From b397b452f7831720d1d9223044a4db963c797fb4 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 22 Jul 2026 09:18:40 +0000 Subject: [PATCH 1/4] Configurations: 'specification/machinelearningservices/MachineLearningServices.Management/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: '96406064213bc7e5ee56208866e698fa679e42e8' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6600500 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 3087 +++++++++- .../README.md | 72 +- .../SAMPLE.md | 5377 ++++++++++++----- .../pom.xml | 16 +- .../MachineLearningManager.java | 1063 ++-- .../fluent/BatchDeploymentsClient.java | 250 +- .../fluent/BatchEndpointsClient.java | 224 +- .../fluent/CapabilityHostsClient.java | 171 + .../fluent/CodeContainersClient.java | 86 +- .../fluent/CodeVersionsClient.java | 104 +- .../fluent/ComponentContainersClient.java | 80 +- .../fluent/ComponentVersionsClient.java | 90 +- .../fluent/ComputesClient.java | 316 +- .../ConnectionRaiBlocklistItemsClient.java | 343 ++ ...tionRaiBlocklistItemsOperationsClient.java | 52 + .../fluent/ConnectionRaiBlocklistsClient.java | 186 + ...nnectionRaiBlocklistsOperationsClient.java | 49 + .../fluent/ConnectionRaiPoliciesClient.java | 186 + ...ConnectionRaiPoliciesOperationsClient.java | 47 + .../fluent/ConnectionsClient.java | 290 + .../fluent/DataContainersClient.java | 80 +- .../fluent/DataVersionsClient.java | 96 +- .../fluent/DatastoresClient.java | 114 +- .../fluent/EndpointDeploymentsClient.java | 260 + .../fluent/EndpointsClient.java | 263 + .../fluent/EnvironmentContainersClient.java | 80 +- .../fluent/EnvironmentVersionsClient.java | 106 +- .../fluent/FeaturesClient.java | 80 +- .../fluent/FeaturesetContainersClient.java | 158 +- .../fluent/FeaturesetVersionsClient.java | 176 +- .../FeaturestoreEntityContainersClient.java | 162 +- .../FeaturestoreEntityVersionsClient.java | 172 +- .../fluent/InferenceEndpointsClient.java | 292 + .../fluent/InferenceGroupsClient.java | 504 ++ .../fluent/InferencePoolsClient.java | 277 + .../machinelearning/fluent/JobsClient.java | 142 +- ...a => MachineLearningManagementClient.java} | 427 +- .../ManagedNetworkProvisionsClient.java | 10 +- ...anagedNetworkSettingsOperationsClient.java | 230 + .../ManagedNetworkSettingsRulesClient.java | 144 +- .../MarketplaceSubscriptionsClient.java | 154 +- .../fluent/ModelContainersClient.java | 82 +- .../fluent/ModelVersionsClient.java | 120 +- .../fluent/OnlineDeploymentsClient.java | 234 +- .../fluent/OnlineEndpointsClient.java | 214 +- .../fluent/OperationsClient.java | 10 +- .../fluent/OutboundRulesClient.java | 229 + .../fluent/OutboundRulesOperationsClient.java | 52 + .../fluent/PTUQuotasClient.java | 95 + .../PrivateEndpointConnectionsClient.java | 114 +- .../fluent/PrivateLinkResourcesClient.java | 49 +- .../machinelearning/fluent/QuotasClient.java | 14 +- .../fluent/RaiPoliciesClient.java | 186 + .../fluent/RaiPoliciesOperationsClient.java | 47 + .../fluent/RegistriesClient.java | 173 +- .../fluent/RegistryCodeContainersClient.java | 116 +- .../fluent/RegistryCodeVersionsClient.java | 132 +- .../RegistryComponentContainersClient.java | 118 +- .../RegistryComponentVersionsClient.java | 124 +- .../fluent/RegistryDataContainersClient.java | 120 +- .../fluent/RegistryDataReferencesClient.java | 2 +- .../fluent/RegistryDataVersionsClient.java | 144 +- .../RegistryEnvironmentContainersClient.java | 136 +- .../RegistryEnvironmentVersionsClient.java | 158 +- .../fluent/RegistryModelContainersClient.java | 132 +- .../fluent/RegistryModelVersionsClient.java | 166 +- .../fluent/SchedulesClient.java | 142 +- .../fluent/ServerlessEndpointsClient.java | 192 +- .../machinelearning/fluent/UsagesClient.java | 6 +- .../fluent/VirtualMachineSizesClient.java | 6 +- .../fluent/WorkspaceConnectionsClient.java | 177 +- .../fluent/WorkspaceFeaturesClient.java | 6 +- .../fluent/WorkspacesClient.java | 336 +- .../fluent/models/AccountApiKeysInner.java | 91 + .../fluent/models/AmlUserFeatureInner.java | 49 +- .../fluent/models/AvailableQuotaInner.java | 75 + .../fluent/models/BatchDeploymentInner.java | 102 +- .../fluent/models/BatchEndpointInner.java | 101 +- .../fluent/models/CapabilityHostInner.java | 155 + .../models/ClusterUpdateProperties.java | 13 +- .../fluent/models/CodeContainerInner.java | 43 +- .../fluent/models/CodeVersionInner.java | 43 +- .../models/ComponentContainerInner.java | 44 +- .../fluent/models/ComponentVersionInner.java | 44 +- .../fluent/models/ComputeResourceInner.java | 111 +- .../fluent/models/ComputeSecretsInner.java | 16 +- .../fluent/models/DataContainerInner.java | 43 +- .../fluent/models/DataVersionBaseInner.java | 44 +- .../fluent/models/DatastoreInner.java | 43 +- .../fluent/models/DatastoreSecretsInner.java | 16 +- .../models/DeltaModelStatusResponseInner.java | 151 + .../fluent/models/DeploymentLogsInner.java | 27 +- .../models/DiagnoseResponseResultInner.java | 30 +- .../fluent/models/EndpointAuthKeysInner.java | 10 +- .../fluent/models/EndpointAuthTokenInner.java | 84 +- ...tResourcePropertiesBasicResourceInner.java | 160 + .../fluent/models/EndpointKeysInner.java | 74 + .../models/EndpointModelPropertiesInner.java | 263 + .../fluent/models/EndpointModelsInner.java | 95 + .../models/EndpointPropertiesBaseInner.java | 138 +- ...tResourcePropertiesBasicResourceInner.java | 157 + .../models/EnvironmentContainerInner.java | 44 +- .../models/EnvironmentVersionInner.java | 44 +- .../models/ExternalFqdnResponseInner.java | 39 +- .../fluent/models/FeatureInner.java | 60 +- .../models/FeaturesetContainerInner.java | 44 +- ...eaturesetVersionBackfillResponseInner.java | 27 +- .../fluent/models/FeaturesetVersionInner.java | 44 +- .../FeaturestoreEntityContainerInner.java | 44 +- .../FeaturestoreEntityVersionInner.java | 44 +- .../GetBlobReferenceSasResponseDtoInner.java | 31 +- .../fluent/models/GroupStatusInner.java | 109 + .../fluent/models/InferenceEndpointInner.java | 269 + .../fluent/models/InferenceGroupInner.java | 269 + .../fluent/models/InferencePoolInner.java | 269 + .../fluent/models/JobBaseInner.java | 43 +- .../models/ListNotebookKeysResultInner.java | 20 +- .../ListStorageAccountKeysResultInner.java | 16 +- .../models/ListWorkspaceKeysResultInner.java | 74 +- .../ManagedNetworkProvisionStatusInner.java | 10 +- ...agedNetworkSettingsBasicResourceInner.java | 156 + .../models/ManagedNetworkSettingsInner.java | 146 +- ...kSettingsPropertiesBasicResourceInner.java | 160 + .../models/MarketplaceSubscriptionInner.java | 44 +- .../fluent/models/ModelContainerInner.java | 43 +- .../fluent/models/ModelVersionInner.java | 43 +- .../NotebookAccessTokenResultInner.java | 104 +- .../models/NotebookResourceInfoInner.java | 78 +- .../fluent/models/OnlineDeploymentInner.java | 102 +- .../fluent/models/OnlineEndpointInner.java | 101 +- .../fluent/models/OperationInner.java | 42 +- .../OutboundRuleBasicResourceInner.java | 46 +- .../models/PendingUploadResponseDtoInner.java | 57 +- .../PrivateEndpointConnectionInner.java | 139 +- .../PrivateEndpointConnectionProperties.java | 61 +- .../models/PrivateLinkResourceInner.java | 245 + .../PrivateLinkResourceListResultInner.java | 101 - .../models/PrivateLinkResourceProperties.java | 30 +- ...klistItemPropertiesBasicResourceInner.java | 157 + ...BlocklistPropertiesBasicResourceInner.java | 157 + ...RaiPolicyPropertiesBasicResourceInner.java | 156 + .../fluent/models/RegistryInner.java | 103 +- ...ryPrivateEndpointConnectionProperties.java | 16 +- .../fluent/models/RegistryProperties.java | 50 +- .../fluent/models/ResourceQuotaInner.java | 21 +- .../fluent/models/ScheduleInner.java | 43 +- .../models/ServerlessEndpointInner.java | 102 +- .../SharedPrivateLinkResourceProperty.java | 85 +- .../fluent/models/SkuResourceInner.java | 78 +- .../UpdateWorkspaceQuotasResultInner.java | 15 +- .../models/UsageAndQuotaDetailsInner.java | 112 + .../fluent/models/UsageInner.java | 15 +- .../VirtualMachineSizeListResultInner.java | 30 +- ...nectionPropertiesV2BasicResourceInner.java | 47 +- .../fluent/models/WorkspaceInner.java | 843 ++- .../models/WorkspacePropertiesInner.java | 1108 ++-- ...kspacePropertiesUpdateParametersInner.java | 518 +- .../WorkspaceUpdateParametersInner.java | 645 ++ .../fluent/models/package-info.java | 4 +- .../machinelearning/fluent/package-info.java | 4 +- .../implementation/AccountApiKeysImpl.java | 36 + .../implementation/AmlUserFeatureImpl.java | 2 +- .../implementation/AvailableQuotaImpl.java | 33 + .../implementation/BatchDeploymentImpl.java | 20 +- .../BatchDeploymentsClientImpl.java | 1389 ++--- .../implementation/BatchDeploymentsImpl.java | 54 +- .../implementation/BatchEndpointImpl.java | 20 +- .../BatchEndpointsClientImpl.java | 1311 ++-- .../implementation/BatchEndpointsImpl.java | 56 +- .../implementation/CapabilityHostImpl.java | 129 + .../CapabilityHostsClientImpl.java | 547 ++ .../implementation/CapabilityHostsImpl.java | 141 + .../implementation/CodeContainerImpl.java | 2 +- .../CodeContainersClientImpl.java | 636 +- .../implementation/CodeContainersImpl.java | 48 +- .../implementation/CodeVersionImpl.java | 2 +- .../CodeVersionsClientImpl.java | 1020 ++-- .../implementation/CodeVersionsImpl.java | 56 +- .../ComponentContainerImpl.java | 2 +- .../ComponentContainersClientImpl.java | 637 +- .../ComponentContainersImpl.java | 48 +- .../implementation/ComponentVersionImpl.java | 2 +- .../ComponentVersionsClientImpl.java | 880 +-- .../implementation/ComponentVersionsImpl.java | 48 +- .../implementation/ComputeResourceImpl.java | 72 +- .../implementation/ComputeSecretsImpl.java | 2 +- .../implementation/ComputesClientImpl.java | 2741 +++++---- .../implementation/ComputesImpl.java | 112 +- ...ConnectionRaiBlocklistItemsClientImpl.java | 1099 ++++ .../ConnectionRaiBlocklistItemsImpl.java | 235 + ...RaiBlocklistItemsOperationsClientImpl.java | 307 + ...ectionRaiBlocklistItemsOperationsImpl.java | 51 + .../ConnectionRaiBlocklistsClientImpl.java | 602 ++ .../ConnectionRaiBlocklistsImpl.java | 165 + ...tionRaiBlocklistsOperationsClientImpl.java | 292 + ...ConnectionRaiBlocklistsOperationsImpl.java | 51 + .../ConnectionRaiPoliciesClientImpl.java | 594 ++ .../ConnectionRaiPoliciesImpl.java | 86 + ...ectionRaiPoliciesOperationsClientImpl.java | 285 + .../ConnectionRaiPoliciesOperationsImpl.java | 51 + .../implementation/ConnectionsClientImpl.java | 1179 ++++ .../implementation/ConnectionsImpl.java | 142 + .../implementation/DataContainerImpl.java | 2 +- .../DataContainersClientImpl.java | 637 +- .../implementation/DataContainersImpl.java | 48 +- .../implementation/DataVersionBaseImpl.java | 4 +- .../DataVersionsClientImpl.java | 921 ++- .../implementation/DataVersionsImpl.java | 48 +- .../implementation/DatastoreImpl.java | 10 +- .../implementation/DatastoreSecretsImpl.java | 2 +- .../implementation/DatastoresClientImpl.java | 911 ++- .../implementation/DatastoresImpl.java | 65 +- .../DeltaModelStatusResponseImpl.java | 57 + .../implementation/DeploymentLogsImpl.java | 2 +- .../DiagnoseResponseResultImpl.java | 2 +- .../implementation/EndpointAuthKeysImpl.java | 2 +- .../implementation/EndpointAuthTokenImpl.java | 10 +- ...ntResourcePropertiesBasicResourceImpl.java | 141 + .../EndpointDeploymentsClientImpl.java | 1132 ++++ .../EndpointDeploymentsImpl.java | 199 + .../implementation/EndpointKeysImpl.java | 39 + .../EndpointModelPropertiesImpl.java | 94 + .../implementation/EndpointModelsImpl.java | 48 + .../EndpointPropertiesBaseImpl.java | 28 +- ...ntResourcePropertiesBasicResourceImpl.java | 154 + .../implementation/EndpointsClientImpl.java | 1141 ++++ .../implementation/EndpointsImpl.java | 173 + .../EnvironmentContainerImpl.java | 2 +- .../EnvironmentContainersClientImpl.java | 639 +- .../EnvironmentContainersImpl.java | 48 +- .../EnvironmentVersionImpl.java | 2 +- .../EnvironmentVersionsClientImpl.java | 908 ++- .../EnvironmentVersionsImpl.java | 50 +- .../ExternalFqdnResponseImpl.java | 8 +- .../implementation/FeatureImpl.java | 2 +- .../implementation/FeaturesClientImpl.java | 507 +- .../implementation/FeaturesImpl.java | 42 +- .../FeaturesetContainerImpl.java | 2 +- .../FeaturesetContainersClientImpl.java | 973 ++- .../FeaturesetContainersImpl.java | 52 +- ...FeaturesetVersionBackfillResponseImpl.java | 2 +- .../implementation/FeaturesetVersionImpl.java | 2 +- .../FeaturesetVersionsClientImpl.java | 1242 ++-- .../FeaturesetVersionsImpl.java | 52 +- .../FeaturestoreEntityContainerImpl.java | 2 +- ...eaturestoreEntityContainersClientImpl.java | 989 ++- .../FeaturestoreEntityContainersImpl.java | 56 +- .../FeaturestoreEntityVersionImpl.java | 2 +- .../FeaturestoreEntityVersionsClientImpl.java | 1078 ++-- .../FeaturestoreEntityVersionsImpl.java | 56 +- .../GetBlobReferenceSasResponseDtoImpl.java | 2 +- .../implementation/GroupStatusImpl.java | 41 + .../implementation/InferenceEndpointImpl.java | 204 + .../InferenceEndpointsClientImpl.java | 1105 ++++ .../InferenceEndpointsImpl.java | 201 + .../implementation/InferenceGroupImpl.java | 232 + .../InferenceGroupsClientImpl.java | 2040 +++++++ .../implementation/InferenceGroupsImpl.java | 259 + .../implementation/InferencePoolImpl.java | 222 + .../InferencePoolsClientImpl.java | 1056 ++++ .../implementation/InferencePoolsImpl.java | 155 + .../implementation/JobBaseImpl.java | 2 +- .../implementation/JobsClientImpl.java | 964 ++- .../implementation/JobsImpl.java | 48 +- .../ListNotebookKeysResultImpl.java | 2 +- .../ListStorageAccountKeysResultImpl.java | 2 +- .../ListWorkspaceKeysResultImpl.java | 18 +- ...chineLearningManagementClientBuilder.java} | 62 +- ... MachineLearningManagementClientImpl.java} | 998 +-- .../ManagedNetworkProvisionStatusImpl.java | 2 +- .../ManagedNetworkProvisionsClientImpl.java | 174 +- .../ManagedNetworkProvisionsImpl.java | 4 +- ...nagedNetworkSettingsBasicResourceImpl.java | 56 + .../ManagedNetworkSettingsImpl.java | 20 +- ...edNetworkSettingsOperationsClientImpl.java | 933 +++ .../ManagedNetworkSettingsOperationsImpl.java | 114 + ...rkSettingsPropertiesBasicResourceImpl.java | 134 + ...ManagedNetworkSettingsRulesClientImpl.java | 847 ++- .../ManagedNetworkSettingsRulesImpl.java | 50 +- .../MarketplaceSubscriptionImpl.java | 2 +- .../MarketplaceSubscriptionsClientImpl.java | 886 ++- .../MarketplaceSubscriptionsImpl.java | 48 +- .../implementation/ModelContainerImpl.java | 2 +- .../ModelContainersClientImpl.java | 659 +- .../implementation/ModelContainersImpl.java | 48 +- .../implementation/ModelVersionImpl.java | 2 +- .../ModelVersionsClientImpl.java | 1041 ++-- .../implementation/ModelVersionsImpl.java | 52 +- .../NotebookAccessTokenResultImpl.java | 30 +- .../NotebookResourceInfoImpl.java | 10 +- .../implementation/OnlineDeploymentImpl.java | 20 +- .../OnlineDeploymentsClientImpl.java | 1680 +++-- .../implementation/OnlineDeploymentsImpl.java | 62 +- .../implementation/OnlineEndpointImpl.java | 20 +- .../OnlineEndpointsClientImpl.java | 1645 ++--- .../implementation/OnlineEndpointsImpl.java | 66 +- .../implementation/OperationImpl.java | 2 +- .../implementation/OperationsClientImpl.java | 179 +- .../implementation/OperationsImpl.java | 2 +- .../OutboundRuleBasicResourceImpl.java | 2 +- .../OutboundRulesClientImpl.java | 845 +++ .../implementation/OutboundRulesImpl.java | 101 + .../OutboundRulesOperationsClientImpl.java | 326 + .../OutboundRulesOperationsImpl.java | 50 + .../implementation/PTUQuotasClientImpl.java | 590 ++ .../implementation/PTUQuotasImpl.java | 74 + .../PendingUploadResponseDtoImpl.java | 2 +- .../PrivateEndpointConnectionImpl.java | 16 +- .../PrivateEndpointConnectionsClientImpl.java | 692 +-- .../PrivateEndpointConnectionsImpl.java | 36 +- .../PrivateLinkResourceImpl.java | 93 + .../PrivateLinkResourceListResultImpl.java | 40 - .../PrivateLinkResourcesClientImpl.java | 309 +- .../PrivateLinkResourcesImpl.java | 33 +- .../implementation/QuotasClientImpl.java | 256 +- .../implementation/QuotasImpl.java | 12 +- ...cklistItemPropertiesBasicResourceImpl.java | 117 + ...iBlocklistPropertiesBasicResourceImpl.java | 111 + .../implementation/RaiPoliciesClientImpl.java | 593 ++ .../implementation/RaiPoliciesImpl.java | 165 + .../RaiPoliciesOperationsClientImpl.java | 285 + .../RaiPoliciesOperationsImpl.java | 51 + .../RaiPolicyPropertiesBasicResourceImpl.java | 110 + .../implementation/RegistriesClientImpl.java | 1234 ++-- .../implementation/RegistriesImpl.java | 60 +- .../RegistryCodeContainersClientImpl.java | 795 +-- .../RegistryCodeContainersImpl.java | 50 +- .../RegistryCodeVersionsClientImpl.java | 1001 ++- .../RegistryCodeVersionsImpl.java | 60 +- ...RegistryComponentContainersClientImpl.java | 804 +-- .../RegistryComponentContainersImpl.java | 50 +- .../RegistryComponentVersionsClientImpl.java | 899 ++- .../RegistryComponentVersionsImpl.java | 54 +- .../RegistryDataContainersClientImpl.java | 812 +-- .../RegistryDataContainersImpl.java | 50 +- .../RegistryDataReferencesClientImpl.java | 123 +- .../RegistryDataReferencesImpl.java | 10 +- .../RegistryDataVersionsClientImpl.java | 1059 ++-- .../RegistryDataVersionsImpl.java | 58 +- ...gistryEnvironmentContainersClientImpl.java | 853 ++- .../RegistryEnvironmentContainersImpl.java | 50 +- ...RegistryEnvironmentVersionsClientImpl.java | 987 ++- .../RegistryEnvironmentVersionsImpl.java | 56 +- .../implementation/RegistryImpl.java | 14 +- .../RegistryModelContainersClientImpl.java | 840 ++- .../RegistryModelContainersImpl.java | 50 +- .../RegistryModelVersionsClientImpl.java | 1138 ++-- .../RegistryModelVersionsImpl.java | 64 +- .../implementation/ResourceManagerUtils.java | 2 +- .../implementation/ResourceQuotaImpl.java | 2 +- .../implementation/ScheduleImpl.java | 2 +- .../implementation/SchedulesClientImpl.java | 867 ++- .../implementation/SchedulesImpl.java | 48 +- .../ServerlessEndpointImpl.java | 28 +- .../ServerlessEndpointsClientImpl.java | 1382 ++--- .../ServerlessEndpointsImpl.java | 56 +- .../implementation/SkuResourceImpl.java | 10 +- .../UpdateWorkspaceQuotasResultImpl.java | 2 +- .../UsageAndQuotaDetailsImpl.java | 48 + .../implementation/UsageImpl.java | 2 +- .../implementation/UsagesClientImpl.java | 168 +- .../implementation/UsagesImpl.java | 2 +- .../VirtualMachineSizeListResultImpl.java | 2 +- .../VirtualMachineSizesClientImpl.java | 83 +- .../VirtualMachineSizesImpl.java | 10 +- ...nnectionPropertiesV2BasicResourceImpl.java | 70 +- .../WorkspaceConnectionsClientImpl.java | 1062 ++-- .../WorkspaceConnectionsImpl.java | 31 +- .../WorkspaceFeaturesClientImpl.java | 174 +- .../implementation/WorkspaceFeaturesImpl.java | 2 +- .../implementation/WorkspaceImpl.java | 470 +- .../WorkspacePropertiesImpl.java | 203 +- ...rkspacePropertiesUpdateParametersImpl.java | 87 +- .../WorkspaceUpdateParametersImpl.java | 149 + .../implementation/WorkspacesClientImpl.java | 2351 +++---- .../implementation/WorkspacesImpl.java | 141 +- .../models/AmlComputeNodesInformation.java | 18 +- .../AvailableQuotaArmPaginatedResult.java | 97 + ...mentTrackedResourceArmPaginatedResult.java | 54 +- ...ointTrackedResourceArmPaginatedResult.java | 54 +- ...deContainerResourceArmPaginatedResult.java | 54 +- ...CodeVersionResourceArmPaginatedResult.java | 54 +- ...ntContainerResourceArmPaginatedResult.java | 54 +- ...nentVersionResourceArmPaginatedResult.java | 54 +- ...taContainerResourceArmPaginatedResult.java | 54 +- ...VersionBaseResourceArmPaginatedResult.java | 54 +- .../DatastoreResourceArmPaginatedResult.java | 54 +- ...ertiesBasicResourceArmPaginatedResult.java | 101 + ...ertiesBasicResourceArmPaginatedResult.java | 100 + ...ntContainerResourceArmPaginatedResult.java | 54 +- ...mentVersionResourceArmPaginatedResult.java | 54 +- .../FeatureResourceArmPaginatedResult.java | 52 +- ...etContainerResourceArmPaginatedResult.java | 54 +- ...esetVersionResourceArmPaginatedResult.java | 54 +- ...tyContainerResourceArmPaginatedResult.java | 55 +- ...tityVersionResourceArmPaginatedResult.java | 54 +- ...ointTrackedResourceArmPaginatedResult.java | 99 + ...roupTrackedResourceArmPaginatedResult.java | 98 + ...PoolTrackedResourceArmPaginatedResult.java | 97 + .../JobBaseResourceArmPaginatedResult.java | 52 +- .../models/ListAmlUserFeatureResult.java | 29 +- .../models/ListUsagesResult.java | 29 +- .../models/ListWorkspaceQuotas.java | 29 +- .../models/ManagedNetworkListResult.java | 96 + ...ubscriptionResourceArmPaginatedResult.java | 54 +- ...elContainerResourceArmPaginatedResult.java | 54 +- ...odelVersionResourceArmPaginatedResult.java | 54 +- ...mentTrackedResourceArmPaginatedResult.java | 54 +- ...ointTrackedResourceArmPaginatedResult.java | 54 +- .../models/OperationListResult.java | 28 +- .../models/OutboundRuleListResult.java | 77 +- .../models/PaginatedComputeResourcesList.java | 52 +- .../PrivateEndpointConnectionListResult.java | 39 +- .../models/PrivateLinkResourceListResult.java | 96 + ...ertiesBasicResourceArmPaginatedResult.java | 100 + ...ertiesBasicResourceArmPaginatedResult.java | 99 + ...ertiesBasicResourceArmPaginatedResult.java | 99 + ...stryTrackedResourceArmPaginatedResult.java | 70 +- .../ScheduleResourceArmPaginatedResult.java | 52 +- ...ointTrackedResourceArmPaginatedResult.java | 54 +- .../models/SkuResourceArmPaginatedResult.java | 54 +- .../models/StringArmPaginatedResult.java | 94 + ...sageAndQuotaDetailsArmPaginatedResult.java | 98 + ...tiesV2BasicResourceArmPaginatedResult.java | 45 +- .../models/WorkspaceListResult.java | 57 +- .../implementation/package-info.java | 4 +- .../machinelearning/models/AKS.java | 167 + ...uteSecrets.java => AKSComputeSecrets.java} | 77 +- ...n.java => AKSNetworkingConfiguration.java} | 70 +- ...operties.java => AKSSchemaProperties.java} | 93 +- ...AuthTypeWorkspaceConnectionProperties.java | 98 +- ...AuthTypeWorkspaceConnectionProperties.java | 102 +- .../models/AccountApiKeys.java | 33 + ...AuthTypeWorkspaceConnectionProperties.java | 108 +- .../AccountKeyDatastoreCredentials.java | 22 +- .../models/AccountKeyDatastoreSecrets.java | 12 +- .../machinelearning/models/AcrDetails.java | 44 +- .../machinelearning/models/ActionType.java | 6 +- .../models/ActualCapacityInfo.java | 152 + .../machinelearning/models/Aks.java | 259 - .../models/AksComputeSecretsProperties.java | 153 - .../machinelearning/models/AksSchema.java | 96 - .../machinelearning/models/AllFeatures.java | 12 +- .../machinelearning/models/AllNodes.java | 12 +- .../models/AllocationState.java | 4 +- .../models/AllowedContentLevel.java | 56 + .../machinelearning/models/AmlCompute.java | 108 +- .../models/AmlComputeNodeInformation.java | 42 +- .../models/AmlComputeProperties.java | 143 +- .../models/AmlComputeSchema.java | 96 - .../machinelearning/models/AmlToken.java | 12 +- .../models/AmlTokenComputeIdentity.java | 12 +- .../models/AmlUserFeature.java | 2 +- .../models/AnonymousAccessCredential.java | 14 +- ...iKeyAuthWorkspaceConnectionProperties.java | 106 +- .../models/ApplicationSharingPolicy.java | 4 +- .../machinelearning/models/ArmResourceId.java | 10 +- .../machinelearning/models/AssetBase.java | 74 +- .../models/AssetContainer.java | 28 +- .../machinelearning/models/AssetJobInput.java | 129 - .../models/AssetJobOutput.java | 121 - .../models/AssetProvisioningState.java | 2 +- .../models/AssetReferenceBase.java | 16 +- .../machinelearning/models/AssignedUser.java | 21 +- .../machinelearning/models/AuthMode.java | 46 + .../models/AutoForecastHorizon.java | 12 +- .../machinelearning/models/AutoMLJob.java | 215 +- .../models/AutoMLVertical.java | 63 +- .../models/AutoNCrossValidations.java | 12 +- .../models/AutoPauseProperties.java | 10 +- .../models/AutoRebuildSetting.java | 2 +- .../models/AutoScaleProperties.java | 10 +- .../models/AutoSeasonality.java | 12 +- .../models/AutoTargetLags.java | 12 +- .../models/AutoTargetRollingWindowSize.java | 12 +- .../machinelearning/models/Autosave.java | 2 +- .../models/AvailableQuota.java | 26 + .../models/AvailableQuotaProperties.java | 74 + .../models/AzureBlobDatastore.java | 161 +- .../models/AzureDataLakeGen1Datastore.java | 147 +- .../models/AzureDataLakeGen2Datastore.java | 200 +- .../models/AzureDatastore.java | 121 - .../models/AzureDevOpsWebhook.java | 12 +- .../models/AzureFileDatastore.java | 213 +- .../models/AzureOpenAiFineTuning.java | 151 + .../models/AzureOpenAiHyperParameters.java | 149 + .../machinelearning/models/BanditPolicy.java | 76 +- .../models/BatchDeployment.java | 50 +- .../models/BatchDeploymentConfiguration.java | 10 +- .../BatchDeploymentConfigurationType.java | 2 +- .../models/BatchDeploymentProperties.java | 218 +- .../models/BatchDeployments.java | 92 +- .../machinelearning/models/BatchEndpoint.java | 48 +- .../models/BatchEndpointDefaults.java | 10 +- .../models/BatchEndpointProperties.java | 55 +- .../models/BatchEndpoints.java | 86 +- .../models/BatchLoggingLevel.java | 2 +- .../models/BatchOutputAction.java | 2 +- ...elineComponentDeploymentConfiguration.java | 15 +- .../models/BatchRetrySettings.java | 10 +- .../models/BayesianSamplingAlgorithm.java | 12 +- .../models/BillingCurrency.java | 4 +- .../machinelearning/models/BindOptions.java | 12 +- .../BlobReferenceForConsumptionDto.java | 75 +- .../models/BlockedTransformers.java | 26 +- .../machinelearning/models/BuildContext.java | 17 +- .../machinelearning/models/Caching.java | 2 +- .../models/CapabilityHost.java | 189 + .../models/CapabilityHostKind.java | 46 + .../models/CapabilityHostProperties.java | 338 ++ .../CapabilityHostProvisioningState.java | 71 + .../models/CapabilityHosts.java | 118 + .../models/CategoricalDataDriftMetric.java | 8 +- .../CategoricalDataDriftMetricThreshold.java | 20 +- .../models/CategoricalDataQualityMetric.java | 8 +- ...CategoricalDataQualityMetricThreshold.java | 20 +- .../CategoricalPredictionDriftMetric.java | 8 +- ...goricalPredictionDriftMetricThreshold.java | 20 +- .../CertificateDatastoreCredentials.java | 149 +- .../models/CertificateDatastoreSecrets.java | 12 +- .../models/Classification.java | 326 +- .../models/ClassificationModels.java | 50 +- ...lassificationMultilabelPrimaryMetrics.java | 18 +- .../models/ClassificationPrimaryMetrics.java | 16 +- .../ClassificationTrainingSettings.java | 64 +- .../models/ClusterPurpose.java | 2 +- .../models/ClusterUpdateParameters.java | 13 +- .../models/CodeConfiguration.java | 18 +- .../machinelearning/models/CodeContainer.java | 2 +- .../models/CodeContainerProperties.java | 52 +- .../models/CodeContainers.java | 58 +- .../machinelearning/models/CodeVersion.java | 2 +- .../models/CodeVersionProperties.java | 42 +- .../machinelearning/models/CodeVersions.java | 56 +- .../models/CognitiveServicesSku.java | 197 + .../machinelearning/models/Collection.java | 72 +- .../models/ColumnTransformer.java | 14 +- .../machinelearning/models/CommandJob.java | 304 +- .../models/CommandJobLimits.java | 12 +- .../models/ComponentContainer.java | 2 +- .../models/ComponentContainerProperties.java | 52 +- .../models/ComponentContainers.java | 42 +- .../models/ComponentVersion.java | 2 +- .../models/ComponentVersionProperties.java | 46 +- .../models/ComponentVersions.java | 50 +- .../machinelearning/models/Compute.java | 12 +- .../models/ComputeInstance.java | 108 +- .../models/ComputeInstanceApplication.java | 38 +- .../ComputeInstanceAuthorizationType.java | 4 +- .../ComputeInstanceAutologgerSettings.java | 88 + .../ComputeInstanceConnectivityEndpoints.java | 12 +- .../models/ComputeInstanceContainer.java | 74 +- .../models/ComputeInstanceCreatedBy.java | 24 +- .../models/ComputeInstanceDataDisk.java | 67 +- .../models/ComputeInstanceDataMount.java | 48 +- .../ComputeInstanceEnvironmentInfo.java | 38 +- .../models/ComputeInstanceLastOperation.java | 60 +- .../models/ComputeInstanceProperties.java | 329 +- .../models/ComputeInstanceSchema.java | 96 - .../models/ComputeInstanceSshSettings.java | 28 +- .../models/ComputeInstanceState.java | 7 +- .../models/ComputeInstanceVersion.java | 27 +- .../models/ComputePowerAction.java | 4 +- .../models/ComputeRecurrenceFrequency.java | 12 +- .../models/ComputeRecurrenceSchedule.java | 23 +- .../models/ComputeResource.java | 152 +- .../models/ComputeResourceSchema.java | 96 - .../models/ComputeRuntimeDto.java | 12 +- .../models/ComputeSchedules.java | 13 +- .../models/ComputeSecrets.java | 2 +- .../models/ComputeStartStopSchedule.java | 19 +- .../models/ComputeTriggerType.java | 4 +- .../machinelearning/models/ComputeType.java | 2 +- .../models/ComputeWeekDay.java | 16 +- .../machinelearning/models/Computes.java | 230 +- .../models/ConnectionAuthType.java | 37 +- .../models/ConnectionCategory.java | 96 +- .../models/ConnectionGroup.java | 2 +- .../models/ConnectionRaiBlocklistItems.java | 197 + ...ConnectionRaiBlocklistItemsOperations.java | 46 + .../models/ConnectionRaiBlocklists.java | 124 + .../ConnectionRaiBlocklistsOperations.java | 44 + .../models/ConnectionRaiPolicies.java | 106 + .../ConnectionRaiPoliciesOperations.java | 42 + .../machinelearning/models/Connections.java | 201 + .../models/ContainerResourceRequirements.java | 66 +- .../models/ContainerResourceSettings.java | 56 +- .../machinelearning/models/ContainerType.java | 2 +- .../machinelearning/models/ContentSafety.java | 47 +- ...yEndpointDeploymentResourceProperties.java | 208 + ...ntentSafetyEndpointResourceProperties.java | 170 + .../models/ContentSafetyLevel.java | 51 + .../models/ContentSafetyStatus.java | 2 +- .../models/CosmosDbSettings.java | 16 +- .../models/CreateMonitorAction.java | 22 +- .../models/CredentialsType.java | 2 +- .../machinelearning/models/Cron.java | 10 +- .../machinelearning/models/CronTrigger.java | 19 +- .../models/CustomForecastHorizon.java | 12 +- .../machinelearning/models/CustomKeys.java | 16 +- ...stomKeysWorkspaceConnectionProperties.java | 100 +- .../models/CustomMetricThreshold.java | 60 +- .../models/CustomModelFineTuning.java | 154 + .../models/CustomModelJobInput.java | 59 +- .../models/CustomModelJobOutput.java | 70 +- .../models/CustomMonitoringSignal.java | 91 +- .../models/CustomNCrossValidations.java | 12 +- .../models/CustomSeasonality.java | 12 +- .../machinelearning/models/CustomService.java | 57 +- .../models/CustomTargetLags.java | 19 +- .../models/CustomTargetRollingWindowSize.java | 12 +- .../models/DataAvailabilityStatus.java | 2 +- .../models/DataCollectionMode.java | 2 +- .../machinelearning/models/DataCollector.java | 106 +- .../machinelearning/models/DataContainer.java | 2 +- .../models/DataContainerProperties.java | 60 +- .../models/DataContainers.java | 42 +- .../models/DataDriftMetricThresholdBase.java | 13 +- .../models/DataDriftMonitoringSignal.java | 128 +- .../machinelearning/models/DataFactory.java | 105 +- .../models/DataGenerationTaskType.java | 66 + .../models/DataGenerationType.java | 51 + .../models/DataGenerationVertical.java | 216 + .../models/DataLakeAnalytics.java | 109 +- .../models/DataLakeAnalyticsSchema.java | 96 - .../DataLakeAnalyticsSchemaProperties.java | 10 +- .../models/DataPathAssetReference.java | 56 +- .../DataQualityMetricThresholdBase.java | 13 +- .../models/DataQualityMonitoringSignal.java | 128 +- .../models/DataReferenceCredential.java | 12 +- .../models/DataReferenceCredentialType.java | 2 +- .../machinelearning/models/DataType.java | 2 +- .../models/DataVersionBase.java | 4 +- .../models/DataVersionBaseProperties.java | 50 +- .../machinelearning/models/DataVersions.java | 56 +- .../machinelearning/models/Databricks.java | 114 +- .../models/DatabricksComputeSecrets.java | 29 +- .../DatabricksComputeSecretsProperties.java | 94 - .../models/DatabricksProperties.java | 10 +- .../models/DatabricksSchema.java | 96 - .../models/DatasetReference.java | 113 + .../machinelearning/models/Datastore.java | 7 +- .../models/DatastoreCredentials.java | 10 +- .../models/DatastoreProperties.java | 82 +- .../models/DatastoreSecrets.java | 2 +- .../machinelearning/models/DatastoreType.java | 2 +- .../machinelearning/models/Datastores.java | 69 +- .../models/DefaultActionType.java | 51 + .../DefaultResourceProvisioningState.java | 91 + .../models/DefaultScaleSettings.java | 12 +- .../models/DeltaModelCurrentState.java | 108 + .../models/DeltaModelListRequest.java | 143 + .../models/DeltaModelModifyRequest.java | 146 + .../models/DeltaModelStatusRequest.java | 115 + .../models/DeltaModelStatusResponse.java | 56 + .../models/DeploymentLogs.java | 2 +- .../models/DeploymentLogsRequest.java | 10 +- .../DeploymentModelVersionUpgradeOption.java | 59 + .../models/DeploymentProvisioningState.java | 2 +- .../DeploymentResourceConfiguration.java | 12 +- .../models/DestinationAsset.java | 58 +- .../models/DiagnoseRequestProperties.java | 264 +- .../models/DiagnoseResponseResult.java | 2 +- .../models/DiagnoseResponseResultValue.java | 142 +- .../models/DiagnoseResult.java | 12 +- .../models/DiagnoseResultLevel.java | 2 +- .../models/DiagnoseWorkspaceParameters.java | 19 +- .../models/DistillationJob.java | 366 ++ .../models/DistributionConfiguration.java | 12 +- .../models/DistributionType.java | 7 +- .../machinelearning/models/Docker.java | 18 +- .../models/DockerCredential.java | 62 +- .../models/EarlyTerminationPolicy.java | 54 +- .../models/EarlyTerminationPolicyType.java | 2 +- .../models/EgressPublicNetworkAccessType.java | 2 +- .../models/EmailNotificationEnableType.java | 2 +- .../models/EncryptionKeyVaultProperties.java | 165 - .../EncryptionKeyVaultUpdateProperties.java | 18 +- .../models/EncryptionProperty.java | 156 +- .../models/EncryptionStatus.java | 2 +- .../models/EncryptionUpdateProperties.java | 20 +- .../machinelearning/models/Endpoint.java | 22 +- .../models/EndpointAuthKeys.java | 2 +- .../models/EndpointAuthMode.java | 2 +- .../models/EndpointAuthToken.java | 16 +- .../models/EndpointComputeType.java | 2 +- .../models/EndpointDeploymentModel.java | 169 + .../EndpointDeploymentPropertiesBase.java | 109 +- .../EndpointDeploymentResourceProperties.java | 162 + ...oymentResourcePropertiesBasicResource.java | 194 + .../models/EndpointDeployments.java | 191 + .../machinelearning/models/EndpointKeys.java | 26 + .../EndpointModelDeprecationProperties.java | 99 + .../models/EndpointModelProperties.java | 101 + .../EndpointModelSkuCapacityProperties.java | 93 + .../models/EndpointModelSkuProperties.java | 170 + .../EndpointModelSkuRateLimitProperties.java | 114 + ...odelSkuRateLimitRulePatternProperties.java | 93 + ...dpointModelSkuRateLimitRuleProperties.java | 168 + .../models/EndpointModels.java | 34 + .../models/EndpointPropertiesBase.java | 35 +- .../models/EndpointProvisioningState.java | 2 +- .../models/EndpointResourceProperties.java | 351 ++ ...dpointResourcePropertiesBasicResource.java | 234 + .../models/EndpointScheduleAction.java | 27 +- .../EndpointServiceConnectionStatus.java | 61 - .../machinelearning/models/EndpointType.java | 71 + .../machinelearning/models/Endpoints.java | 213 + .../models/EnvironmentContainer.java | 2 +- .../EnvironmentContainerProperties.java | 52 +- .../models/EnvironmentContainers.java | 42 +- .../models/EnvironmentType.java | 2 +- .../models/EnvironmentVariable.java | 28 +- .../models/EnvironmentVariableType.java | 4 +- .../models/EnvironmentVersion.java | 4 +- .../models/EnvironmentVersionProperties.java | 218 +- .../models/EnvironmentVersions.java | 54 +- .../models/EstimatedVMPrice.java | 74 +- .../models/EstimatedVMPrices.java | 82 +- .../models/ExternalFqdnResponse.java | 4 +- .../machinelearning/models/Feature.java | 2 +- ...atureAttributionDriftMonitoringSignal.java | 123 +- .../models/FeatureAttributionMetric.java | 4 +- .../FeatureAttributionMetricThreshold.java | 61 +- .../models/FeatureDataType.java | 2 +- .../models/FeatureImportanceMode.java | 6 +- .../models/FeatureImportanceSettings.java | 10 +- .../machinelearning/models/FeatureLags.java | 6 +- .../models/FeatureProperties.java | 97 +- .../models/FeatureStoreSettings.java | 21 +- .../machinelearning/models/FeatureSubset.java | 19 +- .../machinelearning/models/FeatureWindow.java | 64 +- .../machinelearning/models/Features.java | 74 +- .../models/FeaturesetContainer.java | 4 +- .../models/FeaturesetContainerProperties.java | 52 +- .../models/FeaturesetContainers.java | 68 +- .../models/FeaturesetSpecification.java | 10 +- .../models/FeaturesetVersion.java | 4 +- .../FeaturesetVersionBackfillRequest.java | 152 +- .../FeaturesetVersionBackfillResponse.java | 2 +- .../models/FeaturesetVersionProperties.java | 142 +- .../models/FeaturesetVersions.java | 80 +- .../models/FeaturestoreEntityContainer.java | 4 +- ...FeaturestoreEntityContainerProperties.java | 52 +- .../models/FeaturestoreEntityContainers.java | 72 +- .../models/FeaturestoreEntityVersion.java | 4 +- .../FeaturestoreEntityVersionProperties.java | 77 +- .../models/FeaturestoreEntityVersions.java | 76 +- .../models/FeaturizationMode.java | 8 +- .../models/FeaturizationSettings.java | 10 +- .../machinelearning/models/FineTuningJob.java | 338 ++ .../models/FineTuningTaskType.java | 96 + .../models/FineTuningVertical.java | 214 + .../models/FinetuningDetails.java | 117 + .../machinelearning/models/FirewallSku.java | 51 + .../models/FixedInputData.java | 34 +- .../machinelearning/models/FlavorData.java | 10 +- .../models/ForecastHorizon.java | 10 +- .../models/ForecastHorizonMode.java | 6 +- .../machinelearning/models/Forecasting.java | 325 +- .../models/ForecastingModels.java | 67 +- .../models/ForecastingPrimaryMetrics.java | 12 +- .../models/ForecastingSettings.java | 356 +- .../models/ForecastingTrainingSettings.java | 64 +- .../machinelearning/models/FqdnEndpoint.java | 41 +- .../models/FqdnEndpointDetail.java | 27 +- .../machinelearning/models/FqdnEndpoints.java | 55 +- .../models/FqdnEndpointsProperties.java | 126 - .../models/FqdnEndpointsPropertyBag.java | 74 + .../models/FqdnOutboundRule.java | 18 +- .../GetBlobReferenceForConsumptionDto.java | 74 +- .../models/GetBlobReferenceSasRequestDto.java | 10 +- .../GetBlobReferenceSasResponseDto.java | 2 +- .../machinelearning/models/Goal.java | 2 +- .../models/GridSamplingAlgorithm.java | 12 +- .../models/GroupEnvironmentConfiguration.java | 208 + .../models/GroupModelConfiguration.java | 85 + .../machinelearning/models/GroupStatus.java | 40 + .../machinelearning/models/HDInsight.java | 114 +- .../models/HDInsightProperties.java | 13 +- .../models/HDInsightSchema.java | 96 - .../machinelearning/models/IPRule.java | 89 + .../models/IdAssetReference.java | 19 +- .../models/IdentityConfiguration.java | 10 +- .../models/IdentityConfigurationType.java | 2 +- .../models/IdentityForCmk.java | 20 +- .../models/IdleShutdownSetting.java | 85 + .../machinelearning/models/Image.java | 69 +- .../models/ImageClassification.java | 94 +- .../models/ImageClassificationBase.java | 184 - .../models/ImageClassificationMultilabel.java | 94 +- .../machinelearning/models/ImageDetails.java | 141 + .../machinelearning/models/ImageInfo.java | 169 + .../models/ImageInstanceSegmentation.java | 94 +- .../models/ImageLimitSettings.java | 68 +- .../machinelearning/models/ImageMetadata.java | 57 +- .../ImageModelDistributionSettings.java | 60 +- ...delDistributionSettingsClassification.java | 28 +- ...elDistributionSettingsObjectDetection.java | 28 +- .../models/ImageModelSettings.java | 229 +- .../ImageModelSettingsClassification.java | 87 +- .../ImageModelSettingsObjectDetection.java | 144 +- .../models/ImageObjectDetection.java | 94 +- .../models/ImageObjectDetectionBase.java | 184 - .../models/ImageSweepSettings.java | 57 +- .../machinelearning/models/ImageType.java | 7 +- .../machinelearning/models/ImageVertical.java | 203 - .../machinelearning/models/IndexColumn.java | 56 +- .../models/InferenceContainerProperties.java | 37 +- .../models/InferenceEndpoint.java | 375 ++ .../models/InferenceEndpointProperties.java | 204 + .../models/InferenceEndpoints.java | 192 + .../models/InferenceGroup.java | 353 ++ .../models/InferenceGroupProperties.java | 218 + .../models/InferenceGroups.java | 318 + .../machinelearning/models/InferencePool.java | 345 ++ .../models/InferencePoolProperties.java | 131 + .../models/InferencePools.java | 152 + .../models/InputDeliveryMode.java | 2 +- .../InstanceSegmentationPrimaryMetrics.java | 5 +- .../models/InstanceTypeSchema.java | 13 +- .../models/InstanceTypeSchemaResources.java | 10 +- .../machinelearning/models/IsolationMode.java | 2 +- .../machinelearning/models/JobBase.java | 4 +- .../models/JobBaseProperties.java | 280 +- .../machinelearning/models/JobInput.java | 10 +- .../machinelearning/models/JobInputType.java | 2 +- .../machinelearning/models/JobLimits.java | 16 +- .../machinelearning/models/JobLimitsType.java | 2 +- .../machinelearning/models/JobOutput.java | 10 +- .../machinelearning/models/JobOutputType.java | 2 +- .../models/JobResourceConfiguration.java | 110 +- .../machinelearning/models/JobResources.java | 88 + .../models/JobScheduleAction.java | 22 +- .../machinelearning/models/JobService.java | 159 +- .../machinelearning/models/JobStatus.java | 35 +- .../machinelearning/models/JobTier.java | 2 +- .../machinelearning/models/JobType.java | 12 +- .../machinelearning/models/Jobs.java | 64 +- .../models/JupyterKernelConfig.java | 143 + .../machinelearning/models/KeyType.java | 2 +- .../models/KeyVaultProperties.java | 145 + .../machinelearning/models/Kubernetes.java | 108 +- .../models/KubernetesOnlineDeployment.java | 148 +- .../models/KubernetesProperties.java | 17 +- .../models/KubernetesSchema.java | 96 - .../models/LabelGeneration.java | 182 + .../models/LakeHouseArtifact.java | 12 +- .../models/LearningRateScheduler.java | 8 +- .../models/ListNotebookKeysResult.java | 6 +- .../models/ListStorageAccountKeysResult.java | 4 +- .../machinelearning/models/ListViewType.java | 2 +- .../models/ListWorkspaceKeysResult.java | 32 +- .../models/LiteralJobInput.java | 19 +- .../models/LoadBalancerType.java | 2 +- .../machinelearning/models/LogVerbosity.java | 14 +- .../models/MLFlowModelJobInput.java | 59 +- .../models/MLFlowModelJobOutput.java | 70 +- .../machinelearning/models/MLTableData.java | 42 +- .../models/MLTableJobInput.java | 59 +- .../models/MLTableJobOutput.java | 70 +- .../models/ManagedComputeIdentity.java | 15 +- .../models/ManagedIdentity.java | 36 +- ...AuthTypeWorkspaceConnectionProperties.java | 102 +- .../models/ManagedIdentityCredential.java | 101 +- .../models/ManagedNetworkKind.java | 52 + .../ManagedNetworkProvisionOptions.java | 10 +- .../models/ManagedNetworkProvisionStatus.java | 2 +- .../ManagedNetworkProvisioningState.java | 71 + .../models/ManagedNetworkProvisions.java | 6 +- .../models/ManagedNetworkSettings.java | 32 +- .../ManagedNetworkSettingsBasicResource.java | 56 + .../models/ManagedNetworkSettingsEx.java | 190 + .../ManagedNetworkSettingsOperations.java | 122 + .../ManagedNetworkSettingsProperties.java | 106 + ...etworkSettingsPropertiesBasicResource.java | 195 + .../models/ManagedNetworkSettingsRules.java | 50 +- .../models/ManagedNetworkStatus.java | 2 +- .../models/ManagedOnlineDeployment.java | 145 +- ...eEndpointDeploymentResourceProperties.java | 149 + ...nagedOnlineEndpointResourceProperties.java | 342 ++ .../models/ManagedPERequirement.java | 56 + .../models/ManagedPEStatus.java | 56 + ...anagedResourceGroupAssignedIdentities.java | 87 + .../models/ManagedResourceGroupSettings.java | 90 + .../models/ManagedServiceIdentity.java | 66 +- .../models/ManagedServiceIdentityType.java | 10 +- .../models/MarketplacePlan.java | 34 +- .../models/MarketplaceSubscription.java | 4 +- .../MarketplaceSubscriptionProperties.java | 67 +- ...ketplaceSubscriptionProvisioningState.java | 12 +- .../models/MarketplaceSubscriptionStatus.java | 12 +- .../models/MarketplaceSubscriptions.java | 56 +- .../MaterializationComputeResource.java | 10 +- .../models/MaterializationSettings.java | 127 +- .../models/MaterializationStoreType.java | 2 +- .../models/MedianStoppingPolicy.java | 28 +- .../models/MlflowAutologger.java | 51 + .../models/ModelContainer.java | 2 +- .../models/ModelContainerProperties.java | 52 +- .../models/ModelContainers.java | 44 +- .../models/ModelLifecycleStatus.java | 51 + .../machinelearning/models/ModelProvider.java | 51 + .../machinelearning/models/ModelSettings.java | 10 +- .../machinelearning/models/ModelSize.java | 12 +- .../machinelearning/models/ModelTaskType.java | 2 +- .../machinelearning/models/ModelVersion.java | 2 +- .../models/ModelVersionProperties.java | 125 +- .../machinelearning/models/ModelVersions.java | 72 +- .../MonitorComputeConfigurationBase.java | 10 +- .../models/MonitorComputeIdentityBase.java | 10 +- .../models/MonitorComputeIdentityType.java | 6 +- .../models/MonitorComputeType.java | 4 +- .../models/MonitorDefinition.java | 128 +- .../MonitorEmailNotificationSettings.java | 10 +- .../models/MonitorNotificationSettings.java | 13 +- .../models/MonitorServerlessSparkCompute.java | 32 +- .../models/MonitoringFeatureDataType.java | 6 +- .../models/MonitoringFeatureFilterBase.java | 10 +- .../models/MonitoringFeatureFilterType.java | 8 +- .../models/MonitoringInputDataBase.java | 78 +- .../models/MonitoringInputDataType.java | 8 +- .../models/MonitoringNotificationType.java | 4 +- .../models/MonitoringSignalBase.java | 10 +- .../models/MonitoringSignalType.java | 13 +- .../models/MonitoringTarget.java | 63 +- .../models/MonitoringThreshold.java | 10 +- .../machinelearning/models/MountAction.java | 2 +- .../machinelearning/models/MountMode.java | 51 + .../machinelearning/models/MountState.java | 2 +- .../machinelearning/models/Mpi.java | 12 +- .../models/NCrossValidations.java | 10 +- .../models/NCrossValidationsMode.java | 6 +- .../machinelearning/models/Network.java | 2 +- .../machinelearning/models/NetworkAcls.java | 118 + .../machinelearning/models/NlpVertical.java | 159 - .../NlpVerticalFeaturizationSettings.java | 12 +- .../models/NlpVerticalLimitSettings.java | 64 +- .../machinelearning/models/NodeState.java | 2 +- .../models/NodeStateCounts.java | 48 +- .../machinelearning/models/Nodes.java | 10 +- .../models/NodesValueType.java | 2 +- ...AuthTypeWorkspaceConnectionProperties.java | 98 +- .../models/NoneDatastoreCredentials.java | 12 +- .../models/NotebookAccessTokenResult.java | 46 +- .../models/NotebookPreparationError.java | 38 +- .../models/NotebookResourceInfo.java | 15 +- .../models/NotificationSetting.java | 71 +- .../models/NumericalDataDriftMetric.java | 10 +- .../NumericalDataDriftMetricThreshold.java | 20 +- .../models/NumericalDataQualityMetric.java | 8 +- .../NumericalDataQualityMetricThreshold.java | 20 +- .../NumericalPredictionDriftMetric.java | 10 +- ...mericalPredictionDriftMetricThreshold.java | 20 +- ...AuthTypeWorkspaceConnectionProperties.java | 111 +- .../models/ObjectDetectionPrimaryMetrics.java | 5 +- .../machinelearning/models/Objective.java | 65 +- .../models/OneLakeArtifact.java | 17 +- .../models/OneLakeArtifactType.java | 2 +- .../models/OneLakeDatastore.java | 103 +- .../models/OnlineDeployment.java | 50 +- .../models/OnlineDeploymentProperties.java | 349 +- .../models/OnlineDeployments.java | 88 +- .../models/OnlineEndpoint.java | 48 +- .../models/OnlineEndpointProperties.java | 158 +- .../models/OnlineEndpoints.java | 82 +- .../models/OnlineRequestSettings.java | 92 +- .../models/OnlineScaleSettings.java | 10 +- ...IEndpointDeploymentResourceProperties.java | 207 + .../OpenAIEndpointResourceProperties.java | 169 + .../models/OperatingSystemType.java | 2 +- .../machinelearning/models/Operation.java | 8 +- .../models/OperationDisplay.java | 14 +- .../machinelearning/models/OperationName.java | 7 +- .../models/OperationStatus.java | 7 +- .../models/OperationTrigger.java | 2 +- .../machinelearning/models/Operations.java | 10 +- .../machinelearning/models/OrderString.java | 2 +- .../machinelearning/models/Origin.java | 8 +- .../models/OsPatchingStatus.java | 148 + .../machinelearning/models/OsType.java | 2 +- .../machinelearning/models/OutboundRule.java | 64 +- .../models/OutboundRuleBasicResource.java | 4 +- .../machinelearning/models/OutboundRules.java | 143 + .../models/OutboundRulesOperations.java | 47 + .../models/OutputDeliveryMode.java | 2 +- .../models/OutputPathAssetReference.java | 56 +- ...uthTypeWorkspaceConnectionProperties.java} | 147 +- .../models/PTUDeploymentUsage.java | 142 + .../machinelearning/models/PTUQuotas.java | 85 + .../models/PackageDetails.java | 169 + .../models/PartialBatchDeployment.java | 10 +- ...lMinimalTrackedResourceWithProperties.java | 13 +- .../models/PartialManagedServiceIdentity.java | 10 +- .../models/PartialMinimalTrackedResource.java | 10 +- ...ialMinimalTrackedResourceWithIdentity.java | 15 +- .../PartialMinimalTrackedResourceWithSku.java | 15 +- ...imalTrackedResourceWithSkuAndIdentity.java | 64 +- ...PartialRegistryPartialTrackedResource.java | 16 +- .../machinelearning/models/PartialSku.java | 152 +- .../machinelearning/models/Password.java | 12 +- .../machinelearning/models/PatchStatus.java | 66 + .../models/PendingUploadCredentialDto.java | 12 +- .../models/PendingUploadCredentialType.java | 2 +- .../models/PendingUploadRequestDto.java | 16 +- .../models/PendingUploadResponseDto.java | 4 +- .../models/PendingUploadType.java | 2 +- .../PersonalComputeInstanceSettings.java | 23 +- .../machinelearning/models/PipelineJob.java | 193 +- .../models/PoolProvisioningState.java | 71 + .../PredictionDriftMetricThresholdBase.java | 13 +- .../PredictionDriftMonitoringSignal.java | 88 +- .../models/PrivateEndpoint.java | 18 +- .../models/PrivateEndpointConnection.java | 90 +- ...teEndpointConnectionProvisioningState.java | 2 +- .../models/PrivateEndpointConnections.java | 78 +- .../models/PrivateEndpointDestination.java | 10 +- .../models/PrivateEndpointOutboundRule.java | 50 +- .../models/PrivateEndpointResource.java | 16 +- ...rivateEndpointServiceConnectionStatus.java | 12 +- .../models/PrivateLinkResource.java | 289 +- .../models/PrivateLinkResourceListResult.java | 27 - .../models/PrivateLinkResources.java | 43 +- .../PrivateLinkServiceConnectionState.java | 91 +- .../machinelearning/models/ProbeSettings.java | 104 +- .../models/PromptSettings.java | 141 + .../models/PropertiesBase.java | 116 + .../machinelearning/models/Protocol.java | 4 +- .../models/ProvisioningState.java | 5 +- .../models/ProvisioningStatus.java | 2 +- .../models/PublicNetworkAccess.java | 4 +- .../models/PublicNetworkAccessType.java | 51 - .../machinelearning/models/PyTorch.java | 12 +- .../machinelearning/models/QueueSettings.java | 16 +- .../models/QuotaBaseProperties.java | 20 +- .../machinelearning/models/QuotaUnit.java | 2 +- .../models/QuotaUpdateParameters.java | 13 +- .../machinelearning/models/Quotas.java | 14 +- .../models/RaiBlocklistConfig.java | 113 + .../models/RaiBlocklistItemBulkRequest.java | 113 + .../models/RaiBlocklistItemProperties.java | 113 + ...iBlocklistItemPropertiesBasicResource.java | 141 + .../models/RaiBlocklistProperties.java | 85 + .../RaiBlocklistPropertiesBasicResource.java | 140 + .../machinelearning/models/RaiPolicies.java | 124 + .../models/RaiPoliciesOperations.java | 42 + .../models/RaiPolicyContentFilter.java | 199 + .../models/RaiPolicyContentSource.java | 51 + .../machinelearning/models/RaiPolicyMode.java | 56 + .../models/RaiPolicyProperties.java | 235 + .../RaiPolicyPropertiesBasicResource.java | 139 + .../machinelearning/models/RaiPolicyType.java | 51 + .../models/RandomSamplingAlgorithm.java | 56 +- .../models/RandomSamplingAlgorithmRule.java | 2 +- .../machinelearning/models/Ray.java | 244 + .../machinelearning/models/Recurrence.java | 13 +- .../models/RecurrenceFrequency.java | 12 +- .../models/RecurrenceSchedule.java | 65 +- .../models/RecurrenceTrigger.java | 22 +- .../machinelearning/models/ReferenceType.java | 2 +- .../models/RegenerateEndpointKeysRequest.java | 18 +- .../RegenerateServiceAccountKeyContent.java | 87 + .../machinelearning/models/Registries.java | 68 +- .../machinelearning/models/Registry.java | 31 +- .../models/RegistryCodeContainers.java | 66 +- .../models/RegistryCodeVersions.java | 80 +- .../models/RegistryComponentContainers.java | 66 +- .../models/RegistryComponentVersions.java | 72 +- .../models/RegistryDataContainers.java | 68 +- .../models/RegistryDataReferences.java | 2 +- .../models/RegistryDataVersions.java | 92 +- .../models/RegistryEnvironmentContainers.java | 74 +- .../models/RegistryEnvironmentVersions.java | 86 +- .../models/RegistryListCredentialsResult.java | 54 +- .../models/RegistryModelContainers.java | 74 +- .../models/RegistryModelVersions.java | 98 +- ...RegistryPartialManagedServiceIdentity.java | 51 +- .../RegistryPrivateEndpointConnection.java | 13 +- ...stryPrivateLinkServiceConnectionState.java | 18 +- .../models/RegistryRegionArmDetails.java | 16 +- .../machinelearning/models/Regression.java | 266 +- .../models/RegressionModels.java | 35 +- .../models/RegressionPrimaryMetrics.java | 12 +- .../models/RegressionTrainingSettings.java | 64 +- .../models/RemoteLoginPortPublicAccess.java | 4 +- .../models/RequestConfiguration.java | 125 + .../models/RequestLogging.java | 10 +- .../machinelearning/models/ResizeSchema.java | 85 + .../machinelearning/models/ResourceBase.java | 56 +- .../models/ResourceConfiguration.java | 10 +- .../machinelearning/models/ResourceId.java | 17 +- .../machinelearning/models/ResourceName.java | 12 +- .../machinelearning/models/ResourceQuota.java | 6 +- .../models/RollingInputData.java | 87 +- .../models/RollingRateType.java | 2 +- .../machinelearning/models/Route.java | 16 +- .../machinelearning/models/RuleAction.java | 2 +- .../machinelearning/models/RuleCategory.java | 2 +- .../machinelearning/models/RuleStatus.java | 17 +- .../machinelearning/models/RuleType.java | 2 +- .../models/SamplingAlgorithm.java | 10 +- .../models/SamplingAlgorithmType.java | 2 +- ...AuthTypeWorkspaceConnectionProperties.java | 101 +- .../machinelearning/models/SasCredential.java | 29 +- .../models/SasCredentialDto.java | 29 +- .../models/SasDatastoreCredentials.java | 22 +- .../models/SasDatastoreSecrets.java | 12 +- .../machinelearning/models/ScaleSettings.java | 10 +- .../models/ScaleSettingsInformation.java | 19 +- .../machinelearning/models/ScaleType.java | 2 +- .../models/ScaleUnitConfiguration.java | 117 + .../machinelearning/models/Schedule.java | 4 +- .../models/ScheduleActionBase.java | 10 +- .../models/ScheduleActionType.java | 2 +- .../machinelearning/models/ScheduleBase.java | 10 +- .../models/ScheduleListViewType.java | 2 +- .../models/ScheduleProperties.java | 123 +- .../models/ScheduleProvisioningState.java | 2 +- .../models/ScheduleProvisioningStatus.java | 2 +- .../models/ScheduleStatus.java | 2 +- .../machinelearning/models/Schedules.java | 52 +- .../models/ScriptReference.java | 16 +- .../models/ScriptsToExecute.java | 16 +- .../machinelearning/models/Seasonality.java | 10 +- .../models/SeasonalityMode.java | 6 +- .../machinelearning/models/SecretExpiry.java | 113 + .../machinelearning/models/SecretsType.java | 2 +- .../models/ServerlessComputeSettings.java | 10 +- .../models/ServerlessEndpoint.java | 72 +- ...ServerlessEndpointCapacityReservation.java | 117 + .../ServerlessEndpointContentSafety.java | 89 + .../ServerlessEndpointInferenceEndpoint.java | 94 + .../ServerlessEndpointModelSettings.java | 87 + .../models/ServerlessEndpointProperties.java | 147 +- .../ServerlessEndpointResourceProperties.java | 432 ++ .../models/ServerlessEndpointState.java | 2 +- .../models/ServerlessEndpoints.java | 60 +- .../models/ServerlessInferenceEndpoint.java | 55 +- .../ServerlessInferenceEndpointAuthMode.java | 12 +- .../models/ServerlessOffer.java | 114 + .../models/ServiceAccountKeyName.java | 51 + .../models/ServiceDataAccessAuthIdentity.java | 8 +- .../ServiceManagedResourcesSettings.java | 19 +- ...AuthTypeWorkspaceConnectionProperties.java | 102 +- .../ServicePrincipalDatastoreCredentials.java | 124 +- .../ServicePrincipalDatastoreSecrets.java | 12 +- .../models/ServiceTagDestination.java | 23 +- .../models/ServiceTagOutboundRule.java | 21 +- .../machinelearning/models/SetupScripts.java | 13 +- .../models/SharedPrivateLinkResource.java | 69 +- .../ShortSeriesHandlingConfiguration.java | 10 +- .../machinelearning/models/Sku.java | 16 +- .../machinelearning/models/SkuCapacity.java | 100 +- .../machinelearning/models/SkuResource.java | 16 +- .../machinelearning/models/SkuScaleType.java | 8 +- .../machinelearning/models/SkuSetting.java | 46 +- .../machinelearning/models/SkuTier.java | 10 +- .../machinelearning/models/SourceType.java | 2 +- .../machinelearning/models/SparkJob.java | 374 +- .../machinelearning/models/SparkJobEntry.java | 10 +- .../models/SparkJobEntryType.java | 2 +- .../models/SparkJobPythonEntry.java | 19 +- .../models/SparkJobScalaEntry.java | 19 +- .../models/SparkResourceConfiguration.java | 10 +- ...hEndpointDeploymentResourceProperties.java | 207 + .../SpeechEndpointResourceProperties.java | 169 + .../models/SshPublicAccess.java | 4 +- .../models/SslConfigStatus.java | 2 +- .../models/SslConfiguration.java | 10 +- .../models/StackEnsembleSettings.java | 82 +- .../models/StackMetaLearnerType.java | 10 +- .../models/StaticInputData.java | 95 +- .../machinelearning/models/Status.java | 4 +- .../models/StochasticOptimizer.java | 10 +- .../models/StorageAccountDetails.java | 45 +- .../models/StorageAccountType.java | 2 +- .../models/StringStringKeyValuePair.java | 113 + .../machinelearning/models/SweepJob.java | 333 +- .../models/SweepJobLimits.java | 58 +- .../machinelearning/models/SynapseSpark.java | 108 +- .../models/SynapseSparkProperties.java | 16 +- .../models/SystemCreatedAcrAccount.java | 13 +- .../models/SystemCreatedStorageAccount.java | 20 +- .../models/SystemDatastoresAuthMode.java | 56 + .../machinelearning/models/SystemService.java | 12 +- .../machinelearning/models/TableVertical.java | 356 -- .../TableVerticalFeaturizationSettings.java | 147 +- .../models/TableVerticalLimitSettings.java | 172 +- .../models/TargetAggregationFunction.java | 4 +- .../machinelearning/models/TargetLags.java | 10 +- .../models/TargetLagsMode.java | 6 +- .../models/TargetRollingWindowSize.java | 10 +- .../models/TargetRollingWindowSizeMode.java | 6 +- .../TargetUtilizationScaleSettings.java | 110 +- .../machinelearning/models/TaskType.java | 35 +- .../models/TeacherModelEndpoint.java | 85 + .../TeacherModelEndpointRequestSettings.java | 117 + .../models/TeacherModelSettings.java | 120 + .../machinelearning/models/TensorFlow.java | 56 +- .../models/TextClassification.java | 103 +- .../models/TextClassificationMultilabel.java | 103 +- .../machinelearning/models/TextNer.java | 99 +- .../machinelearning/models/TmpfsOptions.java | 12 +- .../models/TopNFeaturesByAttribution.java | 12 +- .../models/TrainingSettings.java | 143 +- .../models/TrialComponent.java | 87 +- .../machinelearning/models/TriggerBase.java | 16 +- .../machinelearning/models/TriggerType.java | 2 +- .../models/TritonModelJobInput.java | 59 +- .../models/TritonModelJobOutput.java | 70 +- .../models/TruncationSelectionPolicy.java | 28 +- .../models/UnderlyingResourceAction.java | 2 +- .../machinelearning/models/UnitOfMeasure.java | 4 +- .../models/UpdateWorkspaceQuotas.java | 51 +- .../models/UpdateWorkspaceQuotasResult.java | 2 +- .../models/UriFileDataVersion.java | 42 +- .../models/UriFileJobInput.java | 59 +- .../models/UriFileJobOutput.java | 70 +- .../models/UriFolderDataVersion.java | 42 +- .../models/UriFolderJobInput.java | 59 +- .../models/UriFolderJobOutput.java | 70 +- .../machinelearning/models/Usage.java | 2 +- .../models/UsageAndQuotaDetails.java | 41 + .../machinelearning/models/UsageName.java | 12 +- .../machinelearning/models/UsageUnit.java | 2 +- .../machinelearning/models/Usages.java | 6 +- .../machinelearning/models/UseStl.java | 4 +- .../models/UserAccountCredentials.java | 48 +- .../models/UserAssignedIdentity.java | 25 +- .../models/UserCreatedAcrAccount.java | 96 - .../models/UserCreatedStorageAccount.java | 96 - .../machinelearning/models/UserIdentity.java | 12 +- ...AuthTypeWorkspaceConnectionProperties.java | 102 +- .../machinelearning/models/VMPriceOSType.java | 4 +- .../machinelearning/models/VMTier.java | 4 +- .../models/ValidationMetricType.java | 10 +- .../machinelearning/models/ValueFormat.java | 46 - .../models/VirtualMachine.java | 108 +- .../models/VirtualMachineImage.java | 17 +- .../models/VirtualMachineSchema.java | 96 - .../VirtualMachineSchemaProperties.java | 13 +- .../models/VirtualMachineSecrets.java | 32 +- .../models/VirtualMachineSecretsSchema.java | 97 - .../models/VirtualMachineSize.java | 105 +- .../models/VirtualMachineSizeListResult.java | 2 +- .../models/VirtualMachineSizes.java | 6 +- .../models/VirtualMachineSshCredentials.java | 10 +- .../machinelearning/models/VmPriority.java | 2 +- .../models/VolumeDefinition.java | 31 +- .../models/VolumeDefinitionType.java | 4 +- .../machinelearning/models/VolumeOptions.java | 12 +- .../models/VulnerabilityDetails.java | 419 ++ .../models/VulnerabilityFindings.java | 283 + .../models/VulnerabilityRisk.java | 66 + .../machinelearning/models/Webhook.java | 10 +- .../machinelearning/models/WebhookType.java | 2 +- .../machinelearning/models/WeekDay.java | 16 +- .../machinelearning/models/Workspace.java | 1020 +++- .../models/WorkspaceConnectionAccessKey.java | 10 +- .../models/WorkspaceConnectionAccountKey.java | 12 +- .../models/WorkspaceConnectionApiKey.java | 10 +- .../WorkspaceConnectionManagedIdentity.java | 56 +- .../models/WorkspaceConnectionOAuth2.java | 23 +- ...orkspaceConnectionPersonalAccessToken.java | 10 +- .../WorkspaceConnectionPropertiesV2.java | 190 +- ...ceConnectionPropertiesV2BasicResource.java | 81 +- .../WorkspaceConnectionServicePrincipal.java | 10 +- ...kspaceConnectionSharedAccessSignature.java | 10 +- .../WorkspaceConnectionUpdateParameter.java | 87 + .../WorkspaceConnectionUsernamePassword.java | 58 +- .../models/WorkspaceConnections.java | 96 +- .../models/WorkspaceFeatures.java | 6 +- .../models/WorkspaceHubConfig.java | 10 +- .../WorkspacePrivateEndpointResource.java | 93 + .../models/WorkspaceProperties.java | 280 +- .../WorkspacePropertiesUpdateParameters.java | 119 +- .../models/WorkspaceUpdateParameters.java | 475 +- .../machinelearning/models/Workspaces.java | 179 +- .../machinelearning/models/package-info.java | 4 +- .../machinelearning/package-info.java | 4 +- .../src/main/java/module-info.java | 3 +- ...ourcemanager-machinelearning_metadata.json | 1 + .../proxy-config.json | 2 +- ...resourcemanager-machinelearning.properties | 1 + ...BatchDeploymentsCreateOrUpdateSamples.java | 21 +- .../BatchDeploymentsDeleteSamples.java | 6 +- .../generated/BatchDeploymentsGetSamples.java | 6 +- .../BatchDeploymentsListSamples.java | 6 +- .../BatchDeploymentsUpdateSamples.java | 6 +- .../BatchEndpointsCreateOrUpdateSamples.java | 12 +- .../BatchEndpointsDeleteSamples.java | 6 +- .../generated/BatchEndpointsGetSamples.java | 6 +- .../BatchEndpointsListKeysSamples.java | 6 +- .../generated/BatchEndpointsListSamples.java | 6 +- .../BatchEndpointsUpdateSamples.java | 6 +- .../CapabilityHostsCreateOrUpdateSamples.java | 37 + .../CapabilityHostsDeleteSamples.java | 23 + .../generated/CapabilityHostsGetSamples.java | 23 + .../CodeContainersCreateOrUpdateSamples.java | 6 +- .../CodeContainersDeleteSamples.java | 6 +- .../generated/CodeContainersGetSamples.java | 6 +- .../generated/CodeContainersListSamples.java | 6 +- ...sCreateOrGetStartPendingUploadSamples.java | 6 +- .../CodeVersionsCreateOrUpdateSamples.java | 8 +- .../generated/CodeVersionsDeleteSamples.java | 6 +- .../generated/CodeVersionsGetSamples.java | 6 +- .../generated/CodeVersionsListSamples.java | 6 +- .../generated/CodeVersionsPublishSamples.java | 12 +- ...ponentContainersCreateOrUpdateSamples.java | 10 +- .../ComponentContainersDeleteSamples.java | 6 +- .../ComponentContainersGetSamples.java | 6 +- .../ComponentContainersListSamples.java | 6 +- ...omponentVersionsCreateOrUpdateSamples.java | 8 +- .../ComponentVersionsDeleteSamples.java | 6 +- .../ComponentVersionsGetSamples.java | 6 +- .../ComponentVersionsListSamples.java | 6 +- .../ComponentVersionsPublishSamples.java | 12 +- .../ComputeCreateOrUpdateSamples.java | 88 +- .../generated/ComputeDeleteSamples.java | 6 +- .../ComputeGetAllowedResizeSizesSamples.java | 24 + .../generated/ComputeGetSamples.java | 26 +- .../generated/ComputeListKeysSamples.java | 6 +- .../generated/ComputeListNodesSamples.java | 6 +- .../generated/ComputeListSamples.java | 6 +- .../generated/ComputeResizeSamples.java | 26 + .../generated/ComputeRestartSamples.java | 6 +- .../generated/ComputeStartSamples.java | 6 +- .../generated/ComputeStopSamples.java | 6 +- .../ComputeUpdateCustomServicesSamples.java | 68 + .../ComputeUpdateDataMountsSamples.java | 37 + ...mputeUpdateIdleShutdownSettingSamples.java | 27 + .../generated/ComputeUpdateSamples.java | 6 +- ...ectionCreateOrUpdateDeploymentSamples.java | 37 + .../ConnectionDeleteDeploymentSamples.java | 25 + .../ConnectionGetAllModelsSamples.java | 24 + .../ConnectionGetDeploymentSamples.java | 25 + .../generated/ConnectionGetModelsSamples.java | 24 + .../ConnectionListDeploymentsSamples.java | 24 + .../ConnectionRaiBlocklistCreateSamples.java | 28 + .../ConnectionRaiBlocklistDeleteSamples.java | 24 + .../ConnectionRaiBlocklistGetSamples.java | 24 + ...nectionRaiBlocklistItemAddBulkSamples.java | 35 + ...nnectionRaiBlocklistItemCreateSamples.java | 29 + ...tionRaiBlocklistItemDeleteBulkSamples.java | 27 + ...nnectionRaiBlocklistItemDeleteSamples.java | 25 + .../ConnectionRaiBlocklistItemGetSamples.java | 25 + ...RaiBlocklistItemsOperationListSamples.java | 24 + ...tionRaiBlocklistsOperationListSamples.java | 23 + ...ectionRaiPoliciesOperationListSamples.java | 23 + .../ConnectionRaiPolicyCreateSamples.java | 48 + .../ConnectionRaiPolicyDeleteSamples.java | 24 + .../ConnectionRaiPolicyGetSamples.java | 24 + .../DataContainersCreateOrUpdateSamples.java | 8 +- .../DataContainersDeleteSamples.java | 6 +- .../generated/DataContainersGetSamples.java | 6 +- .../generated/DataContainersListSamples.java | 6 +- .../DataVersionsCreateOrUpdateSamples.java | 10 +- .../generated/DataVersionsDeleteSamples.java | 6 +- .../generated/DataVersionsGetSamples.java | 6 +- .../generated/DataVersionsListSamples.java | 6 +- .../generated/DataVersionsPublishSamples.java | 12 +- .../DatastoresCreateOrUpdateSamples.java | 35 +- .../generated/DatastoresDeleteSamples.java | 6 +- .../generated/DatastoresGetSamples.java | 6 +- .../generated/DatastoresListSamples.java | 6 +- .../DatastoresListSecretsSamples.java | 12 +- .../EndpointCreateOrUpdateSamples.java | 30 + ...dpointDeploymentCreateOrUpdateSamples.java | 34 + .../EndpointDeploymentDeleteSamples.java | 25 + ...dpointDeploymentGetInWorkspaceSamples.java | 24 + .../EndpointDeploymentGetSamples.java | 24 + .../EndpointDeploymentListSamples.java | 24 + .../generated/EndpointGetModelsSamples.java | 23 + .../generated/EndpointGetSamples.java | 23 + .../generated/EndpointListKeysSamples.java | 23 + .../generated/EndpointListSamples.java | 26 + .../EndpointRegenerateKeysSamples.java | 29 + ...onmentContainersCreateOrUpdateSamples.java | 10 +- .../EnvironmentContainersDeleteSamples.java | 6 +- .../EnvironmentContainersGetSamples.java | 6 +- .../EnvironmentContainersListSamples.java | 6 +- ...ironmentVersionsCreateOrUpdateSamples.java | 12 +- .../EnvironmentVersionsDeleteSamples.java | 6 +- .../EnvironmentVersionsGetSamples.java | 6 +- .../EnvironmentVersionsListSamples.java | 6 +- .../EnvironmentVersionsPublishSamples.java | 12 +- .../generated/FeaturesGetSamples.java | 6 +- .../generated/FeaturesListSamples.java | 6 +- ...uresetContainersCreateOrUpdateSamples.java | 8 +- .../FeaturesetContainersDeleteSamples.java | 6 +- .../FeaturesetContainersGetEntitySamples.java | 6 +- .../FeaturesetContainersListSamples.java | 6 +- .../FeaturesetVersionsBackfillSamples.java | 23 +- ...aturesetVersionsCreateOrUpdateSamples.java | 45 +- .../FeaturesetVersionsDeleteSamples.java | 6 +- .../FeaturesetVersionsGetSamples.java | 6 +- .../FeaturesetVersionsListSamples.java | 6 +- ...EntityContainersCreateOrUpdateSamples.java | 8 +- ...urestoreEntityContainersDeleteSamples.java | 6 +- ...storeEntityContainersGetEntitySamples.java | 6 +- ...aturestoreEntityContainersListSamples.java | 6 +- ...reEntityVersionsCreateOrUpdateSamples.java | 12 +- ...aturestoreEntityVersionsDeleteSamples.java | 6 +- .../FeaturestoreEntityVersionsGetSamples.java | 6 +- ...FeaturestoreEntityVersionsListSamples.java | 6 +- ...ferenceEndpointsCreateOrUpdateSamples.java | 69 + .../InferenceEndpointsDeleteSamples.java | 24 + .../InferenceEndpointsGetSamples.java | 25 + .../InferenceEndpointsListSamples.java | 27 + .../InferenceEndpointsUpdateSamples.java | 45 + .../InferenceGroupsCreateOrUpdateSamples.java | 89 + .../InferenceGroupsDeleteSamples.java | 24 + ...roupsGetDeltaModelsStatusAsyncSamples.java | 30 + .../generated/InferenceGroupsGetSamples.java | 24 + .../InferenceGroupsGetStatusSamples.java | 24 + ...enceGroupsListDeltaModelsAsyncSamples.java | 30 + .../generated/InferenceGroupsListSamples.java | 27 + .../InferenceGroupsListSkusSamples.java | 24 + ...ceGroupsModifyDeltaModelsAsyncSamples.java | 31 + .../InferenceGroupsUpdateSamples.java | 51 + .../InferencePoolsCreateOrUpdateSamples.java | 65 + .../InferencePoolsDeleteSamples.java | 23 + .../generated/InferencePoolsGetSamples.java | 24 + .../generated/InferencePoolsListSamples.java | 27 + .../InferencePoolsUpdateSamples.java | 60 + .../generated/JobsCancelSamples.java | 6 +- .../generated/JobsCreateOrUpdateSamples.java | 230 +- .../generated/JobsDeleteSamples.java | 6 +- .../generated/JobsGetSamples.java | 42 +- .../generated/JobsListSamples.java | 48 +- ...visionsProvisionManagedNetworkSamples.java | 6 +- ...gedNetworkSettingsOperationGetSamples.java | 24 + ...edNetworkSettingsOperationListSamples.java | 24 + ...dNetworkSettingsOperationPatchSamples.java | 56 + ...gedNetworkSettingsOperationPutSamples.java | 54 + ...workSettingsRuleCreateOrUpdateSamples.java | 6 +- ...nagedNetworkSettingsRuleDeleteSamples.java | 6 +- .../ManagedNetworkSettingsRuleGetSamples.java | 6 +- ...ManagedNetworkSettingsRuleListSamples.java | 6 +- ...aceSubscriptionsCreateOrUpdateSamples.java | 6 +- ...MarketplaceSubscriptionsDeleteSamples.java | 6 +- .../MarketplaceSubscriptionsGetSamples.java | 6 +- .../MarketplaceSubscriptionsListSamples.java | 6 +- .../ModelContainersCreateOrUpdateSamples.java | 6 +- .../ModelContainersDeleteSamples.java | 6 +- .../generated/ModelContainersGetSamples.java | 6 +- .../generated/ModelContainersListSamples.java | 6 +- .../ModelVersionsCreateOrUpdateSamples.java | 8 +- .../generated/ModelVersionsDeleteSamples.java | 6 +- .../generated/ModelVersionsGetSamples.java | 6 +- .../generated/ModelVersionsListSamples.java | 6 +- .../ModelVersionsPublishSamples.java | 12 +- ...nlineDeploymentsCreateOrUpdateSamples.java | 74 +- .../OnlineDeploymentsDeleteSamples.java | 6 +- .../OnlineDeploymentsGetLogsSamples.java | 6 +- .../OnlineDeploymentsGetSamples.java | 10 +- .../OnlineDeploymentsListSamples.java | 6 +- .../OnlineDeploymentsListSkusSamples.java | 10 +- .../OnlineDeploymentsUpdateSamples.java | 26 +- .../OnlineEndpointsCreateOrUpdateSamples.java | 12 +- .../OnlineEndpointsDeleteSamples.java | 6 +- .../generated/OnlineEndpointsGetSamples.java | 6 +- .../OnlineEndpointsGetTokenSamples.java | 6 +- .../OnlineEndpointsListKeysSamples.java | 6 +- .../generated/OnlineEndpointsListSamples.java | 6 +- .../OnlineEndpointsRegenerateKeysSamples.java | 6 +- .../OnlineEndpointsUpdateSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- .../OutboundRuleCreateOrUpdateSamples.java | 34 + .../generated/OutboundRuleDeleteSamples.java | 23 + .../generated/OutboundRuleGetSamples.java | 24 + .../generated/OutboundRuleListSamples.java | 22 + .../OutboundRulesOperationPostSamples.java | 52 + .../PTUQuotaGetAvailableSamples.java | 23 + .../PTUQuotaListAvailableSamples.java | 23 + .../generated/PTUQuotaListSamples.java | 23 + ...pointConnectionsCreateOrUpdateSamples.java | 10 +- ...ivateEndpointConnectionsDeleteSamples.java | 10 +- .../PrivateEndpointConnectionsGetSamples.java | 6 +- ...PrivateEndpointConnectionsListSamples.java | 6 +- .../PrivateLinkResourcesListSamples.java | 8 +- .../generated/QuotasListSamples.java | 6 +- .../generated/QuotasUpdateSamples.java | 6 +- .../RaiPoliciesOperationListSamples.java | 23 + .../generated/RaiPolicyCreateSamples.java | 47 + .../generated/RaiPolicyDeleteSamples.java | 23 + .../generated/RaiPolicyGetSamples.java | 24 + .../RegistriesCreateOrUpdateSamples.java | 61 +- .../generated/RegistriesDeleteSamples.java | 6 +- .../RegistriesGetByResourceGroupSamples.java | 21 +- .../RegistriesListByResourceGroupSamples.java | 21 +- .../generated/RegistriesListSamples.java | 6 +- .../RegistriesRemoveRegionsSamples.java | 22 +- .../generated/RegistriesUpdateSamples.java | 41 +- ...ryCodeContainersCreateOrUpdateSamples.java | 6 +- .../RegistryCodeContainersDeleteSamples.java | 6 +- .../RegistryCodeContainersGetSamples.java | 6 +- .../RegistryCodeContainersListSamples.java | 6 +- ...sCreateOrGetStartPendingUploadSamples.java | 6 +- ...stryCodeVersionsCreateOrUpdateSamples.java | 8 +- .../RegistryCodeVersionsDeleteSamples.java | 6 +- .../RegistryCodeVersionsGetSamples.java | 6 +- .../RegistryCodeVersionsListSamples.java | 6 +- ...ponentContainersCreateOrUpdateSamples.java | 10 +- ...istryComponentContainersDeleteSamples.java | 6 +- ...RegistryComponentContainersGetSamples.java | 6 +- ...egistryComponentContainersListSamples.java | 6 +- ...omponentVersionsCreateOrUpdateSamples.java | 8 +- ...egistryComponentVersionsDeleteSamples.java | 6 +- .../RegistryComponentVersionsGetSamples.java | 6 +- .../RegistryComponentVersionsListSamples.java | 6 +- ...ryDataContainersCreateOrUpdateSamples.java | 8 +- .../RegistryDataContainersDeleteSamples.java | 6 +- .../RegistryDataContainersGetSamples.java | 6 +- .../RegistryDataContainersListSamples.java | 6 +- ...aReferencesGetBlobReferenceSasSamples.java | 6 +- ...sCreateOrGetStartPendingUploadSamples.java | 6 +- ...stryDataVersionsCreateOrUpdateSamples.java | 10 +- .../RegistryDataVersionsDeleteSamples.java | 6 +- .../RegistryDataVersionsGetSamples.java | 6 +- .../RegistryDataVersionsListSamples.java | 6 +- ...onmentContainersCreateOrUpdateSamples.java | 10 +- ...tryEnvironmentContainersDeleteSamples.java | 6 +- ...gistryEnvironmentContainersGetSamples.java | 6 +- ...istryEnvironmentContainersListSamples.java | 6 +- ...ironmentVersionsCreateOrUpdateSamples.java | 12 +- ...istryEnvironmentVersionsDeleteSamples.java | 6 +- ...RegistryEnvironmentVersionsGetSamples.java | 6 +- ...egistryEnvironmentVersionsListSamples.java | 6 +- ...yModelContainersCreateOrUpdateSamples.java | 6 +- .../RegistryModelContainersDeleteSamples.java | 6 +- .../RegistryModelContainersGetSamples.java | 6 +- .../RegistryModelContainersListSamples.java | 6 +- ...sCreateOrGetStartPendingUploadSamples.java | 6 +- ...tryModelVersionsCreateOrUpdateSamples.java | 8 +- .../RegistryModelVersionsDeleteSamples.java | 6 +- .../RegistryModelVersionsGetSamples.java | 6 +- .../RegistryModelVersionsListSamples.java | 6 +- .../SchedulesCreateOrUpdateSamples.java | 18 +- .../generated/SchedulesDeleteSamples.java | 6 +- .../generated/SchedulesGetSamples.java | 6 +- .../generated/SchedulesListSamples.java | 6 +- ...verlessEndpointsCreateOrUpdateSamples.java | 17 +- .../ServerlessEndpointsDeleteSamples.java | 6 +- .../ServerlessEndpointsGetSamples.java | 6 +- .../ServerlessEndpointsListKeysSamples.java | 6 +- .../ServerlessEndpointsListSamples.java | 6 +- ...verlessEndpointsRegenerateKeysSamples.java | 6 +- .../ServerlessEndpointsUpdateSamples.java | 16 +- .../generated/UsagesListSamples.java | 6 +- .../VirtualMachineSizesListSamples.java | 6 +- .../WorkspaceConnectionsCreateSamples.java | 8 +- .../WorkspaceConnectionsDeleteSamples.java | 6 +- .../WorkspaceConnectionsGetSamples.java | 6 +- .../WorkspaceConnectionsListSamples.java | 8 +- ...orkspaceConnectionsListSecretsSamples.java | 6 +- ...spaceConnectionsTestConnectionSamples.java | 34 + .../WorkspaceConnectionsUpdateSamples.java | 54 + .../WorkspaceFeaturesListSamples.java | 6 +- .../WorkspacesCreateOrUpdateSamples.java | 32 +- .../generated/WorkspacesDeleteSamples.java | 6 +- .../generated/WorkspacesDiagnoseSamples.java | 25 +- .../WorkspacesGetByResourceGroupSamples.java | 6 +- .../WorkspacesListByResourceGroupSamples.java | 8 +- .../generated/WorkspacesListKeysSamples.java | 6 +- ...kspacesListNotebookAccessTokenSamples.java | 6 +- .../WorkspacesListNotebookKeysSamples.java | 6 +- ...ndNetworkDependenciesEndpointsSamples.java | 6 +- .../generated/WorkspacesListSamples.java | 8 +- ...rkspacesListStorageAccountKeysSamples.java | 6 +- .../WorkspacesPrepareNotebookSamples.java | 6 +- .../WorkspacesResyncKeysSamples.java | 6 +- .../generated/WorkspacesUpdateSamples.java | 6 +- .../AKSNetworkingConfigurationTests.java | 35 + ...ypeWorkspaceConnectionPropertiesTests.java | 61 +- .../generated/AcrDetailsTests.java | 27 +- .../generated/ActualCapacityInfoTests.java | 23 + .../AksNetworkingConfigurationTests.java | 35 - .../generated/AllFeaturesTests.java | 2 +- .../generated/AllNodesTests.java | 2 +- .../AmlComputeNodeInformationTests.java | 10 +- .../AmlComputeNodesInformationTests.java | 12 +- .../AmlTokenComputeIdentityTests.java | 2 +- .../generated/AmlTokenTests.java | 2 +- .../generated/AmlUserFeatureInnerTests.java | 20 +- .../generated/ArmResourceIdTests.java | 10 +- .../generated/AssetBaseTests.java | 35 +- .../generated/AssetContainerTests.java | 28 +- .../generated/AssetJobInputTests.java | 28 - .../generated/AssetJobOutputTests.java | 28 - .../generated/AssetReferenceBaseTests.java | 2 +- .../generated/AssignedUserTests.java | 14 +- .../generated/AutoForecastHorizonTests.java | 2 +- .../generated/AutoMLJobTests.java | 224 +- .../generated/AutoMLVerticalTests.java | 30 +- .../generated/AutoNCrossValidationsTests.java | 2 +- .../generated/AutoPausePropertiesTests.java | 14 +- .../generated/AutoScalePropertiesTests.java | 18 +- .../generated/AutoSeasonalityTests.java | 2 +- .../generated/AutoTargetLagsTests.java | 2 +- .../AutoTargetRollingWindowSizeTests.java | 2 +- ...AvailableQuotaArmPaginatedResultTests.java | 21 + .../generated/AvailableQuotaInnerTests.java | 18 + .../AvailableQuotaPropertiesTests.java | 18 + .../generated/AzureDatastoreTests.java | 28 - .../generated/AzureDevOpsWebhookTests.java | 13 +- .../generated/AzureOpenAiFineTuningTests.java | 47 + .../AzureOpenAiHyperParametersTests.java | 33 + .../generated/BanditPolicyTests.java | 28 +- .../BatchDeploymentConfigurationTests.java | 2 +- .../BatchDeploymentsDeleteMockTests.java | 9 +- .../generated/BatchEndpointDefaultsTests.java | 10 +- .../BatchEndpointsDeleteMockTests.java | 8 +- ...ComponentDeploymentConfigurationTests.java | 28 +- .../generated/BatchRetrySettingsTests.java | 14 +- .../BayesianSamplingAlgorithmTests.java | 2 +- .../generated/BindOptionsTests.java | 19 +- .../generated/BuildContextTests.java | 14 +- .../generated/CapabilityHostInnerTests.java | 72 + .../CapabilityHostPropertiesTests.java | 69 + ...apabilityHostsCreateOrUpdateMockTests.java | 76 + ...pabilityHostsGetWithResponseMockTests.java | 49 + ...egoricalDataDriftMetricThresholdTests.java | 16 +- ...oricalDataQualityMetricThresholdTests.java | 16 +- ...alPredictionDriftMetricThresholdTests.java | 10 +- .../generated/ClassificationTests.java | 321 +- .../ClassificationTrainingSettingsTests.java | 73 +- .../ClusterUpdateParametersTests.java | 22 +- .../ClusterUpdatePropertiesTests.java | 22 +- .../generated/CodeContainerInnerTests.java | 28 +- .../CodeContainerPropertiesTests.java | 28 +- ...tainerResourceArmPaginatedResultTests.java | 60 +- ...rsCreateOrUpdateWithResponseMockTests.java | 27 +- ...ContainersDeleteWithResponseMockTests.java | 9 +- ...odeContainersGetWithResponseMockTests.java | 18 +- .../CodeContainersListMockTests.java | 20 +- ...deVersionsDeleteWithResponseMockTests.java | 9 +- .../CodeVersionsPublishMockTests.java | 14 +- .../generated/CognitiveServicesSkuTests.java | 38 + .../generated/CollectionTests.java | 28 +- .../generated/ColumnTransformerTests.java | 17 +- .../generated/CommandJobLimitsTests.java | 10 +- .../ComponentContainerInnerTests.java | 30 +- .../ComponentContainerPropertiesTests.java | 29 +- ...tainerResourceArmPaginatedResultTests.java | 56 +- ...rsCreateOrUpdateWithResponseMockTests.java | 28 +- ...ContainersDeleteWithResponseMockTests.java | 8 +- ...entContainersGetWithResponseMockTests.java | 18 +- .../ComponentContainersListMockTests.java | 18 +- .../generated/ComponentVersionInnerTests.java | 38 +- .../ComponentVersionPropertiesTests.java | 36 +- ...ersionResourceArmPaginatedResultTests.java | 68 +- ...nsCreateOrUpdateWithResponseMockTests.java | 33 +- ...ntVersionsDeleteWithResponseMockTests.java | 9 +- ...onentVersionsGetWithResponseMockTests.java | 21 +- .../ComponentVersionsListMockTests.java | 20 +- .../ComponentVersionsPublishMockTests.java | 14 +- .../ComputeInstanceApplicationTests.java | 17 +- ...omputeInstanceAutologgerSettingsTests.java | 27 + ...uteInstanceConnectivityEndpointsTests.java | 10 +- .../ComputeInstanceContainerTests.java | 29 +- .../ComputeInstanceCreatedByTests.java | 14 +- .../ComputeInstanceDataDiskTests.java | 23 +- .../ComputeInstanceDataMountTests.java | 56 +- .../ComputeInstanceEnvironmentInfoTests.java | 17 +- .../ComputeInstanceLastOperationTests.java | 23 +- .../ComputeInstanceVersionTests.java | 13 +- .../ComputeRecurrenceScheduleTests.java | 24 +- .../generated/ComputeRuntimeDtoTests.java | 10 +- .../generated/ComputeSchedulesTests.java | 169 +- .../generated/ComputeSecretsInnerTests.java | 8 +- .../ComputeStartStopScheduleTests.java | 87 +- .../generated/ComputesDeleteMockTests.java | 8 +- ...lowedResizeSizesWithResponseMockTests.java | 50 + ...ComputesListKeysWithResponseMockTests.java | 8 +- .../generated/ComputesListNodesMockTests.java | 10 +- ...teCustomServicesWithResponseMockTests.java | 228 + ...UpdateDataMountsWithResponseMockTests.java | 82 + ...eShutdownSettingWithResponseMockTests.java | 37 + ...tionRaiBlocklistItemsAddBulkMockTests.java | 50 + ...ctionRaiBlocklistItemsCreateMockTests.java | 43 + ...locklistItemsGetWithResponseMockTests.java | 41 + ...BlocklistItemsOperationsListMockTests.java | 41 + ...onnectionRaiBlocklistsCreateMockTests.java | 42 + ...RaiBlocklistsGetWithResponseMockTests.java | 40 + ...nRaiBlocklistsOperationsListMockTests.java | 39 + .../ConnectionRaiPoliciesCreateMockTests.java | 85 + ...onRaiPoliciesGetWithResponseMockTests.java | 57 + ...ionRaiPoliciesOperationsListMockTests.java | 58 + ...ionsCreateOrUpdateDeploymentMockTests.java | 43 + ...ionsGetAllModelsWithResponseMockTests.java | 57 + ...onsGetDeploymentWithResponseMockTests.java | 40 + .../ConnectionsGetModelsMockTests.java | 62 + .../ConnectionsListDeploymentsMockTests.java | 39 + .../ContainerResourceRequirementsTests.java | 35 +- .../ContainerResourceSettingsTests.java | 21 +- ...ointDeploymentResourcePropertiesTests.java | 65 + ...SafetyEndpointResourcePropertiesTests.java | 49 + .../generated/ContentSafetyTests.java | 11 +- .../generated/CosmosDbSettingsTests.java | 10 +- .../generated/CreateMonitorActionTests.java | 70 +- .../machinelearning/generated/CronTests.java | 24 +- .../generated/CronTriggerTests.java | 26 +- .../generated/CustomForecastHorizonTests.java | 10 +- .../generated/CustomMetricThresholdTests.java | 17 +- .../generated/CustomModelFineTuningTests.java | 54 + .../generated/CustomModelJobInputTests.java | 21 +- .../generated/CustomModelJobOutputTests.java | 21 +- .../CustomMonitoringSignalTests.java | 78 +- .../CustomNCrossValidationsTests.java | 10 +- .../generated/CustomSeasonalityTests.java | 10 +- .../generated/CustomServiceTests.java | 213 +- .../generated/CustomTargetLagsTests.java | 10 +- .../CustomTargetRollingWindowSizeTests.java | 10 +- .../generated/DataCollectorTests.java | 36 +- .../generated/DataContainerInnerTests.java | 34 +- .../DataContainerPropertiesTests.java | 26 +- ...tainerResourceArmPaginatedResultTests.java | 77 +- ...rsCreateOrUpdateWithResponseMockTests.java | 27 +- ...ContainersDeleteWithResponseMockTests.java | 9 +- ...ataContainersGetWithResponseMockTests.java | 20 +- .../DataContainersListMockTests.java | 19 +- .../DataDriftMetricThresholdBaseTests.java | 10 +- .../DataDriftMonitoringSignalTests.java | 94 +- .../DataGenerationVerticalTests.java | 75 + ...ataLakeAnalyticsSchemaPropertiesTests.java | 13 +- .../DataLakeAnalyticsSchemaTests.java | 28 - .../DataPathAssetReferenceTests.java | 20 +- .../DataQualityMetricThresholdBaseTests.java | 10 +- .../DataQualityMonitoringSignalTests.java | 86 +- .../generated/DataVersionBaseInnerTests.java | 43 +- .../DataVersionBasePropertiesTests.java | 40 +- ...onBaseResourceArmPaginatedResultTests.java | 72 +- ...nsCreateOrUpdateWithResponseMockTests.java | 36 +- ...taVersionsDeleteWithResponseMockTests.java | 9 +- .../DataVersionsGetWithResponseMockTests.java | 22 +- .../generated/DataVersionsListMockTests.java | 22 +- .../DataVersionsPublishMockTests.java | 14 +- .../generated/DatasetReferenceTests.java | 27 + ...DatastoresDeleteWithResponseMockTests.java | 9 +- .../generated/DefaultScaleSettingsTests.java | 2 +- .../DeltaModelCurrentStateTests.java | 21 + .../DeltaModelModifyRequestTests.java | 34 + .../DeltaModelStatusRequestTests.java | 31 + .../DeltaModelStatusResponseInnerTests.java | 25 + .../generated/DeploymentLogsInnerTests.java | 13 +- .../generated/DeploymentLogsRequestTests.java | 10 +- .../DeploymentResourceConfigurationTests.java | 18 +- .../generated/DestinationAssetTests.java | 23 +- .../generated/DistillationJobTests.java | 178 + .../DistributionConfigurationTests.java | 2 +- .../generated/DockerTests.java | 14 +- .../EarlyTerminationPolicyTests.java | 14 +- .../EndpointDeploymentModelTests.java | 35 + ...sBasicResourceArmPaginatedResultTests.java | 20 + ...urcePropertiesBasicResourceInnerTests.java | 29 + ...ointDeploymentResourcePropertiesTests.java | 27 + ...intDeploymentsCreateOrUpdateMockTests.java | 42 + ...intDeploymentsGetInWorkspaceMockTests.java | 41 + ...ntDeploymentsGetWithResponseMockTests.java | 39 + .../EndpointDeploymentsListMockTests.java | 39 + ...dpointModelDeprecationPropertiesTests.java | 21 + .../EndpointModelPropertiesInnerTests.java | 38 + ...dpointModelSkuCapacityPropertiesTests.java | 20 + ...kuRateLimitRulePatternPropertiesTests.java | 20 + .../generated/EndpointModelsInnerTests.java | 40 + ...sBasicResourceArmPaginatedResultTests.java | 25 + ...urcePropertiesBasicResourceInnerTests.java | 50 + .../EndpointResourcePropertiesTests.java | 51 + .../EndpointScheduleActionTests.java | 6 +- .../generated/EndpointTests.java | 34 +- .../EndpointsCreateOrUpdateMockTests.java | 63 + .../EndpointsGetModelsMockTests.java | 62 + .../EndpointsGetWithResponseMockTests.java | 45 + .../generated/EndpointsListMockTests.java | 48 + .../EnvironmentContainerInnerTests.java | 27 +- .../EnvironmentContainerPropertiesTests.java | 29 +- ...tainerResourceArmPaginatedResultTests.java | 61 +- ...rsCreateOrUpdateWithResponseMockTests.java | 27 +- ...ContainersDeleteWithResponseMockTests.java | 8 +- ...entContainersGetWithResponseMockTests.java | 18 +- .../EnvironmentContainersListMockTests.java | 18 +- .../generated/EnvironmentVariableTests.java | 13 +- .../EnvironmentVersionInnerTests.java | 221 +- .../EnvironmentVersionPropertiesTests.java | 188 +- ...ersionResourceArmPaginatedResultTests.java | 133 +- ...nsCreateOrUpdateWithResponseMockTests.java | 105 +- ...ntVersionsDeleteWithResponseMockTests.java | 8 +- ...nmentVersionsGetWithResponseMockTests.java | 59 +- .../EnvironmentVersionsListMockTests.java | 72 +- .../EnvironmentVersionsPublishMockTests.java | 14 +- .../generated/EstimatedVMPriceTests.java | 17 +- .../generated/EstimatedVMPricesTests.java | 37 +- .../ExternalFqdnResponseInnerTests.java | 48 +- ...AttributionDriftMonitoringSignalTests.java | 131 +- ...eatureAttributionMetricThresholdTests.java | 12 +- .../FeatureImportanceSettingsTests.java | 10 +- .../generated/FeatureInnerTests.java | 44 +- .../generated/FeaturePropertiesTests.java | 42 +- ...eatureResourceArmPaginatedResultTests.java | 67 +- .../generated/FeatureStoreSettingsTests.java | 24 +- .../generated/FeatureSubsetTests.java | 13 +- .../generated/FeatureWindowTests.java | 17 +- .../FeaturesGetWithResponseMockTests.java | 20 +- .../generated/FeaturesListMockTests.java | 22 +- .../FeaturesetContainerInnerTests.java | 29 +- .../FeaturesetContainerPropertiesTests.java | 28 +- ...tainerResourceArmPaginatedResultTests.java | 57 +- ...esetContainersCreateOrUpdateMockTests.java | 30 +- .../FeaturesetContainersDeleteMockTests.java | 9 +- ...tainersGetEntityWithResponseMockTests.java | 18 +- .../FeaturesetContainersListMockTests.java | 22 +- .../FeaturesetSpecificationTests.java | 10 +- ...FeaturesetVersionBackfillRequestTests.java | 70 +- ...esetVersionBackfillResponseInnerTests.java | 15 +- .../FeaturesetVersionInnerTests.java | 179 +- .../FeaturesetVersionPropertiesTests.java | 164 +- ...ersionResourceArmPaginatedResultTests.java | 190 +- .../FeaturesetVersionsBackfillMockTests.java | 39 +- ...uresetVersionsCreateOrUpdateMockTests.java | 119 +- .../FeaturesetVersionsDeleteMockTests.java | 8 +- ...resetVersionsGetWithResponseMockTests.java | 62 +- .../FeaturesetVersionsListMockTests.java | 70 +- ...FeaturestoreEntityContainerInnerTests.java | 29 +- ...restoreEntityContainerPropertiesTests.java | 27 +- ...tainerResourceArmPaginatedResultTests.java | 72 +- ...tityContainersCreateOrUpdateMockTests.java | 28 +- ...estoreEntityContainersDeleteMockTests.java | 9 +- ...tainersGetEntityWithResponseMockTests.java | 19 +- ...urestoreEntityContainersListMockTests.java | 21 +- .../FeaturestoreEntityVersionInnerTests.java | 51 +- ...turestoreEntityVersionPropertiesTests.java | 54 +- ...ersionResourceArmPaginatedResultTests.java | 107 +- ...EntityVersionsCreateOrUpdateMockTests.java | 48 +- ...urestoreEntityVersionsDeleteMockTests.java | 8 +- ...ntityVersionsGetWithResponseMockTests.java | 24 +- ...aturestoreEntityVersionsListMockTests.java | 31 +- .../generated/FeaturizationSettingsTests.java | 10 +- .../generated/FineTuningJobTests.java | 152 + .../generated/FineTuningVerticalTests.java | 37 + .../generated/FinetuningDetailsTests.java | 44 + .../generated/FixedInputDataTests.java | 23 +- .../generated/FlavorDataTests.java | 14 +- .../generated/ForecastHorizonTests.java | 2 +- .../generated/ForecastingSettingsTests.java | 62 +- .../generated/ForecastingTests.java | 353 +- .../ForecastingTrainingSettingsTests.java | 69 +- .../generated/FqdnEndpointDetailTests.java | 13 +- .../generated/FqdnEndpointTests.java | 24 +- .../FqdnEndpointsPropertiesTests.java | 42 - .../FqdnEndpointsPropertyBagTests.java | 21 + .../generated/FqdnEndpointsTests.java | 33 +- .../generated/FqdnOutboundRuleTests.java | 19 +- .../GetBlobReferenceSasRequestDtoTests.java | 17 +- .../generated/GridSamplingAlgorithmTests.java | 2 +- .../GroupModelConfigurationTests.java | 25 + .../generated/GroupStatusInnerTests.java | 25 + .../generated/IPRuleTests.java | 24 + .../generated/IdAssetReferenceTests.java | 12 +- .../generated/IdentityConfigurationTests.java | 2 +- .../generated/IdentityForCmkTests.java | 11 +- .../generated/IdleShutdownSettingTests.java | 25 + .../ImageClassificationBaseTests.java | 312 - .../ImageClassificationMultilabelTests.java | 626 +- .../generated/ImageClassificationTests.java | 552 +- .../generated/ImageDetailsTests.java | 174 + .../generated/ImageInfoTests.java | 32 + .../ImageInstanceSegmentationTests.java | 769 +-- .../generated/ImageLimitSettingsTests.java | 22 +- .../generated/ImageMetadataTests.java | 32 - ...stributionSettingsClassificationTests.java | 196 +- ...tributionSettingsObjectDetectionTests.java | 250 +- .../ImageModelDistributionSettingsTests.java | 172 +- ...ImageModelSettingsClassificationTests.java | 232 +- ...mageModelSettingsObjectDetectionTests.java | 275 +- .../generated/ImageModelSettingsTests.java | 194 +- .../ImageObjectDetectionBaseTests.java | 456 -- .../generated/ImageObjectDetectionTests.java | 648 +- .../generated/ImageSweepSettingsTests.java | 21 +- .../machinelearning/generated/ImageTests.java | 21 +- .../generated/ImageVerticalTests.java | 63 - .../generated/IndexColumnTests.java | 16 +- .../InferenceContainerPropertiesTests.java | 41 +- .../InferenceEndpointsDeleteMockTests.java | 34 + .../InferenceGroupsDeleteMockTests.java | 34 + ...odelsStatusAsyncWithResponseMockTests.java | 51 + ...eGroupsGetStatusWithResponseMockTests.java | 45 + .../InferenceGroupsListSkusMockTests.java | 47 + .../InferencePoolsDeleteMockTests.java | 33 + .../InstanceTypeSchemaResourcesTests.java | 17 +- .../generated/InstanceTypeSchemaTests.java | 25 +- .../generated/JobBaseInnerTests.java | 134 +- .../generated/JobBasePropertiesTests.java | 121 +- ...obBaseResourceArmPaginatedResultTests.java | 149 +- .../generated/JobInputTests.java | 12 +- .../generated/JobLimitsTests.java | 10 +- .../generated/JobOutputTests.java | 10 +- .../JobResourceConfigurationTests.java | 35 +- .../generated/JobResourcesTests.java | 25 + .../generated/JobScheduleActionTests.java | 152 +- .../generated/JobServiceTests.java | 31 +- .../generated/JobsCancelMockTests.java | 8 +- ...bsCreateOrUpdateWithResponseMockTests.java | 104 +- .../generated/JobsDeleteMockTests.java | 8 +- .../JobsGetWithResponseMockTests.java | 44 +- .../generated/JobsListMockTests.java | 50 +- .../generated/JupyterKernelConfigTests.java | 33 + .../generated/KubernetesPropertiesTests.java | 88 +- .../generated/KubernetesSchemaTests.java | 79 - .../generated/LabelGenerationTests.java | 82 + .../generated/LakeHouseArtifactTests.java | 13 +- .../ListAmlUserFeatureResultTests.java | 14 +- .../generated/ListUsagesResultTests.java | 14 +- .../generated/ListWorkspaceQuotasTests.java | 14 +- .../generated/LiteralJobInputTests.java | 14 +- .../generated/MLFlowModelJobInputTests.java | 22 +- .../generated/MLFlowModelJobOutputTests.java | 27 +- .../generated/MLTableDataTests.java | 48 +- .../generated/MLTableJobInputTests.java | 22 +- .../generated/MLTableJobOutputTests.java | 25 +- .../ManagedComputeIdentityTests.java | 14 +- .../generated/ManagedIdentityTests.java | 21 +- .../ManagedNetworkListResultTests.java | 32 + .../ManagedNetworkProvisionOptionsTests.java | 6 +- ...nagedNetworkProvisionStatusInnerTests.java | 17 +- ...sionsProvisionManagedNetworkMockTests.java | 16 +- ...etworkSettingsBasicResourceInnerTests.java | 75 + .../ManagedNetworkSettingsExTests.java | 69 + .../ManagedNetworkSettingsInnerTests.java | 49 +- ...ngsOperationsGetWithResponseMockTests.java | 55 + ...etworkSettingsOperationsListMockTests.java | 59 + ...NetworkSettingsOperationsPutMockTests.java | 83 + ...ingsPropertiesBasicResourceInnerTests.java | 84 + ...ManagedNetworkSettingsPropertiesTests.java | 75 + ...kSettingsRulesCreateOrUpdateMockTests.java | 18 +- ...edNetworkSettingsRulesDeleteMockTests.java | 9 +- ...SettingsRulesGetWithResponseMockTests.java | 14 +- ...agedNetworkSettingsRulesListMockTests.java | 16 +- ...ointDeploymentResourcePropertiesTests.java | 34 + ...OnlineEndpointResourcePropertiesTests.java | 83 + ...dResourceGroupAssignedIdentitiesTests.java | 26 + .../ManagedResourceGroupSettingsTests.java | 29 + .../ManagedServiceIdentityTests.java | 13 +- .../generated/MarketplacePlanTests.java | 14 +- .../MarketplaceSubscriptionInnerTests.java | 10 +- ...arketplaceSubscriptionPropertiesTests.java | 10 +- ...iptionResourceArmPaginatedResultTests.java | 28 +- ...eSubscriptionsCreateOrUpdateMockTests.java | 16 +- ...SubscriptionsGetWithResponseMockTests.java | 12 +- ...MarketplaceSubscriptionsListMockTests.java | 14 +- .../MaterializationComputeResourceTests.java | 10 +- .../MaterializationSettingsTests.java | 107 +- .../generated/MedianStoppingPolicyTests.java | 14 +- .../generated/ModelContainerInnerTests.java | 26 +- .../ModelContainerPropertiesTests.java | 27 +- ...tainerResourceArmPaginatedResultTests.java | 59 +- ...rsCreateOrUpdateWithResponseMockTests.java | 28 +- ...ContainersDeleteWithResponseMockTests.java | 8 +- ...delContainersGetWithResponseMockTests.java | 18 +- .../ModelContainersListMockTests.java | 19 +- .../generated/ModelSettingsTests.java | 10 +- .../generated/ModelVersionInnerTests.java | 78 +- .../ModelVersionPropertiesTests.java | 75 +- ...ersionResourceArmPaginatedResultTests.java | 93 +- ...nsCreateOrUpdateWithResponseMockTests.java | 71 +- ...elVersionsDeleteWithResponseMockTests.java | 8 +- ...ModelVersionsGetWithResponseMockTests.java | 34 +- .../generated/ModelVersionsListMockTests.java | 36 +- .../ModelVersionsPublishMockTests.java | 14 +- .../MonitorComputeConfigurationBaseTests.java | 2 +- .../MonitorComputeIdentityBaseTests.java | 2 +- .../generated/MonitorDefinitionTests.java | 52 +- ...MonitorEmailNotificationSettingsTests.java | 12 +- .../MonitorNotificationSettingsTests.java | 10 +- .../MonitorServerlessSparkComputeTests.java | 16 +- .../MonitoringFeatureFilterBaseTests.java | 2 +- .../MonitoringInputDataBaseTests.java | 29 +- .../generated/MonitoringSignalBaseTests.java | 14 +- .../generated/MonitoringTargetTests.java | 16 +- .../generated/MonitoringThresholdTests.java | 10 +- .../machinelearning/generated/MpiTests.java | 10 +- .../generated/NCrossValidationsTests.java | 2 +- .../generated/NetworkAclsTests.java | 33 + ...NlpVerticalFeaturizationSettingsTests.java | 10 +- .../NlpVerticalLimitSettingsTests.java | 22 +- .../generated/NlpVerticalTests.java | 50 - .../generated/NodeStateCountsTests.java | 10 +- .../machinelearning/generated/NodesTests.java | 2 +- ...ypeWorkspaceConnectionPropertiesTests.java | 60 +- .../generated/NotificationSettingTests.java | 25 +- ...umericalDataDriftMetricThresholdTests.java | 16 +- ...ericalDataQualityMetricThresholdTests.java | 10 +- ...alPredictionDriftMetricThresholdTests.java | 16 +- .../generated/ObjectiveTests.java | 16 +- .../generated/OneLakeArtifactTests.java | 10 +- .../OnlineDeploymentsDeleteMockTests.java | 9 +- ...ploymentsGetLogsWithResponseMockTests.java | 14 +- .../OnlineDeploymentsListSkusMockTests.java | 21 +- .../OnlineEndpointsDeleteMockTests.java | 8 +- .../generated/OnlineRequestSettingsTests.java | 22 +- .../generated/OnlineScaleSettingsTests.java | 2 +- ...ointDeploymentResourcePropertiesTests.java | 65 + ...OpenAIEndpointResourcePropertiesTests.java | 54 + .../generated/OperationDisplayTests.java | 10 +- .../generated/OperationInnerTests.java | 11 +- .../generated/OperationListResultTests.java | 14 +- .../generated/OperationsListMockTests.java | 8 +- .../OutboundRuleBasicResourceInnerTests.java | 14 +- .../OutboundRuleListResultTests.java | 31 +- .../generated/OutboundRuleTests.java | 18 +- .../OutboundRulesCreateOrUpdateMockTests.java | 46 + ...OutboundRulesGetWithResponseMockTests.java | 42 + .../generated/OutboundRulesListMockTests.java | 42 + .../OutputPathAssetReferenceTests.java | 15 +- .../generated/PTUDeploymentUsageTests.java | 23 + ...otasGetAvailableWithResponseMockTests.java | 37 + .../PTUQuotasListAvailableMockTests.java | 38 + .../generated/PTUQuotasListMockTests.java | 46 + .../generated/PackageDetailsTests.java | 35 + ...malTrackedResourceWithPropertiesTests.java | 19 +- .../PartialBatchDeploymentTests.java | 10 +- .../PartialManagedServiceIdentityTests.java | 8 +- .../PartialMinimalTrackedResourceTests.java | 15 +- ...nimalTrackedResourceWithIdentityTests.java | 21 +- ...rackedResourceWithSkuAndIdentityTests.java | 51 +- ...ialMinimalTrackedResourceWithSkuTests.java | 40 +- ...alRegistryPartialTrackedResourceTests.java | 51 +- .../generated/PartialSkuTests.java | 30 +- .../generated/PasswordTests.java | 11 +- .../PendingUploadRequestDtoTests.java | 14 +- .../PersonalComputeInstanceSettingsTests.java | 14 +- .../generated/PipelineJobTests.java | 155 +- ...edictionDriftMetricThresholdBaseTests.java | 10 +- .../PredictionDriftMonitoringSignalTests.java | 80 +- .../PrivateEndpointConnectionInnerTests.java | 78 +- ...vateEndpointConnectionListResultTests.java | 88 +- ...vateEndpointConnectionPropertiesTests.java | 26 +- ...nsCreateOrUpdateWithResponseMockTests.java | 68 +- ...onnectionsDeleteWithResponseMockTests.java | 8 +- ...ntConnectionsGetWithResponseMockTests.java | 30 +- ...ivateEndpointConnectionsListMockTests.java | 35 +- .../PrivateEndpointDestinationTests.java | 28 +- .../PrivateEndpointOutboundRuleTests.java | 30 +- .../PrivateEndpointResourceTests.java | 10 +- .../generated/PrivateEndpointTests.java | 4 +- .../PrivateLinkResourceInnerTests.java | 31 + ...ivateLinkResourceListResultInnerTests.java | 85 - .../PrivateLinkResourceListResultTests.java | 33 + .../PrivateLinkResourcePropertiesTests.java | 17 +- .../generated/PrivateLinkResourceTests.java | 73 - .../PrivateLinkResourcesListMockTests.java | 51 + ...inkResourcesListWithResponseMockTests.java | 49 - ...rivateLinkServiceConnectionStateTests.java | 28 +- .../generated/ProbeSettingsTests.java | 34 +- .../generated/PromptSettingsTests.java | 32 + .../generated/PyTorchTests.java | 10 +- .../generated/QueueSettingsTests.java | 2 +- .../generated/QuotaBasePropertiesTests.java | 23 +- .../generated/QuotaUpdateParametersTests.java | 38 +- .../generated/QuotasListMockTests.java | 11 +- .../QuotasUpdateWithResponseMockTests.java | 30 +- .../generated/RaiBlocklistConfigTests.java | 27 + .../RaiBlocklistItemBulkRequestTests.java | 32 + ...sBasicResourceArmPaginatedResultTests.java | 21 + ...ItemPropertiesBasicResourceInnerTests.java | 30 + .../RaiBlocklistItemPropertiesTests.java | 28 + ...sBasicResourceArmPaginatedResultTests.java | 20 + ...listPropertiesBasicResourceInnerTests.java | 29 + .../RaiBlocklistPropertiesTests.java | 25 + .../generated/RaiPoliciesCreateMockTests.java | 78 + .../RaiPoliciesGetWithResponseMockTests.java | 56 + .../RaiPoliciesOperationsListMockTests.java | 59 + .../RaiPolicyContentFilterTests.java | 40 + ...sBasicResourceArmPaginatedResultTests.java | 38 + ...licyPropertiesBasicResourceInnerTests.java | 90 + .../generated/RaiPolicyPropertiesTests.java | 82 + .../RandomSamplingAlgorithmTests.java | 14 +- .../machinelearning/generated/RayTests.java | 41 + .../generated/RecurrenceScheduleTests.java | 24 +- .../generated/RecurrenceTests.java | 54 +- .../generated/RecurrenceTriggerTests.java | 53 +- .../RegistriesCreateOrUpdateMockTests.java | 142 +- .../generated/RegistriesDeleteMockTests.java | 8 +- ...tByResourceGroupWithResponseMockTests.java | 49 +- ...egistriesListByResourceGroupMockTests.java | 52 +- .../generated/RegistriesListMockTests.java | 49 +- .../RegistriesRemoveRegionsMockTests.java | 135 +- ...CodeContainersCreateOrUpdateMockTests.java | 24 +- ...RegistryCodeContainersDeleteMockTests.java | 8 +- ...odeContainersGetWithResponseMockTests.java | 18 +- .../RegistryCodeContainersListMockTests.java | 22 +- .../RegistryCodeVersionsDeleteMockTests.java | 8 +- ...nentContainersCreateOrUpdateMockTests.java | 27 +- ...tryComponentContainersDeleteMockTests.java | 9 +- ...entContainersGetWithResponseMockTests.java | 18 +- ...istryComponentContainersListMockTests.java | 18 +- ...ponentVersionsCreateOrUpdateMockTests.java | 31 +- ...istryComponentVersionsDeleteMockTests.java | 10 +- ...onentVersionsGetWithResponseMockTests.java | 20 +- ...egistryComponentVersionsListMockTests.java | 21 +- ...DataContainersCreateOrUpdateMockTests.java | 29 +- ...RegistryDataContainersDeleteMockTests.java | 9 +- ...ataContainersGetWithResponseMockTests.java | 18 +- .../RegistryDataContainersListMockTests.java | 21 +- ...ryDataVersionsCreateOrUpdateMockTests.java | 34 +- .../RegistryDataVersionsDeleteMockTests.java | 8 +- ...yDataVersionsGetWithResponseMockTests.java | 22 +- .../RegistryDataVersionsListMockTests.java | 24 +- ...mentContainersCreateOrUpdateMockTests.java | 29 +- ...yEnvironmentContainersDeleteMockTests.java | 8 +- ...entContainersGetWithResponseMockTests.java | 18 +- ...tryEnvironmentContainersListMockTests.java | 19 +- ...onmentVersionsCreateOrUpdateMockTests.java | 114 +- ...tryEnvironmentVersionsDeleteMockTests.java | 8 +- ...nmentVersionsGetWithResponseMockTests.java | 59 +- ...istryEnvironmentVersionsListMockTests.java | 70 +- .../generated/RegistryInnerTests.java | 209 +- ...odelContainersCreateOrUpdateMockTests.java | 27 +- ...egistryModelContainersDeleteMockTests.java | 9 +- ...delContainersGetWithResponseMockTests.java | 18 +- .../RegistryModelContainersListMockTests.java | 18 +- ...yModelVersionsCreateOrUpdateMockTests.java | 68 +- .../RegistryModelVersionsDeleteMockTests.java | 8 +- ...ModelVersionsGetWithResponseMockTests.java | 33 +- .../RegistryModelVersionsListMockTests.java | 36 +- ...tryPartialManagedServiceIdentityTests.java | 14 +- ...vateEndpointConnectionPropertiesTests.java | 42 +- ...egistryPrivateEndpointConnectionTests.java | 54 +- ...rivateLinkServiceConnectionStateTests.java | 24 +- .../generated/RegistryPropertiesTests.java | 360 +- .../RegistryRegionArmDetailsTests.java | 119 +- ...rackedResourceArmPaginatedResultTests.java | 236 +- .../generated/RegressionTests.java | 293 +- .../RegressionTrainingSettingsTests.java | 70 +- .../generated/RequestConfigurationTests.java | 30 + .../generated/RequestLoggingTests.java | 12 +- .../generated/ResizeSchemaTests.java | 24 + .../generated/ResourceBaseTests.java | 22 +- .../generated/ResourceConfigurationTests.java | 19 +- .../generated/ResourceIdTests.java | 10 +- .../generated/ResourceNameTests.java | 10 +- .../generated/ResourceQuotaInnerTests.java | 10 +- .../generated/RollingInputDataTests.java | 48 +- .../machinelearning/generated/RouteTests.java | 14 +- .../generated/SamplingAlgorithmTests.java | 2 +- .../ScaleSettingsInformationTests.java | 22 +- .../generated/ScaleSettingsTests.java | 22 +- .../ScaleUnitConfigurationTests.java | 30 + .../generated/ScheduleActionBaseTests.java | 2 +- .../generated/ScheduleBaseTests.java | 20 +- .../generated/ScheduleInnerTests.java | 55 +- .../generated/SchedulePropertiesTests.java | 51 +- ...heduleResourceArmPaginatedResultTests.java | 93 +- .../SchedulesCreateOrUpdateMockTests.java | 45 +- .../generated/SchedulesDeleteMockTests.java | 8 +- .../SchedulesGetWithResponseMockTests.java | 26 +- .../generated/SchedulesListMockTests.java | 27 +- .../generated/ScriptReferenceTests.java | 28 +- .../generated/ScriptsToExecuteTests.java | 52 +- .../generated/SeasonalityTests.java | 2 +- .../ServerlessComputeSettingsTests.java | 16 +- ...rlessEndpointCapacityReservationTests.java | 30 + .../ServerlessEndpointContentSafetyTests.java | 27 + ...verlessEndpointInferenceEndpointTests.java | 23 + .../ServerlessEndpointInnerTests.java | 73 +- .../ServerlessEndpointModelSettingsTests.java | 25 + .../ServerlessEndpointPropertiesTests.java | 22 +- ...erlessEndpointResourcePropertiesTests.java | 87 + ...rackedResourceArmPaginatedResultTests.java | 152 +- ...rlessEndpointsCreateOrUpdateMockTests.java | 66 +- ...lessEndpointsGetWithResponseMockTests.java | 33 +- .../ServerlessEndpointsListMockTests.java | 34 +- .../ServerlessInferenceEndpointTests.java | 17 +- .../generated/ServerlessOfferTests.java | 27 + .../ServiceManagedResourcesSettingsTests.java | 10 +- .../generated/ServiceTagDestinationTests.java | 32 +- .../ServiceTagOutboundRuleTests.java | 32 +- .../generated/SetupScriptsTests.java | 52 +- ...haredPrivateLinkResourcePropertyTests.java | 29 +- .../SharedPrivateLinkResourceTests.java | 28 +- .../generated/SkuCapacityTests.java | 24 +- .../SkuResourceArmPaginatedResultTests.java | 41 +- .../generated/SkuResourceInnerTests.java | 35 +- .../generated/SkuSettingTests.java | 17 +- .../machinelearning/generated/SkuTests.java | 34 +- .../generated/SparkJobEntryTests.java | 2 +- .../generated/SparkJobPythonEntryTests.java | 10 +- .../generated/SparkJobScalaEntryTests.java | 10 +- .../SparkResourceConfigurationTests.java | 14 +- ...ointDeploymentResourcePropertiesTests.java | 65 + ...SpeechEndpointResourcePropertiesTests.java | 53 + .../generated/StackEnsembleSettingsTests.java | 19 +- .../generated/StaticInputDataTests.java | 47 +- .../generated/StorageAccountDetailsTests.java | 37 +- .../StringArmPaginatedResultTests.java | 20 + .../generated/SweepJobLimitsTests.java | 28 +- .../SynapseSparkPropertiesTests.java | 76 +- .../SystemCreatedAcrAccountTests.java | 22 +- .../SystemCreatedStorageAccountTests.java | 34 +- .../generated/SystemServiceTests.java | 11 +- ...bleVerticalFeaturizationSettingsTests.java | 84 +- .../TableVerticalLimitSettingsTests.java | 46 +- .../generated/TableVerticalTests.java | 131 - .../generated/TargetLagsTests.java | 2 +- .../TargetRollingWindowSizeTests.java | 2 +- .../TargetUtilizationScaleSettingsTests.java | 29 +- ...cherModelEndpointRequestSettingsTests.java | 30 + .../generated/TeacherModelEndpointTests.java | 25 + .../generated/TeacherModelSettingsTests.java | 52 + .../generated/TensorFlowTests.java | 14 +- .../TextClassificationMultilabelTests.java | 76 +- .../generated/TextClassificationTests.java | 82 +- .../generated/TextNerTests.java | 72 +- .../generated/TmpfsOptionsTests.java | 10 +- .../TopNFeaturesByAttributionTests.java | 10 +- .../generated/TrainingSettingsTests.java | 53 +- .../generated/TriggerBaseTests.java | 21 +- .../generated/TritonModelJobInputTests.java | 22 +- .../generated/TritonModelJobOutputTests.java | 25 +- .../TruncationSelectionPolicyTests.java | 22 +- ...UpdateWorkspaceQuotasResultInnerTests.java | 10 +- .../generated/UpdateWorkspaceQuotasTests.java | 17 +- .../generated/UriFileDataVersionTests.java | 38 +- .../generated/UriFileJobInputTests.java | 24 +- .../generated/UriFileJobOutputTests.java | 21 +- .../generated/UriFolderDataVersionTests.java | 41 +- .../generated/UriFolderJobInputTests.java | 24 +- .../generated/UriFolderJobOutputTests.java | 27 +- ...ndQuotaDetailsArmPaginatedResultTests.java | 27 + .../UsageAndQuotaDetailsInnerTests.java | 25 + .../generated/UsageInnerTests.java | 10 +- .../generated/UsageNameTests.java | 10 +- .../generated/UsagesListMockTests.java | 10 +- .../generated/UserAssignedIdentityTests.java | 8 +- .../generated/UserCreatedAcrAccountTests.java | 27 - .../UserCreatedStorageAccountTests.java | 27 - .../generated/UserIdentityTests.java | 2 +- .../generated/VirtualMachineImageTests.java | 10 +- ...irtualMachineSizeListResultInnerTests.java | 60 +- .../generated/VirtualMachineSizeTests.java | 43 +- ...MachineSizesListWithResponseMockTests.java | 21 +- .../generated/VolumeDefinitionTests.java | 52 +- .../generated/VolumeOptionsTests.java | 6 +- .../generated/VulnerabilityDetailsTests.java | 77 + .../generated/VulnerabilityFindingsTests.java | 133 + .../generated/WebhookTests.java | 10 +- ...rkspaceConnectionManagedIdentityTests.java | 14 +- ...aceConnectionPersonalAccessTokenTests.java | 13 +- ...2BasicResourceArmPaginatedResultTests.java | 85 +- ...onPropertiesV2BasicResourceInnerTests.java | 61 +- .../WorkspaceConnectionPropertiesV2Tests.java | 63 +- ...eConnectionSharedAccessSignatureTests.java | 11 +- ...rkspaceConnectionUpdateParameterTests.java | 74 + ...onnectionsCreateWithResponseMockTests.java | 50 +- ...onnectionsDeleteWithResponseMockTests.java | 8 +- ...ceConnectionsGetWithResponseMockTests.java | 31 +- .../WorkspaceConnectionsListMockTests.java | 31 +- ...tionsListSecretsWithResponseMockTests.java | 31 +- .../WorkspaceFeaturesListMockTests.java | 17 +- .../generated/WorkspaceHubConfigTests.java | 17 +- ...WorkspacePrivateEndpointResourceTests.java | 23 + .../generated/WorkspacesDeleteMockTests.java | 8 +- ...denciesEndpointsWithResponseMockTests.java | 14 +- .../WorkspacesResyncKeysMockTests.java | 8 +- .../tsp-location.yaml | 4 + 2265 files changed, 116947 insertions(+), 72312 deletions(-) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/{AzureMachineLearningWorkspaces.java => MachineLearningManagementClient.java} (70%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PTUQuotasClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AvailableQuotaInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointDeploymentResourcePropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{AzureMachineLearningWorkspacesBuilder.java => MachineLearningManagementClientBuilder.java} (63%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{AzureMachineLearningWorkspacesImpl.java => MachineLearningManagementClientImpl.java} (72%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageAndQuotaDetailsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/AmlComputeNodesInformation.java (87%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AvailableQuotaArmPaginatedResult.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/BatchDeploymentTrackedResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/BatchEndpointTrackedResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/CodeContainerResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/CodeVersionResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ComponentContainerResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ComponentVersionResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/DataContainerResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/DataVersionBaseResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/DatastoreResourceArmPaginatedResult.java (64%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/EnvironmentContainerResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/EnvironmentVersionResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/FeatureResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/FeaturesetContainerResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/FeaturesetVersionResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java (64%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceEndpointTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceGroupTrackedResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferencePoolTrackedResourceArmPaginatedResult.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/JobBaseResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ListAmlUserFeatureResult.java (75%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ListUsagesResult.java (74%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ListWorkspaceQuotas.java (74%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ManagedNetworkListResult.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/MarketplaceSubscriptionResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ModelContainerResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ModelVersionResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/OnlineEndpointTrackedResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/OperationListResult.java (78%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/OutboundRuleListResult.java (54%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/PaginatedComputeResourcesList.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/PrivateEndpointConnectionListResult.java (77%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateLinkResourceListResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/RegistryTrackedResourceArmPaginatedResult.java (62%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ScheduleResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java (64%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/SkuResourceArmPaginatedResult.java (64%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/StringArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/UsageAndQuotaDetailsArmPaginatedResult.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java (74%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/{ => implementation}/models/WorkspaceListResult.java (57%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{AksComputeSecrets.java => AKSComputeSecrets.java} (60%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{AksNetworkingConfiguration.java => AKSNetworkingConfiguration.java} (70%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{AksSchemaProperties.java => AKSSchemaProperties.java} (72%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHost.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItems.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistsOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPoliciesOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelFineTuning.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationTaskType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationVertical.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetReference.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistillationJob.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FinetuningDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IPRule.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelGeneration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkKind.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsEx.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsPropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRules.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRulesOperations.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{PatAuthTypeWorkspaceConnectionProperties.java => PATAuthTypeWorkspaceConnectionProperties.java} (59%) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUDeploymentUsage.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUQuotas.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PromptSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPoliciesOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringStringKeyValuePair.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpointRequestSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/azure-resourcemanager-machinelearning.properties create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionCreateOrUpdateDeploymentSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionDeleteDeploymentSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetDeploymentSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetModelsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListDeltaModelsAsyncSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsModifyDeltaModelsAsyncSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPatchSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPutSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesOperationPostSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaGetAvailableSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListAvailableSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AKSNetworkingConfigurationTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ActualCapacityInfoTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaArmPaginatedResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiFineTuningTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiHyperParametersTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CognitiveServicesSkuTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceAutologgerSettingsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetAllowedResizeSizesWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateCustomServicesWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateDataMountsWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateIdleShutdownSettingWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsAddBulkMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsCreateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationsListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsCreateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationsListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesCreateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationsListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsCreateOrUpdateDeploymentMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetAllModelsWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetDeploymentWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetModelsMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsListDeploymentsMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointDeploymentResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelFineTuningTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataGenerationVerticalTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatasetReferenceTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelCurrentStateTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelModifyRequestTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusRequestTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusResponseInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistillationJobTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentModelTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsCreateOrUpdateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetInWorkspaceMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelDeprecationPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelPropertiesInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuCapacityPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuRateLimitRulePatternPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelsInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceArmPaginatedResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsCreateOrUpdateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetModelsMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningJobTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningVerticalTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FinetuningDetailsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertyBagTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupModelConfigurationTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupStatusInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IPRuleTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdleShutdownSettingTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageDetailsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInfoTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourcesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JupyterKernelConfigTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LabelGenerationTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkListResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsBasicResourceInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsExTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsPutMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointDeploymentResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupAssignedIdentitiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupSettingsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NetworkAclsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointDeploymentResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesCreateOrUpdateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUDeploymentUsageTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasGetAvailableWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListAvailableMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PackageDetailsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PromptSettingsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistConfigTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemBulkRequestTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceArmPaginatedResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesCreateMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesGetWithResponseMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationsListMockTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyContentFilterTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceArmPaginatedResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceInnerTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RayTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestConfigurationTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResizeSchemaTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleUnitConfigurationTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointCapacityReservationTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointContentSafetyTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInferenceEndpointTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointModelSettingsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessOfferTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointDeploymentResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointResourcePropertiesTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StringArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointRequestSettingsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelSettingsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsArmPaginatedResultTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityDetailsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityFindingsTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionUpdateParameterTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePrivateEndpointResourceTests.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index 66d924503f0c..9cfb61070a2c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md @@ -1,14 +1,3093 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2026-07-22) -### Features Added +- Azure Resource Manager Machine Learning client library for Java. This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package api-version 2026-05-15-preview. 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.FqdnEndpointsProperties` was removed + +#### `models.OperationListResult` was removed + +#### `models.DatabricksComputeSecretsProperties` was removed + +#### `models.DatabricksSchema` was removed + +#### `models.ComputeInstanceSchema` was removed + +#### `models.Aks` was removed + +#### `models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult` was removed + +#### `models.DataVersionBaseResourceArmPaginatedResult` was removed + +#### `models.ServerlessEndpointTrackedResourceArmPaginatedResult` was removed + +#### `models.DataContainerResourceArmPaginatedResult` was removed + +#### `models.FeaturestoreEntityContainerResourceArmPaginatedResult` was removed + +#### `models.ImageClassificationBase` was removed + +#### `models.FeatureResourceArmPaginatedResult` was removed + +#### `models.MarketplaceSubscriptionResourceArmPaginatedResult` was removed + +#### `models.DataLakeAnalyticsSchema` was removed + +#### `models.ModelVersionResourceArmPaginatedResult` was removed + +#### `models.AksSchemaProperties` was removed + +#### `models.AssetJobOutput` was removed + +#### `models.PrivateEndpointConnectionListResult` was removed + +#### `models.AmlComputeNodesInformation` was removed + +#### `models.ListWorkspaceQuotas` was removed + +#### `models.PaginatedComputeResourcesList` was removed + +#### `models.ScheduleResourceArmPaginatedResult` was removed + +#### `models.UserCreatedAcrAccount` was removed + +#### `models.FeaturestoreEntityVersionResourceArmPaginatedResult` was removed + +#### `models.DatastoreResourceArmPaginatedResult` was removed + +#### `models.ListAmlUserFeatureResult` was removed + +#### `models.ComponentContainerResourceArmPaginatedResult` was removed + +#### `models.ComputeResourceSchema` was removed + +#### `models.EncryptionKeyVaultProperties` was removed + +#### `models.NlpVertical` was removed + +#### `models.ValueFormat` was removed + +#### `models.OutboundRuleListResult` was removed + +#### `models.SkuResourceArmPaginatedResult` was removed + +#### `models.JobBaseResourceArmPaginatedResult` was removed + +#### `models.CodeContainerResourceArmPaginatedResult` was removed + +#### `models.ListUsagesResult` was removed + +#### `models.ComponentVersionResourceArmPaginatedResult` was removed + +#### `models.PublicNetworkAccessType` was removed + +#### `models.EnvironmentVersionResourceArmPaginatedResult` was removed + +#### `models.AksNetworkingConfiguration` was removed + +#### `models.VirtualMachineSecretsSchema` was removed + +#### `models.BatchEndpointTrackedResourceArmPaginatedResult` was removed + +#### `models.OnlineDeploymentTrackedResourceArmPaginatedResult` was removed + +#### `models.ImageVertical` was removed + +#### `models.KubernetesSchema` was removed + +#### `models.AksComputeSecrets` was removed + +#### `models.AksSchema` was removed + +#### `models.AssetJobInput` was removed + +#### `models.TableVertical` was removed + +#### `models.ImageObjectDetectionBase` was removed + +#### `models.UserCreatedStorageAccount` was removed + +#### `models.WorkspaceListResult` was removed + +#### `models.RegistryTrackedResourceArmPaginatedResult` was removed + +#### `models.EndpointServiceConnectionStatus` was removed + +#### `models.ModelContainerResourceArmPaginatedResult` was removed + +#### `models.AmlComputeSchema` was removed + +#### `models.PrivateLinkResourceListResult` was removed + +#### `models.CodeVersionResourceArmPaginatedResult` was removed + +#### `models.HDInsightSchema` was removed + +#### `models.BatchDeploymentTrackedResourceArmPaginatedResult` was removed + +#### `models.AksComputeSecretsProperties` was removed + +#### `models.FeaturesetContainerResourceArmPaginatedResult` was removed + +#### `models.OnlineEndpointTrackedResourceArmPaginatedResult` was removed + +#### `models.FeaturesetVersionResourceArmPaginatedResult` was removed + +#### `models.VirtualMachineSchema` was removed + +#### `models.EnvironmentContainerResourceArmPaginatedResult` was removed + +#### `models.AzureDatastore` was removed + +#### `models.PatAuthTypeWorkspaceConnectionProperties` was removed + +#### `models.DataVersionBase$DefinitionStages` was modified + +* `withExistingData(java.lang.String,java.lang.String,java.lang.String)` was removed in stage 1 + +#### `models.SystemCreatedStorageAccount` was modified + +* `validate()` was removed + +#### `models.DiagnoseRequestProperties` was modified + +* `validate()` was removed + +#### `models.NlpVerticalLimitSettings` was modified + +* `validate()` was removed + +#### `models.AutoScaleProperties` was modified + +* `validate()` was removed + +#### `models.NoneDatastoreCredentials` was modified + +* `validate()` was removed + +#### `models.EstimatedVMPrice` was modified + +* `EstimatedVMPrice()` was changed to private access +* `withVmTier(models.VMTier)` was removed +* `withRetailPrice(double)` was removed +* `validate()` was removed +* `withOsType(models.VMPriceOSType)` was removed + +#### `models.ScaleSettingsInformation` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionPropertiesV2` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `valueFormat()` was removed +* `validate()` was removed +* `value()` was removed +* `withValue(java.lang.String)` was removed + +#### `models.BanditPolicy` was modified + +* `java.lang.Float slackAmount()` -> `java.lang.Double slackAmount()` +* `validate()` was removed +* `withSlackFactor(java.lang.Float)` was removed +* `java.lang.Float slackFactor()` -> `java.lang.Double slackFactor()` +* `withSlackAmount(java.lang.Float)` was removed + +#### `models.JobResourceConfiguration` was modified + +* `validate()` was removed + +#### `models.ImageClassificationMultilabel` was modified + +* `validate()` was removed + +#### `models.BuildContext` was modified + +* `validate()` was removed + +#### `models.CronTrigger` was modified + +* `validate()` was removed + +#### `models.LakeHouseArtifact` was modified + +* `validate()` was removed + +#### `models.MLFlowModelJobOutput` was modified + +* `validate()` was removed + +#### `models.AzureBlobDatastore` was modified + +* `validate()` was removed +* `isDefault()` was removed + +#### `models.AssetContainer` was modified + +* `validate()` was removed + +#### `models.KubernetesProperties` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionAccessKey` was modified + +* `validate()` was removed + +#### `models.DestinationAsset` was modified + +* `validate()` was removed + +#### `models.ImageModelSettingsObjectDetection` was modified + +* `withMomentum(java.lang.Float)` was removed +* `withTileOverlapRatio(java.lang.Float)` was removed +* `withBeta1(java.lang.Float)` was removed +* `java.lang.Float tileOverlapRatio()` -> `java.lang.Double tileOverlapRatio()` +* `withTilePredictionsNmsThreshold(java.lang.Float)` was removed +* `java.lang.Float tilePredictionsNmsThreshold()` -> `java.lang.Double tilePredictionsNmsThreshold()` +* `withWeightDecay(java.lang.Float)` was removed +* `validate()` was removed +* `withStepLRGamma(java.lang.Float)` was removed +* `withBeta2(java.lang.Float)` was removed +* `withWarmupCosineLRCycles(java.lang.Float)` was removed +* `java.lang.Float boxScoreThreshold()` -> `java.lang.Double boxScoreThreshold()` +* `java.lang.Float nmsIouThreshold()` -> `java.lang.Double nmsIouThreshold()` +* `withNmsIouThreshold(java.lang.Float)` was removed +* `java.lang.Float validationIouThreshold()` -> `java.lang.Double validationIouThreshold()` +* `withValidationIouThreshold(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed +* `withBoxScoreThreshold(java.lang.Float)` was removed + +#### `models.ManagedIdentityCredential` was modified + +* `ManagedIdentityCredential()` was changed to private access +* `withUserManagedIdentityTenantId(java.lang.String)` was removed +* `withUserManagedIdentityClientId(java.lang.String)` was removed +* `withManagedIdentityType(java.lang.String)` was removed +* `withUserManagedIdentityPrincipalId(java.lang.String)` was removed +* `withUserManagedIdentityResourceId(java.lang.String)` was removed +* `validate()` was removed + +#### `models.AmlToken` was modified + +* `validate()` was removed + +#### `models.ServerlessComputeSettings` was modified + +* `validate()` was removed + +#### `models.MonitoringFeatureFilterBase` was modified + +* `validate()` was removed + +#### `models.SweepJobLimits` was modified + +* `validate()` was removed + +#### `models.DataDriftMonitoringSignal` was modified + +* `validate()` was removed + +#### `models.MonitorNotificationSettings` was modified + +* `validate()` was removed + +#### `models.WorkspaceHubConfig` was modified + +* `validate()` was removed + +#### `models.SynapseSpark` was modified + +* `validate()` was removed +* `createdOn()` was removed +* `isAttachedCompute()` was removed +* `provisioningErrors()` was removed +* `provisioningState()` was removed +* `modifiedOn()` was removed + +#### `models.ScheduleProperties` was modified + +* `validate()` was removed + +#### `models.FqdnEndpoints` was modified + +* `FqdnEndpoints()` was changed to private access +* `withProperties(models.FqdnEndpointsProperties)` was removed +* `properties()` was removed +* `validate()` was removed + +#### `models.DefaultScaleSettings` was modified + +* `validate()` was removed + +#### `models.FeaturesetVersionProperties` was modified + +* `validate()` was removed + +#### `models.ImageSweepSettings` was modified + +* `validate()` was removed + +#### `models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties` was modified + +* `validate()` was removed + +#### `models.SystemService` was modified + +* `SystemService()` was changed to private access +* `validate()` was removed + +#### `models.OnlineRequestSettings` was modified + +* `validate()` was removed + +#### `models.DataVersionBaseProperties` was modified + +* `validate()` was removed + +#### `models.MaterializationComputeResource` was modified + +* `validate()` was removed + +#### `models.ManagedComputeIdentity` was modified + +* `validate()` was removed + +#### `models.AcrDetails` was modified + +* `validate()` was removed +* `userCreatedAcrAccount()` was removed +* `withUserCreatedAcrAccount(models.UserCreatedAcrAccount)` was removed + +#### `models.CodeConfiguration` was modified + +* `validate()` was removed + +#### `models.ImageInstanceSegmentation` was modified + +* `validate()` was removed + +#### `models.ForecastHorizon` was modified + +* `validate()` was removed + +#### `models.TmpfsOptions` was modified + +* `validate()` was removed + +#### `models.DockerCredential` was modified + +* `DockerCredential()` was changed to private access +* `withUsername(java.lang.String)` was removed +* `username()` was removed +* `validate()` was removed +* `withPassword(java.lang.String)` was removed + +#### `models.BatchDeploymentProperties` was modified + +* `validate()` was removed + +#### `models.CategoricalPredictionDriftMetricThreshold` was modified + +* `validate()` was removed + +#### `models.CustomMetricThreshold` was modified + +* `validate()` was removed + +#### `models.MarketplaceSubscriptionProperties` was modified + +* `validate()` was removed + +#### `models.SparkJobScalaEntry` was modified + +* `validate()` was removed + +#### `models.PartialMinimalTrackedResourceWithSku` was modified + +* `validate()` was removed + +#### `models.TargetRollingWindowSize` was modified + +* `validate()` was removed + +#### `models.DataLakeAnalytics` was modified + +* `provisioningErrors()` was removed +* `createdOn()` was removed +* `modifiedOn()` was removed +* `isAttachedCompute()` was removed +* `validate()` was removed +* `provisioningState()` was removed + +#### `models.AutoTargetRollingWindowSize` was modified + +* `validate()` was removed + +#### `models.SparkJobEntry` was modified + +* `validate()` was removed + +#### `models.ClassificationTrainingSettings` was modified + +* `validate()` was removed + +#### `models.EncryptionUpdateProperties` was modified + +* `validate()` was removed + +#### `models.PartialBatchDeployment` was modified + +* `validate()` was removed + +#### `models.Image` was modified + +* `validate()` was removed + +#### `models.MonitorComputeConfigurationBase` was modified + +* `validate()` was removed + +#### `models.ComputeStartStopSchedule` was modified + +* `validate()` was removed + +#### `models.ResourceName` was modified + +* `ResourceName()` was changed to private access +* `validate()` was removed + +#### `models.VirtualMachineSecrets` was modified + +* `VirtualMachineSecrets()` was changed to private access +* `withAdministratorAccount(models.VirtualMachineSshCredentials)` was removed +* `validate()` was removed + +#### `models.PrivateEndpointConnection$Definition` was modified + +* `withPrivateEndpoint(models.PrivateEndpoint)` was removed + +#### `models.AutoPauseProperties` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceCreatedBy` was modified + +* `ComputeInstanceCreatedBy()` was changed to private access +* `username()` was removed +* `validate()` was removed + +#### `models.ModelVersionProperties` was modified + +* `validate()` was removed + +#### `models.BatchEndpointProperties` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionApiKey` was modified + +* `validate()` was removed + +#### `models.Collection` was modified + +* `validate()` was removed + +#### `models.OnlineDeploymentProperties` was modified + +* `validate()` was removed + +#### `models.TruncationSelectionPolicy` was modified + +* `validate()` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed + +#### `models.PrivateEndpointResource` was modified + +* `validate()` was removed + +#### `models.SystemCreatedAcrAccount` was modified + +* `validate()` was removed + +#### `models.BatchRetrySettings` was modified + +* `validate()` was removed + +#### `models.MonitorDefinition` was modified + +* `validate()` was removed + +#### `models.VirtualMachineSshCredentials` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionUsernamePassword` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionPersonalAccessToken` was modified + +* `validate()` was removed + +#### `models.QuotaBaseProperties` was modified + +* `validate()` was removed + +#### `models.MarketplacePlan` was modified + +* `MarketplacePlan()` was changed to private access +* `validate()` was removed + +#### `models.CodeContainerProperties` was modified + +* `validate()` was removed + +#### `models.OneLakeDatastore` was modified + +* `validate()` was removed +* `isDefault()` was removed + +#### `models.AmlComputeNodeInformation` was modified + +* `AmlComputeNodeInformation()` was changed to private access +* `validate()` was removed + +#### `models.FeatureImportanceSettings` was modified + +* `validate()` was removed + +#### `models.FeaturesetSpecification` was modified + +* `validate()` was removed + +#### `models.ModelContainerProperties` was modified + +* `validate()` was removed + +#### `models.TableVerticalFeaturizationSettings` was modified + +* `validate()` was removed + +#### `models.AzureDevOpsWebhook` was modified + +* `validate()` was removed + +#### `models.DataDriftMetricThresholdBase` was modified + +* `validate()` was removed + +#### `models.MonitoringSignalBase` was modified + +* `validate()` was removed + +#### `models.EarlyTerminationPolicy` was modified + +* `validate()` was removed + +#### `models.AutoNCrossValidations` was modified + +* `validate()` was removed + +#### `models.InferenceContainerProperties` was modified + +* `validate()` was removed + +#### `models.Docker` was modified + +* `validate()` was removed + +#### `models.NumericalPredictionDriftMetricThreshold` was modified + +* `validate()` was removed + +#### `models.ClusterUpdateParameters` was modified + +* `validate()` was removed + +#### `models.JobLimits` was modified + +* `validate()` was removed + +#### `models.TargetLags` was modified + +* `validate()` was removed + +#### `models.ArmResourceId` was modified + +* `validate()` was removed + +#### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `validate()` was removed +* `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed + +#### `models.BatchEndpointDefaults` was modified + +* `validate()` was removed + +#### `models.ImageModelDistributionSettingsClassification` was modified + +* `validate()` was removed + +#### `models.ScriptsToExecute` was modified + +* `validate()` was removed + +#### `models.PrivateEndpointOutboundRule` was modified + +* `validate()` was removed + +#### `models.Nodes` was modified + +* `validate()` was removed + +#### `models.AzureDataLakeGen1Datastore` was modified + +* `validate()` was removed +* `isDefault()` was removed + +#### `models.BindOptions` was modified + +* `validate()` was removed + +#### `models.Workspaces` was modified + +* `list(java.lang.String,com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Kubernetes` was modified + +* `validate()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningErrors()` was removed +* `createdOn()` was removed +* `provisioningState()` was removed + +#### `models.AllFeatures` was modified + +* `validate()` was removed + +#### `models.ManagedOnlineDeployment` was modified + +* `provisioningState()` was removed +* `validate()` was removed + +#### `models.NodeStateCounts` was modified + +* `NodeStateCounts()` was changed to private access +* `validate()` was removed + +#### `models.PrivateLinkServiceConnectionState` was modified + +* `validate()` was removed + +#### `models.EnvironmentVersionProperties` was modified + +* `validate()` was removed + +#### `models.DataReferenceCredential` was modified + +* `validate()` was removed + +#### `models.AssignedUser` was modified + +* `validate()` was removed + +#### `models.EnvironmentContainerProperties` was modified + +* `validate()` was removed + +#### `models.PredictionDriftMonitoringSignal` was modified + +* `validate()` was removed + +#### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified + +* `withValue(java.lang.String)` was removed +* `validate()` was removed +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed + +#### `models.FeatureProperties` was modified + +* `FeatureProperties()` was changed to private access +* `withFeatureName(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed +* `withDataType(models.FeatureDataType)` was removed +* `withProperties(java.util.Map)` was removed +* `withDescription(java.lang.String)` was removed +* `validate()` was removed + +#### `models.CustomModelJobInput` was modified + +* `validate()` was removed + +#### `models.CodeVersionProperties` was modified + +* `validate()` was removed + +#### `models.DataQualityMonitoringSignal` was modified + +* `validate()` was removed + +#### `models.Objective` was modified + +* `validate()` was removed + +#### `models.QuotaUpdateParameters` was modified + +* `validate()` was removed + +#### `models.RegistryPartialManagedServiceIdentity` was modified + +* `validate()` was removed +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `java.util.UUID principalId()` -> `java.lang.String principalId()` + +#### `models.UriFolderDataVersion` was modified + +* `validate()` was removed + +#### `models.TopNFeaturesByAttribution` was modified + +* `validate()` was removed + +#### `models.DataPathAssetReference` was modified + +* `validate()` was removed + +#### `models.SynapseSparkProperties` was modified + +* `validate()` was removed + +#### `models.Datastores` was modified + +* `listSecretsWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.StackEnsembleSettings` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceDataDisk` was modified + +* `ComputeInstanceDataDisk()` was changed to private access +* `withCaching(models.Caching)` was removed +* `withLun(java.lang.Integer)` was removed +* `withStorageAccountType(models.StorageAccountType)` was removed +* `validate()` was removed +* `withDiskSizeGB(java.lang.Integer)` was removed + +#### `models.RegistryPrivateEndpointConnection` was modified + +* `validate()` was removed + +#### `models.GetBlobReferenceSasRequestDto` was modified + +* `validate()` was removed + +#### `models.TargetUtilizationScaleSettings` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceApplication` was modified + +* `ComputeInstanceApplication()` was changed to private access +* `withDisplayName(java.lang.String)` was removed +* `validate()` was removed +* `withEndpointUri(java.lang.String)` was removed + +#### `models.PrivateLinkResource` was modified + +* `PrivateLinkResource()` was removed +* `java.lang.String groupId()` -> `java.lang.String groupId()` +* `withIdentity(models.ManagedServiceIdentity)` was removed +* `toJson(com.azure.json.JsonWriter)` was removed +* `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` +* `java.lang.String name()` -> `java.lang.String name()` +* `java.lang.String type()` -> `java.lang.String type()` +* `validate()` was removed +* `withRequiredZoneNames(java.util.List)` was removed +* `withLocation(java.lang.String)` was removed +* `models.Sku sku()` -> `models.Sku sku()` +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `java.util.List requiredMembers()` -> `java.util.List requiredMembers()` +* `withTags(java.util.Map)` was removed +* `fromJson(com.azure.json.JsonReader)` was removed +* `java.lang.String id()` -> `java.lang.String id()` +* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` +* `withSku(models.Sku)` was removed +* `java.lang.String location()` -> `java.lang.String location()` +* `java.util.Map tags()` -> `java.util.Map tags()` + +#### `models.PipelineJob` was modified + +* `status()` was removed +* `validate()` was removed + +#### `models.Password` was modified + +* `Password()` was changed to private access +* `validate()` was removed + +#### `models.ColumnTransformer` was modified + +* `validate()` was removed + +#### `models.TrainingSettings` was modified + +* `validate()` was removed + +#### `models.RecurrenceSchedule` was modified + +* `validate()` was removed + +#### `models.StorageAccountDetails` was modified + +* `userCreatedStorageAccount()` was removed +* `validate()` was removed +* `withUserCreatedStorageAccount(models.UserCreatedStorageAccount)` was removed + +#### `models.PartialMinimalTrackedResource` was modified + +* `validate()` was removed + +#### `models.RegistryRegionArmDetails` was modified + +* `validate()` was removed + +#### `models.EncryptionKeyVaultUpdateProperties` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionManagedIdentity` was modified + +* `validate()` was removed + +#### `models.CustomTargetLags` was modified + +* `validate()` was removed + +#### `models.DistributionConfiguration` was modified + +* `validate()` was removed + +#### `models.StaticInputData` was modified + +* `validate()` was removed + +#### `models.Seasonality` was modified + +* `validate()` was removed + +#### `models.HDInsightProperties` was modified + +* `validate()` was removed + +#### `models.Classification` was modified + +* `validate()` was removed + +#### `models.VirtualMachine` was modified + +* `provisioningErrors()` was removed +* `validate()` was removed +* `createdOn()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed + +#### `models.RegressionTrainingSettings` was modified + +* `validate()` was removed + +#### `models.VolumeOptions` was modified + +* `validate()` was removed + +#### `models.UpdateWorkspaceQuotas` was modified + +* `UpdateWorkspaceQuotas()` was changed to private access +* `validate()` was removed +* `withStatus(models.Status)` was removed +* `withLimit(java.lang.Long)` was removed + +#### `models.AmlCompute` was modified + +* `createdOn()` was removed +* `provisioningErrors()` was removed +* `validate()` was removed +* `provisioningState()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed + +#### `models.AzureDataLakeGen2Datastore` was modified + +* `validate()` was removed +* `isDefault()` was removed + +#### `models.MonitoringTarget` was modified + +* `validate()` was removed + +#### `models.ImageModelSettingsClassification` was modified + +* `withBeta1(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed +* `withStepLRGamma(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed +* `withBeta2(java.lang.Float)` was removed +* `withWarmupCosineLRCycles(java.lang.Float)` was removed +* `validate()` was removed +* `withWeightDecay(java.lang.Float)` was removed + +#### `models.QueueSettings` was modified + +* `validate()` was removed + +#### `models.AccountKeyDatastoreCredentials` was modified + +* `validate()` was removed + +#### `models.ContainerResourceRequirements` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceConnectivityEndpoints` was modified + +* `ComputeInstanceConnectivityEndpoints()` was changed to private access +* `validate()` was removed + +#### `models.Databricks` was modified + +* `modifiedOn()` was removed +* `createdOn()` was removed +* `provisioningErrors()` was removed +* `isAttachedCompute()` was removed +* `provisioningState()` was removed +* `validate()` was removed + +#### `models.PrivateEndpointConnection$Update` was modified + +* `withPrivateEndpoint(models.PrivateEndpoint)` was removed + +#### `models.FeatureAttributionMetricThreshold` was modified + +* `validate()` was removed + +#### `models.UriFileDataVersion` was modified + +* `validate()` was removed + +#### `models.ComputeRecurrenceSchedule` was modified + +* `validate()` was removed + +#### `models.MonitorServerlessSparkCompute` was modified + +* `validate()` was removed + +#### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified + +* `createdByWorkspaceArmId()` was removed +* `group()` was removed +* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `validate()` was removed + +#### `models.UriFileJobInput` was modified + +* `validate()` was removed + +#### `models.ComputeInstance` was modified + +* `createdOn()` was removed +* `provisioningErrors()` was removed +* `validate()` was removed +* `modifiedOn()` was removed +* `isAttachedCompute()` was removed +* `provisioningState()` was removed + +#### `models.AnonymousAccessCredential` was modified + +* `AnonymousAccessCredential()` was changed to private access +* `validate()` was removed + +#### `models.SkuCapacity` was modified + +* `SkuCapacity()` was changed to private access +* `withDefaultProperty(java.lang.Integer)` was removed +* `withMinimum(java.lang.Integer)` was removed +* `withScaleType(models.SkuScaleType)` was removed +* `validate()` was removed +* `withMaximum(java.lang.Integer)` was removed + +#### `models.WorkspaceConnections` was modified + +* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.ComponentContainerProperties` was modified + +* `validate()` was removed + +#### `models.AmlComputeProperties` was modified + +* `validate()` was removed + +#### `models.Route` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceContainer` was modified + +* `ComputeInstanceContainer()` was changed to private access +* `withNetwork(models.Network)` was removed +* `withName(java.lang.String)` was removed +* `withEnvironment(models.ComputeInstanceEnvironmentInfo)` was removed +* `validate()` was removed +* `withGpu(java.lang.String)` was removed +* `withAutosave(models.Autosave)` was removed + +#### `models.UriFileJobOutput` was modified + +* `validate()` was removed + +#### `models.MaterializationSettings` was modified + +* `validate()` was removed + +#### `models.Recurrence` was modified + +* `validate()` was removed + +#### `models.LiteralJobInput` was modified + +* `validate()` was removed + +#### `models.TableVerticalLimitSettings` was modified + +* `validate()` was removed + +#### `models.UriFolderJobInput` was modified + +* `validate()` was removed + +#### `models.TrialComponent` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionServicePrincipal` was modified + +* `validate()` was removed + +#### `models.MedianStoppingPolicy` was modified + +* `validate()` was removed + +#### `models.Webhook` was modified + +* `validate()` was removed + +#### `models.Datastore` was modified + +* `listSecretsWithResponse(com.azure.core.util.Context)` was removed + +#### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `validate()` was removed +* `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed + +#### `models.NotebookPreparationError` was modified + +* `NotebookPreparationError()` was changed to private access +* `validate()` was removed +* `withStatusCode(java.lang.Integer)` was removed +* `withErrorMessage(java.lang.String)` was removed + +#### `models.PrivateEndpointDestination` was modified + +* `validate()` was removed + +#### `models.ScaleSettings` was modified + +* `validate()` was removed + +#### `models.PartialManagedServiceIdentity` was modified + +* `validate()` was removed + +#### `models.Regression` was modified + +* `validate()` was removed + +#### `models.OneLakeArtifact` was modified + +* `validate()` was removed + +#### `models.PrivateEndpoint` was modified + +* `validate()` was removed + +#### `models.ServerlessEndpointProperties` was modified + +* `validate()` was removed + +#### `MachineLearningManager` was modified + +* `fluent.AzureMachineLearningWorkspaces serviceClient()` -> `fluent.MachineLearningManagementClient serviceClient()` + +#### `models.ImageMetadata` was modified + +* `ImageMetadata()` was changed to private access +* `validate()` was removed +* `withCurrentImageVersion(java.lang.String)` was removed +* `withLatestImageVersion(java.lang.String)` was removed +* `withIsLatestOsImageVersion(java.lang.Boolean)` was removed + +#### `models.ScheduleActionBase` was modified + +* `validate()` was removed + +#### `models.MLTableData` was modified + +* `validate()` was removed + +#### `models.Forecasting` was modified + +* `validate()` was removed + +#### `models.CertificateDatastoreSecrets` was modified + +* `validate()` was removed + +#### `models.CustomKeysWorkspaceConnectionProperties` was modified + +* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed +* `validate()` was removed + +#### `models.CertificateDatastoreCredentials` was modified + +* `withTenantId(java.util.UUID)` was removed +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `validate()` was removed +* `withClientId(java.util.UUID)` was removed + +#### `models.CustomKeys` was modified + +* `validate()` was removed + +#### `models.FeatureStoreSettings` was modified + +* `validate()` was removed + +#### `models.VirtualMachineSchemaProperties` was modified + +* `validate()` was removed + +#### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed +* `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed +* `validate()` was removed + +#### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ServiceManagedResourcesSettings` was modified + +* `validate()` was removed + +#### `models.GridSamplingAlgorithm` was modified + +* `validate()` was removed + +#### `models.IdentityForCmk` was modified + +* `validate()` was removed + +#### `models.AzureFileDatastore` was modified + +* `isDefault()` was removed +* `validate()` was removed + +#### `models.ManagedNetworkProvisionOptions` was modified + +* `validate()` was removed + +#### `models.SparkJob` was modified + +* `validate()` was removed +* `status()` was removed + +#### `models.WorkspaceUpdateParameters` was modified + +* `WorkspaceUpdateParameters()` was removed +* `models.Sku sku()` -> `models.Sku sku()` +* `withPrimaryUserAssignedIdentity(java.lang.String)` was removed +* `fromJson(com.azure.json.JsonReader)` was removed +* `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -> `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` +* `fluent.models.ManagedNetworkSettingsInner managedNetwork()` -> `models.ManagedNetworkSettings managedNetwork()` +* `withImageBuildCompute(java.lang.String)` was removed +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `models.ServerlessComputeSettings serverlessComputeSettings()` -> `models.ServerlessComputeSettings serverlessComputeSettings()` +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed +* `withV1LegacyMode(java.lang.Boolean)` was removed +* `java.lang.String description()` -> `java.lang.String description()` +* `toJson(com.azure.json.JsonWriter)` was removed +* `models.EncryptionUpdateProperties encryption()` -> `models.EncryptionUpdateProperties encryption()` +* `withDescription(java.lang.String)` was removed +* `withContainerRegistry(java.lang.String)` was removed +* `withSku(models.Sku)` was removed +* `withFeatureStoreSettings(models.FeatureStoreSettings)` was removed +* `withManagedNetwork(fluent.models.ManagedNetworkSettingsInner)` was removed +* `withServerlessComputeSettings(models.ServerlessComputeSettings)` was removed +* `java.lang.String friendlyName()` -> `java.lang.String friendlyName()` +* `validate()` was removed +* `java.lang.String imageBuildCompute()` -> `java.lang.String imageBuildCompute()` +* `java.lang.String applicationInsights()` -> `java.lang.String applicationInsights()` +* `withApplicationInsights(java.lang.String)` was removed +* `withEncryption(models.EncryptionUpdateProperties)` was removed +* `withServiceManagedResourcesSettings(models.ServiceManagedResourcesSettings)` was removed +* `java.lang.Boolean enableDataIsolation()` -> `java.lang.Boolean enableDataIsolation()` +* `java.util.Map tags()` -> `java.util.Map tags()` +* `models.FeatureStoreSettings featureStoreSettings()` -> `models.FeatureStoreSettings featureStoreSettings()` +* `withTags(java.util.Map)` was removed +* `java.lang.Boolean v1LegacyMode()` -> `java.lang.Boolean v1LegacyMode()` +* `withFriendlyName(java.lang.String)` was removed +* `java.lang.String primaryUserAssignedIdentity()` -> `java.lang.String primaryUserAssignedIdentity()` +* `withIdentity(models.ManagedServiceIdentity)` was removed +* `withEnableDataIsolation(java.lang.Boolean)` was removed +* `java.lang.String containerRegistry()` -> `java.lang.String containerRegistry()` +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` + +#### `models.ComputeRuntimeDto` was modified + +* `validate()` was removed + +#### `models.FeatureWindow` was modified + +* `validate()` was removed + +#### `models.Cron` was modified + +* `validate()` was removed + +#### `models.NlpVerticalFeaturizationSettings` was modified + +* `validate()` was removed + +#### `models.VirtualMachineImage` was modified + +* `validate()` was removed + +#### `models.UriFolderJobOutput` was modified + +* `validate()` was removed + +#### `models.Compute` was modified + +* `validate()` was removed + +#### `models.FeatureSubset` was modified + +* `validate()` was removed + +#### `models.PendingUploadRequestDto` was modified + +* `validate()` was removed + +#### `models.OutputPathAssetReference` was modified + +* `validate()` was removed + +#### `models.DataCollector` was modified + +* `validate()` was removed + +#### `models.TriggerBase` was modified + +* `validate()` was removed + +#### `models.AssetBase` was modified + +* `validate()` was removed + +#### `models.InstanceTypeSchemaResources` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionAccountKey` was modified + +* `validate()` was removed + +#### `models.MonitoringInputDataBase` was modified + +* `validate()` was removed + +#### `models.ScriptReference` was modified + +* `validate()` was removed + +#### `models.MLTableJobOutput` was modified + +* `validate()` was removed + +#### `models.AutoMLVertical` was modified + +* `validate()` was removed + +#### `models.Mpi` was modified + +* `validate()` was removed + +#### `models.DiagnoseResponseResultValue` was modified + +* `DiagnoseResponseResultValue()` was changed to private access +* `withKeyVaultResults(java.util.List)` was removed +* `withDnsResolutionResults(java.util.List)` was removed +* `withStorageAccountResults(java.util.List)` was removed +* `validate()` was removed +* `withApplicationInsightsResults(java.util.List)` was removed +* `withNetworkSecurityRuleResults(java.util.List)` was removed +* `withUserDefinedRouteResults(java.util.List)` was removed +* `withOtherResults(java.util.List)` was removed +* `withContainerRegistryResults(java.util.List)` was removed +* `withResourceLockResults(java.util.List)` was removed + +#### `models.SasDatastoreCredentials` was modified + +* `validate()` was removed + +#### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed + +#### `models.CategoricalDataQualityMetricThreshold` was modified + +* `validate()` was removed + +#### `models.DatabricksComputeSecrets` was modified + +* `DatabricksComputeSecrets()` was changed to private access +* `withDatabricksAccessToken(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ImageModelDistributionSettings` was modified + +* `validate()` was removed + +#### `models.CustomService` was modified + +* `validate()` was removed + +#### `models.AadAuthTypeWorkspaceConnectionProperties` was modified + +* `group()` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed + +#### `models.BlobReferenceForConsumptionDto` was modified + +* `BlobReferenceForConsumptionDto()` was changed to private access +* `withBlobUri(java.lang.String)` was removed +* `validate()` was removed +* `withCredential(models.PendingUploadCredentialDto)` was removed +* `withStorageAccountArmId(java.lang.String)` was removed + +#### `models.VolumeDefinition` was modified + +* `validate()` was removed + +#### `models.DiagnoseResult` was modified + +* `DiagnoseResult()` was changed to private access +* `validate()` was removed + +#### `models.TritonModelJobOutput` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionSharedAccessSignature` was modified + +* `validate()` was removed + +#### `models.DatastoreCredentials` was modified + +* `validate()` was removed + +#### `models.ProbeSettings` was modified + +* `validate()` was removed + +#### `models.ResourceBase` was modified + +* `validate()` was removed + +#### `models.ManagedServiceIdentity` was modified + +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `validate()` was removed +* `java.util.UUID principalId()` -> `java.lang.String principalId()` + +#### `models.EstimatedVMPrices` was modified + +* `EstimatedVMPrices()` was changed to private access +* `validate()` was removed +* `withBillingCurrency(models.BillingCurrency)` was removed +* `withUnitOfMeasure(models.UnitOfMeasure)` was removed +* `withValues(java.util.List)` was removed + +#### `models.ServerlessInferenceEndpoint` was modified + +* `ServerlessInferenceEndpoint()` was changed to private access +* `withUri(java.lang.String)` was removed +* `validate()` was removed + +#### `models.TextClassificationMultilabel` was modified + +* `validate()` was removed + +#### `models.FeaturesetVersionBackfillRequest` was modified + +* `validate()` was removed + +#### `models.CosmosDbSettings` was modified + +* `validate()` was removed + +#### `models.IdAssetReference` was modified + +* `validate()` was removed + +#### `models.PersonalComputeInstanceSettings` was modified + +* `validate()` was removed + +#### `models.OutboundRule` was modified + +* `validate()` was removed + +#### `models.CommandJobLimits` was modified + +* `validate()` was removed + +#### `models.VirtualMachineSize` was modified + +* `VirtualMachineSize()` was changed to private access +* `withSupportedComputeTypes(java.util.List)` was removed +* `withEstimatedVMPrices(models.EstimatedVMPrices)` was removed +* `validate()` was removed + +#### `models.ModelSettings` was modified + +* `validate()` was removed + +#### `models.Endpoint` was modified + +* `validate()` was removed + +#### `models.ImageClassification` was modified + +* `validate()` was removed + +#### `models.MonitoringThreshold` was modified + +* `validate()` was removed + +#### `models.DatabricksProperties` was modified + +* `validate()` was removed + +#### `models.RollingInputData` was modified + +* `validate()` was removed + +#### `models.SasDatastoreSecrets` was modified + +* `validate()` was removed + +#### `models.SharedPrivateLinkResource` was modified + +* `validate()` was removed + +#### `models.TritonModelJobInput` was modified + +* `validate()` was removed + +#### `models.ContainerResourceSettings` was modified + +* `validate()` was removed + +#### `models.CustomModelJobOutput` was modified + +* `validate()` was removed + +#### `models.FlavorData` was modified + +* `validate()` was removed + +#### `models.DatastoreProperties` was modified + +* `validate()` was removed + +#### `models.IndexColumn` was modified + +* `validate()` was removed + +#### `models.CategoricalDataDriftMetricThreshold` was modified + +* `validate()` was removed + +#### `models.BayesianSamplingAlgorithm` was modified + +* `validate()` was removed + +#### `models.NumericalDataQualityMetricThreshold` was modified + +* `validate()` was removed + +#### `models.DeploymentResourceConfiguration` was modified + +* `validate()` was removed + +#### `models.PredictionDriftMetricThresholdBase` was modified + +* `validate()` was removed + +#### `models.CustomNCrossValidations` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceEnvironmentInfo` was modified + +* `ComputeInstanceEnvironmentInfo()` was changed to private access +* `validate()` was removed +* `withName(java.lang.String)` was removed +* `withVersion(java.lang.String)` was removed + +#### `models.GetBlobReferenceForConsumptionDto` was modified + +* `GetBlobReferenceForConsumptionDto()` was changed to private access +* `withCredential(models.DataReferenceCredential)` was removed +* `validate()` was removed +* `withStorageAccountArmId(java.lang.String)` was removed +* `withBlobUri(java.lang.String)` was removed + +#### `models.SkuSetting` was modified + +* `SkuSetting()` was changed to private access +* `validate()` was removed +* `withTier(models.SkuTier)` was removed +* `withName(java.lang.String)` was removed + +#### `models.MonitorEmailNotificationSettings` was modified + +* `validate()` was removed + +#### `models.ResourceConfiguration` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceSshSettings` was modified + +* `validate()` was removed + +#### `models.RegenerateEndpointKeysRequest` was modified + +* `validate()` was removed + +#### `models.PrivateLinkResources` was modified + +* `models.PrivateLinkResourceListResult list(java.lang.String,java.lang.String)` -> `com.azure.core.http.rest.PagedIterable list(java.lang.String,java.lang.String)` +* `listWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.TensorFlow` was modified + +* `validate()` was removed + +#### `models.SasCredential` was modified + +* `SasCredential()` was changed to private access +* `validate()` was removed +* `withSasUri(java.lang.String)` was removed + +#### `models.NotificationSetting` was modified + +* `validate()` was removed + +#### `models.SasAuthTypeWorkspaceConnectionProperties` was modified + +* `withValue(java.lang.String)` was removed +* `validate()` was removed +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed + +#### `models.BatchDeploymentConfiguration` was modified + +* `validate()` was removed + +#### `models.SasCredentialDto` was modified + +* `SasCredentialDto()` was changed to private access +* `withSasUri(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ServiceTagOutboundRule` was modified + +* `validate()` was removed + +#### `models.DeploymentLogsRequest` was modified + +* `validate()` was removed + +#### `models.TextNer` was modified + +* `validate()` was removed + +#### `models.FqdnEndpoint` was modified + +* `FqdnEndpoint()` was changed to private access +* `withEndpointDetails(java.util.List)` was removed +* `withDomainName(java.lang.String)` was removed +* `validate()` was removed + +#### `models.MLTableJobInput` was modified + +* `validate()` was removed + +#### `models.AutoForecastHorizon` was modified + +* `validate()` was removed + +#### `models.EnvironmentVariable` was modified + +* `validate()` was removed + +#### `models.WorkspaceConnectionOAuth2` was modified + +* `validate()` was removed +* `withClientId(java.util.UUID)` was removed +* `java.util.UUID clientId()` -> `java.lang.String clientId()` + +#### `models.PartialRegistryPartialTrackedResource` was modified + +* `validate()` was removed + +#### `models.PartialMinimalTrackedResourceWithSkuAndIdentity` was modified + +* `validate()` was removed + +#### `models.FeaturestoreEntityContainerProperties` was modified + +* `validate()` was removed + +#### `models.EncryptionProperty` was modified + +* `withKeyVaultProperties(models.EncryptionKeyVaultProperties)` was removed +* `models.EncryptionKeyVaultProperties keyVaultProperties()` -> `models.KeyVaultProperties keyVaultProperties()` +* `validate()` was removed + +#### `models.FeaturestoreEntityVersionProperties` was modified + +* `validate()` was removed + +#### `models.CommandJob` was modified + +* `validate()` was removed +* `status()` was removed + +#### `models.NumericalDataDriftMetricThreshold` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceVersion` was modified + +* `ComputeInstanceVersion()` was changed to private access +* `validate()` was removed +* `withRuntime(java.lang.String)` was removed + +#### `models.IdentityConfiguration` was modified + +* `validate()` was removed + +#### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed + +#### `models.RegistryListCredentialsResult` was modified + +* `RegistryListCredentialsResult()` was changed to private access +* `withPasswords(java.util.List)` was removed +* `validate()` was removed + +#### `models.FeaturizationSettings` was modified + +* `validate()` was removed + +#### `models.ServicePrincipalDatastoreCredentials` was modified + +* `withTenantId(java.util.UUID)` was removed +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `validate()` was removed +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `withClientId(java.util.UUID)` was removed + +#### `models.ServiceTagDestination` was modified + +* `validate()` was removed + +#### `models.RequestLogging` was modified + +* `validate()` was removed + +#### `models.SslConfiguration` was modified + +* `validate()` was removed + +#### `models.DiagnoseWorkspaceParameters` was modified + +* `validate()` was removed + +#### `models.EndpointDeploymentPropertiesBase` was modified + +* `validate()` was removed + +#### `models.DataFactory` was modified + +* `isAttachedCompute()` was removed +* `provisioningState()` was removed +* `createdOn()` was removed +* `modifiedOn()` was removed +* `provisioningErrors()` was removed +* `validate()` was removed + +#### `models.CustomTargetRollingWindowSize` was modified + +* `validate()` was removed + +#### `models.ImageObjectDetection` was modified + +* `validate()` was removed + +#### `models.FeaturesetContainerProperties` was modified + +* `validate()` was removed + +#### `models.Sku` was modified + +* `validate()` was removed + +#### `models.InstanceTypeSchema` was modified + +* `validate()` was removed + +#### `models.UserIdentity` was modified + +* `validate()` was removed + +#### `models.ImageModelSettings` was modified + +* `withMomentum(java.lang.Float)` was removed +* `java.lang.Float stepLRGamma()` -> `java.lang.Double stepLRGamma()` +* `java.lang.Float momentum()` -> `java.lang.Double momentum()` +* `java.lang.Float weightDecay()` -> `java.lang.Double weightDecay()` +* `java.lang.Float warmupCosineLRCycles()` -> `java.lang.Double warmupCosineLRCycles()` +* `withWeightDecay(java.lang.Float)` was removed +* `java.lang.Float beta2()` -> `java.lang.Double beta2()` +* `java.lang.Float learningRate()` -> `java.lang.Double learningRate()` +* `java.lang.Float beta1()` -> `java.lang.Double beta1()` +* `withStepLRGamma(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed +* `withBeta1(java.lang.Float)` was removed +* `validate()` was removed +* `withBeta2(java.lang.Float)` was removed +* `withWarmupCosineLRCycles(java.lang.Float)` was removed + +#### `models.CustomMonitoringSignal` was modified + +* `validate()` was removed + +#### `models.UserAccountCredentials` was modified + +* `validate()` was removed + +#### `models.JobOutput` was modified + +* `validate()` was removed + +#### `models.EndpointScheduleAction` was modified + +* `validate()` was removed + +#### `models.ManagedIdentity` was modified + +* `java.util.UUID objectId()` -> `java.lang.String objectId()` +* `withObjectId(java.util.UUID)` was removed +* `withClientId(java.util.UUID)` was removed +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `validate()` was removed + +#### `models.CreateMonitorAction` was modified + +* `validate()` was removed + +#### `models.SetupScripts` was modified + +* `validate()` was removed + +#### `models.MLFlowModelJobInput` was modified + +* `validate()` was removed + +#### `models.CustomForecastHorizon` was modified + +* `validate()` was removed + +#### `models.AssetReferenceBase` was modified + +* `validate()` was removed + +#### `models.DataQualityMetricThresholdBase` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceProperties` was modified + +* `validate()` was removed + +#### `models.SparkResourceConfiguration` was modified + +* `validate()` was removed + +#### `models.UsageName` was modified + +* `UsageName()` was changed to private access +* `validate()` was removed + +#### `models.SparkJobPythonEntry` was modified + +* `validate()` was removed + +#### `models.SweepJob` was modified + +* `validate()` was removed +* `status()` was removed + +#### `models.AutoSeasonality` was modified + +* `validate()` was removed + +#### `models.PrivateEndpointConnection` was modified + +* `models.PrivateEndpoint privateEndpoint()` -> `models.WorkspacePrivateEndpointResource privateEndpoint()` + +#### `models.NCrossValidations` was modified + +* `validate()` was removed + +#### `models.DataVersionBase$Definition` was modified + +* `withExistingData(java.lang.String,java.lang.String,java.lang.String)` was removed + +#### `models.ScheduleBase` was modified + +* `validate()` was removed + +#### `models.ImageModelDistributionSettingsObjectDetection` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceDataMount` was modified + +* `validate()` was removed + +#### `models.ForecastingTrainingSettings` was modified + +* `validate()` was removed + +#### `models.TextClassification` was modified + +* `validate()` was removed + +#### `models.PartialSku` was modified + +* `validate()` was removed + +#### `models.AutoTargetLags` was modified + +* `validate()` was removed + +#### `models.ImageLimitSettings` was modified + +* `validate()` was removed + +#### `models.OnlineScaleSettings` was modified + +* `validate()` was removed + +#### `models.DataContainerProperties` was modified + +* `validate()` was removed + +#### `models.PartialMinimalTrackedResourceWithIdentity` was modified + +* `validate()` was removed + +#### `models.AutoMLJob` was modified + +* `validate()` was removed +* `status()` was removed + +#### `models.AmlTokenComputeIdentity` was modified + +* `validate()` was removed + +#### `models.RandomSamplingAlgorithm` was modified + +* `validate()` was removed + +#### `models.JobInput` was modified + +* `validate()` was removed + +#### `models.FeatureAttributionDriftMonitoringSignal` was modified + +* `validate()` was removed + +#### `models.JobScheduleAction` was modified + +* `validate()` was removed + +#### `models.JobService` was modified + +* `validate()` was removed + +#### `models.HDInsight` was modified + +* `isAttachedCompute()` was removed +* `validate()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed +* `createdOn()` was removed +* `provisioningErrors()` was removed + +#### `models.KubernetesOnlineDeployment` was modified + +* `validate()` was removed +* `provisioningState()` was removed + +#### `models.AccountKeyDatastoreSecrets` was modified + +* `validate()` was removed + +#### `models.ServicePrincipalDatastoreSecrets` was modified + +* `validate()` was removed + +#### `models.OnlineEndpointProperties` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccessType)` was removed +* `models.PublicNetworkAccessType publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` +* `validate()` was removed + +#### `models.CustomSeasonality` was modified + +* `validate()` was removed + +#### `models.ResourceId` was modified + +* `validate()` was removed + +#### `models.AllNodes` was modified + +* `validate()` was removed + +#### `models.RecurrenceTrigger` was modified + +* `validate()` was removed + +#### `models.FqdnEndpointDetail` was modified + +* `FqdnEndpointDetail()` was changed to private access +* `withPort(java.lang.Integer)` was removed +* `validate()` was removed + +#### `models.MonitorComputeIdentityBase` was modified + +* `validate()` was removed + +#### `models.ContentSafety` was modified + +* `validate()` was removed + +#### `models.ComputeInstanceLastOperation` was modified + +* `ComputeInstanceLastOperation()` was changed to private access +* `withOperationTrigger(models.OperationTrigger)` was removed +* `validate()` was removed +* `withOperationName(models.OperationName)` was removed +* `withOperationTime(java.time.OffsetDateTime)` was removed +* `withOperationStatus(models.OperationStatus)` was removed + +#### `models.ForecastingSettings` was modified + +* `validate()` was removed + +#### `models.BatchPipelineComponentDeploymentConfiguration` was modified + +* `validate()` was removed + +#### `models.JobBaseProperties` was modified + +* `validate()` was removed + +#### `models.PyTorch` was modified + +* `validate()` was removed + +#### `models.PendingUploadCredentialDto` was modified + +* `validate()` was removed + +#### `models.RegistryPrivateLinkServiceConnectionState` was modified + +* `models.EndpointServiceConnectionStatus status()` -> `models.PrivateEndpointServiceConnectionStatus status()` +* `withStatus(models.EndpointServiceConnectionStatus)` was removed +* `validate()` was removed + +#### `models.FixedInputData` was modified + +* `validate()` was removed + +#### `models.UserAssignedIdentity` was modified + +* `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `validate()` was removed +* `java.util.UUID clientId()` -> `java.lang.String clientId()` + +#### `models.DataLakeAnalyticsSchemaProperties` was modified + +* `validate()` was removed + +#### `models.ComponentVersionProperties` was modified + +* `validate()` was removed + +#### `models.FqdnOutboundRule` was modified + +* `validate()` was removed + +#### `models.SamplingAlgorithm` was modified + +* `validate()` was removed + +#### `models.ComputeSchedules` was modified + +* `validate()` was removed + +### Features Added + +* `models.ManagedNetworkSettingsProperties` was added + +* `models.GroupEnvironmentConfiguration` was added + +* `models.ManagedOnlineEndpointResourceProperties` was added + +* `models.ManagedPERequirement` was added + +* `models.ManagedNetworkSettingsPropertiesBasicResource$Update` was added + +* `models.DataGenerationVertical` was added + +* `models.PackageDetails` was added + +* `models.DeltaModelStatusRequest` was added + +* `models.Endpoints` was added + +* `models.GroupStatus` was added + +* `models.ManagedNetworkKind` was added + +* `models.OutboundRules` was added + +* `models.RaiPolicyPropertiesBasicResource$DefinitionStages` was added + +* `models.WorkspaceConnectionPropertiesV2BasicResource$Update` was added + +* `models.RaiPolicyType` was added + +* `models.RaiBlocklistItemPropertiesBasicResource$Definition` was added + +* `models.RaiPolicies` was added + +* `models.EndpointResourcePropertiesBasicResource` was added + +* `models.EndpointDeployments` was added + +* `models.CapabilityHost$Update` was added + +* `models.InferenceGroup$DefinitionStages` was added + +* `models.DeploymentModelVersionUpgradeOption` was added + +* `models.ManagedNetworkSettingsBasicResource` was added + +* `models.CapabilityHosts` was added + +* `models.InferenceEndpointProperties` was added + +* `models.ServiceAccountKeyName` was added + +* `models.EndpointDeploymentResourceProperties` was added + +* `models.UsageAndQuotaDetails` was added + +* `models.IdleShutdownSetting` was added + +* `models.InferencePool` was added + +* `models.RaiPolicyPropertiesBasicResource$Definition` was added + +* `models.RaiBlocklistProperties` was added + +* `models.ServerlessOffer` was added + +* `models.CapabilityHost$UpdateStages` was added + +* `models.ManagedResourceGroupSettings` was added + +* `models.CapabilityHost$DefinitionStages` was added + +* `models.EndpointResourcePropertiesBasicResource$Definition` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$UpdateStages` was added + +* `models.OutboundRulesOperations` was added + +* `models.EndpointModelSkuProperties` was added + +* `models.AKSSchemaProperties` was added + +* `models.InferenceGroup` was added + +* `models.EndpointResourcePropertiesBasicResource$UpdateStages` was added + +* `models.InferenceEndpoint$DefinitionStages` was added + +* `models.RequestConfiguration` was added + +* `models.PromptSettings` was added + +* `models.EndpointDeploymentModel` was added + +* `models.EndpointResourcePropertiesBasicResource$DefinitionStages` was added + +* `models.ManagedResourceGroupAssignedIdentities` was added + +* `models.MountMode` was added + +* `models.EndpointKeys` was added + +* `models.ImageDetails` was added + +* `models.EndpointResourceProperties` was added + +* `models.InferencePool$DefinitionStages` was added + +* `models.RaiBlocklistPropertiesBasicResource$DefinitionStages` was added + +* `models.ActualCapacityInfo` was added + +* `models.ServerlessEndpointCapacityReservation` was added + +* `models.SpeechEndpointResourceProperties` was added + +* `models.PTUQuotas` was added + +* `models.InferenceGroupProperties` was added + +* `models.ManagedNetworkSettingsPropertiesBasicResource$UpdateStages` was added + +* `models.EndpointResourcePropertiesBasicResource$Update` was added + +* `models.AKSComputeSecrets` was added + +* `models.AllowedContentLevel` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$Update` was added + +* `models.CapabilityHost` was added + +* `models.FqdnEndpointsPropertyBag` was added + +* `models.InferencePool$Update` was added + +* `models.JobResources` was added + +* `models.ServerlessEndpointModelSettings` was added + +* `models.AuthMode` was added + +* `models.ServerlessEndpointResourceProperties` was added + +* `models.TeacherModelSettings` was added + +* `models.ConnectionRaiBlocklists` was added + +* `models.AccountApiKeys` was added + +* `models.EndpointType` was added + +* `models.DeltaModelListRequest` was added + +* `models.EndpointModelDeprecationProperties` was added + +* `models.ConnectionRaiPolicies` was added + +* `models.FinetuningDetails` was added + +* `models.ManagedNetworkSettingsOperations` was added + +* `models.EndpointModelSkuRateLimitProperties` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource` was added + +* `models.RaiPolicyContentFilter` was added + +* `models.Ray` was added + +* `models.FineTuningJob` was added + +* `models.ResizeSchema` was added + +* `models.VulnerabilityDetails` was added + +* `models.ModelProvider` was added + +* `models.MlflowAutologger` was added + +* `models.RaiBlocklistItemPropertiesBasicResource$DefinitionStages` was added + +* `models.ComputeInstanceAutologgerSettings` was added + +* `models.AzureOpenAiHyperParameters` was added + +* `models.ConnectionRaiBlocklistItems` was added + +* `models.FineTuningTaskType` was added + +* `models.ManagedNetworkProvisioningState` was added + +* `models.GroupModelConfiguration` was added + +* `models.RaiBlocklistPropertiesBasicResource$Definition` was added + +* `models.StringStringKeyValuePair` was added + +* `models.DefaultActionType` was added + +* `models.CustomModelFineTuning` was added + +* `models.CapabilityHostKind` was added + +* `models.DeltaModelStatusResponse` was added + +* `models.TeacherModelEndpointRequestSettings` was added + +* `models.ConnectionRaiBlocklistItemsOperations` was added + +* `models.WorkspaceConnectionUpdateParameter` was added + +* `models.ScaleUnitConfiguration` was added + +* `models.OpenAIEndpointDeploymentResourceProperties` was added + +* `models.SystemDatastoresAuthMode` was added + +* `models.EndpointModelProperties` was added + +* `models.DeltaModelCurrentState` was added + +* `models.PoolProvisioningState` was added + +* `models.FirewallSku` was added + +* `models.InferenceGroup$Definition` was added + +* `models.RaiBlocklistItemBulkRequest` was added + +* `models.ManagedNetworkSettingsPropertiesBasicResource$DefinitionStages` was added + +* `models.Connections` was added + +* `models.JupyterKernelConfig` was added + +* `models.AKS` was added + +* `models.ConnectionRaiBlocklistsOperations` was added + +* `models.ManagedNetworkSettingsEx` was added + +* `models.InferenceEndpoint` was added + +* `models.ManagedOnlineEndpointDeploymentResourceProperties` was added + +* `models.RaiBlocklistItemPropertiesBasicResource` was added + +* `models.CapabilityHost$Definition` was added + +* `models.AzureOpenAiFineTuning` was added + +* `models.RaiBlocklistPropertiesBasicResource` was added + +* `models.RaiPoliciesOperations` was added + +* `models.PTUDeploymentUsage` was added + +* `models.InferenceGroup$Update` was added + +* `models.ImageInfo` was added + +* `models.ModelLifecycleStatus` was added + +* `models.AvailableQuotaProperties` was added + +* `models.RaiPolicyMode` was added + +* `models.KeyVaultProperties` was added + +* `models.InferenceEndpoint$Update` was added + +* `models.EndpointModelSkuCapacityProperties` was added + +* `models.EndpointModelSkuRateLimitRulePatternProperties` was added + +* `models.OsPatchingStatus` was added + +* `models.InferenceEndpoint$Definition` was added + +* `models.PatchStatus` was added + +* `models.InferenceGroups` was added + +* `models.ServerlessEndpointInferenceEndpoint` was added + +* `models.DataGenerationType` was added + +* `models.ServerlessEndpointContentSafety` was added + +* `models.DatasetReference` was added + +* `models.ContentSafetyEndpointDeploymentResourceProperties` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$DefinitionStages` was added + +* `models.CapabilityHostProperties` was added + +* `models.WorkspacePrivateEndpointResource` was added + +* `models.PATAuthTypeWorkspaceConnectionProperties` was added + +* `models.NetworkAcls` was added + +* `models.SpeechEndpointDeploymentResourceProperties` was added + +* `models.InferencePoolProperties` was added + +* `models.AKSNetworkingConfiguration` was added + +* `models.RaiPolicyPropertiesBasicResource` was added + +* `models.RaiPolicyContentSource` was added + +* `models.RaiBlocklistConfig` was added + +* `models.ContentSafetyEndpointResourceProperties` was added + +* `models.TeacherModelEndpoint` was added + +* `models.DistillationJob` was added + +* `models.InferenceGroup$UpdateStages` was added + +* `models.AvailableQuota` was added + +* `models.ManagedNetworkSettingsPropertiesBasicResource$Definition` was added + +* `models.InferenceEndpoints` was added + +* `models.VulnerabilityRisk` was added + +* `models.ConnectionRaiPoliciesOperations` was added + +* `models.IPRule` was added + +* `models.DeltaModelModifyRequest` was added + +* `models.DataGenerationTaskType` was added + +* `models.InferencePool$UpdateStages` was added + +* `models.ManagedPEStatus` was added + +* `models.InferenceEndpoint$UpdateStages` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$Definition` was added + +* `models.InferencePool$Definition` was added + +* `models.ContentSafetyLevel` was added + +* `models.FineTuningVertical` was added + +* `models.DefaultResourceProvisioningState` was added + +* `models.PropertiesBase` was added + +* `models.ManagedNetworkSettingsPropertiesBasicResource` was added + +* `models.SecretExpiry` was added + +* `models.InferencePools` was added + +* `models.CapabilityHostProvisioningState` was added + +* `models.RegenerateServiceAccountKeyContent` was added + +* `models.EndpointModels` was added + +* `models.LabelGeneration` was added + +* `models.OpenAIEndpointResourceProperties` was added + +* `models.CognitiveServicesSku` was added + +* `models.RaiPolicyProperties` was added + +* `models.VulnerabilityFindings` was added + +* `models.RaiBlocklistItemProperties` was added + +* `models.WorkspaceConnectionPropertiesV2BasicResource$UpdateStages` was added + +* `models.EndpointModelSkuRateLimitRuleProperties` was added + +#### `models.Registry$Definition` was modified + +* `withManagedResourceGroupSettings(models.ManagedResourceGroupSettings)` was added + +#### `models.DiagnoseRequestProperties` was modified + +* `requiredResourceProviders()` was added +* `withRequiredResourceProviders(java.util.Map)` was added + +#### `models.ConnectionCategory` was modified + +* `DATABRICKS` was added +* `AZURE_STORAGE_ACCOUNT` was added +* `POWER_PLATFORM_ENVIRONMENT` was added +* `REMOTE_TOOL` was added +* `SHAREPOINT` was added +* `APP_INSIGHTS` was added +* `MICROSOFT_FABRIC` was added +* `PINECONE` was added +* `GROUNDING_WITH_CUSTOM_SEARCH` was added +* `API_MANAGEMENT` was added +* `MODEL_GATEWAY` was added +* `AZURE_CONTAINER_APP_ENVIRONMENT` was added +* `MANAGED_ONLINE_ENDPOINT` was added +* `REMOTE_A2A` was added +* `APP_CONFIG` was added +* `GROUNDING_WITH_BING_SEARCH` was added +* `AZURE_KEY_VAULT` was added +* `ELASTICSEARCH` was added + +#### `models.WorkspaceConnectionPropertiesV2` was modified + +* `withPeRequirement(models.ManagedPERequirement)` was added +* `error()` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `useWorkspaceManagedIdentity()` was added +* `peRequirement()` was added +* `withError(java.lang.String)` was added +* `peStatus()` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added + +#### `models.BanditPolicy` was modified + +* `withSlackFactor(java.lang.Double)` was added +* `withSlackAmount(java.lang.Double)` was added + +#### `models.JobResourceConfiguration` was modified + +* `dockerArgsList()` was added +* `withDockerArgsList(java.util.List)` was added + +#### `models.MLFlowModelJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.ImageModelSettingsObjectDetection` was modified + +* `withValidationIouThreshold(java.lang.Double)` was added +* `withBoxScoreThreshold(java.lang.Double)` was added +* `withWarmupCosineLRCycles(java.lang.Double)` was added +* `withBeta2(java.lang.Double)` was added +* `withTileOverlapRatio(java.lang.Double)` was added +* `withWeightDecay(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added +* `withNmsIouThreshold(java.lang.Double)` was added +* `withTilePredictionsNmsThreshold(java.lang.Double)` was added +* `withBeta1(java.lang.Double)` was added +* `withLearningRate(java.lang.Double)` was added + +#### `models.ComputeInstanceState` was modified + +* `RESIZING` was added + +#### `models.FqdnEndpoints` was modified + +* `category()` was added +* `endpoints()` was added + +#### `models.DockerCredential` was modified + +* `userName()` was added + +#### `models.Registry` was modified + +* `managedResourceGroupSettings()` was added + +#### `models.Workspace$Update` was modified + +* `withIpAllowlist(java.util.List)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added + +#### `models.Image` was modified + +* `withVersion(java.lang.String)` was added +* `version()` was added + +#### `models.PrivateEndpointConnection$Definition` was modified + +* `withPrivateEndpoint(models.WorkspacePrivateEndpointResource)` was added + +#### `models.ComputeInstanceCreatedBy` was modified + +* `userName()` was added + +#### `models.ModelVersionProperties` was modified + +* `withDatasets(java.util.List)` was added +* `datasets()` was added + +#### `models.OnlineDeploymentProperties` was modified + +* `withStartupProbe(models.ProbeSettings)` was added +* `startupProbe()` was added + +#### `models.InferenceContainerProperties` was modified + +* `startupRoute()` was added +* `withStartupRoute(models.Route)` was added + +#### `models.OperationStatus` was modified + +* `RESIZE_FAILED` was added + +#### `models.OperationName` was modified + +* `RESIZE` was added + +#### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added + +#### `models.PrivateEndpointOutboundRule` was modified + +* `withFqdns(java.util.List)` was added +* `fqdns()` was added + +#### `models.Workspaces` was modified + +* `list(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `listByResourceGroup(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.ManagedOnlineDeployment` was modified + +* `withStartupProbe(models.ProbeSettings)` was added + +#### `models.EnvironmentVersionProperties` was modified + +* `withImageDetails(models.ImageDetails)` was added +* `imageDetails()` was added + +#### `models.Computes` was modified + +* `updateDataMountsWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `updateIdleShutdownSettingWithResponse(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `updateDataMounts(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added +* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema)` was added +* `getAllowedResizeSizes(java.lang.String,java.lang.String,java.lang.String)` was added +* `updateIdleShutdownSetting(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting)` was added +* `updateCustomServices(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added +* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema,com.azure.core.util.Context)` was added + +#### `models.ConnectionAuthType` was modified + +* `AGENTIC_IDENTITY_TOKEN` was added +* `PROJECT_MANAGED_IDENTITY` was added +* `AGENTIC_USER` was added +* `AGENT_USER_IMPERSONATION` was added +* `USER_ENTRA_TOKEN` was added +* `ACCOUNT_MANAGED_IDENTITY` was added +* `DELEGATED_SAS` was added + +#### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified + +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.Workspace$Definition` was modified + +* `withKeyVaults(java.util.List)` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `withExistingWorkspaces(java.util.List)` was added +* `withEnableServiceSideCmkEncryption(java.lang.Boolean)` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `withEnableSimplifiedCmk(java.lang.Boolean)` was added +* `withStorageAccounts(java.util.List)` was added +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added +* `withIpAllowlist(java.util.List)` was added +* `withProvisionNetworkNow(java.lang.Boolean)` was added +* `withContainerRegistries(java.util.List)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added + +#### `models.Datastores` was modified + +* `listSecretsWithResponse(java.lang.String,java.lang.String,java.lang.String,models.SecretExpiry,com.azure.core.util.Context)` was added + +#### `models.PrivateLinkResource` was modified + +* `innerModel()` was added + +#### `models.PipelineJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.ImageModelSettingsClassification` was modified + +* `withLearningRate(java.lang.Double)` was added +* `withWarmupCosineLRCycles(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added +* `withBeta2(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added +* `withWeightDecay(java.lang.Double)` was added +* `withBeta1(java.lang.Double)` was added + +#### `models.PrivateEndpointConnection$Update` was modified + +* `withPrivateEndpoint(models.WorkspacePrivateEndpointResource)` was added + +#### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified + +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added + +#### `models.WorkspaceConnections` was modified + +* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added +* `testConnection(java.lang.String,java.lang.String,java.lang.String)` was added +* `testConnection(java.lang.String,java.lang.String,java.lang.String,fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added + +#### `models.ManagedNetworkSettings` was modified + +* `managedNetworkKind()` was added +* `firewallPublicIpAddress()` was added +* `enableNetworkMonitor()` was added +* `firewallSku()` was added + +#### `models.Workspace` was modified + +* `existingWorkspaces()` was added +* `softDeleteRetentionInDays()` was added +* `ipAllowlist()` was added +* `allowRoleAssignmentOnRG()` was added +* `agentsEndpointUri()` was added +* `systemDatastoresAuthMode()` was added +* `containerRegistries()` was added +* `enableServiceSideCmkEncryption()` was added +* `storageAccounts()` was added +* `provisionNetworkNow()` was added +* `networkAcls()` was added +* `enableSimplifiedCmk()` was added +* `keyVaults()` was added +* `enableSoftwareBillOfMaterials()` was added + +#### `models.UriFileJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.Datastore` was modified + +* `listSecretsWithResponse(models.SecretExpiry,com.azure.core.util.Context)` was added + +#### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added + +#### `MachineLearningManager` was modified + +* `capabilityHosts()` was added +* `outboundRules()` was added +* `connections()` was added +* `outboundRulesOperations()` was added +* `endpointDeployments()` was added +* `inferenceGroups()` was added +* `managedNetworkSettingsOperations()` was added +* `connectionRaiBlocklistsOperations()` was added +* `connectionRaiBlocklistItemsOperations()` was added +* `inferencePools()` was added +* `inferenceEndpoints()` was added +* `connectionRaiPolicies()` was added +* `raiPoliciesOperations()` was added +* `endpoints()` was added +* `connectionRaiPoliciesOperations()` was added +* `raiPolicies()` was added +* `connectionRaiBlocklists()` was added +* `pTUQuotas()` was added +* `connectionRaiBlocklistItems()` was added + +#### `models.ImageMetadata` was modified + +* `osPatchingStatus()` was added + +#### `models.CustomKeysWorkspaceConnectionProperties` was modified + +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added + +#### `models.CertificateDatastoreCredentials` was modified + +* `withClientId(java.lang.String)` was added +* `withTenantId(java.lang.String)` was added + +#### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified + +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added + +#### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.SparkJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.WorkspacePropertiesUpdateParameters` was modified + +* `ipAllowlist()` was added +* `networkAcls()` was added +* `enableSoftwareBillOfMaterials()` was added +* `allowRoleAssignmentOnRG()` was added +* `softDeleteRetentionInDays()` was added +* `systemDatastoresAuthMode()` was added + +#### `models.WorkspaceUpdateParameters` was modified + +* `networkAcls()` was added +* `systemDatastoresAuthMode()` was added +* `enableSoftwareBillOfMaterials()` was added +* `ipAllowlist()` was added +* `allowRoleAssignmentOnRG()` was added +* `innerModel()` was added +* `softDeleteRetentionInDays()` was added + +#### `models.UriFolderJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.RuleStatus` was modified + +* `FAILED` was added +* `DELETING` was added +* `PROVISIONING` was added + +#### `models.MLTableJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.CustomService` was modified + +* `kernel()` was added +* `withKernel(models.JupyterKernelConfig)` was added + +#### `models.AadAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added + +#### `models.TritonModelJobOutput` was modified + +* `withAssetName(java.lang.String)` was added +* `assetName()` was added + +#### `models.WorkspaceConnectionPropertiesV2BasicResource` was modified + +* `testConnection(fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added +* `update()` was added +* `testConnection()` was added +* `resourceGroupName()` was added + +#### `models.WorkspaceProperties` was modified + +* `enableSoftwareBillOfMaterials()` was added +* `containerRegistries()` was added +* `softDeleteRetentionInDays()` was added +* `existingWorkspaces()` was added +* `keyVaults()` was added +* `systemDatastoresAuthMode()` was added +* `enableSimplifiedCmk()` was added +* `ipAllowlist()` was added +* `enableServiceSideCmkEncryption()` was added +* `agentsEndpointUri()` was added +* `storageAccounts()` was added +* `networkAcls()` was added +* `allowRoleAssignmentOnRG()` was added +* `provisionNetworkNow()` was added + +#### `models.OutboundRule` was modified + +* `errorInformation()` was added +* `parentRuleNames()` was added + +#### `models.ComputeResource` was modified + +* `updateIdleShutdownSettingWithResponse(models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `updateIdleShutdownSetting(models.IdleShutdownSetting)` was added +* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added +* `getAllowedResizeSizes()` was added +* `resize(models.ResizeSchema)` was added +* `updateDataMounts(java.util.List)` was added +* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added +* `getAllowedResizeSizesWithResponse(com.azure.core.util.Context)` was added +* `updateCustomServices(java.util.List)` was added +* `updateCustomServicesWithResponse(java.util.List,com.azure.core.util.Context)` was added + +#### `models.CustomModelJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.PrivateLinkResources` was modified + +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.SasAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.WorkspaceConnectionOAuth2` was modified + +* `withClientId(java.lang.String)` was added + +#### `models.EncryptionProperty` was modified + +* `storageAccountResourceId()` was added +* `searchAccountResourceId()` was added +* `withCosmosDbResourceId(java.lang.String)` was added +* `withStorageAccountResourceId(java.lang.String)` was added +* `cosmosDbResourceId()` was added +* `withSearchAccountResourceId(java.lang.String)` was added +* `withKeyVaultProperties(models.KeyVaultProperties)` was added + +#### `models.CommandJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified + +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withError(java.lang.String)` was added + +#### `models.ServicePrincipalDatastoreCredentials` was modified + +* `withClientId(java.lang.String)` was added +* `withTenantId(java.lang.String)` was added + +#### `models.ServiceTagDestination` was modified + +* `withAddressPrefixes(java.util.List)` was added + +#### `models.NotebookResourceInfo` was modified + +* `isPrivateLinkEnabled()` was added + +#### `models.ImageModelSettings` was modified + +* `withBeta1(java.lang.Double)` was added +* `withLearningRate(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added +* `withWeightDecay(java.lang.Double)` was added +* `withWarmupCosineLRCycles(java.lang.Double)` was added +* `withBeta2(java.lang.Double)` was added + +#### `models.ManagedIdentity` was modified + +* `withClientId(java.lang.String)` was added +* `withObjectId(java.lang.String)` was added + +#### `models.ComputeInstanceProperties` was modified + +* `enableOSPatching()` was added +* `withEnableOSPatching(java.lang.Boolean)` was added +* `withEnableRootAccess(java.lang.Boolean)` was added +* `idleTimeBeforeShutdown()` was added +* `releaseQuotaOnStop()` was added +* `withReleaseQuotaOnStop(java.lang.Boolean)` was added +* `withIdleTimeBeforeShutdown(java.lang.String)` was added +* `autologgerSettings()` was added +* `withEnableSSO(java.lang.Boolean)` was added +* `enableRootAccess()` was added +* `enableSSO()` was added +* `withAutologgerSettings(models.ComputeInstanceAutologgerSettings)` was added + +#### `models.ServerlessInferenceEndpointAuthMode` was modified + +* `KEY_AND_AAD` was added +* `AAD` was added + +#### `models.DistributionType` was modified + +* `RAY` was added + +#### `models.SweepJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.DataVersionBase$Definition` was modified + +* `withExistingDatum(java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.ComputeInstanceDataMount` was modified + +* `mountMode()` was added +* `withMountMode(models.MountMode)` was added + +#### `models.AutoMLJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.JobType` was modified + +* `FINE_TUNING` was added +* `DISTILLATION` was added + +#### `models.KubernetesOnlineDeployment` was modified + +* `withStartupProbe(models.ProbeSettings)` was added + +#### `models.OnlineEndpointProperties` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was added + +#### `models.ContentSafety` was modified + +* `contentSafetyLevel()` was added +* `withContentSafetyLevel(models.ContentSafetyLevel)` was added + +#### `models.JobBaseProperties` was modified + +* `parentJobName()` was added +* `withParentJobName(java.lang.String)` was added + +#### `models.RegistryPrivateLinkServiceConnectionState` was modified -### Other Changes +* `withStatus(models.PrivateEndpointServiceConnectionStatus)` was added ## 1.1.0 (2024-08-22) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md index d6e0a036eb7a..359fdec39518 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Machine Learning client library for Java. -This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2024-04. 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 Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package api-version 2026-05-15-preview. 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 @@ MachineLearningManager manager = MachineLearningManager .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. @@ -78,39 +78,37 @@ workspace = machineLearningManager.workspaces() .withSku(new Sku().withName("Basic").withTier(SkuTier.BASIC)) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED)) .withFriendlyName(workspaceName) - .withStorageAccount( - storageManager.storageAccounts() - .define(storageName) - .withRegion(REGION) - .withExistingResourceGroup(resourceGroupName) - .withSku(StorageAccountSkuType.STANDARD_LRS) - .withMinimumTlsVersion(MinimumTlsVersion.TLS1_0) - .withHnsEnabled(false) - .withAccessFromAzureServices() - .withOnlyHttpsTraffic() - .withBlobStorageAccountKind().withAccessTier(AccessTier.HOT) - .create() - .id()) - .withKeyVault( - keyVaultManager.vaults() - .define(keyVaultName) - .withRegion(REGION) - .withExistingResourceGroup(resourceGroupName) - .withEmptyAccessPolicy() - .withSku(SkuName.STANDARD) - .withDeploymentDisabled() - .withAccessFromAllNetworks() - .create() - .id()) - .withApplicationInsights( - applicationInsightsManager.components() - .define(insightName) - .withRegion(REGION) - .withExistingResourceGroup(resourceGroupName) - .withKind("web") - .withApplicationType(ApplicationType.WEB) - .create() - .id()) + .withStorageAccount(storageManager.storageAccounts() + .define(storageName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withSku(StorageAccountSkuType.STANDARD_LRS) + .withMinimumTlsVersion(MinimumTlsVersion.TLS1_0) + .withHnsEnabled(false) + .withAccessFromAzureServices() + .withOnlyHttpsTraffic() + .withBlobStorageAccountKind() + .withAccessTier(AccessTier.HOT) + .create() + .id()) + .withKeyVault(keyVaultManager.vaults() + .define(keyVaultName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withEmptyAccessPolicy() + .withSku(SkuName.STANDARD) + .withDeploymentDisabled() + .withAccessFromAllNetworks() + .create() + .id()) + .withApplicationInsights(applicationInsightsManager.components() + .define(insightName) + .withRegion(REGION) + .withExistingResourceGroup(resourceGroupName) + .withKind("web") + .withApplicationType(ApplicationType.WEB) + .create() + .id()) .create(); ``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md) @@ -143,5 +141,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/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md index 0ef21ec43a9a..91a429c1a37b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md @@ -18,6 +18,12 @@ - [ListKeys](#batchendpoints_listkeys) - [Update](#batchendpoints_update) +## CapabilityHosts + +- [CreateOrUpdate](#capabilityhosts_createorupdate) +- [Delete](#capabilityhosts_delete) +- [Get](#capabilityhosts_get) + ## CodeContainers - [CreateOrUpdate](#codecontainers_createorupdate) @@ -54,13 +60,59 @@ - [CreateOrUpdate](#compute_createorupdate) - [Delete](#compute_delete) - [Get](#compute_get) +- [GetAllowedResizeSizes](#compute_getallowedresizesizes) - [List](#compute_list) - [ListKeys](#compute_listkeys) - [ListNodes](#compute_listnodes) +- [Resize](#compute_resize) - [Restart](#compute_restart) - [Start](#compute_start) - [Stop](#compute_stop) - [Update](#compute_update) +- [UpdateCustomServices](#compute_updatecustomservices) +- [UpdateDataMounts](#compute_updatedatamounts) +- [UpdateIdleShutdownSetting](#compute_updateidleshutdownsetting) + +## Connection + +- [CreateOrUpdateDeployment](#connection_createorupdatedeployment) +- [DeleteDeployment](#connection_deletedeployment) +- [GetAllModels](#connection_getallmodels) +- [GetDeployment](#connection_getdeployment) +- [GetModels](#connection_getmodels) +- [ListDeployments](#connection_listdeployments) + +## ConnectionRaiBlocklist + +- [Create](#connectionraiblocklist_create) +- [Delete](#connectionraiblocklist_delete) +- [Get](#connectionraiblocklist_get) + +## ConnectionRaiBlocklistItem + +- [AddBulk](#connectionraiblocklistitem_addbulk) +- [Create](#connectionraiblocklistitem_create) +- [Delete](#connectionraiblocklistitem_delete) +- [DeleteBulk](#connectionraiblocklistitem_deletebulk) +- [Get](#connectionraiblocklistitem_get) + +## ConnectionRaiBlocklistItemsOperation + +- [List](#connectionraiblocklistitemsoperation_list) + +## ConnectionRaiBlocklistsOperation + +- [List](#connectionraiblocklistsoperation_list) + +## ConnectionRaiPoliciesOperation + +- [List](#connectionraipoliciesoperation_list) + +## ConnectionRaiPolicy + +- [Create](#connectionraipolicy_create) +- [Delete](#connectionraipolicy_delete) +- [Get](#connectionraipolicy_get) ## DataContainers @@ -85,6 +137,23 @@ - [List](#datastores_list) - [ListSecrets](#datastores_listsecrets) +## Endpoint + +- [CreateOrUpdate](#endpoint_createorupdate) +- [Get](#endpoint_get) +- [GetModels](#endpoint_getmodels) +- [List](#endpoint_list) +- [ListKeys](#endpoint_listkeys) +- [RegenerateKeys](#endpoint_regeneratekeys) + +## EndpointDeployment + +- [CreateOrUpdate](#endpointdeployment_createorupdate) +- [Delete](#endpointdeployment_delete) +- [Get](#endpointdeployment_get) +- [GetInWorkspace](#endpointdeployment_getinworkspace) +- [List](#endpointdeployment_list) + ## EnvironmentContainers - [CreateOrUpdate](#environmentcontainers_createorupdate) @@ -134,6 +203,35 @@ - [Get](#featurestoreentityversions_get) - [List](#featurestoreentityversions_list) +## InferenceEndpoints + +- [CreateOrUpdate](#inferenceendpoints_createorupdate) +- [Delete](#inferenceendpoints_delete) +- [Get](#inferenceendpoints_get) +- [List](#inferenceendpoints_list) +- [Update](#inferenceendpoints_update) + +## InferenceGroups + +- [CreateOrUpdate](#inferencegroups_createorupdate) +- [Delete](#inferencegroups_delete) +- [Get](#inferencegroups_get) +- [GetDeltaModelsStatusAsync](#inferencegroups_getdeltamodelsstatusasync) +- [GetStatus](#inferencegroups_getstatus) +- [List](#inferencegroups_list) +- [ListDeltaModelsAsync](#inferencegroups_listdeltamodelsasync) +- [ListSkus](#inferencegroups_listskus) +- [ModifyDeltaModelsAsync](#inferencegroups_modifydeltamodelsasync) +- [Update](#inferencegroups_update) + +## InferencePools + +- [CreateOrUpdate](#inferencepools_createorupdate) +- [Delete](#inferencepools_delete) +- [Get](#inferencepools_get) +- [List](#inferencepools_list) +- [Update](#inferencepools_update) + ## Jobs - [Cancel](#jobs_cancel) @@ -146,6 +244,13 @@ - [ProvisionManagedNetwork](#managednetworkprovisions_provisionmanagednetwork) +## ManagedNetworkSettingsOperation + +- [Get](#managednetworksettingsoperation_get) +- [List](#managednetworksettingsoperation_list) +- [Patch](#managednetworksettingsoperation_patch) +- [Put](#managednetworksettingsoperation_put) + ## ManagedNetworkSettingsRule - [CreateOrUpdate](#managednetworksettingsrule_createorupdate) @@ -200,6 +305,23 @@ - [List](#operations_list) +## OutboundRule + +- [CreateOrUpdate](#outboundrule_createorupdate) +- [Delete](#outboundrule_delete) +- [Get](#outboundrule_get) +- [List](#outboundrule_list) + +## OutboundRulesOperation + +- [Post](#outboundrulesoperation_post) + +## PTUQuota + +- [GetAvailable](#ptuquota_getavailable) +- [List](#ptuquota_list) +- [ListAvailable](#ptuquota_listavailable) + ## PrivateEndpointConnections - [CreateOrUpdate](#privateendpointconnections_createorupdate) @@ -216,6 +338,16 @@ - [List](#quotas_list) - [Update](#quotas_update) +## RaiPoliciesOperation + +- [List](#raipoliciesoperation_list) + +## RaiPolicy + +- [Create](#raipolicy_create) +- [Delete](#raipolicy_delete) +- [Get](#raipolicy_get) + ## Registries - [CreateOrUpdate](#registries_createorupdate) @@ -335,6 +467,8 @@ - [Get](#workspaceconnections_get) - [List](#workspaceconnections_list) - [ListSecrets](#workspaceconnections_listsecrets) +- [TestConnection](#workspaceconnections_testconnection) +- [Update](#workspaceconnections_update) ## WorkspaceFeatures @@ -383,9 +517,7 @@ import java.util.Map; */ public final class BatchDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Deployment. @@ -398,19 +530,19 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .define("testDeploymentName") .withRegion("string") .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new BatchDeploymentProperties().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new BatchDeploymentProperties() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) + .withProperties(mapOf("string", "string")) .withCompute("string") .withErrorThreshold(1) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M"))) - .withMiniBatchSize(1L) .withLoggingLevel(BatchLoggingLevel.INFO) - .withModel(new IdAssetReference().withAssetId("string")) .withMaxConcurrencyPerInstance(1) + .withMiniBatchSize(1L) + .withModel(new IdAssetReference().withAssetId("string")) .withOutputAction(BatchOutputAction.SUMMARY_ONLY) .withOutputFileName("string") .withResources(new DeploymentResourceConfiguration().withInstanceCount(1) @@ -418,11 +550,12 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", Object.class, - SerializerEncoding.JSON))))) + SerializerEncoding.JSON)))) + .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -453,9 +586,7 @@ public final class BatchDeploymentsCreateOrUpdateSamples { */ public final class BatchDeploymentsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/delete.json */ /** * Sample code: Delete Workspace Batch Deployment. @@ -479,9 +610,7 @@ public final class BatchDeploymentsDeleteSamples { */ public final class BatchDeploymentsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/get.json */ /** * Sample code: Get Workspace Batch Deployment. @@ -505,9 +634,7 @@ public final class BatchDeploymentsGetSamples { */ public final class BatchDeploymentsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/list.json */ /** * Sample code: List Workspace Batch Deployment. @@ -536,9 +663,7 @@ import java.util.Map; */ public final class BatchDeploymentsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/update.json */ /** * Sample code: Update Workspace Batch Deployment. @@ -590,9 +715,7 @@ import java.util.Map; */ public final class BatchEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Endpoint. @@ -605,14 +728,14 @@ public final class BatchEndpointsCreateOrUpdateSamples { .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new BatchEndpointProperties().withDescription("string") + .withProperties(new BatchEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -643,9 +766,7 @@ public final class BatchEndpointsCreateOrUpdateSamples { */ public final class BatchEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/delete.json */ /** * Sample code: Delete Workspace Batch Endpoint. @@ -668,9 +789,7 @@ public final class BatchEndpointsDeleteSamples { */ public final class BatchEndpointsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/get.json */ /** * Sample code: Get Workspace Batch Endpoint. @@ -693,9 +812,7 @@ public final class BatchEndpointsGetSamples { */ public final class BatchEndpointsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/list.json */ /** * Sample code: List Workspace Batch Endpoint. @@ -717,9 +834,7 @@ public final class BatchEndpointsListSamples { */ public final class BatchEndpointsListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Batch Endpoint. @@ -751,9 +866,7 @@ import java.util.Map; */ public final class BatchEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/update.json */ /** * Sample code: Update Workspace Batch Endpoint. @@ -788,6 +901,86 @@ public final class BatchEndpointsUpdateSamples { } ``` +### CapabilityHosts_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; +import java.util.Arrays; + +/** + * Samples for CapabilityHosts CreateOrUpdate. + */ +public final class CapabilityHostsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/CapabilityHost/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .define("capabilityHostName") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new CapabilityHostProperties() + .withAcaEnvironmentConnections(Arrays.asList("sampleAcaEnvironmentConnection")) + .withAiServicesConnections(Arrays.asList("sampleAIServiceConnection")) + .withCustomerSubnet( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroups/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet") + .withStorageConnections(Arrays.asList("sampleStorageConnection")) + .withThreadStorageConnections(Arrays.asList("sampleThreadStorageConnection")) + .withVectorStoreConnections(Arrays.asList("sampleVectorStoreConnection"))) + .create(); + } +} +``` + +### CapabilityHosts_Delete + +```java +/** + * Samples for CapabilityHosts Delete. + */ +public final class CapabilityHostsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/CapabilityHost/delete.json + */ + /** + * Sample code: Delete CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .delete("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} +``` + +### CapabilityHosts_Get + +```java +/** + * Samples for CapabilityHosts Get. + */ +public final class CapabilityHostsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/CapabilityHost/get.json + */ + /** + * Sample code: Get CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .getWithResponse("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} +``` + ### CodeContainers_CreateOrUpdate ```java @@ -800,9 +993,7 @@ import java.util.Map; */ public final class CodeContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Container. @@ -841,9 +1032,7 @@ public final class CodeContainersCreateOrUpdateSamples { */ public final class CodeContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/delete.json */ /** * Sample code: Delete Workspace Code Container. @@ -866,9 +1055,7 @@ public final class CodeContainersDeleteSamples { */ public final class CodeContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/get.json */ /** * Sample code: Get Workspace Code Container. @@ -891,9 +1078,7 @@ public final class CodeContainersGetSamples { */ public final class CodeContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/list.json */ /** * Sample code: List Workspace Code Container. @@ -918,9 +1103,7 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; */ public final class CodeVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Workspace Code Version. @@ -950,9 +1133,7 @@ import java.util.Map; */ public final class CodeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Version. @@ -965,8 +1146,8 @@ public final class CodeVersionsCreateOrUpdateSamples { .define("string") .withExistingCode("test-rg", "my-aml-workspace", "string") .withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")) .create(); @@ -994,9 +1175,7 @@ public final class CodeVersionsCreateOrUpdateSamples { */ public final class CodeVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/delete.json */ /** * Sample code: Delete Workspace Code Version. @@ -1019,9 +1198,7 @@ public final class CodeVersionsDeleteSamples { */ public final class CodeVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/get.json */ /** * Sample code: Get Workspace Code Version. @@ -1044,9 +1221,7 @@ public final class CodeVersionsGetSamples { */ public final class CodeVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/list.json */ /** * Sample code: List Workspace Code Version. @@ -1072,9 +1247,7 @@ import com.azure.resourcemanager.machinelearning.models.DestinationAsset; */ public final class CodeVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/publish.json */ /** * Sample code: Publish Workspace Code Version. @@ -1085,9 +1258,9 @@ public final class CodeVersionsPublishSamples { publishWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } @@ -1105,9 +1278,7 @@ import java.util.Map; */ public final class ComponentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Container. @@ -1120,8 +1291,8 @@ public final class ComponentContainersCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))) + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) .create(); } @@ -1147,9 +1318,7 @@ public final class ComponentContainersCreateOrUpdateSamples { */ public final class ComponentContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/delete.json */ /** * Sample code: Delete Workspace Component Container. @@ -1172,9 +1341,7 @@ public final class ComponentContainersDeleteSamples { */ public final class ComponentContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/get.json */ /** * Sample code: Get Workspace Component Container. @@ -1198,9 +1365,7 @@ public final class ComponentContainersGetSamples { */ public final class ComponentContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/list.json */ /** * Sample code: List Workspace Component Container. @@ -1229,9 +1394,7 @@ import java.util.Map; */ public final class ComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Version. @@ -1244,8 +1407,8 @@ public final class ComponentVersionsCreateOrUpdateSamples { .define("string") .withExistingComponent("test-rg", "my-aml-workspace", "string") .withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, @@ -1275,9 +1438,7 @@ public final class ComponentVersionsCreateOrUpdateSamples { */ public final class ComponentVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/delete.json */ /** * Sample code: Delete Workspace Component Version. @@ -1300,9 +1461,7 @@ public final class ComponentVersionsDeleteSamples { */ public final class ComponentVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/get.json */ /** * Sample code: Get Workspace Component Version. @@ -1326,9 +1485,7 @@ public final class ComponentVersionsGetSamples { */ public final class ComponentVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/list.json */ /** * Sample code: List Workspace Component Version. @@ -1353,9 +1510,7 @@ import com.azure.resourcemanager.machinelearning.models.DestinationAsset; */ public final class ComponentVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/publish.json */ /** * Sample code: Publish Workspace Component Version. @@ -1366,9 +1521,9 @@ public final class ComponentVersionsPublishSamples { publishWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } @@ -1377,14 +1532,15 @@ public final class ComponentVersionsPublishSamples { ### Compute_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.Aks; -import com.azure.resourcemanager.machinelearning.models.AksSchemaProperties; +import com.azure.resourcemanager.machinelearning.models.AKS; +import com.azure.resourcemanager.machinelearning.models.AKSSchemaProperties; import com.azure.resourcemanager.machinelearning.models.AmlCompute; import com.azure.resourcemanager.machinelearning.models.AmlComputeProperties; import com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy; import com.azure.resourcemanager.machinelearning.models.AssignedUser; import com.azure.resourcemanager.machinelearning.models.ComputeInstance; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings; import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; @@ -1402,8 +1558,10 @@ import com.azure.resourcemanager.machinelearning.models.Image; import com.azure.resourcemanager.machinelearning.models.ImageType; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; +import com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; +import com.azure.resourcemanager.machinelearning.models.MlflowAutologger; import com.azure.resourcemanager.machinelearning.models.OsType; import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; import com.azure.resourcemanager.machinelearning.models.Protocol; @@ -1426,50 +1584,44 @@ import java.util.Map; */ public final class ComputeCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAKSCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/AKSCompute.json */ /** - * Sample code: Create an AKS Compute. + * Sample code: Update an AKS Compute. * * @param manager Entry point to MachineLearningManager. */ - public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new Aks()) + .withProperties(new AKS().withDescription("some compute") + .withResourceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") + .withProperties(new AKSSchemaProperties().withAgentCount(4))) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AKSCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/BasicAKSCompute.json */ /** - * Sample code: Update an AKS Compute. + * Sample code: Create an AKS Compute. * * @param manager Entry point to MachineLearningManager. */ - public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new Aks().withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AksSchemaProperties().withAgentCount(4))) + .withProperties(new AKS()) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/KubernetesCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -1495,9 +1647,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. @@ -1529,9 +1679,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAmlCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -1558,9 +1706,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstance.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -1577,26 +1723,35 @@ public final class ComputeCreateOrUpdateSamples { new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6") .withSubnet(new ResourceId().withId("test-subnet-resource-id")) .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withAutologgerSettings( + new ComputeInstanceAutologgerSettings().withMlflowAutologger(MlflowAutologger.ENABLED)) .withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withCustomServices(Arrays.asList(new CustomService().withName("rstudio") + .withCustomServices(Arrays.asList(new CustomService().withName("rstudio-workbench") .withImage(new Image().withType(ImageType.DOCKER) - .withReference("ghcr.io/azure/rocker-rstudio-ml-verse:latest") + .withReference("ghcr.io/azure/rstudio-workbench:latest") .withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("test_variable", + .withEnvironmentVariables(mapOf("RSP_LICENSE", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("test_value") + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") .withAdditionalProperties(mapOf()))) .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) .withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP) .withName("connect") .withTarget(8787) - .withPublished(8787))) + .withPublished(4444))) .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("/home/azureuser/cloudfiles") - .withTarget("/home/azureuser/cloudfiles"))) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withKernel(new JupyterKernelConfig().withArgv(Arrays.asList("option1", "option2", "option3")) + .withDisplayName("TestKernel") + .withLanguage("python")) .withAdditionalProperties(mapOf()))) .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) + .withEnableOSPatching(true) + .withEnableRootAccess(true) + .withEnableSSO(true) + .withReleaseQuotaOnStop(true) .withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings() .withAssignedUser(new AssignedUser().withObjectId("00000000-0000-0000-0000-000000000000") .withTenantId("00000000-0000-0000-0000-000000000000"))))) @@ -1604,9 +1759,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -1625,9 +1778,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AmlCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -1647,9 +1798,7 @@ public final class ComputeCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. @@ -1690,9 +1839,7 @@ import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction */ public final class ComputeDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/delete.json + * x-ms-original-file: 2026-05-15-preview/Compute/delete.json */ /** * Sample code: Delete Compute. @@ -1715,9 +1862,7 @@ public final class ComputeDeleteSamples { */ public final class ComputeGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AKSCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -1730,39 +1875,33 @@ public final class ComputeGetSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/KubernetesCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/ComputeInstance.json */ /** - * Sample code: Get a Kubernetes Compute. + * Sample code: Get an ComputeInstance. * * @param manager Entry point to MachineLearningManager. */ - public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/ComputeInstance.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/KubernetesCompute.json */ /** - * Sample code: Get an ComputeInstance. + * Sample code: Get a Kubernetes Compute. * * @param manager Entry point to MachineLearningManager. */ - public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AmlCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. @@ -1776,6 +1915,29 @@ public final class ComputeGetSamples { } ``` +### Compute_GetAllowedResizeSizes + +```java +/** + * Samples for Compute GetAllowedResizeSizes. + */ +public final class ComputeGetAllowedResizeSizesSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Compute/getAllowedVMSizesForResize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .getAllowedResizeSizesWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); + } +} +``` + ### Compute_List ```java @@ -1784,9 +1946,7 @@ public final class ComputeGetSamples { */ public final class ComputeListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/list.json + * x-ms-original-file: 2026-05-15-preview/Compute/list.json */ /** * Sample code: Get Computes. @@ -1807,9 +1967,7 @@ public final class ComputeListSamples { */ public final class ComputeListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. @@ -1831,9 +1989,7 @@ public final class ComputeListKeysSamples { */ public final class ComputeListNodesSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listNodes.json + * x-ms-original-file: 2026-05-15-preview/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. @@ -1847,6 +2003,31 @@ public final class ComputeListNodesSamples { } ``` +### Compute_Resize + +```java +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; + +/** + * Samples for Compute Resize. + */ +public final class ComputeResizeSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Compute/resize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .resize("testrg123", "workspaces123", "compute123", new ResizeSchema().withTargetVMSize("Standard_DS11_v2"), + com.azure.core.util.Context.NONE); + } +} +``` + ### Compute_Restart ```java @@ -1855,9 +2036,7 @@ public final class ComputeListNodesSamples { */ public final class ComputeRestartSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/restart.json + * x-ms-original-file: 2026-05-15-preview/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. @@ -1879,9 +2058,7 @@ public final class ComputeRestartSamples { */ public final class ComputeStartSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/start.json + * x-ms-original-file: 2026-05-15-preview/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. @@ -1903,9 +2080,7 @@ public final class ComputeStartSamples { */ public final class ComputeStopSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/stop.json + * x-ms-original-file: 2026-05-15-preview/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. @@ -1932,9 +2107,7 @@ import java.time.Duration; */ public final class ComputeUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/patch.json + * x-ms-original-file: 2026-05-15-preview/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. @@ -1955,38 +2128,57 @@ public final class ComputeUpdateSamples { } ``` -### DataContainers_CreateOrUpdate +### Compute_UpdateCustomServices ```java -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; +import com.azure.resourcemanager.machinelearning.models.Protocol; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for DataContainers CreateOrUpdate. + * Samples for Compute UpdateCustomServices. */ -public final class DataContainersCreateOrUpdateSamples { +public final class ComputeUpdateCustomServicesSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Compute/updateCustomServices.json */ /** - * Sample code: CreateOrUpdate Workspace Data Container. + * Sample code: Update Custom Services. * * @param manager Entry point to MachineLearningManager. */ - public static void - createOrUpdateWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .define("datacontainer123") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withProperties(mapOf("properties1", "value1", "properties2", "value2")) - .withDataType(DataType.fromString("UriFile"))) - .create(); + public static void updateCustomServices(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .updateCustomServicesWithResponse("testrg123", "workspaces123", "compute123", + Arrays.asList(new CustomService().withName("rstudio-workbench") + .withImage(new Image().withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables(mapOf("RSP_LICENSE", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") + .withAdditionalProperties(mapOf()))) + .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(4444))) + .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withAdditionalProperties(mapOf())), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -2003,644 +2195,2022 @@ public final class DataContainersCreateOrUpdateSamples { } ``` -### DataContainers_Delete +### Compute_UpdateDataMounts ```java +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.MountAction; +import com.azure.resourcemanager.machinelearning.models.MountMode; +import com.azure.resourcemanager.machinelearning.models.SourceType; +import java.util.Arrays; + /** - * Samples for DataContainers Delete. + * Samples for Compute UpdateDataMounts. */ -public final class DataContainersDeleteSamples { +public final class ComputeUpdateDataMountsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Compute/updateDataMounts.json */ /** - * Sample code: Delete Workspace Data Container. + * Sample code: Update Data Mounts. * * @param manager Entry point to MachineLearningManager. */ - public static void - deleteWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + public static void updateDataMounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .updateDataMountsWithResponse("testrg123", "workspaces123", "compute123", + Arrays.asList(new ComputeInstanceDataMount().withSource( + "azureml://subscriptions/some-sub/resourcegroups/some-rg/workspaces/some-ws/data/some-data-asset-name/versions/some-data-asset-version") + .withSourceType(SourceType.URI) + .withMountName("hello") + .withMountAction(MountAction.MOUNT) + .withMountMode(MountMode.READ_ONLY) + .withMountPath("/some/random/path/on/host")), + com.azure.core.util.Context.NONE); } } ``` -### DataContainers_Get +### Compute_UpdateIdleShutdownSetting ```java +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; + /** - * Samples for DataContainers Get. + * Samples for Compute UpdateIdleShutdownSetting. */ -public final class DataContainersGetSamples { +public final class ComputeUpdateIdleShutdownSettingSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Compute/updateIdleShutdownSetting.json */ /** - * Sample code: Get Workspace Data Container. + * Sample code: Update idle shutdown setting of ComputeInstance. * * @param manager Entry point to MachineLearningManager. */ - public static void - getWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + public static void updateIdleShutdownSettingOfComputeInstance( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .updateIdleShutdownSettingWithResponse("testrg123", "workspaces123", "compute123", + new IdleShutdownSetting().withIdleTimeBeforeShutdown("PT120M"), com.azure.core.util.Context.NONE); } } ``` -### DataContainers_List +### Connection_CreateOrUpdateDeployment ```java +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; /** - * Samples for DataContainers List. + * Samples for Connection CreateOrUpdateDeployment. */ -public final class DataContainersListSamples { +public final class ConnectionCreateOrUpdateDeploymentSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/createDeployment.json */ /** - * Sample code: List Workspace Data Container. + * Sample code: Create Azure OpenAI Connection Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void - listWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers().list("testrg123", "workspace123", null, null, com.azure.core.util.Context.NONE); + public static void createAzureOpenAIConnectionDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .createOrUpdateDeployment("resourceGroup-1", "testworkspace", "testConnection", "text-davinci-003", + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel(new EndpointDeploymentModel().withFormat("OpenAI") + .withName("text-davinci-003") + .withVersion("1")) + .withVersionUpgradeOption( + DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)), + com.azure.core.util.Context.NONE); } } ``` -### DataVersions_CreateOrUpdate +### Connection_DeleteDeployment ```java -import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for DataVersions CreateOrUpdate. + * Samples for Connection DeleteDeployment. */ -public final class DataVersionsCreateOrUpdateSamples { +public final class ConnectionDeleteDeploymentSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/deleteDeployment.json */ /** - * Sample code: CreateOrUpdate Workspace Data Version Base. + * Sample code: Delete Azure OpenAI Connection Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceDataVersionBase( + public static void deleteAzureOpenAIConnectionDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .define("string") - .withExistingData("test-rg", "my-aml-workspace", "string") - .withProperties(new UriFileDataVersion().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withDataUri("string")) - .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; + manager.connections() + .deleteDeployment("test-rg", "aml-workspace-name", "testConnection", "testDeploymentName", + com.azure.core.util.Context.NONE); } } ``` -### DataVersions_Delete +### Connection_GetAllModels ```java /** - * Samples for DataVersions Delete. + * Samples for Connection GetAllModels. */ -public final class DataVersionsDeleteSamples { +public final class ConnectionGetAllModelsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/delete.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/listConnectionModels.json */ /** - * Sample code: Delete Workspace Data Version Base. + * Sample code: Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. * * @param manager Entry point to MachineLearningManager. */ - public static void - deleteWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void getModelsUnderTheAzureMLWorkspaceForAllAzureOpenAIConnectionsThatTheUserCanDeploy( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getAllModelsWithResponse("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); } } ``` -### DataVersions_Get +### Connection_GetDeployment ```java /** - * Samples for DataVersions Get. + * Samples for Connection GetDeployment. */ -public final class DataVersionsGetSamples { +public final class ConnectionGetDeploymentSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/get.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/getDeployment.json */ /** - * Sample code: Get Workspace Data Version Base. + * Sample code: Get Azure OpenAI Connection Deployment. * * @param manager Entry point to MachineLearningManager. */ public static void - getWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + getAzureOpenAIConnectionDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getDeploymentWithResponse("resourceGroup-1", "testworkspace", "testConnection", "text-davinci-003", + com.azure.core.util.Context.NONE); } } ``` -### DataVersions_List +### Connection_GetModels ```java - /** - * Samples for DataVersions List. + * Samples for Connection GetModels. */ -public final class DataVersionsListSamples { +public final class ConnectionGetModelsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/getModels.json */ /** - * Sample code: List Workspace Data Version Base. + * Sample code: Get Azure OpenAI Connection Models. * * @param manager Entry point to MachineLearningManager. */ public static void - listWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, "string", null, - com.azure.core.util.Context.NONE); + getAzureOpenAIConnectionModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getModels("test-rg", "aml-workspace-name", "testConnection", com.azure.core.util.Context.NONE); } } ``` -### DataVersions_Publish +### Connection_ListDeployments ```java -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - /** - * Samples for DataVersions Publish. + * Samples for Connection ListDeployments. */ -public final class DataVersionsPublishSamples { +public final class ConnectionListDeploymentsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/publish.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/listDeployments.json */ /** - * Sample code: Publish Workspace Data Version Base. + * Sample code: List Azure OpenAI Connection Deployments. * * @param manager Entry point to MachineLearningManager. */ public static void - publishWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), - com.azure.core.util.Context.NONE); + listAzureOpenAIConnectionDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .listDeployments("resourceGroup-1", "testworkspace", "testConnection", com.azure.core.util.Context.NONE); } } ``` -### Datastores_CreateOrUpdate +### ConnectionRaiBlocklist_Create ```java -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureFileDatastore; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; /** - * Samples for Datastores CreateOrUpdate. + * Samples for ConnectionRaiBlocklist Create. */ -public final class DatastoresCreateOrUpdateSamples { +public final class ConnectionRaiBlocklistCreateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/create.json */ /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). + * Sample code: Create Rai Blocklist. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureDataLakeGen1Datastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withStoreName("string")) - .withSkipValidation(false) + public static void createRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .define("raiBlocklistName") + .withExistingConnection("test-rg", "aml-workspace-name", "testConnection") + .withProperties(new RaiBlocklistProperties().withDescription("Basic blocklist description")) .create(); } +} +``` +### ConnectionRaiBlocklist_Delete + +```java +/** + * Samples for ConnectionRaiBlocklist Delete. + */ +public final class ConnectionRaiBlocklistDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/delete.json */ /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). + * Sample code: Delete Rai Blocklist. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureDataLakeGen2Datastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withFilesystem("string") - .withAccountName("string") - .withEndpoint("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); + public static void deleteRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); } +} +``` + +### ConnectionRaiBlocklist_Get +```java +/** + * Samples for ConnectionRaiBlocklist Get. + */ +public final class ConnectionRaiBlocklistGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/get.json */ /** - * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). + * Sample code: Get Rai Blocklist. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDatastoreAzureBlobWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureBlobDatastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withContainerName("string") - .withEndpoint("core.windows.net") - .withProtocol("https")) - .withSkipValidation(false) - .create(); + public static void getRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); } +} +``` +### ConnectionRaiBlocklistItem_AddBulk + +```java +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import java.util.Arrays; + +/** + * Samples for ConnectionRaiBlocklistItem AddBulk. + */ +public final class ConnectionRaiBlocklistItemAddBulkSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/addBulk.json */ /** - * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). + * Sample code: Create Bulk Rai Blocklist Items. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new AzureFileDatastore().withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials(new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withFileShareName("string") - .withEndpoint("string") - .withProtocol("string")) - .withSkipValidation(false) - .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; + public static void + createBulkRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .addBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + Arrays.asList( + new RaiBlocklistItemBulkRequest().withName("myblocklistitem1") + .withProperties( + new RaiBlocklistItemProperties().withIsRegex(true).withPattern("^[a-z0-9_-]{2,16}$")), + new RaiBlocklistItemBulkRequest().withName("myblocklistitem2") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("blockwords"))), + com.azure.core.util.Context.NONE); } } ``` -### Datastores_Delete +### ConnectionRaiBlocklistItem_Create ```java +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; + /** - * Samples for Datastores Delete. + * Samples for ConnectionRaiBlocklistItem Create. */ -public final class DatastoresDeleteSamples { +public final class ConnectionRaiBlocklistItemCreateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/delete.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/create.json */ /** - * Sample code: Delete datastore. + * Sample code: Create RaiBlocklist Item. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void + createRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .define("raiBlocklistItemName") + .withExistingRaiBlocklist("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("Pattern To Block")) + .create(); } } ``` -### Datastores_Get +### ConnectionRaiBlocklistItem_Delete ```java /** - * Samples for Datastores Get. + * Samples for ConnectionRaiBlocklistItem Delete. */ -public final class DatastoresGetSamples { +public final class ConnectionRaiBlocklistItemDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/get.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/delete.json */ /** - * Sample code: Get datastore. + * Sample code: Delete RaiBlocklist Item. * * @param manager Entry point to MachineLearningManager. */ - public static void getDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void + deleteRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", "raiBlocklistItemName", + com.azure.core.util.Context.NONE); } } ``` -### Datastores_List +### ConnectionRaiBlocklistItem_DeleteBulk ```java import java.util.Arrays; /** - * Samples for Datastores List. + * Samples for ConnectionRaiBlocklistItem DeleteBulk. */ -public final class DatastoresListSamples { +public final class ConnectionRaiBlocklistItemDeleteBulkSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/deleteBulk.json */ /** - * Sample code: List datastores. + * Sample code: Delete Bulk Rai Blocklist Items. * * @param manager Entry point to MachineLearningManager. */ - public static void listDatastores(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .list("test-rg", "my-aml-workspace", null, 1, false, Arrays.asList("string"), "string", "string", false, - com.azure.core.util.Context.NONE); + public static void + deleteBulkRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .deleteBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + Arrays.asList("myblocklistitem1", "myblocklistitem2"), com.azure.core.util.Context.NONE); } } ``` -### Datastores_ListSecrets +### ConnectionRaiBlocklistItem_Get ```java /** - * Samples for Datastores ListSecrets. + * Samples for ConnectionRaiBlocklistItem Get. */ -public final class DatastoresListSecretsSamples { +public final class ConnectionRaiBlocklistItemGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/listSecrets.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/get.json */ /** - * Sample code: Get datastore secrets. + * Sample code: Get Rai RaiBlocklist Item. * * @param manager Entry point to MachineLearningManager. */ - public static void getDatastoreSecrets(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores() - .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void + getRaiRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + "raiBlocklistItemName", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_CreateOrUpdate +### ConnectionRaiBlocklistItemsOperation_List ```java -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for EnvironmentContainers CreateOrUpdate. + * Samples for ConnectionRaiBlocklistItemsOperation List. */ -public final class EnvironmentContainersCreateOrUpdateSamples { +public final class ConnectionRaiBlocklistItemsOperationListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/list.json */ /** - * Sample code: CreateOrUpdate Workspace Environment Container. + * Sample code: List RaiBlocklist Items. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties(new EnvironmentContainerProperties().withDescription("string") - .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .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; + public static void listRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItemsOperations() + .list("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_Delete +### ConnectionRaiBlocklistsOperation_List ```java /** - * Samples for EnvironmentContainers Delete. + * Samples for ConnectionRaiBlocklistsOperation List. */ -public final class EnvironmentContainersDeleteSamples { +public final class ConnectionRaiBlocklistsOperationListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/list.json */ /** - * Sample code: Delete Workspace Environment Container. + * Sample code: List Rai Blocklist. * * @param manager Entry point to MachineLearningManager. */ - public static void - deleteWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + public static void listRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistsOperations() + .list("test-rg", "aml-workspace-name", "testConnection", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_Get +### ConnectionRaiPoliciesOperation_List ```java /** - * Samples for EnvironmentContainers Get. + * Samples for ConnectionRaiPoliciesOperation List. */ -public final class EnvironmentContainersGetSamples { +public final class ConnectionRaiPoliciesOperationListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/list.json */ /** - * Sample code: Get Workspace Environment Container. + * Sample code: List Rai policy. * * @param manager Entry point to MachineLearningManager. */ - public static void - getWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .getWithResponse("testrg123", "testworkspace", "testEnvironment", com.azure.core.util.Context.NONE); + public static void listRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPoliciesOperations() + .list("test-rg", "aml-workspace-name", "testConnection", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_List +### ConnectionRaiPolicy_Create ```java +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; /** - * Samples for EnvironmentContainers List. + * Samples for ConnectionRaiPolicy Create. */ -public final class EnvironmentContainersListSamples { +public final class ConnectionRaiPolicyCreateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/create.json */ /** - * Sample code: List Workspace Environment Container. + * Sample code: Create Rai policy. * * @param manager Entry point to MachineLearningManager. */ - public static void - listWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .list("testrg123", "testworkspace", null, null, com.azure.core.util.Context.NONE); + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .create("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + new RaiPolicyPropertiesBasicResourceInner().withProperties(new RaiPolicyProperties() + .withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)), + com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_CreateOrUpdate +### ConnectionRaiPolicy_Delete ```java -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; +/** + * Samples for ConnectionRaiPolicy Delete. + */ +public final class ConnectionRaiPolicyDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/delete.json + */ + /** + * Sample code: Delete Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} +``` +### ConnectionRaiPolicy_Get + +```java /** - * Samples for EnvironmentVersions CreateOrUpdate. + * Samples for ConnectionRaiPolicy Get. */ -public final class EnvironmentVersionsCreateOrUpdateSamples { +public final class ConnectionRaiPolicyGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/get.json */ /** - * Sample code: CreateOrUpdate Workspace Environment Version. + * Sample code: Get Rai policy. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} +``` + +### DataContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; +import com.azure.resourcemanager.machinelearning.models.DataType; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DataContainers CreateOrUpdate. + */ +public final class DataContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers() + .define("datacontainer123") + .withExistingWorkspace("testrg123", "workspace123") + .withProperties(new DataContainerProperties().withDescription("string") + .withProperties(mapOf("properties1", "value1", "properties2", "value2")) + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withDataType(DataType.fromString("UriFile"))) + .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; + } +} +``` + +### DataContainers_Delete + +```java +/** + * Samples for DataContainers Delete. + */ +public final class DataContainersDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/delete.json + */ + /** + * Sample code: Delete Workspace Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers() + .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + } +} +``` + +### DataContainers_Get + +```java +/** + * Samples for DataContainers Get. + */ +public final class DataContainersGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/get.json + */ + /** + * Sample code: Get Workspace Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers() + .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + } +} +``` + +### DataContainers_List + +```java + +/** + * Samples for DataContainers List. + */ +public final class DataContainersListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/list.json + */ + /** + * Sample code: List Workspace Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers().list("testrg123", "workspace123", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### DataVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DataVersions CreateOrUpdate. + */ +public final class DataVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceDataVersionBase( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions() + .define("string") + .withExistingDatum("test-rg", "my-aml-workspace", "string") + .withProperties(new UriFileDataVersion().withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withDataUri("string")) + .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; + } +} +``` + +### DataVersions_Delete + +```java +/** + * Samples for DataVersions Delete. + */ +public final class DataVersionsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/delete.json + */ + /** + * Sample code: Delete Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions() + .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### DataVersions_Get + +```java +/** + * Samples for DataVersions Get. + */ +public final class DataVersionsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/get.json + */ + /** + * Sample code: Get Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### DataVersions_List + +```java + +/** + * Samples for DataVersions List. + */ +public final class DataVersionsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/list.json + */ + /** + * Sample code: List Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions() + .list("test-rg", "my-aml-workspace", "string", "string", 1, null, "string", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### DataVersions_Publish + +```java +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** + * Samples for DataVersions Publish. + */ +public final class DataVersionsPublishSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/publish.json + */ + /** + * Sample code: Publish Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + publishWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions() + .publish("test-rg", "my-aml-workspace", "string", "string", + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials; +import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; +import com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore; +import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore; +import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore; +import com.azure.resourcemanager.machinelearning.models.AzureFileDatastore; +import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials; +import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Datastores CreateOrUpdate. + */ +public final class DatastoresCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new AzureDataLakeGen1Datastore().withDescription("string") + .withTags(mapOf("string", "string")) + .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") + .withClientId("00000000-1111-2222-3333-444444444444") + .withResourceUrl("string") + .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) + .withTenantId("00000000-1111-2222-3333-444444444444")) + .withStoreName("string")) + .withSkipValidation(false) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new AzureDataLakeGen2Datastore().withDescription("string") + .withTags(mapOf("string", "string")) + .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") + .withClientId("00000000-1111-2222-3333-444444444444") + .withResourceUrl("string") + .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) + .withTenantId("00000000-1111-2222-3333-444444444444")) + .withAccountName("string") + .withEndpoint("string") + .withFilesystem("string") + .withProtocol("string")) + .withSkipValidation(false) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureBlobWAccountKey/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateDatastoreAzureBlobWAccountKey( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new AzureBlobDatastore().withDescription("string") + .withTags(mapOf("string", "string")) + .withCredentials(new AccountKeyDatastoreCredentials() + .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) + .withAccountName("string") + .withContainerName("string") + .withEndpoint("core.windows.net") + .withProtocol("https")) + .withSkipValidation(false) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureFileWAccountKey/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new AzureFileDatastore().withDescription("string") + .withTags(mapOf("string", "string")) + .withCredentials(new AccountKeyDatastoreCredentials() + .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) + .withAccountName("string") + .withEndpoint("string") + .withFileShareName("string") + .withProtocol("string")) + .withSkipValidation(false) + .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; + } +} +``` + +### Datastores_Delete + +```java +/** + * Samples for Datastores Delete. + */ +public final class DatastoresDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/delete.json + */ + /** + * Sample code: Delete datastore. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores() + .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_Get + +```java +/** + * Samples for Datastores Get. + */ +public final class DatastoresGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/get.json + */ + /** + * Sample code: Get datastore. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_List + +```java +import java.util.Arrays; + +/** + * Samples for Datastores List. + */ +public final class DatastoresListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/list.json + */ + /** + * Sample code: List datastores. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listDatastores(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores() + .list("test-rg", "my-aml-workspace", null, 1, false, Arrays.asList("string"), "string", "string", false, + com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_ListSecrets + +```java +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; + +/** + * Samples for Datastores ListSecrets. + */ +public final class DatastoresListSecretsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Datastore/listSecrets.json + */ + /** + * Sample code: Get datastore secrets. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getDatastoreSecrets(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.datastores() + .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", + new SecretExpiry().withExpirableSecret(false).withExpireAfterHours(1), + com.azure.core.util.Context.NONE); + } +} +``` + +### Endpoint_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties; + +/** + * Samples for Endpoint CreateOrUpdate. + */ +public final class EndpointCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/create.json + */ + /** + * Sample code: Create Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .define("Azure.OpenAI") + .withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties(new OpenAIEndpointResourceProperties().withAssociatedResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.CognitiveService/account/account-1") + .withName("Azure.OpenAI")) + .create(); + } +} +``` + +### Endpoint_Get + +```java +/** + * Samples for Endpoint Get. + */ +public final class EndpointGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/get.json + */ + /** + * Sample code: Get Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} +``` + +### Endpoint_GetModels + +```java +/** + * Samples for Endpoint GetModels. + */ +public final class EndpointGetModelsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/getModels.json + */ + /** + * Sample code: Get Endpoint Models. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpointModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .getModels("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} +``` + +### Endpoint_List + +```java +import com.azure.resourcemanager.machinelearning.models.EndpointType; + +/** + * Samples for Endpoint List. + */ +public final class EndpointListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/list.json + */ + /** + * Sample code: List Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .list("test-rg", "aml-workspace-name", EndpointType.AZURE_OPEN_AI, null, null, null, "skip_string", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### Endpoint_ListKeys + +```java +/** + * Samples for Endpoint ListKeys. + */ +public final class EndpointListKeysSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/listKeys.json + */ + /** + * Sample code: List Endpoint Keys. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .listKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} +``` + +### Endpoint_RegenerateKeys + +```java +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; +import com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName; + +/** + * Samples for Endpoint RegenerateKeys. + */ +public final class EndpointRegenerateKeysSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/regenerateKey.json + */ + /** + * Sample code: Regenerate Endpoint Keys. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + regenerateEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .regenerateKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", + new RegenerateServiceAccountKeyContent().withKeyName(ServiceAccountKeyName.KEY1), + com.azure.core.util.Context.NONE); + } +} +``` + +### EndpointDeployment_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; + +/** + * Samples for EndpointDeployment CreateOrUpdate. + */ +public final class EndpointDeploymentCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/create.json + */ + /** + * Sample code: Create Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .define("text-davinci-003") + .withExistingEndpoint("resourceGroup-1", "testworkspace", "Azure.OpenAI") + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel( + new EndpointDeploymentModel().withFormat("OpenAI").withName("text-davinci-003").withVersion("1")) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)) + .create(); + } +} +``` + +### EndpointDeployment_Delete + +```java +/** + * Samples for EndpointDeployment Delete. + */ +public final class EndpointDeploymentDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/delete.json + */ + /** + * Sample code: Delete Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "testDeploymentName", + com.azure.core.util.Context.NONE); + } +} +``` + +### EndpointDeployment_Get + +```java +/** + * Samples for EndpointDeployment Get. + */ +public final class EndpointDeploymentGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/get.json + */ + /** + * Sample code: Get Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .getWithResponse("resourceGroup-1", "testworkspace", "Azure.OpenAI", "text-davinci-003", + com.azure.core.util.Context.NONE); + } +} +``` + +### EndpointDeployment_GetInWorkspace + +```java + +/** + * Samples for EndpointDeployment GetInWorkspace. + */ +public final class EndpointDeploymentGetInWorkspaceSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/getInWorkspace.json + */ + /** + * Sample code: Get Endpoint Deployments In Workspace. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getEndpointDeploymentsInWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .getInWorkspace("resourceGroup-1", "testworkspace", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### EndpointDeployment_List + +```java +/** + * Samples for EndpointDeployment List. + */ +public final class EndpointDeploymentListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/getDeployments.json + */ + /** + * Sample code: Get Endpoint Deployments. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getEndpointDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .list("resourceGroup-1", "testworkspace", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for EnvironmentContainers CreateOrUpdate. + */ +public final class EnvironmentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceEnvironmentContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers() + .define("testEnvironment") + .withExistingWorkspace("testrg123", "testworkspace") + .withProperties(new EnvironmentContainerProperties().withDescription("string") + .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) + .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; + } +} +``` + +### EnvironmentContainers_Delete + +```java +/** + * Samples for EnvironmentContainers Delete. + */ +public final class EnvironmentContainersDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/delete.json + */ + /** + * Sample code: Delete Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers() + .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentContainers_Get + +```java +/** + * Samples for EnvironmentContainers Get. + */ +public final class EnvironmentContainersGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/get.json + */ + /** + * Sample code: Get Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers() + .getWithResponse("testrg123", "testworkspace", "testEnvironment", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentContainers_List + +```java + +/** + * Samples for EnvironmentContainers List. + */ +public final class EnvironmentContainersListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/list.json + */ + /** + * Sample code: List Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers() + .list("testrg123", "testworkspace", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.BuildContext; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; +import com.azure.resourcemanager.machinelearning.models.Route; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for EnvironmentVersions CreateOrUpdate. + */ +public final class EnvironmentVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceEnvironmentVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions() + .define("string") + .withExistingEnvironment("test-rg", "my-aml-workspace", "string") + .withProperties(new EnvironmentVersionProperties().withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withBuild(new BuildContext().withContextUri( + "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") + .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") + .withInferenceConfig( + new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) + .withReadinessRoute(new Route().withPath("string").withPort(1)) + .withScoringRoute(new Route().withPath("string").withPort(1)))) + .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; + } +} +``` + +### EnvironmentVersions_Delete + +```java +/** + * Samples for EnvironmentVersions Delete. + */ +public final class EnvironmentVersionsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/delete.json + */ + /** + * Sample code: Delete Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions() + .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentVersions_Get + +```java +/** + * Samples for EnvironmentVersions Get. + */ +public final class EnvironmentVersionsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/get.json + */ + /** + * Sample code: Get Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentVersions_List + +```java + +/** + * Samples for EnvironmentVersions List. + */ +public final class EnvironmentVersionsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/list.json + */ + /** + * Sample code: List Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions() + .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentVersions_Publish + +```java +import com.azure.resourcemanager.machinelearning.models.DestinationAsset; + +/** + * Samples for EnvironmentVersions Publish. + */ +public final class EnvironmentVersionsPublishSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/publish.json + */ + /** + * Sample code: Publish Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + publishWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentVersions() + .publish("test-rg", "my-aml-workspace", "string", "string", + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), + com.azure.core.util.Context.NONE); + } +} +``` + +### Features_Get + +```java +/** + * Samples for Features Get. + */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Feature/get.json + */ + /** + * Sample code: Get Feature. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.features() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", "string", + com.azure.core.util.Context.NONE); + } +} +``` + +### Features_List + +```java + +/** + * Samples for Features List. + */ +public final class FeaturesListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Feature/list.json + */ + /** + * Sample code: List Feature. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.features() + .list("test-rg", "my-aml-workspace", "string", "string", null, "string", "string", "string", null, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturesetContainers CreateOrUpdate. + */ +public final class FeaturesetContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetContainers() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new FeaturesetContainerProperties().withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsArchived(false)) + .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; + } +} +``` + +### FeaturesetContainers_Delete + +```java +/** + * Samples for FeaturesetContainers Delete. + */ +public final class FeaturesetContainersDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/delete.json + */ + /** + * Sample code: Delete Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceFeaturesetContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetContainers() + .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetContainers_GetEntity + +```java +/** + * Samples for FeaturesetContainers GetEntity. + */ +public final class FeaturesetContainersGetEntitySamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/getEntity.json + */ + /** + * Sample code: GetEntity Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEntityWorkspaceFeaturesetContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetContainers() + .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** + * Samples for FeaturesetContainers List. + */ +public final class FeaturesetContainersListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/list.json + */ + /** + * Sample code: List Workspace Featureset Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceFeaturesetContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetContainers() + .list("test-rg", "my-aml-workspace", null, "string", ListViewType.ARCHIVED_ONLY, null, null, null, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetVersions_Backfill + +```java +import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; +import com.azure.resourcemanager.machinelearning.models.FeatureWindow; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturesetVersions Backfill. + */ +public final class FeaturesetVersionsBackfillSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/backfill.json + */ + /** + * Sample code: Backfill Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + backfillWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetVersions() + .backfill("test-rg", "my-aml-workspace", "string", "string", + new FeaturesetVersionBackfillRequest() + .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE)) + .withDescription("string") + .withDisplayName("string") + .withFeatureWindow( + new FeatureWindow().withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) + .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) + .withJobId("string") + .withResource(new MaterializationComputeResource().withInstanceType("string")) + .withSparkConfiguration(mapOf("string", "string")) + .withTags(mapOf("string", "string")), + com.azure.core.util.Context.NONE); + } + + // 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; + } +} +``` + +### FeaturesetVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; +import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; +import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; +import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; +import com.azure.resourcemanager.machinelearning.models.WeekDay; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturesetVersions CreateOrUpdate. + */ +public final class FeaturesetVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturesetVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetVersions() + .define("string") + .withExistingFeatureset("test-rg", "my-aml-workspace", "string") + .withProperties(new FeaturesetVersionProperties().withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withIsArchived(false) + .withEntities(Arrays.asList("string")) + .withMaterializationSettings(new MaterializationSettings() + .withNotification( + new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) + .withEmails(Arrays.asList("string"))) + .withResource(new MaterializationComputeResource().withInstanceType("string")) + .withSchedule(new RecurrenceTrigger().withEndTime("string") + .withStartTime("string") + .withTimeZone("string") + .withFrequency(RecurrenceFrequency.DAY) + .withInterval(1) + .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1)) + .withMinutes(Arrays.asList(1)) + .withMonthDays(Arrays.asList(1)) + .withWeekDays(Arrays.asList(WeekDay.MONDAY)))) + .withSparkConfiguration(mapOf("string", "string")) + .withStoreType(MaterializationStoreType.ONLINE)) + .withSpecification(new FeaturesetSpecification().withPath("string")) + .withStage("string")) + .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; + } +} +``` + +### FeaturesetVersions_Delete + +```java +/** + * Samples for FeaturesetVersions Delete. + */ +public final class FeaturesetVersionsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/delete.json + */ + /** + * Sample code: Delete Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetVersions() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetVersions_Get + +```java +/** + * Samples for FeaturesetVersions Get. + */ +public final class FeaturesetVersionsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/get.json + */ + /** + * Sample code: Get Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturesetVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** + * Samples for FeaturesetVersions List. + */ +public final class FeaturesetVersionsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/list.json + */ + /** + * Sample code: List Workspace Featureset Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featuresetVersions() + .list("test-rg", "my-aml-workspace", "string", null, "string", ListViewType.ALL, null, null, null, null, + null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturestoreEntityContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturestoreEntityContainers CreateOrUpdate. + */ +public final class FeaturestoreEntityContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityContainers() .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties(new EnvironmentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new FeaturestoreEntityContainerProperties().withDescription("string") .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") - .withBuild(new BuildContext().withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withInferenceConfig( - new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))) + .withTags(mapOf("string", "string")) + .withIsArchived(false)) .create(); } @@ -2658,194 +4228,253 @@ public final class EnvironmentVersionsCreateOrUpdateSamples { } ``` -### EnvironmentVersions_Delete +### FeaturestoreEntityContainers_Delete ```java /** - * Samples for EnvironmentVersions Delete. + * Samples for FeaturestoreEntityContainers Delete. */ -public final class EnvironmentVersionsDeleteSamples { +public final class FeaturestoreEntityContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/delete.json */ /** - * Sample code: Delete Workspace Environment Version. + * Sample code: Delete Workspace Featurestore Entity Container. * * @param manager Entry point to MachineLearningManager. */ - public static void - deleteWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void deleteWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityContainers() + .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_Get +### FeaturestoreEntityContainers_GetEntity ```java /** - * Samples for EnvironmentVersions Get. + * Samples for FeaturestoreEntityContainers GetEntity. */ -public final class EnvironmentVersionsGetSamples { +public final class FeaturestoreEntityContainersGetEntitySamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/getEntity.json */ /** - * Sample code: Get Workspace Environment Version. + * Sample code: GetEntity Workspace Featurestore Entity Container. * * @param manager Entry point to MachineLearningManager. */ - public static void - getWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void getEntityWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityContainers() + .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_List +### FeaturestoreEntityContainers_List ```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; /** - * Samples for EnvironmentVersions List. + * Samples for FeaturestoreEntityContainers List. */ -public final class EnvironmentVersionsListSamples { +public final class FeaturestoreEntityContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/list.json */ /** - * Sample code: List Workspace Environment Version. + * Sample code: List Workspace Featurestore Entity Container. * * @param manager Entry point to MachineLearningManager. */ - public static void - listWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, com.azure.core.util.Context.NONE); + public static void listWorkspaceFeaturestoreEntityContainer( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityContainers() + .list("test-rg", "my-aml-workspace", null, "string", ListViewType.ALL, null, null, null, null, + com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_Publish +### FeaturestoreEntityVersions_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; +import com.azure.resourcemanager.machinelearning.models.FeatureDataType; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; +import com.azure.resourcemanager.machinelearning.models.IndexColumn; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** - * Samples for EnvironmentVersions Publish. + * Samples for FeaturestoreEntityVersions CreateOrUpdate. */ -public final class EnvironmentVersionsPublishSamples { +public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/createOrUpdate.json */ /** - * Sample code: Publish Workspace Environment Version. + * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. * * @param manager Entry point to MachineLearningManager. */ - public static void - publishWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() - .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), - com.azure.core.util.Context.NONE); + public static void createOrUpdateWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityVersions() + .define("string") + .withExistingFeaturestoreEntity("test-rg", "my-aml-workspace", "string") + .withProperties( + new FeaturestoreEntityVersionProperties().withDescription("string") + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withIsAnonymous(false) + .withIsArchived(false) + .withIndexColumns(Arrays + .asList(new IndexColumn().withColumnName("string").withDataType(FeatureDataType.DATETIME)))) + .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; } } ``` -### Features_Get +### FeaturestoreEntityVersions_Delete ```java /** - * Samples for Features Get. + * Samples for FeaturestoreEntityVersions Delete. */ -public final class FeaturesGetSamples { +public final class FeaturestoreEntityVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/delete.json */ /** - * Sample code: Get Feature. + * Sample code: Delete Workspace Featurestore Entity Version. * * @param manager Entry point to MachineLearningManager. */ - public static void getFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.features() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", "string", - com.azure.core.util.Context.NONE); + public static void deleteWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityVersions() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### Features_List +### FeaturestoreEntityVersions_Get + +```java +/** + * Samples for FeaturestoreEntityVersions Get. + */ +public final class FeaturestoreEntityVersionsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/get.json + */ + /** + * Sample code: Get Workspace Featurestore Entity Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityVersions() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### FeaturestoreEntityVersions_List ```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; /** - * Samples for Features List. + * Samples for FeaturestoreEntityVersions List. */ -public final class FeaturesListSamples { +public final class FeaturestoreEntityVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/list.json */ /** - * Sample code: List Feature. + * Sample code: List Workspace Featurestore Entity Version. * * @param manager Entry point to MachineLearningManager. */ - public static void listFeature(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.features() - .list("test-rg", "my-aml-workspace", "string", "string", null, "string", "string", "string", null, null, - com.azure.core.util.Context.NONE); + public static void listWorkspaceFeaturestoreEntityVersion( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.featurestoreEntityVersions() + .list("test-rg", "my-aml-workspace", "string", null, "string", ListViewType.ACTIVE_ONLY, null, null, null, + null, null, null, com.azure.core.util.Context.NONE); } } ``` -### FeaturesetContainers_CreateOrUpdate +### InferenceEndpoints_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; +import com.azure.resourcemanager.machinelearning.models.AuthMode; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.RequestConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for FeaturesetContainers CreateOrUpdate. + * Samples for InferenceEndpoints CreateOrUpdate. */ -public final class FeaturesetContainersCreateOrUpdateSamples { +public final class InferenceEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Workspace Featureset Container. + * Sample code: CreateOrUpdate Workspace Inference Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceFeaturesetContainer( + public static void createOrUpdateWorkspaceInferenceEndpoint( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new FeaturesetContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false)) + manager.inferenceEndpoints() + .define("testEndpointName") + .withRegion("string") + .withExistingInferencePool("test-rg1", "my-aml-workspace", "string") + .withProperties(new InferenceEndpointProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withAuthMode(AuthMode.AAD) + .withGroupName("string") + .withRequestConfiguration(new RequestConfiguration().withMaxConcurrentRequestsPerInstance(1) + .withRequestTimeout(Duration.parse("PT5M")))) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku(new Sku().withName("string") + .withTier(SkuTier.STANDARD) + .withSize("string") + .withFamily("string") + .withCapacity(1)) .create(); } @@ -2863,124 +4492,106 @@ public final class FeaturesetContainersCreateOrUpdateSamples { } ``` -### FeaturesetContainers_Delete +### InferenceEndpoints_Delete ```java /** - * Samples for FeaturesetContainers Delete. + * Samples for InferenceEndpoints Delete. */ -public final class FeaturesetContainersDeleteSamples { +public final class InferenceEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/delete.json */ /** - * Sample code: Delete Workspace Featureset Container. + * Sample code: Delete Workspace Inference Endpoint. * * @param manager Entry point to MachineLearningManager. */ public static void - deleteWorkspaceFeaturesetContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + deleteWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .delete("test-rg", "my-aml-workspace", "string", "testEndpointName", com.azure.core.util.Context.NONE); } } ``` -### FeaturesetContainers_GetEntity +### InferenceEndpoints_Get ```java /** - * Samples for FeaturesetContainers GetEntity. + * Samples for InferenceEndpoints Get. */ -public final class FeaturesetContainersGetEntitySamples { +public final class InferenceEndpointsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/getEntity.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/get.json */ /** - * Sample code: GetEntity Workspace Featureset Container. + * Sample code: Get Workspace Inference Endpoint. * * @param manager Entry point to MachineLearningManager. */ - public static void getEntityWorkspaceFeaturesetContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void + getWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .getWithResponse("test-rg", "my-aml-workspace", "string", "testEndpointName", + com.azure.core.util.Context.NONE); } } ``` -### FeaturesetContainers_List +### InferenceEndpoints_List ```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.OrderString; /** - * Samples for FeaturesetContainers List. + * Samples for InferenceEndpoints List. */ -public final class FeaturesetContainersListSamples { +public final class InferenceEndpointsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/list.json */ /** - * Sample code: List Workspace Featureset Container. + * Sample code: List Workspace Inference Endpoint. * * @param manager Entry point to MachineLearningManager. */ public static void - listWorkspaceFeaturesetContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() - .list("test-rg", "my-aml-workspace", null, "string", ListViewType.ARCHIVED_ONLY, null, null, null, null, + listWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", OrderString.CREATED_AT_ASC, com.azure.core.util.Context.NONE); } } ``` -### FeaturesetVersions_Backfill +### InferenceEndpoints_Update ```java -import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeatureWindow; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import java.time.OffsetDateTime; -import java.util.Arrays; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; import java.util.HashMap; import java.util.Map; -/** - * Samples for FeaturesetVersions Backfill. - */ -public final class FeaturesetVersionsBackfillSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/backfill.json - */ - /** - * Sample code: Backfill Workspace Featureset Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - backfillWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() - .backfill("test-rg", "my-aml-workspace", "string", "string", - new FeaturesetVersionBackfillRequest().withDisplayName("string") - .withDescription("string") - .withFeatureWindow(new FeatureWindow() - .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) - .withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) - .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE)) - .withJobId("string") - .withTags(mapOf("string", "string")) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string")), +/** + * Samples for InferenceEndpoints Update. + */ +public final class InferenceEndpointsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/update.json + */ + /** + * Sample code: Update Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceInferenceEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.inferenceEndpoints() + .update("test-rg", "my-aml-workspace", "string", "testEndpointName", + mapOf("tags", SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)), com.azure.core.util.Context.NONE); } @@ -2998,66 +4609,77 @@ public final class FeaturesetVersionsBackfillSamples { } ``` -### FeaturesetVersions_CreateOrUpdate +### InferenceGroups_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.WeekDay; +import com.azure.resourcemanager.machinelearning.models.GroupEnvironmentConfiguration; +import com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ProbeSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for FeaturesetVersions CreateOrUpdate. + * Samples for InferenceGroups CreateOrUpdate. */ -public final class FeaturesetVersionsCreateOrUpdateSamples { +public final class InferenceGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Workspace Featureset Version. + * Sample code: CreateOrUpdate Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceFeaturesetVersion( + public static void createOrUpdateWorkspaceInferenceGroup( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() + manager.inferenceGroups() .define("string") - .withExistingFeatureset("test-rg", "my-aml-workspace", "string") - .withProperties(new FeaturesetVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("string")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("string") - .withStartTime("string") - .withTimeZone("string") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(1) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1)) - .withMinutes(Arrays.asList(1)) - .withWeekDays(Arrays.asList(WeekDay.MONDAY)) - .withMonthDays(Arrays.asList(1)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("string")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED))) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string"))) - .withStage("string") - .withEntities(Arrays.asList("string"))) + .withRegion("string") + .withExistingInferencePool("test-rg", "my-aml-workspace", "string") + .withProperties(new InferenceGroupProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withEnvironmentConfiguration(new GroupEnvironmentConfiguration() + .withEnvironmentId("azureml://registries/test-registry/models/enginefeed/versions/1") + .withEnvironmentVariables(Arrays + .asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) + .withReadinessProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) + .withStartupProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M")))) + .withModelConfiguration(new GroupModelConfiguration() + .withModelId("azureml://registries/test-registry/models/modelabc/versions/1")) + .withNodeSkuType("string") + .withScaleUnitSize(1)) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku(new Sku().withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) .create(); } @@ -3075,246 +4697,309 @@ public final class FeaturesetVersionsCreateOrUpdateSamples { } ``` -### FeaturesetVersions_Delete +### InferenceGroups_Delete ```java /** - * Samples for FeaturesetVersions Delete. + * Samples for InferenceGroups Delete. */ -public final class FeaturesetVersionsDeleteSamples { +public final class InferenceGroupsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/delete.json */ /** - * Sample code: Delete Workspace Featureset Version. + * Sample code: Delete Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ public static void - deleteWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() + deleteWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### FeaturesetVersions_Get +### InferenceGroups_Get ```java /** - * Samples for FeaturesetVersions Get. + * Samples for InferenceGroups Get. */ -public final class FeaturesetVersionsGetSamples { +public final class InferenceGroupsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/get.json */ /** - * Sample code: Get Workspace Featureset Version. + * Sample code: Get Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ public static void - getWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() + getWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### FeaturesetVersions_List +### InferenceGroups_GetDeltaModelsStatusAsync ```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import java.util.Arrays; /** - * Samples for FeaturesetVersions List. + * Samples for InferenceGroups GetDeltaModelsStatusAsync. */ -public final class FeaturesetVersionsListSamples { +public final class InferenceGroupsGetDeltaModelsStatusAsyncSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/list.json + * x-ms-original-file: 2026-05-15-preview/InferenceGroup/getDeltaModelsStatusAsync.json */ /** - * Sample code: List Workspace Featureset Version. + * Sample code: GetDeltaModelsStatusAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getDeltaModelsStatusAsyncInferenceGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getDeltaModelsStatusAsyncWithResponse("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelStatusRequest().withDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); + } +} +``` + +### InferenceGroups_GetStatus + +```java +/** + * Samples for InferenceGroups GetStatus. + */ +public final class InferenceGroupsGetStatusSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/getStatus.json + */ + /** + * Sample code: GetStatus Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ public static void - listWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetVersions() - .list("test-rg", "my-aml-workspace", "string", null, "string", ListViewType.ALL, null, null, null, null, - null, null, com.azure.core.util.Context.NONE); + getStatusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getStatusWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### FeaturestoreEntityContainers_CreateOrUpdate +### InferenceGroups_List ```java -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.models.OrderString; /** - * Samples for FeaturestoreEntityContainers CreateOrUpdate. + * Samples for InferenceGroups List. */ -public final class FeaturestoreEntityContainersCreateOrUpdateSamples { +public final class InferenceGroupsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/list.json */ /** - * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. + * Sample code: List Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false)) - .create(); + public static void + listWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", OrderString.CREATED_AT_DESC, + com.azure.core.util.Context.NONE); } +} +``` - // 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; +### InferenceGroups_ListDeltaModelsAsync + +```java +import com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest; + +/** + * Samples for InferenceGroups ListDeltaModelsAsync. + */ +public final class InferenceGroupsListDeltaModelsAsyncSamples { + /* + * x-ms-original-file: 2026-05-15-preview/InferenceGroup/listDeltaModelsAsync.json + */ + /** + * Sample code: ListDeltaModelsAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .listDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelListRequest().withCount(-1) + .withSkipToken("fakeTokenPlaceholder") + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); } } ``` -### FeaturestoreEntityContainers_Delete +### InferenceGroups_ListSkus ```java /** - * Samples for FeaturestoreEntityContainers Delete. + * Samples for InferenceGroups ListSkus. */ -public final class FeaturestoreEntityContainersDeleteSamples { +public final class InferenceGroupsListSkusSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/listSkus.json */ /** - * Sample code: Delete Workspace Featurestore Entity Container. + * Sample code: ListSkus Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void + listSkusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .listSkus("test-rg", "my-aml-workspace", "string", "string", 1, null, com.azure.core.util.Context.NONE); } } ``` -### FeaturestoreEntityContainers_GetEntity +### InferenceGroups_ModifyDeltaModelsAsync ```java +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import java.util.Arrays; + /** - * Samples for FeaturestoreEntityContainers GetEntity. + * Samples for InferenceGroups ModifyDeltaModelsAsync. */ -public final class FeaturestoreEntityContainersGetEntitySamples { +public final class InferenceGroupsModifyDeltaModelsAsyncSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/getEntity.json + * x-ms-original-file: 2026-05-15-preview/InferenceGroup/modifyDeltaModelsAsync.json */ /** - * Sample code: GetEntity Workspace Featurestore Entity Container. + * Sample code: ModifyDeltaModelsAsync Inference Group. * * @param manager Entry point to MachineLearningManager. */ - public static void getEntityWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .getEntityWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void + modifyDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .modifyDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelModifyRequest().withAddDeltaModels(Arrays.asList("string")) + .withRemoveDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); } } ``` -### FeaturestoreEntityContainers_List +### InferenceGroups_Update ```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.util.HashMap; +import java.util.Map; /** - * Samples for FeaturestoreEntityContainers List. + * Samples for InferenceGroups Update. */ -public final class FeaturestoreEntityContainersListSamples { +public final class InferenceGroupsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/update.json */ /** - * Sample code: List Workspace Featurestore Entity Container. + * Sample code: Update Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ - public static void listWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() - .list("test-rg", "my-aml-workspace", null, "string", ListViewType.ALL, null, null, null, null, - com.azure.core.util.Context.NONE); + public static void + updateWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + InferenceGroup resource = manager.inferenceGroups() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withSku(new PartialSku().withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.STANDARD)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### FeaturestoreEntityVersions_CreateOrUpdate +### InferencePools_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; +import com.azure.resourcemanager.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ScaleUnitConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for FeaturestoreEntityVersions CreateOrUpdate. + * Samples for InferencePools CreateOrUpdate. */ -public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { +public final class InferencePoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. + * Sample code: CreateOrUpdate Workspace Inference Pool. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() + public static void + createOrUpdateWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools() .define("string") - .withExistingFeaturestoreEntity("test-rg", "my-aml-workspace", "string") - .withProperties( - new FeaturestoreEntityVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withIsAnonymous(false) - .withIndexColumns(Arrays - .asList(new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("string")))) + .withRegion("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new InferencePoolProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withScaleUnitConfiguration(new ScaleUnitConfiguration().withDisablePublicEgress(false) + .withRegistries(Arrays.asList("string", "registryName1")))) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku(new Sku().withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) .create(); } @@ -3332,80 +5017,132 @@ public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { } ``` -### FeaturestoreEntityVersions_Delete +### InferencePools_Delete ```java /** - * Samples for FeaturestoreEntityVersions Delete. + * Samples for InferencePools Delete. */ -public final class FeaturestoreEntityVersionsDeleteSamples { +public final class InferencePoolsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/delete.json */ /** - * Sample code: Delete Workspace Featurestore Entity Version. + * Sample code: Delete Workspace Inference Pool. * * @param manager Entry point to MachineLearningManager. */ - public static void deleteWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void + deleteWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } } ``` -### FeaturestoreEntityVersions_Get +### InferencePools_Get ```java /** - * Samples for FeaturestoreEntityVersions Get. + * Samples for InferencePools Get. */ -public final class FeaturestoreEntityVersionsGetSamples { +public final class InferencePoolsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/get.json */ /** - * Sample code: Get Workspace Featurestore Entity Version. + * Sample code: Get Workspace Inference Pool. * * @param manager Entry point to MachineLearningManager. */ - public static void getWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + public static void + getWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools() + .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### InferencePools_List + +```java +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * Samples for InferencePools List. + */ +public final class InferencePoolsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/list.json + */ + /** + * Sample code: List Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools() + .list("test-rg", "my-aml-workspace", 1, null, "string", "string", OrderString.UPDATED_AT_ASC, + com.azure.core.util.Context.NONE); } } ``` -### FeaturestoreEntityVersions_List +### InferencePools_Update ```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; /** - * Samples for FeaturestoreEntityVersions List. + * Samples for InferencePools Update. */ -public final class FeaturestoreEntityVersionsListSamples { +public final class InferencePoolsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/update.json */ /** - * Sample code: List Workspace Featurestore Entity Version. + * Sample code: Update Workspace Inference Pool. * * @param manager Entry point to MachineLearningManager. */ - public static void listWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .list("test-rg", "my-aml-workspace", "string", null, "string", ListViewType.ACTIVE_ONLY, null, null, null, - null, null, null, com.azure.core.util.Context.NONE); + public static void updateWorkspaceInferencePool( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + InferencePool resource = manager.inferencePools() + .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withSku(new PartialSku().withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.STANDARD)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -3418,9 +5155,7 @@ public final class FeaturestoreEntityVersionsListSamples { */ public final class JobsCancelSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/cancel.json + * x-ms-original-file: 2026-05-15-preview/Job/cancel.json */ /** * Sample code: Cancel Job. @@ -3442,25 +5177,41 @@ import com.azure.resourcemanager.machinelearning.models.AmlToken; import com.azure.resourcemanager.machinelearning.models.AutoMLJob; import com.azure.resourcemanager.machinelearning.models.CommandJob; import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; +import com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning; +import com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType; +import com.azure.resourcemanager.machinelearning.models.DistillationJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.FinetuningDetails; import com.azure.resourcemanager.machinelearning.models.Goal; import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; import com.azure.resourcemanager.machinelearning.models.ImageClassification; import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; +import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobResources; import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.JobTier; +import com.azure.resourcemanager.machinelearning.models.LabelGeneration; import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; +import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; import com.azure.resourcemanager.machinelearning.models.Mpi; import com.azure.resourcemanager.machinelearning.models.Objective; import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.PipelineJob; +import com.azure.resourcemanager.machinelearning.models.QueueSettings; +import com.azure.resourcemanager.machinelearning.models.Ray; import com.azure.resourcemanager.machinelearning.models.SweepJob; import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint; import com.azure.resourcemanager.machinelearning.models.TensorFlow; import com.azure.resourcemanager.machinelearning.models.TrialComponent; +import com.azure.resourcemanager.machinelearning.models.UriFileJobInput; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; @@ -3473,9 +5224,70 @@ import java.util.Map; */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/createOrUpdateRayDistribution.json + */ + /** + * Sample code: CreateOrUpdate Command Job With Ray Distribution. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateCommandJobWithRayDistribution( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new CommandJob().withDescription("Ray distributed command job") + .withTags(mapOf("string", "string")) + .withComputeId("string") + .withDisplayName("ray-multi-node-job") + .withExperimentName("ray-experiment") + .withIdentity(new AmlToken()) + .withCodeId("fakeTokenPlaceholder") + .withCommand("python train.py") + .withDistribution(new Ray().withPort(6379).withIncludeDashboard(true).withDashboardPort(8265)) + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withResources(new JobResourceConfiguration().withInstanceCount(2) + .withInstanceType("string") + .withProperties(mapOf()))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/DistillationJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Distillation Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateDistillationJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new DistillationJob().withComputeId("gpu-compute") + .withExperimentName("llm-finetuning") + .withDataGenerationDetails( + new LabelGeneration().withDataGenerationTaskType(DataGenerationTaskType.CONVERSATION) + .withTeacherModelEndpoint( + new TeacherModelEndpoint().withEndpointName("newfinetuneinttesting-jbuob")) + .withTrainingData(new UriFileJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11"))) + .withFinetuningDetails(new FinetuningDetails() + .withStudentModel(new MLFlowModelJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Meta-Llama-3.1-8B-Instruct/versions/1"))) + .withOutputs(mapOf("string", + new MLFlowModelJobOutput().withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.STANDARD)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("Standard_NC6")))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -3488,43 +5300,41 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new AutoMLJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") + .withIdentity(new AmlToken()) + .withIsArchived(false) .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIsArchived(false) - .withIdentity(new AmlToken()) + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withOutputs(mapOf("string", + new UriFileJobOutput().withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) .withResources(new JobResourceConfiguration().withInstanceCount(1) .withInstanceType("string") .withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad\":null}", Object.class, SerializerEncoding.JSON)))) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withTaskDetails(new ImageClassification().withTrainingData(new MLTableJobInput().withUri("string")) - .withTargetColumnName("string") + .withTaskDetails(new ImageClassification().withTargetColumnName("string") + .withTrainingData(new MLTableJobInput().withUri("string")) .withModelSettings(new ImageModelSettingsClassification().withValidationCropSize(2)) .withSearchSpace(Arrays.asList( new ImageModelDistributionSettingsClassification().withValidationCropSize("choice(2, 360)"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2))) - .withOutputs(mapOf("string", - new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT)))) + .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -3537,29 +5347,29 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new SweepJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") + .withEarlyTermination(new MedianStoppingPolicy().withDelayEvaluation(1).withEvaluationInterval(1)) + .withLimits(new SweepJobLimits().withMaxConcurrentTrials(1) + .withMaxTotalTrials(1) + .withTrialTimeout(Duration.parse("PT1S"))) + .withObjective(new Objective().withGoal(Goal.MINIMIZE).withPrimaryMetric("string")) + .withSamplingAlgorithm(new GridSamplingAlgorithm()) .withSearchSpace(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"string\":{}}", Object.class, SerializerEncoding.JSON)) - .withSamplingAlgorithm(new GridSamplingAlgorithm()) - .withLimits(new SweepJobLimits().withMaxTotalTrials(1) - .withMaxConcurrentTrials(1) - .withTrialTimeout(Duration.parse("PT1S"))) - .withEarlyTermination(new MedianStoppingPolicy().withEvaluationInterval(1).withDelayEvaluation(1)) - .withObjective(new Objective().withPrimaryMetric("string").withGoal(Goal.MINIMIZE)) .withTrial(new TrialComponent().withCodeId("fakeTokenPlaceholder") .withCommand("string") + .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withResources(new JobResourceConfiguration().withInstanceCount(1) .withInstanceType("string") .withProperties(mapOf("string", @@ -3570,9 +5380,7 @@ public final class JobsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -3585,30 +5393,58 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new PipelineJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) .withOutputs(mapOf("string", new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.UPLOAD)))) + .withMode(OutputDeliveryMode.UPLOAD) + .withUri("string"))) + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/FineTuningJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new FineTuningJob().withComputeId("gpu-compute") + .withExperimentName("llm-finetuning") + .withFineTuningDetails(new CustomModelFineTuning() + .withModel(new MLFlowModelJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")) + .withTaskType(FineTuningTaskType.TEXT_COMPLETION) + .withTrainingData(new UriFileJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11"))) + .withOutputs(mapOf("string", + new MLFlowModelJobOutput().withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.STANDARD)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("Standard_NC6")))) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -3621,34 +5457,35 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new CommandJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") + .withIdentity(new AmlToken()) + .withParentJobName("ParentRun") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIdentity(new AmlToken()) - .withResources(new JobResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, - SerializerEncoding.JSON)))) .withCodeId("fakeTokenPlaceholder") .withCommand("string") + .withDistribution(new TensorFlow().withParameterServerCount(1).withWorkerCount(1)) .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) + .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) .withOutputs(mapOf("string", new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT))) - .withDistribution(new TensorFlow().withWorkerCount(1).withParameterServerCount(1)) - .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) - .withEnvironmentVariables(mapOf("string", "string"))) + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withResources(new JobResourceConfiguration().withInstanceCount(1) + .withInstanceType("string") + .withProperties(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, + SerializerEncoding.JSON))))) .create(); } @@ -3674,9 +5511,7 @@ public final class JobsCreateOrUpdateSamples { */ public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/delete.json + * x-ms-original-file: 2026-05-15-preview/Job/delete.json */ /** * Sample code: Delete Job. @@ -3700,9 +5535,7 @@ public final class JobsDeleteSamples { */ public final class JobsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -3714,9 +5547,19 @@ public final class JobsGetSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/DistillationJob/get.json + */ + /** + * Sample code: Get Distillation Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getDistillationJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -3728,9 +5571,7 @@ public final class JobsGetSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -3742,9 +5583,7 @@ public final class JobsGetSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. @@ -3754,21 +5593,32 @@ public final class JobsGetSamples { public static void getPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/FineTuningJob/get.json + */ + /** + * Sample code: Get FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } } ``` ### Jobs_List ```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; /** * Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/list.json + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -3782,78 +5632,252 @@ public final class JobsListSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/list.json + * x-ms-original-file: 2026-05-15-preview/Job/PipelineJob/list.json + */ + /** + * Sample code: List Pipeline Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .list("test-rg", "my-aml-workspace", null, "string", "string", null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/FineTuningJob/list.json + */ + /** + * Sample code: List FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ALL, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/SweepJob/list.json + */ + /** + * Sample code: List Sweep Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .list("test-rg", "my-aml-workspace", null, "string", "string", null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/AutoMLJob/list.json + */ + /** + * Sample code: List AutoML Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .list("test-rg", "my-aml-workspace", null, null, null, null, null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/DistillationJob/list.json + */ + /** + * Sample code: List Distillation Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listDistillationJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ALL, null, + com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedNetworkProvisions_ProvisionManagedNetwork + +```java +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; + +/** + * Samples for ManagedNetworkProvisions ProvisionManagedNetwork. + */ +public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/provision.json + */ + /** + * Sample code: Provision ManagedNetwork. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + provisionManagedNetwork(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkProvisions() + .provisionManagedNetwork("test-rg", "aml-workspace-name", + new ManagedNetworkProvisionOptions().withIncludeSpark(false), com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedNetworkSettingsOperation_Get + +```java +/** + * Samples for ManagedNetworkSettingsOperation Get. + */ +public final class ManagedNetworkSettingsOperationGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/getManagedNetworkV2.json */ /** - * Sample code: List Pipeline Job. + * Sample code: Get ManagedNetworkSettings. * * @param manager Entry point to MachineLearningManager. */ - public static void listPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, null, - com.azure.core.util.Context.NONE); + public static void + getManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsOperations() + .getWithResponse("test-rg", "aml-workspace-name", "default", com.azure.core.util.Context.NONE); } +} +``` + +### ManagedNetworkSettingsOperation_List +```java +/** + * Samples for ManagedNetworkSettingsOperation List. + */ +public final class ManagedNetworkSettingsOperationListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/list.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/listManagedNetworkV2.json */ /** - * Sample code: List Sweep Job. + * Sample code: List ManagedNetworkSettings. * * @param manager Entry point to MachineLearningManager. */ - public static void listSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, null, - com.azure.core.util.Context.NONE); + public static void + listManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsOperations() + .list("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); } +} +``` + +### ManagedNetworkSettingsOperation_Patch + +```java +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import java.util.HashMap; +import java.util.Map; +/** + * Samples for ManagedNetworkSettingsOperation Patch. + */ +public final class ManagedNetworkSettingsOperationPatchSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/list.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/patchManagedNetworkV2.json */ /** - * Sample code: List AutoML Job. + * Sample code: Patch ManagedNetworkSettings. * * @param manager Entry point to MachineLearningManager. */ - public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs() - .list("test-rg", "my-aml-workspace", null, null, null, null, null, com.azure.core.util.Context.NONE); + public static void + patchManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + ManagedNetworkSettingsPropertiesBasicResource resource = manager.managedNetworkSettingsOperations() + .getWithResponse("test-rg", "aml-workspace-name", "default", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ManagedNetworkSettingsProperties() + .withManagedNetwork(new ManagedNetworkSettingsEx().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("rule_name_1", + new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withDestination("destination_endpoint"))) + .withFirewallSku(FirewallSku.STANDARD))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### ManagedNetworkProvisions_ProvisionManagedNetwork +### ManagedNetworkSettingsOperation_Put ```java -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import java.util.HashMap; +import java.util.Map; /** - * Samples for ManagedNetworkProvisions ProvisionManagedNetwork. + * Samples for ManagedNetworkSettingsOperation Put. */ -public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { +public final class ManagedNetworkSettingsOperationPutSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/provision.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json */ /** - * Sample code: Provision ManagedNetwork. + * Sample code: Put ManagedNetworkSettings. * * @param manager Entry point to MachineLearningManager. */ public static void - provisionManagedNetwork(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.managedNetworkProvisions() - .provisionManagedNetwork("test-rg", "aml-workspace-name", - new ManagedNetworkProvisionOptions().withIncludeSpark(false), com.azure.core.util.Context.NONE); + putManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsOperations() + .define("default") + .withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties(new ManagedNetworkSettingsProperties() + .withManagedNetwork(new ManagedNetworkSettingsEx().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("rule_name_1", + new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withDestination("destination_endpoint"))) + .withFirewallSku(FirewallSku.STANDARD))) + .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; } } ``` @@ -3870,9 +5894,7 @@ import com.azure.resourcemanager.machinelearning.models.RuleStatus; */ public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/createOrUpdateRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/createOrUpdateRule.json */ /** * Sample code: CreateOrUpdate ManagedNetworkSettingsRule. @@ -3900,9 +5922,7 @@ public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { */ public final class ManagedNetworkSettingsRuleDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/deleteRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/deleteRule.json */ /** * Sample code: Delete ManagedNetworkSettingsRule. @@ -3925,9 +5945,7 @@ public final class ManagedNetworkSettingsRuleDeleteSamples { */ public final class ManagedNetworkSettingsRuleGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/getRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/getRule.json */ /** * Sample code: Get ManagedNetworkSettingsRule. @@ -3951,9 +5969,7 @@ public final class ManagedNetworkSettingsRuleGetSamples { */ public final class ManagedNetworkSettingsRuleListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/listRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/listRule.json */ /** * Sample code: List ManagedNetworkSettingsRule. @@ -3977,9 +5993,7 @@ import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionP */ public final class MarketplaceSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Marketplace Subscription. @@ -4005,9 +6019,7 @@ public final class MarketplaceSubscriptionsCreateOrUpdateSamples { */ public final class MarketplaceSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/delete.json */ /** * Sample code: Delete Workspace Marketplace Subscription. @@ -4030,9 +6042,7 @@ public final class MarketplaceSubscriptionsDeleteSamples { */ public final class MarketplaceSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/get.json */ /** * Sample code: Get Workspace Marketplace Subscription. @@ -4055,9 +6065,7 @@ public final class MarketplaceSubscriptionsGetSamples { */ public final class MarketplaceSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/list.json */ /** * Sample code: List Workspace Marketplace Subscription. @@ -4083,9 +6091,7 @@ import java.util.Map; */ public final class ModelContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Container. @@ -4124,9 +6130,7 @@ public final class ModelContainersCreateOrUpdateSamples { */ public final class ModelContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/delete.json */ /** * Sample code: Delete Workspace Model Container. @@ -4149,9 +6153,7 @@ public final class ModelContainersDeleteSamples { */ public final class ModelContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/get.json */ /** * Sample code: Get Workspace Model Container. @@ -4175,9 +6177,7 @@ public final class ModelContainersGetSamples { */ public final class ModelContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/list.json */ /** * Sample code: List Workspace Model Container. @@ -4204,9 +6204,7 @@ import java.util.Map; */ public final class ModelVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Version. @@ -4219,8 +6217,8 @@ public final class ModelVersionsCreateOrUpdateSamples { .define("string") .withExistingModel("test-rg", "my-aml-workspace", "string") .withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") @@ -4250,9 +6248,7 @@ public final class ModelVersionsCreateOrUpdateSamples { */ public final class ModelVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/delete.json */ /** * Sample code: Delete Workspace Model Version. @@ -4275,9 +6271,7 @@ public final class ModelVersionsDeleteSamples { */ public final class ModelVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/get.json */ /** * Sample code: Get Workspace Model Version. @@ -4301,9 +6295,7 @@ public final class ModelVersionsGetSamples { */ public final class ModelVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/list.json */ /** * Sample code: List Workspace Model Version. @@ -4329,9 +6321,7 @@ import com.azure.resourcemanager.machinelearning.models.DestinationAsset; */ public final class ModelVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/publish.json */ /** * Sample code: Publish Workspace Model Version. @@ -4342,9 +6332,9 @@ public final class ModelVersionsPublishSamples { publishWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } @@ -4375,9 +6365,7 @@ import java.util.Map; */ public final class OnlineDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -4390,34 +6378,35 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new KubernetesOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new KubernetesOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withInstanceType("string") + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) .withModel("string") + .withModelMountPath("string") + .withRequestSettings(new OnlineRequestSettings().withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings()) .withContainerResourceRequirements(new ContainerResourceRequirements() - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")) .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")))) + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")) + .withContainerResourceRequests( + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -4427,9 +6416,7 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. @@ -4442,34 +6429,35 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new ManagedOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new ManagedOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT2S")) + .withTimeout(Duration.parse("PT5M"))) + .withModel("string") + .withModelMountPath("string") + .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) + .withInitialDelay(Duration.parse("PT1S")) .withPeriod(Duration.parse("PT10S")) - .withInitialDelay(Duration.parse("PT1S"))) - .withInstanceType("string") - .withModel("string")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT2S"))) + .withRequestSettings(new OnlineRequestSettings().withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings())) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -4500,9 +6488,7 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { */ public final class OnlineDeploymentsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineDeployment/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineDeployment/delete.json */ /** * Sample code: Delete Workspace Online Deployment. @@ -4525,9 +6511,7 @@ public final class OnlineDeploymentsDeleteSamples { */ public final class OnlineDeploymentsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -4542,9 +6526,7 @@ public final class OnlineDeploymentsGetSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. @@ -4571,9 +6553,7 @@ import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; */ public final class OnlineDeploymentsGetLogsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/getLogs.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. @@ -4598,9 +6578,7 @@ public final class OnlineDeploymentsGetLogsSamples { */ public final class OnlineDeploymentsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/list.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. @@ -4623,9 +6601,7 @@ public final class OnlineDeploymentsListSamples { */ public final class OnlineDeploymentsListSkusSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -4640,9 +6616,7 @@ public final class OnlineDeploymentsListSkusSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. @@ -4672,9 +6646,7 @@ import java.util.Map; */ public final class OnlineDeploymentsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -4689,18 +6661,16 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -4715,11 +6685,11 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } @@ -4755,9 +6725,7 @@ import java.util.Map; */ public final class OnlineEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Online Endpoint. @@ -4770,15 +6738,15 @@ public final class OnlineEndpointsCreateOrUpdateSamples { .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new OnlineEndpointProperties().withDescription("string") + .withProperties(new OnlineEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withCompute("string") .withTraffic(mapOf("string", 1))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -4809,9 +6777,7 @@ public final class OnlineEndpointsCreateOrUpdateSamples { */ public final class OnlineEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/delete.json */ /** * Sample code: Delete Workspace Online Endpoint. @@ -4834,9 +6800,7 @@ public final class OnlineEndpointsDeleteSamples { */ public final class OnlineEndpointsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/get.json */ /** * Sample code: Get Workspace Online Endpoint. @@ -4859,9 +6823,7 @@ public final class OnlineEndpointsGetSamples { */ public final class OnlineEndpointsGetTokenSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/getToken.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/getToken.json */ /** * Sample code: GetToken Workspace Online Endpoint. @@ -4887,9 +6849,7 @@ import com.azure.resourcemanager.machinelearning.models.OrderString; */ public final class OnlineEndpointsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/list.json */ /** * Sample code: List Workspace Online Endpoint. @@ -4913,9 +6873,7 @@ public final class OnlineEndpointsListSamples { */ public final class OnlineEndpointsListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Online Endpoint. @@ -4941,9 +6899,7 @@ import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRe */ public final class OnlineEndpointsRegenerateKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/regenerateKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Online Endpoint. @@ -4977,9 +6933,7 @@ import java.util.Map; */ public final class OnlineEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/update.json */ /** * Sample code: Update Workspace Online Endpoint. @@ -5022,9 +6976,7 @@ public final class OnlineEndpointsUpdateSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/operationsList.json + * x-ms-original-file: 2026-05-15-preview/Workspace/operationsList.json */ /** * Sample code: OperationsList. @@ -5037,6 +6989,222 @@ public final class OperationsListSamples { } ``` +### OutboundRule_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; + +/** + * Samples for OutboundRule CreateOrUpdate. + */ +public final class OutboundRuleCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/createOrUpdateRuleV2.json + */ + /** + * Sample code: CreateOrUpdate OutboundRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateOutboundRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules() + .createOrUpdate("test-rg", "aml-workspace-name", "default", "rule_name_1", + new OutboundRuleBasicResourceInner() + .withProperties(new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withStatus(RuleStatus.ACTIVE) + .withDestination("destination_endpoint")), + com.azure.core.util.Context.NONE); + } +} +``` + +### OutboundRule_Delete + +```java +/** + * Samples for OutboundRule Delete. + */ +public final class OutboundRuleDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/deleteRuleV2.json + */ + /** + * Sample code: Delete OutboundRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteOutboundRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules() + .delete("test-rg", "aml-workspace-name", "default", "rule-name", com.azure.core.util.Context.NONE); + } +} +``` + +### OutboundRule_Get + +```java +/** + * Samples for OutboundRule Get. + */ +public final class OutboundRuleGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/getRuleV2.json + */ + /** + * Sample code: Get OutboundRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getOutboundRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules() + .getWithResponse("test-rg", "aml-workspace-name", "default", "name_of_the_fqdn_rule", + com.azure.core.util.Context.NONE); + } +} +``` + +### OutboundRule_List + +```java +/** + * Samples for OutboundRule List. + */ +public final class OutboundRuleListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/listRuleV2.json + */ + /** + * Sample code: List OutboundRules. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listOutboundRules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules().list("test-rg", "aml-workspace-name", "default", com.azure.core.util.Context.NONE); + } +} +``` + +### OutboundRulesOperation_Post + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for OutboundRulesOperation Post. + */ +public final class OutboundRulesOperationPostSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/postOutboundRulesV2.json + */ + /** + * Sample code: Post OutboundRules. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void postOutboundRules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRulesOperations() + .post("test-rg", "aml-workspace-name", "default", + new ManagedNetworkSettingsBasicResourceInner() + .withProperties(new ManagedNetworkSettingsInner().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("rule_name_1", + new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withDestination("destination_endpoint"))) + .withFirewallSku(FirewallSku.STANDARD)), + com.azure.core.util.Context.NONE); + } + + // 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; + } +} +``` + +### PTUQuota_GetAvailable + +```java +/** + * Samples for PTUQuota GetAvailable. + */ +public final class PTUQuotaGetAvailableSamples { + /* + * x-ms-original-file: 2026-05-15-preview/PTUQuota/getAvailable.json + */ + /** + * Sample code: Get available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.pTUQuotas().getAvailableWithResponse("location", com.azure.core.util.Context.NONE); + } +} +``` + +### PTUQuota_List + +```java +/** + * Samples for PTUQuota List. + */ +public final class PTUQuotaListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/PTUQuota/list.json + */ + /** + * Sample code: List MaaS PTU usage and quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listMaaSPTUUsageAndQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.pTUQuotas().list("location", null, com.azure.core.util.Context.NONE); + } +} +``` + +### PTUQuota_ListAvailable + +```java +/** + * Samples for PTUQuota ListAvailable. + */ +public final class PTUQuotaListAvailableSamples { + /* + * x-ms-original-file: 2026-05-15-preview/PTUQuota/listAvailable.json + */ + /** + * Sample code: List available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.pTUQuotas().listAvailable("location", null, com.azure.core.util.Context.NONE); + } +} +``` + ### PrivateEndpointConnections_CreateOrUpdate ```java @@ -5048,9 +7216,7 @@ import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnec */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. @@ -5063,8 +7229,8 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { .define("{privateEndpointConnectionName}") .withExistingWorkspace("rg-1234", "testworkspace") .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) + new PrivateLinkServiceConnectionState().withDescription("Auto-Approved") + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)) .create(); } } @@ -5078,16 +7244,14 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/delete.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/delete.json */ /** - * Sample code: WorkspaceDeletePrivateEndpointConnection. + * Sample code: WorkspacePutPrivateEndpointConnection. * * @param manager Entry point to MachineLearningManager. */ - public static void workspaceDeletePrivateEndpointConnection( + public static void workspacePutPrivateEndpointConnection( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.privateEndpointConnections() .deleteWithResponse("rg-1234", "testworkspace", "{privateEndpointConnectionName}", @@ -5104,9 +7268,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/get.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. @@ -5130,9 +7292,7 @@ public final class PrivateEndpointConnectionsGetSamples { */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/list.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. @@ -5154,9 +7314,7 @@ public final class PrivateEndpointConnectionsListSamples { */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateLinkResource/list.json + * x-ms-original-file: 2026-05-15-preview/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. @@ -5165,7 +7323,7 @@ public final class PrivateLinkResourcesListSamples { */ public static void workspaceListPrivateLinkResources(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.privateLinkResources().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); } } ``` @@ -5178,9 +7336,7 @@ public final class PrivateLinkResourcesListSamples { */ public final class QuotasListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/list.json + * x-ms-original-file: 2026-05-15-preview/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. @@ -5207,9 +7363,7 @@ import java.util.Arrays; */ public final class QuotasUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/update.json + * x-ms-original-file: 2026-05-15-preview/Quota/update.json */ /** * Sample code: update quotas. @@ -5234,15 +7388,128 @@ public final class QuotasUpdateSamples { } ``` +### RaiPoliciesOperation_List + +```java +/** + * Samples for RaiPoliciesOperation List. + */ +public final class RaiPoliciesOperationListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/list.json + */ + /** + * Sample code: List Rai policies. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiPolicies(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPoliciesOperations() + .list("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} +``` + +### RaiPolicy_Create + +```java +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; + +/** + * Samples for RaiPolicy Create. + */ +public final class RaiPolicyCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/create.json + */ + /** + * Sample code: Create Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .define("raiPolicyName") + .withExistingEndpoint("test-rg", "aml-workspace-name", "Azure.OpenAI") + .withProperties(new RaiPolicyProperties().withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)) + .create(); + } +} +``` + +### RaiPolicy_Delete + +```java +/** + * Samples for RaiPolicy Delete. + */ +public final class RaiPolicyDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/delete.json + */ + /** + * Sample code: Delete Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", com.azure.core.util.Context.NONE); + } +} +``` + +### RaiPolicy_Get + +```java +/** + * Samples for RaiPolicy Get. + */ +public final class RaiPolicyGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/get.json + */ + /** + * Sample code: Get Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} +``` + ### Registries_CreateOrUpdate ```java import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; @@ -5252,8 +7519,6 @@ import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5263,9 +7528,7 @@ import java.util.Map; */ public final class RegistriesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry with system created accounts. @@ -5299,7 +7562,7 @@ public final class RegistriesCreateOrUpdateSamples { .withRegistryPrivateLinkServiceConnectionState( new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)) .withProvisioningState("string"))) .withPublicNetworkAccess("string") .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() @@ -5317,55 +7580,6 @@ public final class RegistriesCreateOrUpdateSamples { .create(); } - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-UserCreated.json - */ - /** - * Sample code: CreateOrUpdate Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries() - .define("string") - .withRegion("string") - .withExistingResourceGroup("test-rg") - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .withDiscoveryUrl("string") - .withIntellectualPropertyPublisher("string") - .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) - .withMlFlowRegistryUri("string") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("string") - .withLocation("string") - .withGroupIds(Arrays.asList("string")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") - .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("string"))) - .withPublicNetworkAccess("string") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails().withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("string"))))) - .withLocation("string") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails().withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("string"))))))) - .create(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { @@ -5388,9 +7602,7 @@ public final class RegistriesCreateOrUpdateSamples { */ public final class RegistriesDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/delete.json + * x-ms-original-file: 2026-05-15-preview/Registries/delete.json */ /** * Sample code: Delete Registry. @@ -5411,24 +7623,7 @@ public final class RegistriesDeleteSamples { */ public final class RegistriesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-UserCreated.json - */ - /** - * Sample code: Get Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryWithUserCreatedAccounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/get.json */ /** * Sample code: Get Registry with system created accounts. @@ -5450,9 +7645,7 @@ public final class RegistriesGetByResourceGroupSamples { */ public final class RegistriesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/listBySubscription.json + * x-ms-original-file: 2026-05-15-preview/Registries/listBySubscription.json */ /** * Sample code: List registries by subscription. @@ -5474,24 +7667,7 @@ public final class RegistriesListSamples { */ public final class RegistriesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-UserCreated.json - */ - /** - * Sample code: List registries with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listRegistriesWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/list.json */ /** * Sample code: List registries with system created accounts. @@ -5511,10 +7687,10 @@ public final class RegistriesListByResourceGroupSamples { import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; @@ -5524,8 +7700,6 @@ import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -5535,9 +7709,7 @@ import java.util.Map; */ public final class RegistriesRemoveRegionsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/removeRegions.json + * x-ms-original-file: 2026-05-15-preview/Registries/removeRegions.json */ /** * Sample code: Remove regions from registry. @@ -5570,26 +7742,22 @@ public final class RegistriesRemoveRegionsSamples { .withRegistryPrivateLinkServiceConnectionState( new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)) .withProvisioningState("string"))) .withPublicNetworkAccess("string") .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() .withAcrDetails(Arrays.asList(new AcrDetails() .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("string") .withAcrAccountSku("string") - .withArmResourceId(new ArmResourceId().withResourceId("string"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() .withArmResourceId(new ArmResourceId().withResourceId("string"))))) .withLocation("string") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails() - .withSystemCreatedStorageAccount( + .withStorageAccountDetails( + Arrays.asList(new StorageAccountDetails().withSystemCreatedStorageAccount( new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) .withArmResourceId(new ArmResourceId().withResourceId("string")) .withStorageAccountHnsEnabled(false) .withStorageAccountName("string") - .withStorageAccountType("string")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("string"))))))), + .withStorageAccountType("string")))))), com.azure.core.util.Context.NONE); } @@ -5624,36 +7792,7 @@ import java.util.Map; */ public final class RegistriesUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-UserCreated.json - */ - /** - * Sample code: Update Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateRegistryWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Registry resource = manager.registries() - .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .apply(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/update.json */ /** * Sample code: Update Registry with system created accounts. @@ -5670,11 +7809,11 @@ public final class RegistriesUpdateSamples { .withIdentity( new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) .apply(); } @@ -5705,9 +7844,7 @@ import java.util.Map; */ public final class RegistryCodeContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Container. @@ -5745,9 +7882,7 @@ public final class RegistryCodeContainersCreateOrUpdateSamples { */ public final class RegistryCodeContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/delete.json */ /** * Sample code: Delete Registry Code Container. @@ -5770,9 +7905,7 @@ public final class RegistryCodeContainersDeleteSamples { */ public final class RegistryCodeContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/get.json */ /** * Sample code: Get Registry Code Container. @@ -5795,9 +7928,7 @@ public final class RegistryCodeContainersGetSamples { */ public final class RegistryCodeContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/list.json */ /** * Sample code: List Registry Code Container. @@ -5822,9 +7953,7 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; */ public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Code Version. @@ -5855,9 +7984,7 @@ import java.util.Map; */ public final class RegistryCodeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Version. @@ -5869,8 +7996,8 @@ public final class RegistryCodeVersionsCreateOrUpdateSamples { manager.registryCodeVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new CodeVersionInner().withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); @@ -5898,9 +8025,7 @@ public final class RegistryCodeVersionsCreateOrUpdateSamples { */ public final class RegistryCodeVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/delete.json */ /** * Sample code: Delete Registry Code Version. @@ -5923,9 +8048,7 @@ public final class RegistryCodeVersionsDeleteSamples { */ public final class RegistryCodeVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/get.json */ /** * Sample code: Get Registry Code Version. @@ -5948,9 +8071,7 @@ public final class RegistryCodeVersionsGetSamples { */ public final class RegistryCodeVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/list.json */ /** * Sample code: List Registry Code Version. @@ -5978,9 +8099,7 @@ import java.util.Map; */ public final class RegistryComponentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Container. @@ -5993,8 +8112,8 @@ public final class RegistryComponentContainersCreateOrUpdateSamples { .createOrUpdate("test-rg", "my-aml-registry", "string", new ComponentContainerInner() .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))), + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), com.azure.core.util.Context.NONE); } @@ -6020,9 +8139,7 @@ public final class RegistryComponentContainersCreateOrUpdateSamples { */ public final class RegistryComponentContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/delete.json */ /** * Sample code: Delete Registry Component Container. @@ -6045,9 +8162,7 @@ public final class RegistryComponentContainersDeleteSamples { */ public final class RegistryComponentContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/get.json */ /** * Sample code: Get Registry Component Container. @@ -6070,9 +8185,7 @@ public final class RegistryComponentContainersGetSamples { */ public final class RegistryComponentContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/list.json */ /** * Sample code: List Registry Component Container. @@ -6103,9 +8216,7 @@ import java.util.Map; */ public final class RegistryComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Version. @@ -6117,8 +8228,8 @@ public final class RegistryComponentVersionsCreateOrUpdateSamples { manager.registryComponentVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, @@ -6148,9 +8259,7 @@ public final class RegistryComponentVersionsCreateOrUpdateSamples { */ public final class RegistryComponentVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/delete.json */ /** * Sample code: Delete Registry Component Version. @@ -6173,9 +8282,7 @@ public final class RegistryComponentVersionsDeleteSamples { */ public final class RegistryComponentVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/get.json */ /** * Sample code: Get Registry Component Version. @@ -6198,9 +8305,7 @@ public final class RegistryComponentVersionsGetSamples { */ public final class RegistryComponentVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/list.json */ /** * Sample code: List Registry Component Version. @@ -6229,9 +8334,7 @@ import java.util.Map; */ public final class RegistryDataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Container. @@ -6243,8 +8346,8 @@ public final class RegistryDataContainersCreateOrUpdateSamples { manager.registryDataContainers() .createOrUpdate("test-rg", "registryName", "string", new DataContainerInner().withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false) .withDataType(DataType.URI_FOLDER)), com.azure.core.util.Context.NONE); @@ -6272,9 +8375,7 @@ public final class RegistryDataContainersCreateOrUpdateSamples { */ public final class RegistryDataContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/delete.json */ /** * Sample code: Delete Registry Data Container. @@ -6296,9 +8397,7 @@ public final class RegistryDataContainersDeleteSamples { */ public final class RegistryDataContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/get.json */ /** * Sample code: Get Registry Data Container. @@ -6323,9 +8422,7 @@ import com.azure.resourcemanager.machinelearning.models.ListViewType; */ public final class RegistryDataContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/registryList.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/registryList.json */ /** * Sample code: RegistryList Registry Data Container. @@ -6350,9 +8447,7 @@ import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasReque */ public final class RegistryDataReferencesGetBlobReferenceSasSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/DataReference/getBlobReferenceSAS.json + * x-ms-original-file: 2026-05-15-preview/DataReference/getBlobReferenceSAS.json */ /** * Sample code: GetBlobReferenceSAS Data Reference. @@ -6381,9 +8476,7 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; */ public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Data Version Base. @@ -6415,9 +8508,7 @@ import java.util.Map; */ public final class RegistryDataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Version Base. @@ -6429,10 +8520,10 @@ public final class RegistryDataVersionsCreateOrUpdateSamples { manager.registryDataVersions() .createOrUpdate("test-rg", "registryName", "string", "string", new DataVersionBaseInner().withProperties(new MLTableData().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) + .withIsArchived(false) .withDataUri("string") .withReferencedUris(Arrays.asList("string"))), com.azure.core.util.Context.NONE); @@ -6460,9 +8551,7 @@ public final class RegistryDataVersionsCreateOrUpdateSamples { */ public final class RegistryDataVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/delete.json */ /** * Sample code: Delete Registry Data Version Base. @@ -6485,9 +8574,7 @@ public final class RegistryDataVersionsDeleteSamples { */ public final class RegistryDataVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/get.json */ /** * Sample code: Get Registry Data Version Base. @@ -6512,9 +8599,7 @@ import com.azure.resourcemanager.machinelearning.models.ListViewType; */ public final class RegistryDataVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/registryList.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/registryList.json */ /** * Sample code: RegistryList Registry Data Version Base. @@ -6543,9 +8628,7 @@ import java.util.Map; */ public final class RegistryEnvironmentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Container. @@ -6558,9 +8641,9 @@ public final class RegistryEnvironmentContainersCreateOrUpdateSamples { .createOrUpdate("testrg123", "testregistry", "testEnvironment", new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() .withDescription("string") - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))), com.azure.core.util.Context.NONE); } @@ -6587,9 +8670,7 @@ public final class RegistryEnvironmentContainersCreateOrUpdateSamples { */ public final class RegistryEnvironmentContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/delete.json */ /** * Sample code: Delete Registry Environment Container. @@ -6612,9 +8693,7 @@ public final class RegistryEnvironmentContainersDeleteSamples { */ public final class RegistryEnvironmentContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/get.json */ /** * Sample code: Get Registry Environment Container. @@ -6638,9 +8717,7 @@ public final class RegistryEnvironmentContainersGetSamples { */ public final class RegistryEnvironmentContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/list.json */ /** * Sample code: List Registry Environment Container. @@ -6671,9 +8748,7 @@ import java.util.Map; */ public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Version. @@ -6686,14 +8761,14 @@ public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() .withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") .withBuild(new BuildContext().withContextUri( "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") .withInferenceConfig( new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) .withReadinessRoute(new Route().withPath("string").withPort(1)) @@ -6723,9 +8798,7 @@ public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { */ public final class RegistryEnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/delete.json */ /** * Sample code: Delete Registry Environment Version. @@ -6748,9 +8821,7 @@ public final class RegistryEnvironmentVersionsDeleteSamples { */ public final class RegistryEnvironmentVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/get.json */ /** * Sample code: Get Registry Environment Version. @@ -6774,9 +8845,7 @@ public final class RegistryEnvironmentVersionsGetSamples { */ public final class RegistryEnvironmentVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/list.json */ /** * Sample code: List Registry Environment Version. @@ -6804,9 +8873,7 @@ import java.util.Map; */ public final class RegistryModelContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Container. @@ -6845,9 +8912,7 @@ public final class RegistryModelContainersCreateOrUpdateSamples { */ public final class RegistryModelContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/delete.json */ /** * Sample code: Delete Registry Model Container. @@ -6870,9 +8935,7 @@ public final class RegistryModelContainersDeleteSamples { */ public final class RegistryModelContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/get.json */ /** * Sample code: Get Registry Model Container. @@ -6896,9 +8959,7 @@ public final class RegistryModelContainersGetSamples { */ public final class RegistryModelContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/list.json */ /** * Sample code: List Registry Model Container. @@ -6924,9 +8985,7 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; */ public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Model Version. @@ -6958,9 +9017,7 @@ import java.util.Map; */ public final class RegistryModelVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Version. @@ -6972,8 +9029,8 @@ public final class RegistryModelVersionsCreateOrUpdateSamples { manager.registryModelVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") @@ -7003,9 +9060,7 @@ public final class RegistryModelVersionsCreateOrUpdateSamples { */ public final class RegistryModelVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/delete.json */ /** * Sample code: Delete Registry Model Version. @@ -7028,9 +9083,7 @@ public final class RegistryModelVersionsDeleteSamples { */ public final class RegistryModelVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/get.json */ /** * Sample code: Get Registry Model Version. @@ -7054,9 +9107,7 @@ public final class RegistryModelVersionsGetSamples { */ public final class RegistryModelVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/list.json */ /** * Sample code: List Registry Model Version. @@ -7089,9 +9140,7 @@ import java.util.Map; */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. @@ -7104,18 +9153,18 @@ public final class SchedulesCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ScheduleProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withAction(new EndpointScheduleAction() + .withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, + SerializerEncoding.JSON))) .withDisplayName("string") .withIsEnabled(false) .withTrigger(new CronTrigger().withEndTime("string") .withStartTime("string") .withTimeZone("string") - .withExpression("string")) - .withAction(new EndpointScheduleAction() - .withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, - SerializerEncoding.JSON)))) + .withExpression("string"))) .create(); } @@ -7141,9 +9190,7 @@ public final class SchedulesCreateOrUpdateSamples { */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/delete.json + * x-ms-original-file: 2026-05-15-preview/Schedule/delete.json */ /** * Sample code: Delete Schedule. @@ -7164,9 +9211,7 @@ public final class SchedulesDeleteSamples { */ public final class SchedulesGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/get.json + * x-ms-original-file: 2026-05-15-preview/Schedule/get.json */ /** * Sample code: Get Schedule. @@ -7188,9 +9233,7 @@ public final class SchedulesGetSamples { */ public final class SchedulesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/list.json + * x-ms-original-file: 2026-05-15-preview/Schedule/list.json */ /** * Sample code: List Schedules. @@ -7207,6 +9250,7 @@ public final class SchedulesListSamples { ```java import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -7224,9 +9268,7 @@ import java.util.Map; */ public final class ServerlessEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Serverless Endpoint. @@ -7239,14 +9281,14 @@ public final class ServerlessEndpointsCreateOrUpdateSamples { .define("string") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("string")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) + .withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) + .withContentSafety(new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.BLOCKING) + .withContentSafetyStatus(ContentSafetyStatus.ENABLED)) + .withModelSettings(new ModelSettings().withModelId("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.STANDARD) .withSize("string") @@ -7277,9 +9319,7 @@ public final class ServerlessEndpointsCreateOrUpdateSamples { */ public final class ServerlessEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/delete.json */ /** * Sample code: Delete Workspace Serverless Endpoint. @@ -7301,9 +9341,7 @@ public final class ServerlessEndpointsDeleteSamples { */ public final class ServerlessEndpointsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/get.json */ /** * Sample code: Get Workspace Serverless Endpoint. @@ -7326,9 +9364,7 @@ public final class ServerlessEndpointsGetSamples { */ public final class ServerlessEndpointsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/list.json */ /** * Sample code: List Workspace Serverless Endpoint. @@ -7350,9 +9386,7 @@ public final class ServerlessEndpointsListSamples { */ public final class ServerlessEndpointsListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Serverless Endpoint. @@ -7378,9 +9412,7 @@ import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRe */ public final class ServerlessEndpointsRegenerateKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/regenerateKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Serverless Endpoint. @@ -7416,9 +9448,7 @@ import java.util.Map; */ public final class ServerlessEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/update.json */ /** * Sample code: Update Workspace Serverless Endpoint. @@ -7432,15 +9462,15 @@ public final class ServerlessEndpointsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.PREMIUM) - .withSize("string") - .withFamily("string") - .withCapacity(1)) .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) .withUserAssignedIdentities(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withSku(new PartialSku().withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.PREMIUM)) .apply(); } @@ -7466,9 +9496,7 @@ public final class ServerlessEndpointsUpdateSamples { */ public final class UsagesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Usage/list.json + * x-ms-original-file: 2026-05-15-preview/Usage/list.json */ /** * Sample code: List Usages. @@ -7489,9 +9517,7 @@ public final class UsagesListSamples { */ public final class VirtualMachineSizesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/VirtualMachineSize/list.json + * x-ms-original-file: 2026-05-15-preview/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. @@ -7509,15 +9535,14 @@ public final class VirtualMachineSizesListSamples { ```java import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; /** * Samples for WorkspaceConnections Create. */ public final class WorkspaceConnectionsCreateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/create.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -7531,6 +9556,7 @@ public final class WorkspaceConnectionsCreateSamples { .withExistingWorkspace("resourceGroup-1", "workspace-1") .withProperties( new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY) + .withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")) .withTarget("www.facebook.com")) .create(); } @@ -7545,9 +9571,7 @@ public final class WorkspaceConnectionsCreateSamples { */ public final class WorkspaceConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/delete.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. @@ -7570,9 +9594,7 @@ public final class WorkspaceConnectionsDeleteSamples { */ public final class WorkspaceConnectionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/get.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. @@ -7595,9 +9617,7 @@ public final class WorkspaceConnectionsGetSamples { */ public final class WorkspaceConnectionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -7607,7 +9627,7 @@ public final class WorkspaceConnectionsListSamples { public static void listWorkspaceConnections(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.workspaceConnections() - .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", + .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", null, com.azure.core.util.Context.NONE); } } @@ -7621,9 +9641,7 @@ public final class WorkspaceConnectionsListSamples { */ public final class WorkspaceConnectionsListSecretsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/listSecrets.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/listSecrets.json */ /** * Sample code: GetWorkspaceConnection. @@ -7638,6 +9656,92 @@ public final class WorkspaceConnectionsListSecretsSamples { } ``` +### WorkspaceConnections_TestConnection + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; + +/** + * Samples for WorkspaceConnections TestConnection. + */ +public final class WorkspaceConnectionsTestConnectionSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/testConnection.json + */ + /** + * Sample code: TestWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + testWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections() + .testConnection("resourceGroup-1", "workspace-1", "connection-1", + new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( + new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY) + .withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")) + .withTarget("target_url")), + com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceConnections_Update + +```java +import com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for WorkspaceConnections Update. + */ +public final class WorkspaceConnectionsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/update.json + */ + /** + * Sample code: UpdateWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + updateWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + WorkspaceConnectionPropertiesV2BasicResource resource = manager.workspaceConnections() + .getWithResponse("test-rg", "workspace-1", "connection-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new AccessKeyAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.ADLSGEN2) + .withExpiryTime(OffsetDateTime.parse("2020-01-01T00:00:00Z")) + .withMetadata(mapOf()) + .withTarget("some_string") + .withCredentials(new WorkspaceConnectionAccessKey().withAccessKeyId("fakeTokenPlaceholder") + .withSecretAccessKey("fakeTokenPlaceholder"))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + ### WorkspaceFeatures_List ```java @@ -7646,9 +9750,7 @@ public final class WorkspaceConnectionsListSecretsSamples { */ public final class WorkspaceFeaturesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceFeature/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. @@ -7664,10 +9766,10 @@ public final class WorkspaceFeaturesListSamples { ### Workspaces_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.EncryptionStatus; import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; +import com.azure.resourcemanager.machinelearning.models.KeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; @@ -7682,9 +9784,7 @@ import java.util.Map; */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/create.json + * x-ms-original-file: 2026-05-15-preview/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -7701,29 +9801,29 @@ public final class WorkspacesCreateOrUpdateSamples { .withUserAssignedIdentities(mapOf( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", new UserAssignedIdentity()))) - .withDescription("test description") - .withFriendlyName("HelloName") - .withKeyVault( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") .withApplicationInsights( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights") .withContainerRegistry( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry") - .withStorageAccount( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") - .withEncryption(new EncryptionProperty().withStatus(EncryptionStatus.ENABLED) - .withIdentity(new IdentityForCmk().withUserAssignedIdentity( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) - .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyVaultArmId("fakeTokenPlaceholder") + .withDescription("test description") + .withEncryption(new EncryptionProperty().withIdentity(new IdentityForCmk().withUserAssignedIdentity( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) + .withKeyVaultProperties(new KeyVaultProperties().withIdentityClientId("") .withKeyIdentifier("fakeTokenPlaceholder") - .withIdentityClientId(""))) + .withKeyVaultArmId("fakeTokenPlaceholder")) + .withStatus(EncryptionStatus.ENABLED)) + .withFriendlyName("HelloName") .withHbiWorkspace(false) + .withKeyVault( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") .withSharedPrivateLinkResources(Arrays.asList(new SharedPrivateLinkResource().withName("testdbresource") + .withGroupId("Sql") .withPrivateLinkResourceId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql") - .withGroupId("Sql") .withRequestMessage("Please approve") .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) + .withStorageAccount( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") .create(); } @@ -7749,9 +9849,7 @@ public final class WorkspacesCreateOrUpdateSamples { */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/delete.json */ /** * Sample code: Delete Workspace. @@ -7777,9 +9875,7 @@ import java.util.Map; */ public final class WorkspacesDiagnoseSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/diagnose.json + * x-ms-original-file: 2026-05-15-preview/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -7789,15 +9885,16 @@ public final class WorkspacesDiagnoseSamples { public static void diagnoseWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.workspaces() .diagnose("workspace-1234", "testworkspace", - new DiagnoseWorkspaceParameters().withValue(new DiagnoseRequestProperties().withUdr(mapOf()) - .withNsg(mapOf()) - .withResourceLock(mapOf()) - .withDnsResolution(mapOf()) - .withStorageAccount(mapOf()) - .withKeyVault(mapOf()) - .withContainerRegistry(mapOf()) - .withApplicationInsights(mapOf()) - .withOthers(mapOf())), + new DiagnoseWorkspaceParameters() + .withValue(new DiagnoseRequestProperties().withApplicationInsights(mapOf()) + .withContainerRegistry(mapOf()) + .withDnsResolution(mapOf()) + .withKeyVault(mapOf()) + .withNsg(mapOf()) + .withOthers(mapOf()) + .withResourceLock(mapOf()) + .withStorageAccount(mapOf()) + .withUdr(mapOf())), com.azure.core.util.Context.NONE); } @@ -7823,9 +9920,7 @@ public final class WorkspacesDiagnoseSamples { */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/get.json */ /** * Sample code: Get Workspace. @@ -7847,9 +9942,7 @@ public final class WorkspacesGetByResourceGroupSamples { */ public final class WorkspacesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listBySubscription.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. @@ -7858,7 +9951,7 @@ public final class WorkspacesListSamples { */ public static void getWorkspacesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); + manager.workspaces().list(null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -7871,9 +9964,7 @@ public final class WorkspacesListSamples { */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listByResourceGroup.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. @@ -7882,7 +9973,7 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void getWorkspacesByResourceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); + manager.workspaces().listByResourceGroup("workspace-1234", null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -7895,9 +9986,7 @@ public final class WorkspacesListByResourceGroupSamples { */ public final class WorkspacesListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -7918,9 +10007,7 @@ public final class WorkspacesListKeysSamples { */ public final class WorkspacesListNotebookAccessTokenSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listNotebookAccessToken.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. @@ -7942,9 +10029,7 @@ public final class WorkspacesListNotebookAccessTokenSamples { */ public final class WorkspacesListNotebookKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -7966,9 +10051,7 @@ public final class WorkspacesListNotebookKeysSamples { */ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ExternalFQDN/get.json + * x-ms-original-file: 2026-05-15-preview/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. @@ -7992,9 +10075,7 @@ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { */ public final class WorkspacesListStorageAccountKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listStorageAccountKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. @@ -8016,9 +10097,7 @@ public final class WorkspacesListStorageAccountKeysSamples { */ public final class WorkspacesPrepareNotebookSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/prepare.json + * x-ms-original-file: 2026-05-15-preview/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. @@ -8039,9 +10118,7 @@ public final class WorkspacesPrepareNotebookSamples { */ public final class WorkspacesResyncKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/resyncKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. @@ -8065,9 +10142,7 @@ import com.azure.resourcemanager.machinelearning.models.Workspace; */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/update.json */ /** * Sample code: Update Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index 20824efc33aa..d5fae5331837 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Machine Learning Management - This package contains Microsoft Azure SDK for Machine Learning Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2024-04. + This package contains Microsoft Azure SDK for Machine Learning Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package api-version 2026-05-15-preview. https://github.com/Azure/azure-sdk-for-java @@ -48,11 +48,6 @@ true - - com.azure - azure-json - 1.5.1 - com.azure azure-core @@ -75,6 +70,11 @@ 1.18.4 test + + com.azure + azure-json + 1.5.1 + com.azure.resourcemanager azure-resourcemanager-storage diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java index bb31e555c22f..eabb77554376 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning; @@ -11,39 +11,54 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; 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.machinelearning.fluent.AzureMachineLearningWorkspaces; -import com.azure.resourcemanager.machinelearning.implementation.AzureMachineLearningWorkspacesBuilder; +import com.azure.resourcemanager.machinelearning.fluent.MachineLearningManagementClient; import com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsImpl; import com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsImpl; +import com.azure.resourcemanager.machinelearning.implementation.CapabilityHostsImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ComponentContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.ComponentVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ComputesImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsOperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistsOperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPoliciesImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPoliciesOperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionsImpl; import com.azure.resourcemanager.machinelearning.implementation.DataContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.DatastoresImpl; import com.azure.resourcemanager.machinelearning.implementation.DataVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.DatastoresImpl; +import com.azure.resourcemanager.machinelearning.implementation.EndpointDeploymentsImpl; +import com.azure.resourcemanager.machinelearning.implementation.EndpointsImpl; import com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.FeaturesImpl; import com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.FeaturesetVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.FeaturesImpl; import com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityVersionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.InferenceEndpointsImpl; +import com.azure.resourcemanager.machinelearning.implementation.InferenceGroupsImpl; +import com.azure.resourcemanager.machinelearning.implementation.InferencePoolsImpl; import com.azure.resourcemanager.machinelearning.implementation.JobsImpl; +import com.azure.resourcemanager.machinelearning.implementation.MachineLearningManagementClientBuilder; import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsOperationsImpl; import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesImpl; import com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ModelContainersImpl; @@ -51,9 +66,14 @@ import com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsImpl; import com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsImpl; import com.azure.resourcemanager.machinelearning.implementation.OperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.OutboundRulesImpl; +import com.azure.resourcemanager.machinelearning.implementation.OutboundRulesOperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.PTUQuotasImpl; import com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.machinelearning.implementation.QuotasImpl; +import com.azure.resourcemanager.machinelearning.implementation.RaiPoliciesImpl; +import com.azure.resourcemanager.machinelearning.implementation.RaiPoliciesOperationsImpl; import com.azure.resourcemanager.machinelearning.implementation.RegistriesImpl; import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsImpl; @@ -75,14 +95,24 @@ import com.azure.resourcemanager.machinelearning.implementation.WorkspacesImpl; import com.azure.resourcemanager.machinelearning.models.BatchDeployments; import com.azure.resourcemanager.machinelearning.models.BatchEndpoints; +import com.azure.resourcemanager.machinelearning.models.CapabilityHosts; import com.azure.resourcemanager.machinelearning.models.CodeContainers; import com.azure.resourcemanager.machinelearning.models.CodeVersions; import com.azure.resourcemanager.machinelearning.models.ComponentContainers; import com.azure.resourcemanager.machinelearning.models.ComponentVersions; import com.azure.resourcemanager.machinelearning.models.Computes; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItems; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItemsOperations; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklists; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistsOperations; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPolicies; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPoliciesOperations; +import com.azure.resourcemanager.machinelearning.models.Connections; import com.azure.resourcemanager.machinelearning.models.DataContainers; -import com.azure.resourcemanager.machinelearning.models.Datastores; import com.azure.resourcemanager.machinelearning.models.DataVersions; +import com.azure.resourcemanager.machinelearning.models.Datastores; +import com.azure.resourcemanager.machinelearning.models.EndpointDeployments; +import com.azure.resourcemanager.machinelearning.models.Endpoints; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainers; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; import com.azure.resourcemanager.machinelearning.models.Features; @@ -90,8 +120,12 @@ import com.azure.resourcemanager.machinelearning.models.FeaturesetVersions; import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainers; import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersions; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpoints; +import com.azure.resourcemanager.machinelearning.models.InferenceGroups; +import com.azure.resourcemanager.machinelearning.models.InferencePools; import com.azure.resourcemanager.machinelearning.models.Jobs; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsOperations; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsRules; import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptions; import com.azure.resourcemanager.machinelearning.models.ModelContainers; @@ -99,9 +133,14 @@ import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; import com.azure.resourcemanager.machinelearning.models.OnlineEndpoints; import com.azure.resourcemanager.machinelearning.models.Operations; +import com.azure.resourcemanager.machinelearning.models.OutboundRules; +import com.azure.resourcemanager.machinelearning.models.OutboundRulesOperations; +import com.azure.resourcemanager.machinelearning.models.PTUQuotas; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnections; import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; import com.azure.resourcemanager.machinelearning.models.Quotas; +import com.azure.resourcemanager.machinelearning.models.RaiPolicies; +import com.azure.resourcemanager.machinelearning.models.RaiPoliciesOperations; import com.azure.resourcemanager.machinelearning.models.Registries; import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; @@ -125,6 +164,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -135,28 +175,84 @@ public final class MachineLearningManager { private Operations operations; + private EndpointDeployments endpointDeployments; + private Workspaces workspaces; - private Usages usages; + private CodeContainers codeContainers; - private VirtualMachineSizes virtualMachineSizes; + private Registries registries; - private Quotas quotas; + private CodeVersions codeVersions; - private Computes computes; + private ComponentContainers componentContainers; + + private ComponentVersions componentVersions; + + private DataContainers dataContainers; + + private DataVersions dataVersions; + + private EnvironmentContainers environmentContainers; + + private EnvironmentVersions environmentVersions; + + private ModelContainers modelContainers; + + private ModelVersions modelVersions; + + private BatchEndpoints batchEndpoints; + + private BatchDeployments batchDeployments; + + private CapabilityHosts capabilityHosts; + + private Datastores datastores; + + private FeaturesetContainers featuresetContainers; + + private Features features; + + private FeaturesetVersions featuresetVersions; + + private FeaturestoreEntityContainers featurestoreEntityContainers; + + private FeaturestoreEntityVersions featurestoreEntityVersions; + + private InferencePools inferencePools; + + private InferenceEndpoints inferenceEndpoints; + + private InferenceGroups inferenceGroups; + + private MarketplaceSubscriptions marketplaceSubscriptions; + + private OnlineEndpoints onlineEndpoints; + + private OnlineDeployments onlineDeployments; + + private Schedules schedules; + + private ServerlessEndpoints serverlessEndpoints; + + private RaiPolicies raiPolicies; private PrivateEndpointConnections privateEndpointConnections; - private PrivateLinkResources privateLinkResources; + private Computes computes; - private WorkspaceConnections workspaceConnections; + private WorkspaceFeatures workspaceFeatures; - private ManagedNetworkSettingsRules managedNetworkSettingsRules; + private Connections connections; + + private PrivateLinkResources privateLinkResources; private ManagedNetworkProvisions managedNetworkProvisions; private RegistryCodeContainers registryCodeContainers; + private RegistryDataReferences registryDataReferences; + private RegistryCodeVersions registryCodeVersions; private RegistryComponentContainers registryComponentContainers; @@ -167,8 +263,6 @@ public final class MachineLearningManager { private RegistryDataVersions registryDataVersions; - private RegistryDataReferences registryDataReferences; - private RegistryEnvironmentContainers registryEnvironmentContainers; private RegistryEnvironmentVersions registryEnvironmentVersions; @@ -177,64 +271,48 @@ public final class MachineLearningManager { private RegistryModelVersions registryModelVersions; - private BatchEndpoints batchEndpoints; - - private BatchDeployments batchDeployments; - - private CodeContainers codeContainers; - - private CodeVersions codeVersions; - - private ComponentContainers componentContainers; - - private ComponentVersions componentVersions; - - private DataContainers dataContainers; - - private DataVersions dataVersions; - - private Datastores datastores; + private Jobs jobs; - private EnvironmentContainers environmentContainers; + private WorkspaceConnections workspaceConnections; - private EnvironmentVersions environmentVersions; + private ConnectionRaiBlocklists connectionRaiBlocklists; - private FeaturesetContainers featuresetContainers; + private ConnectionRaiBlocklistsOperations connectionRaiBlocklistsOperations; - private Features features; + private ConnectionRaiBlocklistItems connectionRaiBlocklistItems; - private FeaturesetVersions featuresetVersions; + private ConnectionRaiBlocklistItemsOperations connectionRaiBlocklistItemsOperations; - private FeaturestoreEntityContainers featurestoreEntityContainers; + private ConnectionRaiPolicies connectionRaiPolicies; - private FeaturestoreEntityVersions featurestoreEntityVersions; + private ConnectionRaiPoliciesOperations connectionRaiPoliciesOperations; - private Jobs jobs; + private RaiPoliciesOperations raiPoliciesOperations; - private MarketplaceSubscriptions marketplaceSubscriptions; + private Endpoints endpoints; - private ModelContainers modelContainers; + private ManagedNetworkSettingsRules managedNetworkSettingsRules; - private ModelVersions modelVersions; + private OutboundRules outboundRules; - private OnlineEndpoints onlineEndpoints; + private ManagedNetworkSettingsOperations managedNetworkSettingsOperations; - private OnlineDeployments onlineDeployments; + private OutboundRulesOperations outboundRulesOperations; - private Schedules schedules; + private Usages usages; - private ServerlessEndpoints serverlessEndpoints; + private VirtualMachineSizes virtualMachineSizes; - private Registries registries; + private Quotas quotas; - private WorkspaceFeatures workspaceFeatures; + private PTUQuotas pTUQuotas; - private final AzureMachineLearningWorkspaces clientObject; + private final MachineLearningManagementClient clientObject; private MachineLearningManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureMachineLearningWorkspacesBuilder().pipeline(httpPipeline) + this.clientObject = new MachineLearningManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -281,6 +359,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-machinelearning.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -388,12 +469,14 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf 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.machinelearning") .append("/") - .append("1.1.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -426,7 +509,7 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -451,6 +534,19 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of EndpointDeployments. It manages + * EndpointDeploymentResourcePropertiesBasicResource. + * + * @return Resource collection API of EndpointDeployments. + */ + public EndpointDeployments endpointDeployments() { + if (this.endpointDeployments == null) { + this.endpointDeployments = new EndpointDeploymentsImpl(clientObject.getEndpointDeployments(), this); + } + return endpointDeployments; + } + /** * Gets the resource collection API of Workspaces. It manages Workspace. * @@ -464,255 +560,135 @@ public Workspaces workspaces() { } /** - * Gets the resource collection API of Usages. + * Gets the resource collection API of CodeContainers. It manages CodeContainer. * - * @return Resource collection API of Usages. + * @return Resource collection API of CodeContainers. */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); + public CodeContainers codeContainers() { + if (this.codeContainers == null) { + this.codeContainers = new CodeContainersImpl(clientObject.getCodeContainers(), this); } - return usages; + return codeContainers; } /** - * Gets the resource collection API of VirtualMachineSizes. + * Gets the resource collection API of Registries. It manages Registry. * - * @return Resource collection API of VirtualMachineSizes. + * @return Resource collection API of Registries. */ - public VirtualMachineSizes virtualMachineSizes() { - if (this.virtualMachineSizes == null) { - this.virtualMachineSizes = new VirtualMachineSizesImpl(clientObject.getVirtualMachineSizes(), this); + public Registries registries() { + if (this.registries == null) { + this.registries = new RegistriesImpl(clientObject.getRegistries(), this); } - return virtualMachineSizes; + return registries; } /** - * Gets the resource collection API of Quotas. + * Gets the resource collection API of CodeVersions. It manages CodeVersion. * - * @return Resource collection API of Quotas. + * @return Resource collection API of CodeVersions. */ - public Quotas quotas() { - if (this.quotas == null) { - this.quotas = new QuotasImpl(clientObject.getQuotas(), this); + public CodeVersions codeVersions() { + if (this.codeVersions == null) { + this.codeVersions = new CodeVersionsImpl(clientObject.getCodeVersions(), this); } - return quotas; + return codeVersions; } /** - * Gets the resource collection API of Computes. It manages ComputeResource. + * Gets the resource collection API of ComponentContainers. It manages ComponentContainer. * - * @return Resource collection API of Computes. + * @return Resource collection API of ComponentContainers. */ - public Computes computes() { - if (this.computes == null) { - this.computes = new ComputesImpl(clientObject.getComputes(), this); + public ComponentContainers componentContainers() { + if (this.componentContainers == null) { + this.componentContainers = new ComponentContainersImpl(clientObject.getComponentContainers(), this); } - return computes; + return componentContainers; } /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * Gets the resource collection API of ComponentVersions. It manages ComponentVersion. * - * @return Resource collection API of PrivateEndpointConnections. + * @return Resource collection API of ComponentVersions. */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + public ComponentVersions componentVersions() { + if (this.componentVersions == null) { + this.componentVersions = new ComponentVersionsImpl(clientObject.getComponentVersions(), this); } - return privateEndpointConnections; + return componentVersions; } /** - * Gets the resource collection API of PrivateLinkResources. + * Gets the resource collection API of DataContainers. It manages DataContainer. * - * @return Resource collection API of PrivateLinkResources. + * @return Resource collection API of DataContainers. */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + public DataContainers dataContainers() { + if (this.dataContainers == null) { + this.dataContainers = new DataContainersImpl(clientObject.getDataContainers(), this); } - return privateLinkResources; + return dataContainers; } /** - * Gets the resource collection API of WorkspaceConnections. It manages - * WorkspaceConnectionPropertiesV2BasicResource. + * Gets the resource collection API of DataVersions. It manages DataVersionBase. * - * @return Resource collection API of WorkspaceConnections. + * @return Resource collection API of DataVersions. */ - public WorkspaceConnections workspaceConnections() { - if (this.workspaceConnections == null) { - this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); + public DataVersions dataVersions() { + if (this.dataVersions == null) { + this.dataVersions = new DataVersionsImpl(clientObject.getDataVersions(), this); } - return workspaceConnections; + return dataVersions; } /** - * Gets the resource collection API of ManagedNetworkSettingsRules. It manages OutboundRuleBasicResource. + * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainer. * - * @return Resource collection API of ManagedNetworkSettingsRules. + * @return Resource collection API of EnvironmentContainers. */ - public ManagedNetworkSettingsRules managedNetworkSettingsRules() { - if (this.managedNetworkSettingsRules == null) { - this.managedNetworkSettingsRules - = new ManagedNetworkSettingsRulesImpl(clientObject.getManagedNetworkSettingsRules(), this); + public EnvironmentContainers environmentContainers() { + if (this.environmentContainers == null) { + this.environmentContainers = new EnvironmentContainersImpl(clientObject.getEnvironmentContainers(), this); } - return managedNetworkSettingsRules; + return environmentContainers; } /** - * Gets the resource collection API of ManagedNetworkProvisions. + * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersion. * - * @return Resource collection API of ManagedNetworkProvisions. + * @return Resource collection API of EnvironmentVersions. */ - public ManagedNetworkProvisions managedNetworkProvisions() { - if (this.managedNetworkProvisions == null) { - this.managedNetworkProvisions - = new ManagedNetworkProvisionsImpl(clientObject.getManagedNetworkProvisions(), this); + public EnvironmentVersions environmentVersions() { + if (this.environmentVersions == null) { + this.environmentVersions = new EnvironmentVersionsImpl(clientObject.getEnvironmentVersions(), this); } - return managedNetworkProvisions; + return environmentVersions; } /** - * Gets the resource collection API of RegistryCodeContainers. + * Gets the resource collection API of ModelContainers. It manages ModelContainer. * - * @return Resource collection API of RegistryCodeContainers. + * @return Resource collection API of ModelContainers. */ - public RegistryCodeContainers registryCodeContainers() { - if (this.registryCodeContainers == null) { - this.registryCodeContainers - = new RegistryCodeContainersImpl(clientObject.getRegistryCodeContainers(), this); + public ModelContainers modelContainers() { + if (this.modelContainers == null) { + this.modelContainers = new ModelContainersImpl(clientObject.getModelContainers(), this); } - return registryCodeContainers; + return modelContainers; } /** - * Gets the resource collection API of RegistryCodeVersions. + * Gets the resource collection API of ModelVersions. It manages ModelVersion. * - * @return Resource collection API of RegistryCodeVersions. + * @return Resource collection API of ModelVersions. */ - public RegistryCodeVersions registryCodeVersions() { - if (this.registryCodeVersions == null) { - this.registryCodeVersions = new RegistryCodeVersionsImpl(clientObject.getRegistryCodeVersions(), this); + public ModelVersions modelVersions() { + if (this.modelVersions == null) { + this.modelVersions = new ModelVersionsImpl(clientObject.getModelVersions(), this); } - return registryCodeVersions; - } - - /** - * Gets the resource collection API of RegistryComponentContainers. - * - * @return Resource collection API of RegistryComponentContainers. - */ - public RegistryComponentContainers registryComponentContainers() { - if (this.registryComponentContainers == null) { - this.registryComponentContainers - = new RegistryComponentContainersImpl(clientObject.getRegistryComponentContainers(), this); - } - return registryComponentContainers; - } - - /** - * Gets the resource collection API of RegistryComponentVersions. - * - * @return Resource collection API of RegistryComponentVersions. - */ - public RegistryComponentVersions registryComponentVersions() { - if (this.registryComponentVersions == null) { - this.registryComponentVersions - = new RegistryComponentVersionsImpl(clientObject.getRegistryComponentVersions(), this); - } - return registryComponentVersions; - } - - /** - * Gets the resource collection API of RegistryDataContainers. - * - * @return Resource collection API of RegistryDataContainers. - */ - public RegistryDataContainers registryDataContainers() { - if (this.registryDataContainers == null) { - this.registryDataContainers - = new RegistryDataContainersImpl(clientObject.getRegistryDataContainers(), this); - } - return registryDataContainers; - } - - /** - * Gets the resource collection API of RegistryDataVersions. - * - * @return Resource collection API of RegistryDataVersions. - */ - public RegistryDataVersions registryDataVersions() { - if (this.registryDataVersions == null) { - this.registryDataVersions = new RegistryDataVersionsImpl(clientObject.getRegistryDataVersions(), this); - } - return registryDataVersions; - } - - /** - * Gets the resource collection API of RegistryDataReferences. - * - * @return Resource collection API of RegistryDataReferences. - */ - public RegistryDataReferences registryDataReferences() { - if (this.registryDataReferences == null) { - this.registryDataReferences - = new RegistryDataReferencesImpl(clientObject.getRegistryDataReferences(), this); - } - return registryDataReferences; - } - - /** - * Gets the resource collection API of RegistryEnvironmentContainers. - * - * @return Resource collection API of RegistryEnvironmentContainers. - */ - public RegistryEnvironmentContainers registryEnvironmentContainers() { - if (this.registryEnvironmentContainers == null) { - this.registryEnvironmentContainers - = new RegistryEnvironmentContainersImpl(clientObject.getRegistryEnvironmentContainers(), this); - } - return registryEnvironmentContainers; - } - - /** - * Gets the resource collection API of RegistryEnvironmentVersions. - * - * @return Resource collection API of RegistryEnvironmentVersions. - */ - public RegistryEnvironmentVersions registryEnvironmentVersions() { - if (this.registryEnvironmentVersions == null) { - this.registryEnvironmentVersions - = new RegistryEnvironmentVersionsImpl(clientObject.getRegistryEnvironmentVersions(), this); - } - return registryEnvironmentVersions; - } - - /** - * Gets the resource collection API of RegistryModelContainers. - * - * @return Resource collection API of RegistryModelContainers. - */ - public RegistryModelContainers registryModelContainers() { - if (this.registryModelContainers == null) { - this.registryModelContainers - = new RegistryModelContainersImpl(clientObject.getRegistryModelContainers(), this); - } - return registryModelContainers; - } - - /** - * Gets the resource collection API of RegistryModelVersions. - * - * @return Resource collection API of RegistryModelVersions. - */ - public RegistryModelVersions registryModelVersions() { - if (this.registryModelVersions == null) { - this.registryModelVersions = new RegistryModelVersionsImpl(clientObject.getRegistryModelVersions(), this); - } - return registryModelVersions; + return modelVersions; } /** @@ -740,75 +716,15 @@ public BatchDeployments batchDeployments() { } /** - * Gets the resource collection API of CodeContainers. It manages CodeContainer. - * - * @return Resource collection API of CodeContainers. - */ - public CodeContainers codeContainers() { - if (this.codeContainers == null) { - this.codeContainers = new CodeContainersImpl(clientObject.getCodeContainers(), this); - } - return codeContainers; - } - - /** - * Gets the resource collection API of CodeVersions. It manages CodeVersion. - * - * @return Resource collection API of CodeVersions. - */ - public CodeVersions codeVersions() { - if (this.codeVersions == null) { - this.codeVersions = new CodeVersionsImpl(clientObject.getCodeVersions(), this); - } - return codeVersions; - } - - /** - * Gets the resource collection API of ComponentContainers. It manages ComponentContainer. - * - * @return Resource collection API of ComponentContainers. - */ - public ComponentContainers componentContainers() { - if (this.componentContainers == null) { - this.componentContainers = new ComponentContainersImpl(clientObject.getComponentContainers(), this); - } - return componentContainers; - } - - /** - * Gets the resource collection API of ComponentVersions. It manages ComponentVersion. - * - * @return Resource collection API of ComponentVersions. - */ - public ComponentVersions componentVersions() { - if (this.componentVersions == null) { - this.componentVersions = new ComponentVersionsImpl(clientObject.getComponentVersions(), this); - } - return componentVersions; - } - - /** - * Gets the resource collection API of DataContainers. It manages DataContainer. - * - * @return Resource collection API of DataContainers. - */ - public DataContainers dataContainers() { - if (this.dataContainers == null) { - this.dataContainers = new DataContainersImpl(clientObject.getDataContainers(), this); - } - return dataContainers; - } - - /** - * Gets the resource collection API of DataVersions. It manages DataVersionBase. + * Gets the resource collection API of CapabilityHosts. It manages CapabilityHost. * - * @return Resource collection API of DataVersions. + * @return Resource collection API of CapabilityHosts. */ - public DataVersions dataVersions() { - if (this.dataVersions == null) { - this.dataVersions = new DataVersionsImpl(clientObject.getDataVersions(), this); + public CapabilityHosts capabilityHosts() { + if (this.capabilityHosts == null) { + this.capabilityHosts = new CapabilityHostsImpl(clientObject.getCapabilityHosts(), this); } - return dataVersions; + return capabilityHosts; } /** @@ -823,30 +739,6 @@ public Datastores datastores() { return datastores; } - /** - * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainer. - * - * @return Resource collection API of EnvironmentContainers. - */ - public EnvironmentContainers environmentContainers() { - if (this.environmentContainers == null) { - this.environmentContainers = new EnvironmentContainersImpl(clientObject.getEnvironmentContainers(), this); - } - return environmentContainers; - } - - /** - * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersion. - * - * @return Resource collection API of EnvironmentVersions. - */ - public EnvironmentVersions environmentVersions() { - if (this.environmentVersions == null) { - this.environmentVersions = new EnvironmentVersionsImpl(clientObject.getEnvironmentVersions(), this); - } - return environmentVersions; - } - /** * Gets the resource collection API of FeaturesetContainers. It manages FeaturesetContainer. * @@ -910,52 +802,52 @@ public FeaturestoreEntityVersions featurestoreEntityVersions() { } /** - * Gets the resource collection API of Jobs. It manages JobBase. + * Gets the resource collection API of InferencePools. It manages InferencePool. * - * @return Resource collection API of Jobs. + * @return Resource collection API of InferencePools. */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); + public InferencePools inferencePools() { + if (this.inferencePools == null) { + this.inferencePools = new InferencePoolsImpl(clientObject.getInferencePools(), this); } - return jobs; + return inferencePools; } /** - * Gets the resource collection API of MarketplaceSubscriptions. It manages MarketplaceSubscription. + * Gets the resource collection API of InferenceEndpoints. It manages InferenceEndpoint. * - * @return Resource collection API of MarketplaceSubscriptions. + * @return Resource collection API of InferenceEndpoints. */ - public MarketplaceSubscriptions marketplaceSubscriptions() { - if (this.marketplaceSubscriptions == null) { - this.marketplaceSubscriptions - = new MarketplaceSubscriptionsImpl(clientObject.getMarketplaceSubscriptions(), this); + public InferenceEndpoints inferenceEndpoints() { + if (this.inferenceEndpoints == null) { + this.inferenceEndpoints = new InferenceEndpointsImpl(clientObject.getInferenceEndpoints(), this); } - return marketplaceSubscriptions; + return inferenceEndpoints; } /** - * Gets the resource collection API of ModelContainers. It manages ModelContainer. + * Gets the resource collection API of InferenceGroups. It manages InferenceGroup. * - * @return Resource collection API of ModelContainers. + * @return Resource collection API of InferenceGroups. */ - public ModelContainers modelContainers() { - if (this.modelContainers == null) { - this.modelContainers = new ModelContainersImpl(clientObject.getModelContainers(), this); + public InferenceGroups inferenceGroups() { + if (this.inferenceGroups == null) { + this.inferenceGroups = new InferenceGroupsImpl(clientObject.getInferenceGroups(), this); } - return modelContainers; + return inferenceGroups; } /** - * Gets the resource collection API of ModelVersions. It manages ModelVersion. + * Gets the resource collection API of MarketplaceSubscriptions. It manages MarketplaceSubscription. * - * @return Resource collection API of ModelVersions. + * @return Resource collection API of MarketplaceSubscriptions. */ - public ModelVersions modelVersions() { - if (this.modelVersions == null) { - this.modelVersions = new ModelVersionsImpl(clientObject.getModelVersions(), this); + public MarketplaceSubscriptions marketplaceSubscriptions() { + if (this.marketplaceSubscriptions == null) { + this.marketplaceSubscriptions + = new MarketplaceSubscriptionsImpl(clientObject.getMarketplaceSubscriptions(), this); } - return modelVersions; + return marketplaceSubscriptions; } /** @@ -1007,36 +899,465 @@ public ServerlessEndpoints serverlessEndpoints() { } /** - * Gets the resource collection API of Registries. It manages Registry. + * Gets the resource collection API of RaiPolicies. It manages RaiPolicyPropertiesBasicResource. * - * @return Resource collection API of Registries. + * @return Resource collection API of RaiPolicies. */ - public Registries registries() { - if (this.registries == null) { - this.registries = new RegistriesImpl(clientObject.getRegistries(), this); + public RaiPolicies raiPolicies() { + if (this.raiPolicies == null) { + this.raiPolicies = new RaiPoliciesImpl(clientObject.getRaiPolicies(), this); } - return registries; + return raiPolicies; } /** - * Gets the resource collection API of WorkspaceFeatures. + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. * - * @return Resource collection API of WorkspaceFeatures. + * @return Resource collection API of PrivateEndpointConnections. */ - public WorkspaceFeatures workspaceFeatures() { - if (this.workspaceFeatures == null) { - this.workspaceFeatures = new WorkspaceFeaturesImpl(clientObject.getWorkspaceFeatures(), this); + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); } - return workspaceFeatures; + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of Computes. It manages ComputeResource. + * + * @return Resource collection API of Computes. + */ + public Computes computes() { + if (this.computes == null) { + this.computes = new ComputesImpl(clientObject.getComputes(), this); + } + return computes; + } + + /** + * Gets the resource collection API of WorkspaceFeatures. + * + * @return Resource collection API of WorkspaceFeatures. + */ + public WorkspaceFeatures workspaceFeatures() { + if (this.workspaceFeatures == null) { + this.workspaceFeatures = new WorkspaceFeaturesImpl(clientObject.getWorkspaceFeatures(), this); + } + return workspaceFeatures; + } + + /** + * Gets the resource collection API of Connections. + * + * @return Resource collection API of Connections. + */ + public Connections connections() { + if (this.connections == null) { + this.connections = new ConnectionsImpl(clientObject.getConnections(), this); + } + return connections; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + + /** + * Gets the resource collection API of ManagedNetworkProvisions. + * + * @return Resource collection API of ManagedNetworkProvisions. + */ + public ManagedNetworkProvisions managedNetworkProvisions() { + if (this.managedNetworkProvisions == null) { + this.managedNetworkProvisions + = new ManagedNetworkProvisionsImpl(clientObject.getManagedNetworkProvisions(), this); + } + return managedNetworkProvisions; + } + + /** + * Gets the resource collection API of RegistryCodeContainers. + * + * @return Resource collection API of RegistryCodeContainers. + */ + public RegistryCodeContainers registryCodeContainers() { + if (this.registryCodeContainers == null) { + this.registryCodeContainers + = new RegistryCodeContainersImpl(clientObject.getRegistryCodeContainers(), this); + } + return registryCodeContainers; + } + + /** + * Gets the resource collection API of RegistryDataReferences. + * + * @return Resource collection API of RegistryDataReferences. + */ + public RegistryDataReferences registryDataReferences() { + if (this.registryDataReferences == null) { + this.registryDataReferences + = new RegistryDataReferencesImpl(clientObject.getRegistryDataReferences(), this); + } + return registryDataReferences; + } + + /** + * Gets the resource collection API of RegistryCodeVersions. + * + * @return Resource collection API of RegistryCodeVersions. + */ + public RegistryCodeVersions registryCodeVersions() { + if (this.registryCodeVersions == null) { + this.registryCodeVersions = new RegistryCodeVersionsImpl(clientObject.getRegistryCodeVersions(), this); + } + return registryCodeVersions; + } + + /** + * Gets the resource collection API of RegistryComponentContainers. + * + * @return Resource collection API of RegistryComponentContainers. + */ + public RegistryComponentContainers registryComponentContainers() { + if (this.registryComponentContainers == null) { + this.registryComponentContainers + = new RegistryComponentContainersImpl(clientObject.getRegistryComponentContainers(), this); + } + return registryComponentContainers; + } + + /** + * Gets the resource collection API of RegistryComponentVersions. + * + * @return Resource collection API of RegistryComponentVersions. + */ + public RegistryComponentVersions registryComponentVersions() { + if (this.registryComponentVersions == null) { + this.registryComponentVersions + = new RegistryComponentVersionsImpl(clientObject.getRegistryComponentVersions(), this); + } + return registryComponentVersions; + } + + /** + * Gets the resource collection API of RegistryDataContainers. + * + * @return Resource collection API of RegistryDataContainers. + */ + public RegistryDataContainers registryDataContainers() { + if (this.registryDataContainers == null) { + this.registryDataContainers + = new RegistryDataContainersImpl(clientObject.getRegistryDataContainers(), this); + } + return registryDataContainers; + } + + /** + * Gets the resource collection API of RegistryDataVersions. + * + * @return Resource collection API of RegistryDataVersions. + */ + public RegistryDataVersions registryDataVersions() { + if (this.registryDataVersions == null) { + this.registryDataVersions = new RegistryDataVersionsImpl(clientObject.getRegistryDataVersions(), this); + } + return registryDataVersions; + } + + /** + * Gets the resource collection API of RegistryEnvironmentContainers. + * + * @return Resource collection API of RegistryEnvironmentContainers. + */ + public RegistryEnvironmentContainers registryEnvironmentContainers() { + if (this.registryEnvironmentContainers == null) { + this.registryEnvironmentContainers + = new RegistryEnvironmentContainersImpl(clientObject.getRegistryEnvironmentContainers(), this); + } + return registryEnvironmentContainers; + } + + /** + * Gets the resource collection API of RegistryEnvironmentVersions. + * + * @return Resource collection API of RegistryEnvironmentVersions. + */ + public RegistryEnvironmentVersions registryEnvironmentVersions() { + if (this.registryEnvironmentVersions == null) { + this.registryEnvironmentVersions + = new RegistryEnvironmentVersionsImpl(clientObject.getRegistryEnvironmentVersions(), this); + } + return registryEnvironmentVersions; + } + + /** + * Gets the resource collection API of RegistryModelContainers. + * + * @return Resource collection API of RegistryModelContainers. + */ + public RegistryModelContainers registryModelContainers() { + if (this.registryModelContainers == null) { + this.registryModelContainers + = new RegistryModelContainersImpl(clientObject.getRegistryModelContainers(), this); + } + return registryModelContainers; + } + + /** + * Gets the resource collection API of RegistryModelVersions. + * + * @return Resource collection API of RegistryModelVersions. + */ + public RegistryModelVersions registryModelVersions() { + if (this.registryModelVersions == null) { + this.registryModelVersions = new RegistryModelVersionsImpl(clientObject.getRegistryModelVersions(), this); + } + return registryModelVersions; + } + + /** + * Gets the resource collection API of Jobs. It manages JobBase. + * + * @return Resource collection API of Jobs. + */ + public Jobs jobs() { + if (this.jobs == null) { + this.jobs = new JobsImpl(clientObject.getJobs(), this); + } + return jobs; + } + + /** + * Gets the resource collection API of WorkspaceConnections. It manages + * WorkspaceConnectionPropertiesV2BasicResource. + * + * @return Resource collection API of WorkspaceConnections. + */ + public WorkspaceConnections workspaceConnections() { + if (this.workspaceConnections == null) { + this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); + } + return workspaceConnections; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklists. It manages RaiBlocklistPropertiesBasicResource. + * + * @return Resource collection API of ConnectionRaiBlocklists. + */ + public ConnectionRaiBlocklists connectionRaiBlocklists() { + if (this.connectionRaiBlocklists == null) { + this.connectionRaiBlocklists + = new ConnectionRaiBlocklistsImpl(clientObject.getConnectionRaiBlocklists(), this); + } + return connectionRaiBlocklists; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklistsOperations. + * + * @return Resource collection API of ConnectionRaiBlocklistsOperations. + */ + public ConnectionRaiBlocklistsOperations connectionRaiBlocklistsOperations() { + if (this.connectionRaiBlocklistsOperations == null) { + this.connectionRaiBlocklistsOperations + = new ConnectionRaiBlocklistsOperationsImpl(clientObject.getConnectionRaiBlocklistsOperations(), this); + } + return connectionRaiBlocklistsOperations; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklistItems. It manages + * RaiBlocklistItemPropertiesBasicResource. + * + * @return Resource collection API of ConnectionRaiBlocklistItems. + */ + public ConnectionRaiBlocklistItems connectionRaiBlocklistItems() { + if (this.connectionRaiBlocklistItems == null) { + this.connectionRaiBlocklistItems + = new ConnectionRaiBlocklistItemsImpl(clientObject.getConnectionRaiBlocklistItems(), this); + } + return connectionRaiBlocklistItems; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklistItemsOperations. + * + * @return Resource collection API of ConnectionRaiBlocklistItemsOperations. + */ + public ConnectionRaiBlocklistItemsOperations connectionRaiBlocklistItemsOperations() { + if (this.connectionRaiBlocklistItemsOperations == null) { + this.connectionRaiBlocklistItemsOperations = new ConnectionRaiBlocklistItemsOperationsImpl( + clientObject.getConnectionRaiBlocklistItemsOperations(), this); + } + return connectionRaiBlocklistItemsOperations; + } + + /** + * Gets the resource collection API of ConnectionRaiPolicies. + * + * @return Resource collection API of ConnectionRaiPolicies. + */ + public ConnectionRaiPolicies connectionRaiPolicies() { + if (this.connectionRaiPolicies == null) { + this.connectionRaiPolicies = new ConnectionRaiPoliciesImpl(clientObject.getConnectionRaiPolicies(), this); + } + return connectionRaiPolicies; + } + + /** + * Gets the resource collection API of ConnectionRaiPoliciesOperations. + * + * @return Resource collection API of ConnectionRaiPoliciesOperations. + */ + public ConnectionRaiPoliciesOperations connectionRaiPoliciesOperations() { + if (this.connectionRaiPoliciesOperations == null) { + this.connectionRaiPoliciesOperations + = new ConnectionRaiPoliciesOperationsImpl(clientObject.getConnectionRaiPoliciesOperations(), this); + } + return connectionRaiPoliciesOperations; + } + + /** + * Gets the resource collection API of RaiPoliciesOperations. + * + * @return Resource collection API of RaiPoliciesOperations. + */ + public RaiPoliciesOperations raiPoliciesOperations() { + if (this.raiPoliciesOperations == null) { + this.raiPoliciesOperations = new RaiPoliciesOperationsImpl(clientObject.getRaiPoliciesOperations(), this); + } + return raiPoliciesOperations; + } + + /** + * Gets the resource collection API of Endpoints. It manages EndpointResourcePropertiesBasicResource. + * + * @return Resource collection API of Endpoints. + */ + public Endpoints endpoints() { + if (this.endpoints == null) { + this.endpoints = new EndpointsImpl(clientObject.getEndpoints(), this); + } + return endpoints; + } + + /** + * Gets the resource collection API of ManagedNetworkSettingsRules. It manages OutboundRuleBasicResource. + * + * @return Resource collection API of ManagedNetworkSettingsRules. + */ + public ManagedNetworkSettingsRules managedNetworkSettingsRules() { + if (this.managedNetworkSettingsRules == null) { + this.managedNetworkSettingsRules + = new ManagedNetworkSettingsRulesImpl(clientObject.getManagedNetworkSettingsRules(), this); + } + return managedNetworkSettingsRules; + } + + /** + * Gets the resource collection API of OutboundRules. + * + * @return Resource collection API of OutboundRules. + */ + public OutboundRules outboundRules() { + if (this.outboundRules == null) { + this.outboundRules = new OutboundRulesImpl(clientObject.getOutboundRules(), this); + } + return outboundRules; + } + + /** + * Gets the resource collection API of ManagedNetworkSettingsOperations. It manages + * ManagedNetworkSettingsPropertiesBasicResource. + * + * @return Resource collection API of ManagedNetworkSettingsOperations. + */ + public ManagedNetworkSettingsOperations managedNetworkSettingsOperations() { + if (this.managedNetworkSettingsOperations == null) { + this.managedNetworkSettingsOperations + = new ManagedNetworkSettingsOperationsImpl(clientObject.getManagedNetworkSettingsOperations(), this); + } + return managedNetworkSettingsOperations; + } + + /** + * Gets the resource collection API of OutboundRulesOperations. + * + * @return Resource collection API of OutboundRulesOperations. + */ + public OutboundRulesOperations outboundRulesOperations() { + if (this.outboundRulesOperations == null) { + this.outboundRulesOperations + = new OutboundRulesOperationsImpl(clientObject.getOutboundRulesOperations(), this); + } + return outboundRulesOperations; + } + + /** + * Gets the resource collection API of Usages. + * + * @return Resource collection API of Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(clientObject.getUsages(), this); + } + return usages; + } + + /** + * Gets the resource collection API of VirtualMachineSizes. + * + * @return Resource collection API of VirtualMachineSizes. + */ + public VirtualMachineSizes virtualMachineSizes() { + if (this.virtualMachineSizes == null) { + this.virtualMachineSizes = new VirtualMachineSizesImpl(clientObject.getVirtualMachineSizes(), this); + } + return virtualMachineSizes; + } + + /** + * Gets the resource collection API of Quotas. + * + * @return Resource collection API of Quotas. + */ + public Quotas quotas() { + if (this.quotas == null) { + this.quotas = new QuotasImpl(clientObject.getQuotas(), this); + } + return quotas; + } + + /** + * Gets the resource collection API of PTUQuotas. + * + * @return Resource collection API of PTUQuotas. + */ + public PTUQuotas pTUQuotas() { + if (this.pTUQuotas == null) { + this.pTUQuotas = new PTUQuotasImpl(clientObject.getPTUQuotas(), this); + } + return pTUQuotas; } /** - * Gets wrapped service client AzureMachineLearningWorkspaces providing direct access to the underlying + * Gets wrapped service client MachineLearningManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. * - * @return Wrapped service client AzureMachineLearningWorkspaces. + * @return Wrapped service client MachineLearningManagementClient. */ - public AzureMachineLearningWorkspaces serviceClient() { + public MachineLearningManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java index 8ef782e7a521..a650eb316b68 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,146 +19,131 @@ */ public interface BatchDeploymentsClient { /** - * Lists Batch inference deployments in the workspace. + * Get batch inference deployment by id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Lists Batch inference deployments in the workspace. + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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 paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** - * Delete Batch Inference deployment (asynchronous). + * Get batch inference deployment by id. + * + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + @ServiceMethod(returns = ReturnType.SINGLE) + BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @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 workspaceName, String endpointName, String deploymentName); + SyncPoller, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body); /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body, Context context); /** - * Gets a batch inference deployment by id. + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); + BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body); /** - * Gets a batch inference deployment by id. + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); + BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body, Context context); /** * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, @@ -169,15 +154,16 @@ SyncPoller, BatchDeploymentInner> beginUpdate(S * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, @@ -188,14 +174,14 @@ SyncPoller, BatchDeploymentInner> beginUpdate(S * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, @@ -205,45 +191,43 @@ BatchDeploymentInner update(String resourceGroupName, String workspaceName, Stri * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context); /** - * Creates/updates a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** - * Creates/updates a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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. @@ -251,41 +235,69 @@ SyncPoller, BatchDeploymentInner> beginCreateOr * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** - * Creates/updates a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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) - BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** - * Creates/updates a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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) - BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); + + /** + * Lists Batch inference deployments in the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @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 paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); + + /** + * Lists Batch inference deployments in the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. + * @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 paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java index ad9d816bd275..bd37a2bb98d2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,133 +20,131 @@ */ public interface BatchEndpointsClient { /** - * Lists Batch inference endpoint in the workspace. + * Get batch inference endpoint by name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists Batch inference endpoint in the workspace. + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Delete Batch Inference Endpoint (asynchronous). + * Get batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); + @ServiceMethod(returns = ReturnType.SINGLE) + BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). + * + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - Context context); + SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body); /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Batch Inference Endpoint (asynchronous). + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body, Context context); /** - * Gets a batch inference endpoint by name. + * Create a batch inference endpoint (asynchronous). + * + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); + BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body); /** - * Gets a batch inference endpoint by name. + * Create a batch inference endpoint (asynchronous). + * + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); + BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body, Context context); /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, @@ -156,14 +154,15 @@ SyncPoller, BatchEndpointInner> beginUpdate(Strin * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, @@ -173,13 +172,13 @@ SyncPoller, BatchEndpointInner> beginUpdate(Strin * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, @@ -189,42 +188,39 @@ BatchEndpointInner update(String resourceGroupName, String workspaceName, String * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context); /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. @@ -232,48 +228,72 @@ SyncPoller, BatchEndpointInner> beginCreateOrUpda * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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) - BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body); + void delete(String resourceGroupName, String workspaceName, String endpointName); /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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) - BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); + + /** + * Lists Batch inference endpoint in the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Lists Batch inference endpoint in the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of endpoints to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + Context context); /** * Lists batch Inference Endpoint keys. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. @@ -288,8 +308,8 @@ Response listKeysWithResponse(String resourceGroupName, S * Lists batch Inference Endpoint keys. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java new file mode 100644 index 000000000000..b2bc4deb5754 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; + +/** + * An instance of this class provides access to all the operations defined in CapabilityHostsClient. + */ +public interface CapabilityHostsClient { + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 capabilityHost along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capabilityHost. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CapabilityHostInner get(String resourceGroupName, String workspaceName, String name); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CapabilityHostInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, CapabilityHostInner body); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, CapabilityHostInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, CapabilityHostInner body, Context context); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body, Context context); + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java index de4baa9510dd..a08185100159 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -16,64 +16,78 @@ */ public interface CodeContainersClient { /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return containers. + * + * Get container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return containers. + * + * Get container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -82,14 +96,13 @@ PagedIterable list(String resourceGroupName, String workspac * @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 container along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -97,41 +110,36 @@ Response getWithResponse(String resourceGroupName, String wo * @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 container. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java index abfbf9d071d6..5385de530709 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -21,73 +21,74 @@ */ public interface CodeVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String hash, String hashVersion, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, CodeVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + CodeVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + CodeVersionInner body); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -97,14 +98,14 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName * @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 version along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, + Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -113,53 +114,52 @@ Response getWithResponse(String resourceGroupName, String work * @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 version. */ @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - String version, CodeVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - CodeVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String hash, String hashVersion, Context context); /** * Publish version asset into registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -175,8 +175,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -193,8 +193,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -208,8 +208,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java index 9758c6b03bcf..ebf4be705821 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -17,65 +17,70 @@ */ public interface ComponentContainersClient { /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param body Container entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ComponentContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ComponentContainerInner body); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -84,14 +89,13 @@ PagedIterable list(String resourceGroupName, String wor * @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 container along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -99,41 +103,37 @@ Response getWithResponse(String resourceGroupName, Stri * @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 container. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ComponentContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ComponentContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java index b5c5be3c55a0..7146218e5a9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,72 +20,74 @@ */ public interface ComponentVersionsClient { /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, ComponentVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + ComponentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + ComponentVersionInner body); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -95,14 +97,14 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName * @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 version along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, + Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -111,45 +113,43 @@ Response getWithResponse(String resourceGroupName, String * @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 version. */ @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Create or update version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, ComponentVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Create or update version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - ComponentVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context); /** * Publish version asset into registry. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java index 2acd533571d4..35ac8e231177 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -13,49 +13,26 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; +import java.util.List; /** * An instance of this class provides access to all the operations defined in ComputesClient. */ public interface ComputesClient { - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); - /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +49,7 @@ Response getWithResponse(String resourceGroupName, String * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -87,7 +64,7 @@ Response getWithResponse(String resourceGroupName, String * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,7 +81,7 @@ SyncPoller, ComputeResourceInner> beginCreateOr * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Payload with Machine Learning compute definition. * @param context The context to associate with this operation. @@ -122,7 +99,7 @@ SyncPoller, ComputeResourceInner> beginCreateOr * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,7 +116,7 @@ ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceNa * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Payload with Machine Learning compute definition. * @param context The context to associate with this operation. @@ -157,7 +134,7 @@ ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceNa * operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Additional parameters for cluster update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,7 +151,7 @@ SyncPoller, ComputeResourceInner> beginUpdate(S * operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Additional parameters for cluster update. * @param context The context to associate with this operation. @@ -192,7 +169,7 @@ SyncPoller, ComputeResourceInner> beginUpdate(S * operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Additional parameters for cluster update. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -209,7 +186,7 @@ ComputeResourceInner update(String resourceGroupName, String workspaceName, Stri * operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param parameters Additional parameters for cluster update. * @param context The context to associate with this operation. @@ -226,7 +203,7 @@ ComputeResourceInner update(String resourceGroupName, String workspaceName, Stri * Deletes specified Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from * workspace if 'Detach'. @@ -243,7 +220,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes specified Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from * workspace if 'Detach'. @@ -261,7 +238,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes specified Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from * workspace if 'Detach'. @@ -277,7 +254,7 @@ void delete(String resourceGroupName, String workspaceName, String computeName, * Deletes specified Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from * workspace if 'Detach'. @@ -290,11 +267,72 @@ void delete(String resourceGroupName, String workspaceName, String computeName, void delete(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction, Context context); + /** + * Gets computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return computes in specified workspace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 computes in specified workspace as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @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 updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, String computeName, + List customServices, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @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 updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -310,7 +348,7 @@ PagedIterable listNodes(String resourceGroupName, Str * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -327,7 +365,7 @@ PagedIterable listNodes(String resourceGroupName, Str * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -344,7 +382,7 @@ Response listKeysWithResponse(String resourceGroupName, Str * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -354,11 +392,43 @@ Response listKeysWithResponse(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName); + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating a machine learning workspace. + * @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 updateDataMountsWithResponse(String resourceGroupName, String workspaceName, String computeName, + List dataMounts, Context context); + + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating a machine learning workspace. + * @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 updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts); + /** * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -372,7 +442,7 @@ Response listKeysWithResponse(String resourceGroupName, Str * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -388,7 +458,7 @@ SyncPoller, Void> beginStart(String resourceGroupName, String w * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -401,7 +471,7 @@ SyncPoller, Void> beginStart(String resourceGroupName, String w * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -415,7 +485,7 @@ SyncPoller, Void> beginStart(String resourceGroupName, String w * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -429,7 +499,7 @@ SyncPoller, Void> beginStart(String resourceGroupName, String w * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -445,7 +515,7 @@ SyncPoller, Void> beginStop(String resourceGroupName, String wo * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -458,7 +528,7 @@ SyncPoller, Void> beginStop(String resourceGroupName, String wo * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -472,7 +542,7 @@ SyncPoller, Void> beginStop(String resourceGroupName, String wo * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -486,7 +556,7 @@ SyncPoller, Void> beginStop(String resourceGroupName, String wo * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -502,7 +572,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -515,7 +585,7 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -524,4 +594,130 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void restart(String resourceGroupName, String workspaceName, String computeName, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @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 updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @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 updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @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 Virtual Machine size operation response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @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 Virtual Machine size operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VirtualMachineSizeListResultInner getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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> beginResize(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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> beginResize(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters, Context context); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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 resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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 resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java new file mode 100644 index 000000000000..b676b2e3a08d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java @@ -0,0 +1,343 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import java.util.List; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistItemsClient. + */ +public interface ConnectionRaiBlocklistItemsClient { + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @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>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @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>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body, Context context); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @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) + List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @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) + List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body, Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistItemPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body, Context context); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, Context context); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, Context context); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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 workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java new file mode 100644 index 000000000000..57b787e223e4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in + * ConnectionRaiBlocklistItemsOperationsClient. + */ +public interface ConnectionRaiBlocklistItemsOperationsClient { + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName); + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java new file mode 100644 index 000000000000..9518a9ff8ff9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistsClient. + */ +public interface ConnectionRaiBlocklistsClient { + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body, Context context); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, Context context); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 workspaceName, String connectionName, String raiBlocklistName); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsOperationsClient.java new file mode 100644 index 000000000000..237cf738d73a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsOperationsClient.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistsOperationsClient. + */ +public interface ConnectionRaiBlocklistsOperationsClient { + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java new file mode 100644 index 000000000000..0a0a0792419b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiPoliciesClient. + */ +public interface ConnectionRaiPoliciesClient { + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, Context context); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @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 workspaceName, String connectionName, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesOperationsClient.java new file mode 100644 index 000000000000..064575b095d4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesOperationsClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiPoliciesOperationsClient. + */ +public interface ConnectionRaiPoliciesOperationsClient { + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java new file mode 100644 index 000000000000..b85d40c7946c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionsClient. + */ +public interface ConnectionsClient { + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, + Context context); + + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointModelsInner getAllModels(String resourceGroupName, String workspaceName); + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, Context context); + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deployments under the Azure OpenAI connection by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeploymentWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, Context context); + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deployments under the Azure OpenAI connection by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner getDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName); + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context); + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context); + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName); + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName, Context context); + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName); + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + Context context); + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName); + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java index 27ae140fa88d..77c5a610bd44 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -17,65 +17,70 @@ */ public interface DataContainersClient { /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DataContainerInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param body Container entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + DataContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + DataContainerInner body); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -84,14 +89,13 @@ PagedIterable list(String resourceGroupName, String workspac * @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 container along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -99,41 +103,37 @@ Response getWithResponse(String resourceGroupName, String wo * @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 container. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - DataContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - DataContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java index ae284eec114f..54e3644a9ff6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,75 +20,74 @@ */ public interface DataVersionsClient { /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, DataVersionBaseInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + DataVersionBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + DataVersionBaseInner body); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -98,14 +97,14 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName * @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 version along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, + Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -114,45 +113,46 @@ Response getWithResponse(String resourceGroupName, String * @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 version. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, DataVersionBaseInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - DataVersionBaseInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context); /** * Publish version asset into registry. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java index 4f1a49380464..4b470cadb8ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -11,6 +11,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; import java.util.List; /** @@ -18,137 +19,138 @@ */ public interface DatastoresClient { /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. + * @return datastore along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. + * @return datastore. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DatastoreInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete datastore. + * Create or update datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. + * @param body Datastore entity to create or update. + * @param skipValidation Flag to skip validation. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + DatastoreInner body, Boolean skipValidation, Context context); /** - * Delete datastore. + * Create or update datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. + * @param body Datastore entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, DatastoreInner body); /** - * Get datastore. + * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore 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 datastore along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get datastore. + * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore. */ @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - DatastoreInner body, Boolean skipValidation, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param isDefault Filter down to the workspace default datastore. + * @param names Names of datastores to return. + * @param searchText Text to search for in the datastore names. + * @param orderBy Order by property (createdtime | modifiedtime | name). + * @param orderByAsc Order by property in ascending order. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, DatastoreInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); /** * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. + * @param body Secret expiry information. * @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. @@ -157,13 +159,13 @@ Response createOrUpdateWithResponse(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + SecretExpiry body, Context context); /** * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java new file mode 100644 index 000000000000..1caf77d25047 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointType; + +/** + * An instance of this class provides access to all the operations defined in EndpointDeploymentsClient. + */ +public interface EndpointDeploymentsClient { + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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 deployments under endpoint resource by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context); + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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 deployments under endpoint resource by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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 workspaceName, String endpointName, String deploymentName); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context); + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName); + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param skip Continuation token for pagination. + * @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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java new file mode 100644 index 000000000000..8a1065cf31c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; + +/** + * An instance of this class provides access to all the operations defined in EndpointsClient. + */ +public interface EndpointsClient { + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 endpoint resource + * + * Gets endpoint resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, Context context); + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 endpoint resource + * + * Gets endpoint resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body, Context context); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body); + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body, Context context); + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @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 paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + EndpointType endpointType, Boolean includeOnlineEndpoints, Boolean includeServerlessEndpoints, + Boolean includeConnections, String skip, String expand, Context context); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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) + EndpointKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName, Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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 regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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) + AccountApiKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java index ab219d8a088c..0e81bf96407f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -17,65 +17,70 @@ */ public interface EnvironmentContainersClient { /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, EnvironmentContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + EnvironmentContainerInner body); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -84,14 +89,13 @@ PagedIterable list(String resourceGroupName, String w * @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 container along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -99,41 +103,37 @@ Response getWithResponse(String resourceGroupName, St * @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 container. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, EnvironmentContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - EnvironmentContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java index 761e1ea8a32b..8dea9e348288 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,72 +20,74 @@ */ public interface EnvironmentVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** - * Delete version. + * Creates or updates an EnvironmentVersion. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Definition of EnvironmentVersion. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, EnvironmentVersionInner body, Context context); /** - * Delete version. + * Creates or updates an EnvironmentVersion. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Definition of EnvironmentVersion. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + EnvironmentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + EnvironmentVersionInner body); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -95,14 +97,14 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName * @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 version along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, + Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -111,53 +113,51 @@ Response getWithResponse(String resourceGroupName, Stri * @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 version. */ @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Creates or updates an EnvironmentVersion. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, EnvironmentVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Creates or updates an EnvironmentVersion. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. + * @param name Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - EnvironmentVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context); /** * Publish version asset into registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -173,8 +173,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -191,8 +191,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -206,8 +206,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java index ed237ab0ca7c..ab583980d2d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -16,13 +16,48 @@ * An instance of this class provides access to all the operations defined in FeaturesClient. */ public interface FeaturesClient { + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName 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 feature along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion, String featureName, Context context); + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FeatureInner get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, + String featureName); + /** * List Features. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version 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. @@ -37,8 +72,8 @@ PagedIterable list(String resourceGroupName, String workspaceName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. * @param skip Continuation token for pagination. * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. * @param featureName feature name. @@ -56,39 +91,4 @@ PagedIterable list(String resourceGroupName, String workspaceName, PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, String skip, String tags, String featureName, String description, ListViewType listViewType, Integer pageSize, Context context); - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName, Context context); - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeatureInner get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, - String featureName); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java index 0ced038e3d20..5ef8840cbdec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,192 +19,192 @@ */ public interface FeaturesetContainersClient { /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getEntityWithResponse(String resourceGroupName, String workspaceName, + String name, Context context); /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); + SyncPoller, FeaturesetContainerInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); + SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturesetContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); + FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturesetContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetContainerInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java index 86b8128c91af..1fabce7a0cbb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -21,215 +21,215 @@ */ public interface FeaturesetVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version); + SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, String version, FeaturesetVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context); + SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, String version, FeaturesetVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + FeaturesetVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); + FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + FeaturesetVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage, Context context); /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -248,7 +248,7 @@ FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspace * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -268,7 +268,7 @@ FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspace * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -285,7 +285,7 @@ FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, String * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java index dee9cb58f720..67380e7305f9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,195 +19,195 @@ */ public interface FeaturestoreEntityContainersClient { /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @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 paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getEntityWithResponse(String resourceGroupName, String workspaceName, + String name, Context context); /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @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 paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); + SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); + FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturestoreEntityContainerInner body, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java index aa9d4b1c549b..237d1fd64072 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,209 +19,209 @@ */ public interface FeaturestoreEntityVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String name, String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + FeaturestoreEntityVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version); + SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, + FeaturestoreEntityVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context); + SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, + FeaturestoreEntityVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, FeaturestoreEntityVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); + FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, FeaturestoreEntityVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String name, String version, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java new file mode 100644 index 000000000000..b2bafcb430e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import java.util.Map; + +/** + * An instance of this class provides access to all the operations defined in InferenceEndpointsClient. + */ +public interface InferenceEndpointsClient { + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 inferenceEndpoint along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context); + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceEndpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner get(String resourceGroupName, String workspaceName, String poolName, String endpointName); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, InferenceEndpointInner body); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, InferenceEndpointInner body, Context context); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body); + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body, Context context); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Map body); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Map body, Context context); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Map body); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Map body, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String poolName, + String endpointName); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName, Context context); + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java new file mode 100644 index 000000000000..474fec56d202 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java @@ -0,0 +1,504 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.DeltaModelStatusResponseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; + +/** + * An instance of this class provides access to all the operations defined in InferenceGroupsClient. + */ +public interface InferenceGroupsClient { + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner get(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, InferenceGroupInner body); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceGroupInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, InferenceGroupInner body, Context context); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body); + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body, Context context); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body, + Context context); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body); + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body, Context context); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String poolName, + String groupName); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String poolName, String groupName, Context context); + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context); + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 contract returning to user the delta models along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context); + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 contract returning to user the delta models. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeltaModelStatusResponseInner getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelStatusRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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> beginModifyDeltaModelsAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelModifyRequest body); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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> beginModifyDeltaModelsAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelModifyRequest body, Context context); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest body); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest body, Context context); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getStatusWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GroupStatusInner getStatus(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @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 paginated list of SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java new file mode 100644 index 000000000000..d5928587c0f7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; + +/** + * An instance of this class provides access to all the operations defined in InferencePoolsClient. + */ +public interface InferencePoolsClient { + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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 inferencePool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context); + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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 inferencePool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner get(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body, Context context); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body); + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body, Context context); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body, + Context context); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body); + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String inferencePoolName); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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 workspaceName, String inferencePoolName); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String inferencePoolName, Context context); + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + String tags, String properties, OrderString orderBy, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java index 68a22330dae0..35ea11ef2442 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,164 +19,170 @@ */ public interface JobsClient { /** - * Lists Jobs in the workspace. + * Gets a Job by name/id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. + * @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 paginated list of JobBase entities as paginated response with {@link PagedIterable}. + * @return a Job by name/id along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); /** - * Lists Jobs in the workspace. + * Gets a Job by name/id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. * @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 paginated list of JobBase entities as paginated response with {@link PagedIterable}. + * @return a Job by name/id. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, - String tag, ListViewType listViewType, String properties, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + JobBaseInner get(String resourceGroupName, String workspaceName, String id); /** - * Deletes a Job (asynchronous). + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id); + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, + JobBaseInner body, Context context); /** - * Deletes a Job (asynchronous). + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Job definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body); /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @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.SINGLE) - void delete(String resourceGroupName, String workspaceName, String id); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id); /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @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.SINGLE) - void delete(String resourceGroupName, String workspaceName, String id, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id, + Context context); /** - * Gets a Job by name/id. + * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. - * @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 Job by name/id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + void delete(String resourceGroupName, String workspaceName, String id); /** - * Gets a Job by name/id. + * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. + * @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 Job by name/id. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseInner get(String resourceGroupName, String workspaceName, String id); + void delete(String resourceGroupName, String workspaceName, String id, Context context); /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, - JobBaseInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tag Jobs returned will have this tag key. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, + String tag, ListViewType listViewType, String properties, Context context); /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -190,7 +196,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, Stri * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -206,7 +212,7 @@ SyncPoller, Void> beginCancel(String resourceGroupName, String * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -219,7 +225,7 @@ SyncPoller, Void> beginCancel(String resourceGroupName, String * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MachineLearningManagementClient.java similarity index 70% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MachineLearningManagementClient.java index f9ec50f298e5..14e4bb3b79f5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MachineLearningManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for AzureMachineLearningWorkspaces class. + * The interface for MachineLearningManagementClient class. */ -public interface AzureMachineLearningWorkspaces { +public interface MachineLearningManagementClient { /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -53,6 +53,13 @@ public interface AzureMachineLearningWorkspaces { */ OperationsClient getOperations(); + /** + * Gets the EndpointDeploymentsClient object to access its operations. + * + * @return the EndpointDeploymentsClient object. + */ + EndpointDeploymentsClient getEndpointDeployments(); + /** * Gets the WorkspacesClient object to access its operations. * @@ -61,256 +68,326 @@ public interface AzureMachineLearningWorkspaces { WorkspacesClient getWorkspaces(); /** - * Gets the UsagesClient object to access its operations. + * Gets the CodeContainersClient object to access its operations. * - * @return the UsagesClient object. + * @return the CodeContainersClient object. */ - UsagesClient getUsages(); + CodeContainersClient getCodeContainers(); /** - * Gets the VirtualMachineSizesClient object to access its operations. + * Gets the RegistriesClient object to access its operations. * - * @return the VirtualMachineSizesClient object. + * @return the RegistriesClient object. */ - VirtualMachineSizesClient getVirtualMachineSizes(); + RegistriesClient getRegistries(); /** - * Gets the QuotasClient object to access its operations. + * Gets the CodeVersionsClient object to access its operations. * - * @return the QuotasClient object. + * @return the CodeVersionsClient object. */ - QuotasClient getQuotas(); + CodeVersionsClient getCodeVersions(); /** - * Gets the ComputesClient object to access its operations. + * Gets the ComponentContainersClient object to access its operations. * - * @return the ComputesClient object. + * @return the ComponentContainersClient object. */ - ComputesClient getComputes(); + ComponentContainersClient getComponentContainers(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ComponentVersionsClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ComponentVersionsClient object. */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + ComponentVersionsClient getComponentVersions(); /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the DataContainersClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the DataContainersClient object. */ - PrivateLinkResourcesClient getPrivateLinkResources(); + DataContainersClient getDataContainers(); /** - * Gets the WorkspaceConnectionsClient object to access its operations. + * Gets the DataVersionsClient object to access its operations. * - * @return the WorkspaceConnectionsClient object. + * @return the DataVersionsClient object. */ - WorkspaceConnectionsClient getWorkspaceConnections(); + DataVersionsClient getDataVersions(); /** - * Gets the ManagedNetworkSettingsRulesClient object to access its operations. + * Gets the EnvironmentContainersClient object to access its operations. * - * @return the ManagedNetworkSettingsRulesClient object. + * @return the EnvironmentContainersClient object. */ - ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules(); + EnvironmentContainersClient getEnvironmentContainers(); /** - * Gets the ManagedNetworkProvisionsClient object to access its operations. + * Gets the EnvironmentVersionsClient object to access its operations. * - * @return the ManagedNetworkProvisionsClient object. + * @return the EnvironmentVersionsClient object. */ - ManagedNetworkProvisionsClient getManagedNetworkProvisions(); + EnvironmentVersionsClient getEnvironmentVersions(); /** - * Gets the RegistryCodeContainersClient object to access its operations. + * Gets the ModelContainersClient object to access its operations. * - * @return the RegistryCodeContainersClient object. + * @return the ModelContainersClient object. */ - RegistryCodeContainersClient getRegistryCodeContainers(); + ModelContainersClient getModelContainers(); /** - * Gets the RegistryCodeVersionsClient object to access its operations. + * Gets the ModelVersionsClient object to access its operations. * - * @return the RegistryCodeVersionsClient object. + * @return the ModelVersionsClient object. */ - RegistryCodeVersionsClient getRegistryCodeVersions(); + ModelVersionsClient getModelVersions(); /** - * Gets the RegistryComponentContainersClient object to access its operations. + * Gets the BatchEndpointsClient object to access its operations. * - * @return the RegistryComponentContainersClient object. + * @return the BatchEndpointsClient object. */ - RegistryComponentContainersClient getRegistryComponentContainers(); + BatchEndpointsClient getBatchEndpoints(); /** - * Gets the RegistryComponentVersionsClient object to access its operations. + * Gets the BatchDeploymentsClient object to access its operations. * - * @return the RegistryComponentVersionsClient object. + * @return the BatchDeploymentsClient object. */ - RegistryComponentVersionsClient getRegistryComponentVersions(); + BatchDeploymentsClient getBatchDeployments(); /** - * Gets the RegistryDataContainersClient object to access its operations. + * Gets the CapabilityHostsClient object to access its operations. * - * @return the RegistryDataContainersClient object. + * @return the CapabilityHostsClient object. */ - RegistryDataContainersClient getRegistryDataContainers(); + CapabilityHostsClient getCapabilityHosts(); /** - * Gets the RegistryDataVersionsClient object to access its operations. + * Gets the DatastoresClient object to access its operations. * - * @return the RegistryDataVersionsClient object. + * @return the DatastoresClient object. */ - RegistryDataVersionsClient getRegistryDataVersions(); + DatastoresClient getDatastores(); /** - * Gets the RegistryDataReferencesClient object to access its operations. + * Gets the FeaturesetContainersClient object to access its operations. * - * @return the RegistryDataReferencesClient object. + * @return the FeaturesetContainersClient object. */ - RegistryDataReferencesClient getRegistryDataReferences(); + FeaturesetContainersClient getFeaturesetContainers(); /** - * Gets the RegistryEnvironmentContainersClient object to access its operations. + * Gets the FeaturesClient object to access its operations. * - * @return the RegistryEnvironmentContainersClient object. + * @return the FeaturesClient object. */ - RegistryEnvironmentContainersClient getRegistryEnvironmentContainers(); + FeaturesClient getFeatures(); /** - * Gets the RegistryEnvironmentVersionsClient object to access its operations. + * Gets the FeaturesetVersionsClient object to access its operations. * - * @return the RegistryEnvironmentVersionsClient object. + * @return the FeaturesetVersionsClient object. */ - RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions(); + FeaturesetVersionsClient getFeaturesetVersions(); /** - * Gets the RegistryModelContainersClient object to access its operations. + * Gets the FeaturestoreEntityContainersClient object to access its operations. * - * @return the RegistryModelContainersClient object. + * @return the FeaturestoreEntityContainersClient object. */ - RegistryModelContainersClient getRegistryModelContainers(); + FeaturestoreEntityContainersClient getFeaturestoreEntityContainers(); /** - * Gets the RegistryModelVersionsClient object to access its operations. + * Gets the FeaturestoreEntityVersionsClient object to access its operations. * - * @return the RegistryModelVersionsClient object. + * @return the FeaturestoreEntityVersionsClient object. */ - RegistryModelVersionsClient getRegistryModelVersions(); + FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions(); /** - * Gets the BatchEndpointsClient object to access its operations. + * Gets the InferencePoolsClient object to access its operations. * - * @return the BatchEndpointsClient object. + * @return the InferencePoolsClient object. */ - BatchEndpointsClient getBatchEndpoints(); + InferencePoolsClient getInferencePools(); /** - * Gets the BatchDeploymentsClient object to access its operations. + * Gets the InferenceEndpointsClient object to access its operations. * - * @return the BatchDeploymentsClient object. + * @return the InferenceEndpointsClient object. */ - BatchDeploymentsClient getBatchDeployments(); + InferenceEndpointsClient getInferenceEndpoints(); /** - * Gets the CodeContainersClient object to access its operations. + * Gets the InferenceGroupsClient object to access its operations. * - * @return the CodeContainersClient object. + * @return the InferenceGroupsClient object. */ - CodeContainersClient getCodeContainers(); + InferenceGroupsClient getInferenceGroups(); /** - * Gets the CodeVersionsClient object to access its operations. + * Gets the MarketplaceSubscriptionsClient object to access its operations. * - * @return the CodeVersionsClient object. + * @return the MarketplaceSubscriptionsClient object. */ - CodeVersionsClient getCodeVersions(); + MarketplaceSubscriptionsClient getMarketplaceSubscriptions(); /** - * Gets the ComponentContainersClient object to access its operations. + * Gets the OnlineEndpointsClient object to access its operations. * - * @return the ComponentContainersClient object. + * @return the OnlineEndpointsClient object. */ - ComponentContainersClient getComponentContainers(); + OnlineEndpointsClient getOnlineEndpoints(); /** - * Gets the ComponentVersionsClient object to access its operations. + * Gets the OnlineDeploymentsClient object to access its operations. * - * @return the ComponentVersionsClient object. + * @return the OnlineDeploymentsClient object. */ - ComponentVersionsClient getComponentVersions(); + OnlineDeploymentsClient getOnlineDeployments(); /** - * Gets the DataContainersClient object to access its operations. + * Gets the SchedulesClient object to access its operations. * - * @return the DataContainersClient object. + * @return the SchedulesClient object. */ - DataContainersClient getDataContainers(); + SchedulesClient getSchedules(); /** - * Gets the DataVersionsClient object to access its operations. + * Gets the ServerlessEndpointsClient object to access its operations. * - * @return the DataVersionsClient object. + * @return the ServerlessEndpointsClient object. */ - DataVersionsClient getDataVersions(); + ServerlessEndpointsClient getServerlessEndpoints(); /** - * Gets the DatastoresClient object to access its operations. + * Gets the RaiPoliciesClient object to access its operations. * - * @return the DatastoresClient object. + * @return the RaiPoliciesClient object. */ - DatastoresClient getDatastores(); + RaiPoliciesClient getRaiPolicies(); /** - * Gets the EnvironmentContainersClient object to access its operations. + * Gets the PrivateEndpointConnectionsClient object to access its operations. * - * @return the EnvironmentContainersClient object. + * @return the PrivateEndpointConnectionsClient object. */ - EnvironmentContainersClient getEnvironmentContainers(); + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); /** - * Gets the EnvironmentVersionsClient object to access its operations. + * Gets the ComputesClient object to access its operations. * - * @return the EnvironmentVersionsClient object. + * @return the ComputesClient object. */ - EnvironmentVersionsClient getEnvironmentVersions(); + ComputesClient getComputes(); /** - * Gets the FeaturesetContainersClient object to access its operations. + * Gets the WorkspaceFeaturesClient object to access its operations. * - * @return the FeaturesetContainersClient object. + * @return the WorkspaceFeaturesClient object. */ - FeaturesetContainersClient getFeaturesetContainers(); + WorkspaceFeaturesClient getWorkspaceFeatures(); /** - * Gets the FeaturesClient object to access its operations. + * Gets the ConnectionsClient object to access its operations. * - * @return the FeaturesClient object. + * @return the ConnectionsClient object. */ - FeaturesClient getFeatures(); + ConnectionsClient getConnections(); /** - * Gets the FeaturesetVersionsClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the FeaturesetVersionsClient object. + * @return the PrivateLinkResourcesClient object. */ - FeaturesetVersionsClient getFeaturesetVersions(); + PrivateLinkResourcesClient getPrivateLinkResources(); /** - * Gets the FeaturestoreEntityContainersClient object to access its operations. + * Gets the ManagedNetworkProvisionsClient object to access its operations. * - * @return the FeaturestoreEntityContainersClient object. + * @return the ManagedNetworkProvisionsClient object. */ - FeaturestoreEntityContainersClient getFeaturestoreEntityContainers(); + ManagedNetworkProvisionsClient getManagedNetworkProvisions(); /** - * Gets the FeaturestoreEntityVersionsClient object to access its operations. + * Gets the RegistryCodeContainersClient object to access its operations. * - * @return the FeaturestoreEntityVersionsClient object. + * @return the RegistryCodeContainersClient object. */ - FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions(); + RegistryCodeContainersClient getRegistryCodeContainers(); + + /** + * Gets the RegistryDataReferencesClient object to access its operations. + * + * @return the RegistryDataReferencesClient object. + */ + RegistryDataReferencesClient getRegistryDataReferences(); + + /** + * Gets the RegistryCodeVersionsClient object to access its operations. + * + * @return the RegistryCodeVersionsClient object. + */ + RegistryCodeVersionsClient getRegistryCodeVersions(); + + /** + * Gets the RegistryComponentContainersClient object to access its operations. + * + * @return the RegistryComponentContainersClient object. + */ + RegistryComponentContainersClient getRegistryComponentContainers(); + + /** + * Gets the RegistryComponentVersionsClient object to access its operations. + * + * @return the RegistryComponentVersionsClient object. + */ + RegistryComponentVersionsClient getRegistryComponentVersions(); + + /** + * Gets the RegistryDataContainersClient object to access its operations. + * + * @return the RegistryDataContainersClient object. + */ + RegistryDataContainersClient getRegistryDataContainers(); + + /** + * Gets the RegistryDataVersionsClient object to access its operations. + * + * @return the RegistryDataVersionsClient object. + */ + RegistryDataVersionsClient getRegistryDataVersions(); + + /** + * Gets the RegistryEnvironmentContainersClient object to access its operations. + * + * @return the RegistryEnvironmentContainersClient object. + */ + RegistryEnvironmentContainersClient getRegistryEnvironmentContainers(); + + /** + * Gets the RegistryEnvironmentVersionsClient object to access its operations. + * + * @return the RegistryEnvironmentVersionsClient object. + */ + RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions(); + + /** + * Gets the RegistryModelContainersClient object to access its operations. + * + * @return the RegistryModelContainersClient object. + */ + RegistryModelContainersClient getRegistryModelContainers(); + + /** + * Gets the RegistryModelVersionsClient object to access its operations. + * + * @return the RegistryModelVersionsClient object. + */ + RegistryModelVersionsClient getRegistryModelVersions(); /** * Gets the JobsClient object to access its operations. @@ -320,65 +397,121 @@ public interface AzureMachineLearningWorkspaces { JobsClient getJobs(); /** - * Gets the MarketplaceSubscriptionsClient object to access its operations. + * Gets the WorkspaceConnectionsClient object to access its operations. * - * @return the MarketplaceSubscriptionsClient object. + * @return the WorkspaceConnectionsClient object. */ - MarketplaceSubscriptionsClient getMarketplaceSubscriptions(); + WorkspaceConnectionsClient getWorkspaceConnections(); /** - * Gets the ModelContainersClient object to access its operations. + * Gets the ConnectionRaiBlocklistsClient object to access its operations. * - * @return the ModelContainersClient object. + * @return the ConnectionRaiBlocklistsClient object. */ - ModelContainersClient getModelContainers(); + ConnectionRaiBlocklistsClient getConnectionRaiBlocklists(); /** - * Gets the ModelVersionsClient object to access its operations. + * Gets the ConnectionRaiBlocklistsOperationsClient object to access its operations. * - * @return the ModelVersionsClient object. + * @return the ConnectionRaiBlocklistsOperationsClient object. */ - ModelVersionsClient getModelVersions(); + ConnectionRaiBlocklistsOperationsClient getConnectionRaiBlocklistsOperations(); /** - * Gets the OnlineEndpointsClient object to access its operations. + * Gets the ConnectionRaiBlocklistItemsClient object to access its operations. * - * @return the OnlineEndpointsClient object. + * @return the ConnectionRaiBlocklistItemsClient object. */ - OnlineEndpointsClient getOnlineEndpoints(); + ConnectionRaiBlocklistItemsClient getConnectionRaiBlocklistItems(); /** - * Gets the OnlineDeploymentsClient object to access its operations. + * Gets the ConnectionRaiBlocklistItemsOperationsClient object to access its operations. * - * @return the OnlineDeploymentsClient object. + * @return the ConnectionRaiBlocklistItemsOperationsClient object. */ - OnlineDeploymentsClient getOnlineDeployments(); + ConnectionRaiBlocklistItemsOperationsClient getConnectionRaiBlocklistItemsOperations(); /** - * Gets the SchedulesClient object to access its operations. + * Gets the ConnectionRaiPoliciesClient object to access its operations. * - * @return the SchedulesClient object. + * @return the ConnectionRaiPoliciesClient object. */ - SchedulesClient getSchedules(); + ConnectionRaiPoliciesClient getConnectionRaiPolicies(); /** - * Gets the ServerlessEndpointsClient object to access its operations. + * Gets the ConnectionRaiPoliciesOperationsClient object to access its operations. * - * @return the ServerlessEndpointsClient object. + * @return the ConnectionRaiPoliciesOperationsClient object. */ - ServerlessEndpointsClient getServerlessEndpoints(); + ConnectionRaiPoliciesOperationsClient getConnectionRaiPoliciesOperations(); /** - * Gets the RegistriesClient object to access its operations. + * Gets the RaiPoliciesOperationsClient object to access its operations. * - * @return the RegistriesClient object. + * @return the RaiPoliciesOperationsClient object. */ - RegistriesClient getRegistries(); + RaiPoliciesOperationsClient getRaiPoliciesOperations(); /** - * Gets the WorkspaceFeaturesClient object to access its operations. + * Gets the EndpointsClient object to access its operations. * - * @return the WorkspaceFeaturesClient object. + * @return the EndpointsClient object. */ - WorkspaceFeaturesClient getWorkspaceFeatures(); + EndpointsClient getEndpoints(); + + /** + * Gets the ManagedNetworkSettingsRulesClient object to access its operations. + * + * @return the ManagedNetworkSettingsRulesClient object. + */ + ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules(); + + /** + * Gets the OutboundRulesClient object to access its operations. + * + * @return the OutboundRulesClient object. + */ + OutboundRulesClient getOutboundRules(); + + /** + * Gets the ManagedNetworkSettingsOperationsClient object to access its operations. + * + * @return the ManagedNetworkSettingsOperationsClient object. + */ + ManagedNetworkSettingsOperationsClient getManagedNetworkSettingsOperations(); + + /** + * Gets the OutboundRulesOperationsClient object to access its operations. + * + * @return the OutboundRulesOperationsClient object. + */ + OutboundRulesOperationsClient getOutboundRulesOperations(); + + /** + * Gets the UsagesClient object to access its operations. + * + * @return the UsagesClient object. + */ + UsagesClient getUsages(); + + /** + * Gets the VirtualMachineSizesClient object to access its operations. + * + * @return the VirtualMachineSizesClient object. + */ + VirtualMachineSizesClient getVirtualMachineSizes(); + + /** + * Gets the QuotasClient object to access its operations. + * + * @return the QuotasClient object. + */ + QuotasClient getQuotas(); + + /** + * Gets the PTUQuotasClient object to access its operations. + * + * @return the PTUQuotasClient object. + */ + PTUQuotasClient getPTUQuotas(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java index 1d352bc17141..e27a5da1ab3d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,7 +20,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -35,7 +35,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -53,7 +53,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -66,7 +66,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsOperationsClient.java new file mode 100644 index 000000000000..2cefaf3cc319 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsOperationsClient.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ManagedNetworkSettingsOperationsClient. + */ +public interface ManagedNetworkSettingsOperationsClient { + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String managedNetworkName, Context context); + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNetworkSettingsPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String managedNetworkName); + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPut(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body); + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPut(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNetworkSettingsPropertiesBasicResourceInner put(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body); + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNetworkSettingsPropertiesBasicResourceInner put(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPatch(String resourceGroupName, String workspaceName, String managedNetworkName); + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPatch(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNetworkSettingsPropertiesBasicResourceInner patch(String resourceGroupName, String workspaceName, + String managedNetworkName); + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedNetworkSettingsPropertiesBasicResourceInner patch(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ManagedNetworkSettingsPropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName); + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, + String workspaceName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java index e092cd4e3ab9..8eba0dbf8df4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -18,187 +18,185 @@ */ public interface ManagedNetworkSettingsRulesClient { /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String ruleName, Context context); /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. + * @return an outbound rule from the managed network of a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName); /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName); + SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body); /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName, + SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, Context context); /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @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 concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleName); + OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, + OutboundRuleBasicResourceInner body); /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @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 concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String ruleName, Context context); + OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, + OutboundRuleBasicResourceInner body, Context context); /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String ruleName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName); /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @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 an outbound rule from the managed network of a machine learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName, + Context context); /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleName); /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String ruleName, Context context); /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return outbound Rule Basic Resource for the managed network of a machine learning workspace. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 outbound Rule Basic Resource for the managed network of a machine learning workspace. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java index 33ef9a340bac..7f43d6cc2c04 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -18,185 +18,185 @@ */ public interface MarketplaceSubscriptionsClient { /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); + SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body); /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during 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. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, Context context); /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during 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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body); /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during 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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); + MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body, Context context); /** - * Get container. + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container 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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container 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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context); /** - * Create or update Marketplace Subscription (asynchronous). + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update Marketplace Subscription (asynchronous). + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java index 847e25e1e82a..4b9a7ee6d999 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -17,66 +17,70 @@ */ public interface ModelContainersClient { /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ModelContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ModelContainerInner body); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -85,14 +89,13 @@ PagedIterable list(String resourceGroupName, String workspa * @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 container along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -100,41 +103,38 @@ Response getWithResponse(String resourceGroupName, String w * @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 container. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner get(String resourceGroupName, String workspaceName, String name); + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ModelContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ModelContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java index f331fba8cb0c..806046dd8861 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,79 +20,74 @@ */ public interface ModelVersionsClient { /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, - String feed, ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, ModelVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); + ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + ModelVersionInner body); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -102,14 +97,14 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName * @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 version along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, + Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -118,53 +113,58 @@ Response getWithResponse(String resourceGroupName, String wor * @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 version. */ @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version); + void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Create or update version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, - String version, ModelVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Create or update version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Model version. + * @param description Model description. + * @param offset Number of initial results to skip. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param feed Name of the feed. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - ModelVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, + String feed, ListViewType listViewType, Context context); /** * Publish version asset into registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -180,8 +180,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,8 +198,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -213,8 +213,8 @@ SyncPoller, Void> beginPublish(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java index 0f4e1a6102b2..5febc727d54e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -22,146 +22,123 @@ */ public interface OnlineDeploymentsClient { /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * List Inference Endpoint Deployments. + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. + * @return inference Deployment Deployment along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** - * Delete Inference Endpoint Deployment (asynchronous). + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return inference Deployment Deployment. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + @ServiceMethod(returns = ReturnType.SINGLE) + OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** - * Delete Inference Endpoint Deployment (asynchronous). + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. + * @param body Inference Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body); /** - * Delete Inference Endpoint Deployment (asynchronous). + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body, Context context); /** - * Get Inference Deployment Deployment. + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. + * @param body Inference Endpoint entity to apply during 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 inference Deployment Deployment along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); + OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body); /** - * Get Inference Deployment Deployment. + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during 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 inference Deployment Deployment. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName); + OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body, Context context); /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, @@ -171,7 +148,7 @@ SyncPoller, OnlineDeploymentInner> beginUpdate * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during operation. @@ -179,7 +156,8 @@ SyncPoller, OnlineDeploymentInner> beginUpdate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, @@ -190,14 +168,14 @@ SyncPoller, OnlineDeploymentInner> beginUpdate * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, @@ -207,7 +185,7 @@ OnlineDeploymentInner update(String resourceGroupName, String workspaceName, Str * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during operation. @@ -215,37 +193,35 @@ OnlineDeploymentInner update(String resourceGroupName, String workspaceName, Str * @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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context); /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName); /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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. @@ -253,51 +229,79 @@ SyncPoller, OnlineDeploymentInner> beginCreate * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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) - OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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) - OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); + + /** + * List Inference Endpoint Deployments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); + + /** + * List Inference Endpoint Deployments. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. + * @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 paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); /** * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -313,9 +317,9 @@ Response getLogsWithResponse(String resourceGroupName, Stri * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -330,8 +334,8 @@ DeploymentLogsInner getLogs(String resourceGroupName, String workspaceName, Stri * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -346,8 +350,8 @@ PagedIterable listSkus(String resourceGroupName, String worksp * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param count Number of Skus to be retrieved in a page of results. * @param skip Continuation token for pagination. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java index 0eb371edea14..1cf55969d21c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -24,141 +24,115 @@ */ public interface OnlineEndpointsClient { /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List Online Endpoints. + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. + * @return online Endpoint along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, - EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Delete Online Endpoint (asynchronous). + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return online Endpoint. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); + @ServiceMethod(returns = ReturnType.SINGLE) + OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); /** - * Delete Online Endpoint (asynchronous). + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. + * @param body Online Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, - Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName); + SyncPoller, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, OnlineEndpointInner body); /** - * Delete Online Endpoint (asynchronous). + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, OnlineEndpointInner body, Context context); /** - * Get Online Endpoint. + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. + * @param body Online Endpoint entity to apply during 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 online Endpoint along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); + OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body); /** - * Get Online Endpoint. + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 online Endpoint. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); + OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body, Context context); /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, @@ -168,14 +142,15 @@ SyncPoller, OnlineEndpointInner> beginUpdate(Str * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, @@ -185,13 +160,13 @@ SyncPoller, OnlineEndpointInner> beginUpdate(Str * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, @@ -201,42 +176,39 @@ OnlineEndpointInner update(String resourceGroupName, String workspaceName, Strin * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context); /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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. @@ -244,47 +216,79 @@ SyncPoller, OnlineEndpointInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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) - OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body); + void delete(String resourceGroupName, String workspaceName, String endpointName); /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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) - OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body, Context context); + void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); + + /** + * List Online Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List Online Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Name of the endpoint. + * @param count Number of endpoints to be retrieved in a page of results. + * @param computeType EndpointComputeType to be filtered by. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, + EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, + Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,7 +304,7 @@ Response listKeysWithResponse(String resourceGroupName, S * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -314,7 +318,7 @@ Response listKeysWithResponse(String resourceGroupName, S * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,7 +334,7 @@ SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -347,7 +351,7 @@ SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -362,7 +366,7 @@ void regenerateKeys(String resourceGroupName, String workspaceName, String endpo * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -378,7 +382,7 @@ void regenerateKeys(String resourceGroupName, String workspaceName, String endpo * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -394,7 +398,7 @@ Response getTokenWithResponse(String resourceGroupName, * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java index b222e86651c9..7ed9a1faea39 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -15,7 +15,9 @@ */ public interface OperationsClient { /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -26,7 +28,9 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesClient.java new file mode 100644 index 000000000000..3d667d1de80c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesClient.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.OutboundRuleBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in OutboundRulesClient. + */ +public interface OutboundRulesClient { + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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 concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, Context context); + + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String managedNetworkName, + String ruleName); + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + OutboundRuleBasicResourceInner body); + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + OutboundRuleBasicResourceInner body, Context context); + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body); + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body, Context context); + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName); + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, Context context); + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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 workspaceName, String managedNetworkName, String ruleName); + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + Context context); + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName); + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesOperationsClient.java new file mode 100644 index 000000000000..be208a1fdf1e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesOperationsClient.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in OutboundRulesOperationsClient. + */ +public interface OutboundRulesOperationsClient { + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body); + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PTUQuotasClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PTUQuotasClient.java new file mode 100644 index 000000000000..ad39400c7686 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PTUQuotasClient.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; + +/** + * An instance of this class provides access to all the operations defined in PTUQuotasClient. + */ +public interface PTUQuotasClient { + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAvailable(String location); + + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAvailable(String location, String skip, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The location 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 available MaaS PTU quota along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAvailableWithResponse(String location, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The location name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AvailableQuotaInner getAvailable(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, String skip, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java index b3867155b4b7..010209d88989 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -16,124 +16,132 @@ */ public interface PrivateEndpointConnectionsClient { /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * @return the Private Endpoint Connection resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName); /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body, Context context); /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body); /** - * Update the state of specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context); + Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * Update the state of specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return list of private endpoint connection associated with the specified workspace as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java index c40a3ce213ae..d2a463153c7f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java @@ -1,44 +1,63 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; /** * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public interface PrivateLinkResourcesClient { /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String workspaceName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java index bff12926f7fb..6cb8245d812e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,8 +20,8 @@ public interface QuotasClient { /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @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. @@ -35,8 +35,8 @@ Response updateWithResponse(String location, Q /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @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. @@ -48,7 +48,7 @@ Response updateWithResponse(String location, Q /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -61,7 +61,7 @@ Response updateWithResponse(String location, Q /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java new file mode 100644 index 000000000000..2fd9433a304e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in RaiPoliciesClient. + */ +public interface RaiPoliciesClient { + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, Context context); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @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 workspaceName, String endpointName, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesOperationsClient.java new file mode 100644 index 000000000000..b48b742db881 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesOperationsClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in RaiPoliciesOperationsClient. + */ +public interface RaiPoliciesOperationsClient { + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java index 30efcfc24822..f734f680faee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,221 +19,224 @@ */ public interface RegistriesClient { /** - * List registries by subscription. + * Get registry. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return registry along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, + Context context); /** - * List registries by subscription. + * Get registry. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return registry. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner getByResourceGroup(String resourceGroupName, String registryName); /** - * List registries. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, RegistryInner body); /** - * List registries. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, RegistryInner body, Context context); /** - * Delete registry. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body); /** - * Delete registry. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, Context context); /** - * Delete registry. + * Update tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @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 concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName); + Response updateWithResponse(String resourceGroupName, String registryName, + PartialRegistryPartialTrackedResource body, Context context); /** - * Delete registry. + * Update tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param context The context to associate with this operation. + * @param body Details required to create the registry. * @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 concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, Context context); + RegistryInner update(String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body); /** - * Get registry. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName); /** - * Get registry. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This 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 registry. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner getByResourceGroup(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, Context context); /** - * Update tags. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 registryName, - PartialRegistryPartialTrackedResource body, Context context); + void delete(String resourceGroupName, String registryName); /** - * Update tags. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. + * @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) - RegistryInner update(String resourceGroupName, String registryName, PartialRegistryPartialTrackedResource body); + void delete(String resourceGroupName, String registryName, Context context); /** - * Create or update registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Create or update registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @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. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** * Remove regions from registry. @@ -244,7 +247,8 @@ SyncPoller, RegistryInner> beginCreateOrUpdate(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, @@ -260,7 +264,8 @@ SyncPoller, RegistryInner> beginRemoveRegions(String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, @@ -275,7 +280,7 @@ SyncPoller, RegistryInner> beginRemoveRegions(String r * @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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body); @@ -290,7 +295,7 @@ SyncPoller, RegistryInner> beginRemoveRegions(String r * @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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java index db782ef7731d..8cf8e76af55f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -18,183 +18,183 @@ */ public interface RegistryCodeContainersClient { /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return code container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String codeName, + Context context); /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param codeName Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return code container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + CodeContainerInner get(String resourceGroupName, String registryName, String codeName); /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName); + SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, CodeContainerInner body); /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, - Context context); + SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, CodeContainerInner body, Context context); /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName); + CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, + CodeContainerInner body); /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName, Context context); + CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, + CodeContainerInner body, Context context); /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container 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 code container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName); /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container 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 code container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner get(String resourceGroupName, String registryName, String codeName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, + Context context); /** - * Create or update Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName); /** - * Create or update Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName, Context context); /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java index abda21cb6547..11f8a4e846ee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -20,209 +20,209 @@ */ public interface RegistryCodeVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param version Version identifier. + * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String codeName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String codeName, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String codeName, String orderBy, - Integer top, String skip, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, - String version); + SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, String version, CodeVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, - String version, Context context); + SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, String version, CodeVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName, String version); + CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, + CodeVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); + CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, + CodeVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - String version, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, + String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String codeName, + String version, Context context); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName, String version); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String codeName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String codeName, String orderBy, + Integer top, String skip, Context context); /** * Generate a storage location and credential for the client to upload a code asset to. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -239,8 +239,8 @@ Response createOrGetStartPendingUploadWithRespons * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java index 4ab7c9853bf6..bd8dbba1c3b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -18,185 +18,185 @@ */ public interface RegistryComponentContainersClient { /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String componentName, Context context); /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param componentName Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentContainerInner get(String resourceGroupName, String registryName, String componentName); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName); + SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, + SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName); + ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + ComponentContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName, Context context); + ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + ComponentContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container 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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String componentName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container 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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner get(String resourceGroupName, String registryName, String componentName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, + Context context); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName, Context context); /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String skip, + Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java index a493d51e7a07..f6e4a618a22f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -18,199 +18,199 @@ */ public interface RegistryComponentVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param version Version identifier. + * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String componentName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String componentName, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String componentName, - String orderBy, Integer top, String skip, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, - String version); + SyncPoller, ComponentVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String componentName, String version, ComponentVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, - String version, Context context); + SyncPoller, ComponentVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String componentName, String version, ComponentVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName, String version); + ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + String version, ComponentVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); + ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + String version, ComponentVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String componentName, - String version, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, + String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, String version); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, + String version, Context context); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName, String version); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComponentVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String componentName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String componentName, + String orderBy, Integer top, String skip, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java index e53c73329815..ed199c9806a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,185 +19,185 @@ */ public interface RegistryDataContainersClient { /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String name, + Context context); /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DataContainerInner get(String resourceGroupName, String registryName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name); + SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String name, DataContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - Context context); + SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String name, DataContainerInner body, Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name); + DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, + DataContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name, Context context); + DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, + DataContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container 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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String name, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container 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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner get(String resourceGroupName, String registryName, String name); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, + Context context); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String name); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String name, Context context); /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java index 690bf2625158..d10e3899be24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java index 746599d4390a..867052427706 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -21,213 +21,213 @@ */ public interface RegistryDataVersionsClient { /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String name, + String version, Context context); /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String name, String orderBy, - Integer top, String skip, String tags, ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version); + SyncPoller, DataVersionBaseInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String name, String version, DataVersionBaseInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version, Context context); + SyncPoller, DataVersionBaseInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String name, String version, DataVersionBaseInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name, String version); + DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, String version, + DataVersionBaseInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String name, String version, Context context); + DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, String version, + DataVersionBaseInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String name, - String version, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, + String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, + String version, Context context); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataVersionBaseInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String name, String version); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DataVersionBaseInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String name, String version, Context context); /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String name); /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String name, String orderBy, + Integer top, String skip, String tags, ListViewType listViewType, Context context); /** * Generate a storage location and credential for the client to upload a data asset to. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,8 +244,8 @@ Response createOrGetStartPendingUploadWithRespons * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java index 1a05274522d5..54ed99ec1ea8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,187 +19,187 @@ */ public interface RegistryEnvironmentContainersClient { /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String environmentName, Context context); /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName); + SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, Context context); + SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, + Context context); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName); + EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, + EnvironmentContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName, Context context); + EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, + EnvironmentContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String environmentName); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. + * @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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String environmentName, Context context); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param environmentName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName); /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param environmentName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName, Context context); /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java index ba7844b2fdb6..80fba9422e2a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,202 +19,202 @@ */ public interface RegistryEnvironmentVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String environmentName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, + String environmentName, String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String environmentName, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version); + SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, String version, + EnvironmentVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version, Context context); + SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, String version, + EnvironmentVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName, String version); + EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, + String version, EnvironmentVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); + EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, + String version, EnvironmentVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, String version, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String environmentName, String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, String version); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String environmentName, String version, Context context); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName, String version); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String environmentName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String environmentName, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java index ffd6476b53c6..17365481059f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,185 +19,185 @@ */ public interface RegistryModelContainersClient { /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String modelName, + Context context); /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ModelContainerInner get(String resourceGroupName, String registryName, String modelName); /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName); + SyncPoller, ModelContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String modelName, ModelContainerInner body); /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, - Context context); + SyncPoller, ModelContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String modelName, ModelContainerInner body, Context context); /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName); + ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, + ModelContainerInner body); /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName, Context context); + ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, + ModelContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. + * @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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner get(String resourceGroupName, String registryName, String modelName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, + Context context); /** - * Create or update model container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param modelName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName); /** - * Create or update model container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param modelName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName, Context context); /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java index 11e3725d463f..363a2e393467 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -21,214 +21,214 @@ */ public interface RegistryModelVersionsClient { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String modelName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String registryName, String modelName, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String registryName, String modelName, String skip, - String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, - String version); + SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String modelName, String version, ModelVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, - String version, Context context); + SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String modelName, String version, ModelVersionInner body, Context context); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName, String version); + ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, + ModelVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); + ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, + ModelVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - String version, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, + String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String modelName, + String version, Context context); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName, String version); /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param modelName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String modelName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. * @param version Version identifier. - * @param body Version entity to create or update. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String registryName, String modelName, String skip, + String orderBy, Integer top, String version, String description, String tags, String properties, + ListViewType listViewType, Context context); /** * Generate a storage location and credential for the client to upload a model asset to. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @param context The context to associate with this operation. @@ -246,7 +246,7 @@ Response createOrGetStartPendingUploadWithRespons * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java index cd31652c50e5..05fb14a1024c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,184 +19,184 @@ */ public interface SchedulesClient { /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + * @return schedule along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + * @return schedule. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ScheduleInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); + SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body); /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); + SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body, Context context); /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body); /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); + ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, + Context context); /** - * Get schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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 schedule along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); /** - * Get schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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 schedule. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner get(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context); /** - * Create or update schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param body Schedule definition. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param body Schedule definition. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. * @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 azure Resource Manager resource envelope. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java index ec664f5bab71..6318a25b7f4f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -21,132 +21,115 @@ */ public interface ServerlessEndpointsClient { /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List Serverless Endpoints. + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Serverless Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + * @return serverless Endpoint along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String skip, + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * Delete Serverless Endpoint (asynchronous). + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return serverless Endpoint. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); + @ServiceMethod(returns = ReturnType.SINGLE) + ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name); /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. + * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context); - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); + SyncPoller, ServerlessEndpointInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body); /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context); /** - * Get Serverless Endpoint. + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. + * @param body Serverless Endpoint entity to apply during 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 serverless Endpoint along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body); /** - * Get Serverless Endpoint. + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during 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 serverless Endpoint. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name); + ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body, Context context); /** * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerlessEndpointInner> beginUpdate(String resourceGroupName, @@ -156,14 +139,15 @@ SyncPoller, ServerlessEndpointInner> beginUp * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ServerlessEndpointInner> beginUpdate(String resourceGroupName, @@ -173,13 +157,13 @@ SyncPoller, ServerlessEndpointInner> beginUp * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, @@ -189,42 +173,39 @@ ServerlessEndpointInner update(String resourceGroupName, String workspaceName, S * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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, ServerlessEndpointInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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. @@ -232,47 +213,70 @@ ServerlessEndpointInner update(String resourceGroupName, String workspaceName, S * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context); /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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) - ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body); + void delete(String resourceGroupName, String workspaceName, String name); /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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) - ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body, Context context); + void delete(String resourceGroupName, String workspaceName, String name, Context context); + + /** + * List Serverless Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List Serverless Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -288,7 +292,7 @@ Response listKeysWithResponse(String resourceGroupName, S * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -302,7 +306,7 @@ Response listKeysWithResponse(String resourceGroupName, S * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -318,7 +322,7 @@ SyncPoller, EndpointAuthKeysInner> beginRegene * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -335,7 +339,7 @@ SyncPoller, EndpointAuthKeysInner> beginRegene * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -351,7 +355,7 @@ EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceN * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java index 675c00685de4..6207ff630ed8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -17,7 +17,7 @@ public interface UsagesClient { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -30,7 +30,7 @@ public interface UsagesClient { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java index c0febf79a6e4..f62a0cf443d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -17,7 +17,7 @@ public interface VirtualMachineSizesClient { /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. @@ -30,7 +30,7 @@ public interface VirtualMachineSizesClient { /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java index eee87969a4a3..a1868b05199d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -8,83 +8,120 @@ 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.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter; /** * An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ public interface WorkspaceConnectionsClient { /** - * The create operation. + * Lists machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, Context context); + + /** + * Lists machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Create or update machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body The object for creating or updating a new workspace connection. + * @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 concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); /** - * The create operation. + * Create or update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, - String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters); + String connectionName); /** - * The get operation. + * Update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Parameters for workspace connection update. * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context); + Response updateWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionUpdateParameter body, Context context); /** - * The get operation. + * Update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, + WorkspaceConnectionPropertiesV2BasicResourceInner update(String resourceGroupName, String workspaceName, String connectionName); /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -97,10 +134,10 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName Context context); /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -110,47 +147,56 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String workspaceName); /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param target Target of the workspace connection. * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @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 paginated response with {@link PagedIterable}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, - String workspaceName, String target, String category, Context context); + String workspaceName, String target, String category, Boolean includeAll, Context context); /** * List all the secrets of a machine learning workspaces connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listSecretsWithResponse(String resourceGroupName, @@ -160,14 +206,75 @@ Response listSecretsWithRespo * List all the secrets of a machine learning workspaces connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, String connectionName); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 testConnection(String resourceGroupName, String workspaceName, String connectionName); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java index 8437e6ab4254..538a8eb5d34e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -18,7 +18,7 @@ public interface WorkspaceFeaturesClient { * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -31,7 +31,7 @@ public interface WorkspaceFeaturesClient { * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java index d3a6d397d5b9..954fe32023f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent; @@ -19,8 +19,8 @@ import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; /** * An instance of this class provides access to all the operations defined in WorkspacesClient. @@ -30,7 +30,7 @@ public interface WorkspacesClient { * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -45,7 +45,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -58,8 +58,8 @@ Response getByResourceGroupWithResponse(String resourceGroupName * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @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. @@ -67,14 +67,14 @@ Response getByResourceGroupWithResponse(String resourceGroupName */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters); + String workspaceName, WorkspaceInner body); /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @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. @@ -83,28 +83,28 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate(Strin */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context); + String workspaceName, WorkspaceInner body, Context context); /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters); + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body); /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @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. @@ -112,124 +112,123 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate(Strin * @return an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context); + WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body, Context context); /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body); /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Boolean forceToPurge, - Context context); + SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body, Context context); /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName); + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body); /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body, + Context context); /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. * @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 an object that represents a machine learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Boolean forceToPurge, + Context context); /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters); + void delete(String resourceGroupName, String workspaceName); /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. * @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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, - Context context); + void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context); /** * Lists all the available machine learning workspaces under the specified resource group. @@ -238,8 +237,7 @@ WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceU * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -248,22 +246,49 @@ WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceU * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 of a Workspace list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context); + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); + PagedIterable list(String kind, String skip, String aiCapabilities, Context context); /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -277,8 +302,8 @@ WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceU * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @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. @@ -287,13 +312,13 @@ WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceU */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); + String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body, Context context); /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -306,8 +331,8 @@ SyncPoller, DiagnoseResponseResultInner> * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @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. @@ -316,14 +341,14 @@ SyncPoller, DiagnoseResponseResultInner> */ @ServiceMethod(returns = ReturnType.SINGLE) DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context); + DiagnoseWorkspaceParameters body, Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -339,7 +364,7 @@ Response listKeysWithResponse(String resourceGroup * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -349,91 +374,94 @@ Response listKeysWithResponse(String resourceGroup ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return azure Machine Learning Workspace notebook access token along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listNotebookAccessTokenWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return azure Machine Learning Workspace notebook access token. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName); + Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, + Context context); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName, Context context); + ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); /** - * Lists all the available machine learning workspaces under the specified subscription. + * Lists keys of Azure Machine Learning Workspace's storage account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStorageAccountKeysWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Lists all the available machine learning workspaces under the specified subscription. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skip, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); /** - * return notebook access token and refresh token. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -441,27 +469,27 @@ Response listKeysWithResponse(String resourceGroup * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookAccessTokenWithResponse(String resourceGroupName, + Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, String workspaceName, Context context); /** - * return notebook access token and refresh token. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); + ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -472,10 +500,10 @@ Response listNotebookAccessTokenWithResponse(Str beginPrepareNotebook(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -487,10 +515,10 @@ Response listNotebookAccessTokenWithResponse(Str beginPrepareNotebook(String resourceGroupName, String workspaceName, Context context); /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -500,10 +528,10 @@ Response listNotebookAccessTokenWithResponse(Str NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -514,86 +542,58 @@ Response listNotebookAccessTokenWithResponse(Str NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context); /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 listStorageAccountKeysWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * List storage account keys of a workspace. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName); /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, Context context); /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); + void resyncKeys(String resourceGroupName, String workspaceName); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, - String workspaceName, Context context); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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) - ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); + void resyncKeys(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java new file mode 100644 index 000000000000..8e32841ae765 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AccountApiKeys model. + */ +@Immutable +public final class AccountApiKeysInner implements JsonSerializable { + /* + * The key1 property. + */ + private String key1; + + /* + * The key2 property. + */ + private String key2; + + /** + * Creates an instance of AccountApiKeysInner class. + */ + private AccountApiKeysInner() { + } + + /** + * Get the key1 property: The key1 property. + * + * @return the key1 value. + */ + public String key1() { + return this.key1; + } + + /** + * Get the key2 property: The key2 property. + * + * @return the key2 value. + */ + public String key2() { + return this.key2; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key1", this.key1); + jsonWriter.writeStringField("key2", this.key2); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccountApiKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccountApiKeysInner 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 AccountApiKeysInner. + */ + public static AccountApiKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccountApiKeysInner deserializedAccountApiKeysInner = new AccountApiKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key1".equals(fieldName)) { + deserializedAccountApiKeysInner.key1 = reader.getString(); + } else if ("key2".equals(fieldName)) { + deserializedAccountApiKeysInner.key2 = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccountApiKeysInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java index faf14637e351..f93f78163b81 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Features enabled for a workspace. */ -@Fluent +@Immutable public final class AmlUserFeatureInner implements JsonSerializable { /* * Specifies the feature ID @@ -34,7 +34,7 @@ public final class AmlUserFeatureInner implements JsonSerializable { + /* + * Available quota properties + */ + private AvailableQuotaProperties properties; + + /** + * Creates an instance of AvailableQuotaInner class. + */ + private AvailableQuotaInner() { + } + + /** + * Get the properties property: Available quota properties. + * + * @return the properties value. + */ + public AvailableQuotaProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableQuotaInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableQuotaInner 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 AvailableQuotaInner. + */ + public static AvailableQuotaInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailableQuotaInner deserializedAvailableQuotaInner = new AvailableQuotaInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedAvailableQuotaInner.properties = AvailableQuotaProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableQuotaInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java index d4ddade922d3..0ea552012b62 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,7 +17,7 @@ import java.util.Map; /** - * The BatchDeployment model. + * Concrete tracked resource types can be created by aliasing this type using a specific property type. */ @Fluent public final class BatchDeploymentInner extends Resource { @@ -28,14 +27,14 @@ public final class BatchDeploymentInner extends Resource { private BatchDeploymentProperties properties; /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + * Managed service identity (system assigned and/or user assigned identities) */ - private String kind; + private ManagedServiceIdentity identity; /* - * Managed service identity (system assigned and/or user assigned identities) + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. */ - private ManagedServiceIdentity identity; + private String kind; /* * Sku details required for ARM contract for Autoscaling. @@ -48,9 +47,9 @@ public final class BatchDeploymentInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -58,9 +57,9 @@ public final class BatchDeploymentInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of BatchDeploymentInner class. @@ -89,44 +88,44 @@ public BatchDeploymentInner withProperties(BatchDeploymentProperties properties) } /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - public String kind() { - return this.kind; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param kind the kind value to set. + * @param identity the identity value to set. * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentInner withKind(String kind) { - this.kind = kind; + public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public String kind() { + return this.kind; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @param identity the identity value to set. + * @param kind the kind value to set. * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public BatchDeploymentInner withKind(String kind) { + this.kind = kind; return this; } @@ -160,13 +159,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,13 +179,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -207,29 +206,6 @@ public BatchDeploymentInner withTags(Map tags) { 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 BatchDeploymentInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchDeploymentInner.class); - /** * {@inheritDoc} */ @@ -239,8 +215,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -274,10 +250,10 @@ public static BatchDeploymentInner fromJson(JsonReader jsonReader) throws IOExce deserializedBatchDeploymentInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBatchDeploymentInner.properties = BatchDeploymentProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedBatchDeploymentInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedBatchDeploymentInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedBatchDeploymentInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedBatchDeploymentInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java index a4494b6eabf1..0d695dca1f24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,7 +17,7 @@ import java.util.Map; /** - * The BatchEndpoint model. + * Concrete tracked resource types can be created by aliasing this type using a specific property type. */ @Fluent public final class BatchEndpointInner extends Resource { @@ -28,14 +27,14 @@ public final class BatchEndpointInner extends Resource { private BatchEndpointProperties properties; /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + * Managed service identity (system assigned and/or user assigned identities) */ - private String kind; + private ManagedServiceIdentity identity; /* - * Managed service identity (system assigned and/or user assigned identities) + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. */ - private ManagedServiceIdentity identity; + private String kind; /* * Sku details required for ARM contract for Autoscaling. @@ -48,9 +47,9 @@ public final class BatchEndpointInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -58,9 +57,9 @@ public final class BatchEndpointInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of BatchEndpointInner class. @@ -89,44 +88,44 @@ public BatchEndpointInner withProperties(BatchEndpointProperties properties) { } /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - public String kind() { - return this.kind; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param kind the kind value to set. + * @param identity the identity value to set. * @return the BatchEndpointInner object itself. */ - public BatchEndpointInner withKind(String kind) { - this.kind = kind; + public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public String kind() { + return this.kind; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @param identity the identity value to set. + * @param kind the kind value to set. * @return the BatchEndpointInner object itself. */ - public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public BatchEndpointInner withKind(String kind) { + this.kind = kind; return this; } @@ -160,13 +159,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,13 +179,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -207,28 +206,6 @@ public BatchEndpointInner withTags(Map tags) { 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 BatchEndpointInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointInner.class); - /** * {@inheritDoc} */ @@ -238,8 +215,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -273,10 +250,10 @@ public static BatchEndpointInner fromJson(JsonReader jsonReader) throws IOExcept deserializedBatchEndpointInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBatchEndpointInner.properties = BatchEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedBatchEndpointInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedBatchEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedBatchEndpointInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedBatchEndpointInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java new file mode 100644 index 000000000000..65cd22b718a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.CapabilityHostProperties; +import java.io.IOException; + +/** + * Azure Resource Manager resource envelope. + */ +@Fluent +public final class CapabilityHostInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + private CapabilityHostProperties 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 CapabilityHostInner class. + */ + public CapabilityHostInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public CapabilityHostProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the CapabilityHostInner object itself. + */ + public CapabilityHostInner withProperties(CapabilityHostProperties 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapabilityHostInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityHostInner 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 CapabilityHostInner. + */ + public static CapabilityHostInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityHostInner deserializedCapabilityHostInner = new CapabilityHostInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCapabilityHostInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCapabilityHostInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCapabilityHostInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCapabilityHostInner.properties = CapabilityHostProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCapabilityHostInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityHostInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java index 3529474f10de..7bac8fe4bdc1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -48,17 +48,6 @@ public ClusterUpdateProperties withProperties(ScaleSettingsInformation propertie return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java index 81ef24936822..73c7f9c68409 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class CodeContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class CodeContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CodeContainerInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,31 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 CodeContainerInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(CodeContainerInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java index 5b0d8710edc0..ee7ec995964b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class CodeVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class CodeVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CodeVersionInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,31 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 CodeVersionInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(CodeVersionInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java index 0168e82327e5..2320d148aeba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class ComponentContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class ComponentContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ComponentContainerInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 ComponentContainerInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainerInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java index fbe9071c6c41..0c2600686143 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class ComponentVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class ComponentVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ComponentVersionInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 ComponentVersionInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(ComponentVersionInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java index 9885a5d752a7..d7bdcf136d05 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -22,9 +22,9 @@ @Fluent public final class ComputeResourceInner extends ProxyResource { /* - * The identity of the resource. + * The resource-specific properties for this resource. */ - private ManagedServiceIdentity identity; + private Compute properties; /* * Specifies the location of the resource. @@ -42,19 +42,19 @@ public final class ComputeResourceInner extends ProxyResource { private Sku sku; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The identity of the resource. */ - private SystemData systemData; + private ManagedServiceIdentity identity; /* - * Compute properties + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - private Compute properties; + private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -62,9 +62,9 @@ public final class ComputeResourceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ComputeResourceInner class. @@ -73,22 +73,22 @@ public ComputeResourceInner() { } /** - * Get the identity property: The identity of the resource. + * Get the properties property: The resource-specific properties for this resource. * - * @return the identity value. + * @return the properties value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public Compute properties() { + return this.properties; } /** - * Set the identity property: The identity of the resource. + * Set the properties property: The resource-specific properties for this resource. * - * @param identity the identity value to set. + * @param properties the properties value to set. * @return the ComputeResourceInner object itself. */ - public ComputeResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public ComputeResourceInner withProperties(Compute properties) { + this.properties = properties; return this; } @@ -153,42 +153,42 @@ public ComputeResourceInner withSku(Sku sku) { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the identity property: The identity of the resource. * - * @return the systemData value. + * @return the identity value. */ - public SystemData systemData() { - return this.systemData; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Get the properties property: Compute properties. + * Set the identity property: The identity of the resource. * - * @return the properties value. + * @param identity the identity value to set. + * @return the ComputeResourceInner object itself. */ - public Compute properties() { - return this.properties; + public ComputeResourceInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; } /** - * Set the properties property: Compute properties. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param properties the properties value to set. - * @return the ComputeResourceInner object itself. + * @return the systemData value. */ - public ComputeResourceInner withProperties(Compute properties) { - this.properties = properties; - return this; + public SystemData systemData() { + return this.systemData; } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -202,30 +202,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - if (properties() != null) { - properties().validate(); - } + public String id() { + return this.id; } /** @@ -234,11 +217,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.properties); jsonWriter.writeStringField("location", this.location); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -264,8 +247,8 @@ public static ComputeResourceInner fromJson(JsonReader jsonReader) throws IOExce deserializedComputeResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedComputeResourceInner.type = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedComputeResourceInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedComputeResourceInner.properties = Compute.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedComputeResourceInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { @@ -273,10 +256,10 @@ public static ComputeResourceInner fromJson(JsonReader jsonReader) throws IOExce deserializedComputeResourceInner.tags = tags; } else if ("sku".equals(fieldName)) { deserializedComputeResourceInner.sku = Sku.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedComputeResourceInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedComputeResourceInner.systemData = SystemData.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedComputeResourceInner.properties = Compute.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java index 3d620290a0ee..aa11f0fe7b48 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.AksComputeSecrets; +import com.azure.resourcemanager.machinelearning.models.AKSComputeSecrets; import com.azure.resourcemanager.machinelearning.models.ComputeType; import com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets; import com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets; @@ -28,7 +28,7 @@ public class ComputeSecretsInner implements JsonSerializable { + /* + * Gets or sets actual instance count. + */ + private Integer actualInstanceCount; + + /* + * Gets or sets dictionary representing modelID and its current state. + */ + private Map> deltaModels; + + /* + * Gets or sets expected instance count. + */ + private Integer expectedInstanceCount; + + /* + * Gets or sets revision ID. + */ + private String revisionId; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelStatusResponseInner class. + */ + private DeltaModelStatusResponseInner() { + } + + /** + * Get the actualInstanceCount property: Gets or sets actual instance count. + * + * @return the actualInstanceCount value. + */ + public Integer actualInstanceCount() { + return this.actualInstanceCount; + } + + /** + * Get the deltaModels property: Gets or sets dictionary representing modelID and its current state. + * + * @return the deltaModels value. + */ + public Map> deltaModels() { + return this.deltaModels; + } + + /** + * Get the expectedInstanceCount property: Gets or sets expected instance count. + * + * @return the expectedInstanceCount value. + */ + public Integer expectedInstanceCount() { + return this.expectedInstanceCount; + } + + /** + * Get the revisionId property: Gets or sets revision ID. + * + * @return the revisionId value. + */ + public String revisionId() { + return this.revisionId; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("actualInstanceCount", this.actualInstanceCount); + jsonWriter.writeMapField("deltaModels", this.deltaModels, + (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeJson(element1))); + jsonWriter.writeNumberField("expectedInstanceCount", this.expectedInstanceCount); + jsonWriter.writeStringField("revisionId", this.revisionId); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelStatusResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelStatusResponseInner 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 DeltaModelStatusResponseInner. + */ + public static DeltaModelStatusResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelStatusResponseInner deserializedDeltaModelStatusResponseInner + = new DeltaModelStatusResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actualInstanceCount".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.actualInstanceCount + = reader.getNullable(JsonReader::getInt); + } else if ("deltaModels".equals(fieldName)) { + Map> deltaModels = reader + .readMap(reader1 -> reader1.readArray(reader2 -> DeltaModelCurrentState.fromJson(reader2))); + deserializedDeltaModelStatusResponseInner.deltaModels = deltaModels; + } else if ("expectedInstanceCount".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.expectedInstanceCount + = reader.getNullable(JsonReader::getInt); + } else if ("revisionId".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.revisionId = reader.getString(); + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelStatusResponseInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java index 532f61f4d78c..f9d876d3656b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The DeploymentLogs model. */ -@Fluent +@Immutable public final class DeploymentLogsInner implements JsonSerializable { /* * The retrieved online deployment logs. @@ -24,7 +24,7 @@ public final class DeploymentLogsInner implements JsonSerializable { /* * The value property. @@ -25,7 +25,7 @@ public final class DiagnoseResponseResultInner implements JsonSerializable { /* * Access token for endpoint authentication. */ private String accessToken; - /* - * Access token type. - */ - private String tokenType; - /* * Access token expiry time (UTC). */ @@ -36,10 +31,15 @@ public final class EndpointAuthTokenInner implements JsonSerializable { + EndpointDeploymentResourcePropertiesBasicResourceInner deserializedEndpointDeploymentResourcePropertiesBasicResourceInner + = new EndpointDeploymentResourcePropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.properties + = EndpointDeploymentResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.systemData + = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentResourcePropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java new file mode 100644 index 000000000000..dae8520752e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EndpointKeys model. + */ +@Immutable +public final class EndpointKeysInner implements JsonSerializable { + /* + * Dictionary of Keys for the endpoint. + */ + private AccountApiKeysInner keys; + + /** + * Creates an instance of EndpointKeysInner class. + */ + private EndpointKeysInner() { + } + + /** + * Get the keys property: Dictionary of Keys for the endpoint. + * + * @return the keys value. + */ + public AccountApiKeysInner keys() { + return this.keys; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("keys", this.keys); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointKeysInner 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 EndpointKeysInner. + */ + public static EndpointKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointKeysInner deserializedEndpointKeysInner = new EndpointKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keys".equals(fieldName)) { + deserializedEndpointKeysInner.keys = AccountApiKeysInner.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointKeysInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java new file mode 100644 index 000000000000..1a2eba841f6c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModelSkuProperties; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Endpoint Model properties. + */ +@Immutable +public final class EndpointModelPropertiesInner implements JsonSerializable { + /* + * The capabilities. + */ + private Map capabilities; + + /* + * The deprecation property. + */ + private EndpointModelDeprecationProperties deprecation; + + /* + * The capabilities for finetune models. + */ + private Map finetuneCapabilities; + + /* + * Deployment model format. + */ + private String format; + + /* + * If the model is default version. + */ + private Boolean isDefaultVersion; + + /* + * Model lifecycle status. + */ + private ModelLifecycleStatus lifecycleStatus; + + /* + * The max capacity. + */ + private Integer maxCapacity; + + /* + * Deployment model name. + */ + private String name; + + /* + * The list of Model Sku. + */ + private List skus; + + /* + * The systemData property. + */ + private SystemData systemData; + + /* + * Optional. Deployment model version. If version is not specified, a default version will be assigned. The default + * version is different for different models and might change when there is new version available for a model. + * Default version for a model could be found from list models API. + */ + private String version; + + /** + * Creates an instance of EndpointModelPropertiesInner class. + */ + private EndpointModelPropertiesInner() { + } + + /** + * Get the capabilities property: The capabilities. + * + * @return the capabilities value. + */ + public Map capabilities() { + return this.capabilities; + } + + /** + * Get the deprecation property: The deprecation property. + * + * @return the deprecation value. + */ + public EndpointModelDeprecationProperties deprecation() { + return this.deprecation; + } + + /** + * Get the finetuneCapabilities property: The capabilities for finetune models. + * + * @return the finetuneCapabilities value. + */ + public Map finetuneCapabilities() { + return this.finetuneCapabilities; + } + + /** + * Get the format property: Deployment model format. + * + * @return the format value. + */ + public String format() { + return this.format; + } + + /** + * Get the isDefaultVersion property: If the model is default version. + * + * @return the isDefaultVersion value. + */ + public Boolean isDefaultVersion() { + return this.isDefaultVersion; + } + + /** + * Get the lifecycleStatus property: Model lifecycle status. + * + * @return the lifecycleStatus value. + */ + public ModelLifecycleStatus lifecycleStatus() { + return this.lifecycleStatus; + } + + /** + * Get the maxCapacity property: The max capacity. + * + * @return the maxCapacity value. + */ + public Integer maxCapacity() { + return this.maxCapacity; + } + + /** + * Get the name property: Deployment model name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the skus property: The list of Model Sku. + * + * @return the skus value. + */ + public List skus() { + return this.skus; + } + + /** + * Get the systemData property: The systemData property. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the version property: Optional. Deployment model version. If version is not specified, a default version will + * be assigned. The default version is different for different models and might change when there is new version + * available for a model. Default version for a model could be found from list models API. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("capabilities", this.capabilities, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("deprecation", this.deprecation); + jsonWriter.writeMapField("finetuneCapabilities", this.finetuneCapabilities, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("format", this.format); + jsonWriter.writeBooleanField("isDefaultVersion", this.isDefaultVersion); + jsonWriter.writeStringField("lifecycleStatus", + this.lifecycleStatus == null ? null : this.lifecycleStatus.toString()); + jsonWriter.writeNumberField("maxCapacity", this.maxCapacity); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("skus", this.skus, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("systemData", this.systemData); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelPropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelPropertiesInner 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 EndpointModelPropertiesInner. + */ + public static EndpointModelPropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelPropertiesInner deserializedEndpointModelPropertiesInner = new EndpointModelPropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capabilities".equals(fieldName)) { + Map capabilities = reader.readMap(reader1 -> reader1.getString()); + deserializedEndpointModelPropertiesInner.capabilities = capabilities; + } else if ("deprecation".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.deprecation + = EndpointModelDeprecationProperties.fromJson(reader); + } else if ("finetuneCapabilities".equals(fieldName)) { + Map finetuneCapabilities = reader.readMap(reader1 -> reader1.getString()); + deserializedEndpointModelPropertiesInner.finetuneCapabilities = finetuneCapabilities; + } else if ("format".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.format = reader.getString(); + } else if ("isDefaultVersion".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("lifecycleStatus".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.lifecycleStatus + = ModelLifecycleStatus.fromString(reader.getString()); + } else if ("maxCapacity".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.maxCapacity = reader.getNullable(JsonReader::getInt); + } else if ("name".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.name = reader.getString(); + } else if ("skus".equals(fieldName)) { + List skus + = reader.readArray(reader1 -> EndpointModelSkuProperties.fromJson(reader1)); + deserializedEndpointModelPropertiesInner.skus = skus; + } else if ("systemData".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.systemData = SystemData.fromJson(reader); + } else if ("version".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelPropertiesInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java new file mode 100644 index 000000000000..9b41a46354b0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Paged collection of EndpointModelProperties items. + */ +@Immutable +public final class EndpointModelsInner implements JsonSerializable { + /* + * The EndpointModelProperties items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of EndpointModelsInner class. + */ + private EndpointModelsInner() { + } + + /** + * Get the value property: The EndpointModelProperties items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 EndpointModelsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelsInner 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 EndpointModelsInner. + */ + public static EndpointModelsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelsInner deserializedEndpointModelsInner = new EndpointModelsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EndpointModelPropertiesInner.fromJson(reader1)); + deserializedEndpointModelsInner.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEndpointModelsInner.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelsInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java index 3ed8cb7b4073..30da1f731fa6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,11 +18,24 @@ */ @Fluent public class EndpointPropertiesBaseInner implements JsonSerializable { + /* + * [Required] The authentication method for invoking the endpoint (data plane operation). Use 'Key' for key-based + * authentication. Use 'AMLToken' for Azure Machine Learning token-based authentication. Use 'AADToken' for + * Microsoft Entra token-based authentication. + */ + private EndpointAuthMode authMode; + /* * Description of the inference endpoint. */ private String description; + /* + * EndpointAuthKeys to set initially on an Endpoint. + * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + */ + private EndpointAuthKeysInner keys; + /* * Property dictionary. Properties can be added, but not removed or altered. */ @@ -39,22 +51,34 @@ public class EndpointPropertiesBaseInner implements JsonSerializable writer.writeString(element)); jsonWriter.writeJsonField("keys", this.keys); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -232,6 +216,8 @@ public static EndpointPropertiesBaseInner fromJson(JsonReader jsonReader) throws deserializedEndpointPropertiesBaseInner.authMode = EndpointAuthMode.fromString(reader.getString()); } else if ("description".equals(fieldName)) { deserializedEndpointPropertiesBaseInner.description = reader.getString(); + } else if ("keys".equals(fieldName)) { + deserializedEndpointPropertiesBaseInner.keys = EndpointAuthKeysInner.fromJson(reader); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedEndpointPropertiesBaseInner.properties = properties; @@ -239,8 +225,6 @@ public static EndpointPropertiesBaseInner fromJson(JsonReader jsonReader) throws deserializedEndpointPropertiesBaseInner.scoringUri = reader.getString(); } else if ("swaggerUri".equals(fieldName)) { deserializedEndpointPropertiesBaseInner.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedEndpointPropertiesBaseInner.keys = EndpointAuthKeysInner.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java new file mode 100644 index 000000000000..25f0443c0a86 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.EndpointResourceProperties; +import java.io.IOException; + +/** + * EndpointResourcePropertiesBasicResource is a preview-only resource. + */ +@Fluent +public final class EndpointResourcePropertiesBasicResourceInner extends ProxyResource { + /* + * The properties property. + */ + private EndpointResourceProperties 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 EndpointResourcePropertiesBasicResourceInner class. + */ + public EndpointResourcePropertiesBasicResourceInner() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public EndpointResourceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties property. + * + * @param properties the properties value to set. + * @return the EndpointResourcePropertiesBasicResourceInner object itself. + */ + public EndpointResourcePropertiesBasicResourceInner withProperties(EndpointResourceProperties 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointResourcePropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointResourcePropertiesBasicResourceInner 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 EndpointResourcePropertiesBasicResourceInner. + */ + public static EndpointResourcePropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointResourcePropertiesBasicResourceInner deserializedEndpointResourcePropertiesBasicResourceInner + = new EndpointResourcePropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.properties + = EndpointResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointResourcePropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java index 988eef2ab7d4..460019a56f78 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class EnvironmentContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class EnvironmentContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of EnvironmentContainerInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 EnvironmentContainerInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainerInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java index 479e58bf0248..2acac3b37970 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class EnvironmentVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class EnvironmentVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of EnvironmentVersionInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 EnvironmentVersionInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java index 1ddfcb011592..e5ccad562974 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java @@ -1,32 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; +import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag; import java.io.IOException; import java.util.List; /** * The ExternalFqdnResponse model. */ -@Fluent +@Immutable public final class ExternalFqdnResponseInner implements JsonSerializable { /* * The value property. */ - private List value; + private List value; /** * Creates an instance of ExternalFqdnResponseInner class. */ - public ExternalFqdnResponseInner() { + private ExternalFqdnResponseInner() { } /** @@ -34,32 +34,10 @@ public ExternalFqdnResponseInner() { * * @return the value value. */ - public List value() { + public List value() { return this.value; } - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ExternalFqdnResponseInner object itself. - */ - public ExternalFqdnResponseInner withValue(List value) { - this.value = value; - 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} */ @@ -86,7 +64,8 @@ public static ExternalFqdnResponseInner fromJson(JsonReader jsonReader) throws I reader.nextToken(); if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> FqdnEndpoints.fromJson(reader1)); + List value + = reader.readArray(reader1 -> FqdnEndpointsPropertyBag.fromJson(reader1)); deserializedExternalFqdnResponseInner.value = value; } else { reader.skipChildren(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java index 5fab82ad54b0..99e00173542f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,7 +16,7 @@ /** * Azure Resource Manager resource envelope. */ -@Fluent +@Immutable public final class FeatureInner extends ProxyResource { /* * [Required] Additional attributes of the entity. @@ -30,9 +29,9 @@ public final class FeatureInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,14 +39,14 @@ public final class FeatureInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeatureInner class. */ - public FeatureInner() { + private FeatureInner() { } /** @@ -59,17 +58,6 @@ public FeatureProperties properties() { return this.properties; } - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the FeatureInner object itself. - */ - public FeatureInner withProperties(FeatureProperties properties) { - this.properties = properties; - return this; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -80,13 +68,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,31 +88,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 FeatureInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(FeatureInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java index 75e459199aec..aa3b07aeae0e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class FeaturesetContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class FeaturesetContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturesetContainerInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 FeaturesetContainerInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(FeaturesetContainerInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java index 24b63beb85cb..566dd038188b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Response payload for creating a backfill request for a given feature set version. */ -@Fluent +@Immutable public final class FeaturesetVersionBackfillResponseInner implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class FeaturesetVersionBackfillResponseInner /** * Creates an instance of FeaturesetVersionBackfillResponseInner class. */ - public FeaturesetVersionBackfillResponseInner() { + private FeaturesetVersionBackfillResponseInner() { } /** @@ -38,25 +38,6 @@ public List jobIds() { return this.jobIds; } - /** - * Set the jobIds property: List of jobs submitted as part of the backfill request. - * - * @param jobIds the jobIds value to set. - * @return the FeaturesetVersionBackfillResponseInner object itself. - */ - public FeaturesetVersionBackfillResponseInner withJobIds(List jobIds) { - this.jobIds = jobIds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java index 68b3d08df57c..b0658d197ad5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class FeaturesetVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class FeaturesetVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturesetVersionInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 FeaturesetVersionInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(FeaturesetVersionInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java index 3cff75870f94..94c1b6980fe3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class FeaturestoreEntityContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class FeaturestoreEntityContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturestoreEntityContainerInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 FeaturestoreEntityContainerInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityContainerInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java index 1c8eee3d76d3..383a170f7849 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class FeaturestoreEntityVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class FeaturestoreEntityVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturestoreEntityVersionInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 FeaturestoreEntityVersionInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(FeaturestoreEntityVersionInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java index fa2ad37f6857..0d72fd3e89b0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * BlobReferenceSASResponse for getBlobReferenceSAS API. */ -@Fluent +@Immutable public final class GetBlobReferenceSasResponseDtoInner implements JsonSerializable { /* @@ -26,7 +26,7 @@ public final class GetBlobReferenceSasResponseDtoInner /** * Creates an instance of GetBlobReferenceSasResponseDtoInner class. */ - public GetBlobReferenceSasResponseDtoInner() { + private GetBlobReferenceSasResponseDtoInner() { } /** @@ -38,29 +38,6 @@ public GetBlobReferenceForConsumptionDto blobReferenceForConsumption() { return this.blobReferenceForConsumption; } - /** - * Set the blobReferenceForConsumption property: Blob reference for consumption details. - * - * @param blobReferenceForConsumption the blobReferenceForConsumption value to set. - * @return the GetBlobReferenceSasResponseDtoInner object itself. - */ - public GetBlobReferenceSasResponseDtoInner - withBlobReferenceForConsumption(GetBlobReferenceForConsumptionDto blobReferenceForConsumption) { - this.blobReferenceForConsumption = blobReferenceForConsumption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (blobReferenceForConsumption() != null) { - blobReferenceForConsumption().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java new file mode 100644 index 000000000000..b9b0c07a7953 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo; +import java.io.IOException; + +/** + * The GroupStatus model. + */ +@Immutable +public final class GroupStatusInner implements JsonSerializable { + /* + * Gets or sets the actual capacity info for the group. + */ + private ActualCapacityInfo actualCapacityInfo; + + /* + * Gets or sets the actual number of endpoints in the group. + */ + private Integer endpointCount; + + /* + * Gets or sets the request number of instances for the group. + */ + private Integer requestedCapacity; + + /** + * Creates an instance of GroupStatusInner class. + */ + private GroupStatusInner() { + } + + /** + * Get the actualCapacityInfo property: Gets or sets the actual capacity info for the group. + * + * @return the actualCapacityInfo value. + */ + public ActualCapacityInfo actualCapacityInfo() { + return this.actualCapacityInfo; + } + + /** + * Get the endpointCount property: Gets or sets the actual number of endpoints in the group. + * + * @return the endpointCount value. + */ + public Integer endpointCount() { + return this.endpointCount; + } + + /** + * Get the requestedCapacity property: Gets or sets the request number of instances for the group. + * + * @return the requestedCapacity value. + */ + public Integer requestedCapacity() { + return this.requestedCapacity; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("actualCapacityInfo", this.actualCapacityInfo); + jsonWriter.writeNumberField("endpointCount", this.endpointCount); + jsonWriter.writeNumberField("requestedCapacity", this.requestedCapacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupStatusInner 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 GroupStatusInner. + */ + public static GroupStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GroupStatusInner deserializedGroupStatusInner = new GroupStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actualCapacityInfo".equals(fieldName)) { + deserializedGroupStatusInner.actualCapacityInfo = ActualCapacityInfo.fromJson(reader); + } else if ("endpointCount".equals(fieldName)) { + deserializedGroupStatusInner.endpointCount = reader.getNullable(JsonReader::getInt); + } else if ("requestedCapacity".equals(fieldName)) { + deserializedGroupStatusInner.requestedCapacity = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedGroupStatusInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java new file mode 100644 index 000000000000..35a72b0fa8c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.InferenceEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * InferenceEndpoint is a preview-only resource. + */ +@Fluent +public final class InferenceEndpointInner extends Resource { + /* + * [Required] Additional attributes of the entity. + */ + private InferenceEndpointProperties properties; + + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + private String kind; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + private Sku sku; + + /* + * 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 InferenceEndpointInner class. + */ + public InferenceEndpointInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public InferenceEndpointProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the InferenceEndpointInner object itself. + */ + public InferenceEndpointInner withProperties(InferenceEndpointProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the InferenceEndpointInner object itself. + */ + public InferenceEndpointInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata 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 InferenceEndpointInner object itself. + */ + public InferenceEndpointInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the InferenceEndpointInner object itself. + */ + public InferenceEndpointInner withSku(Sku sku) { + this.sku = sku; + 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 InferenceEndpointInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceEndpointInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceEndpointInner 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 InferenceEndpointInner. + */ + public static InferenceEndpointInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceEndpointInner deserializedInferenceEndpointInner = new InferenceEndpointInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInferenceEndpointInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInferenceEndpointInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInferenceEndpointInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedInferenceEndpointInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInferenceEndpointInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedInferenceEndpointInner.properties = InferenceEndpointProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedInferenceEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedInferenceEndpointInner.kind = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedInferenceEndpointInner.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedInferenceEndpointInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceEndpointInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java new file mode 100644 index 000000000000..50c419e1c5dd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * InferenceGroup is a preview-only resource. + */ +@Fluent +public final class InferenceGroupInner extends Resource { + /* + * [Required] Additional attributes of the entity. + */ + private InferenceGroupProperties properties; + + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + private String kind; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + private Sku sku; + + /* + * 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 InferenceGroupInner class. + */ + public InferenceGroupInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public InferenceGroupProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the InferenceGroupInner object itself. + */ + public InferenceGroupInner withProperties(InferenceGroupProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the InferenceGroupInner object itself. + */ + public InferenceGroupInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata 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 InferenceGroupInner object itself. + */ + public InferenceGroupInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the InferenceGroupInner object itself. + */ + public InferenceGroupInner withSku(Sku sku) { + this.sku = sku; + 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 InferenceGroupInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceGroupInner 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 InferenceGroupInner. + */ + public static InferenceGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceGroupInner deserializedInferenceGroupInner = new InferenceGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInferenceGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInferenceGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInferenceGroupInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedInferenceGroupInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInferenceGroupInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedInferenceGroupInner.properties = InferenceGroupProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedInferenceGroupInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedInferenceGroupInner.kind = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedInferenceGroupInner.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedInferenceGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceGroupInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java new file mode 100644 index 000000000000..e373d9aae2a9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java @@ -0,0 +1,269 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * InferencePool is a preview-only resource. + */ +@Fluent +public final class InferencePoolInner extends Resource { + /* + * [Required] Additional attributes of the entity. + */ + private InferencePoolProperties properties; + + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + private String kind; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + private Sku sku; + + /* + * 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 InferencePoolInner class. + */ + public InferencePoolInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public InferencePoolProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the InferencePoolInner object itself. + */ + public InferencePoolInner withProperties(InferencePoolProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @param identity the identity value to set. + * @return the InferencePoolInner object itself. + */ + public InferencePoolInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata 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 InferencePoolInner object itself. + */ + public InferencePoolInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Get the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Sku details required for ARM contract for Autoscaling. + * + * @param sku the sku value to set. + * @return the InferencePoolInner object itself. + */ + public InferencePoolInner withSku(Sku sku) { + this.sku = sku; + 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 InferencePoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferencePoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferencePoolInner 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 InferencePoolInner. + */ + public static InferencePoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferencePoolInner deserializedInferencePoolInner = new InferencePoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInferencePoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInferencePoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInferencePoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedInferencePoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInferencePoolInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedInferencePoolInner.properties = InferencePoolProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedInferencePoolInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedInferencePoolInner.kind = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedInferencePoolInner.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedInferencePoolInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferencePoolInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java index f9f23857c3dc..b44035c5b7c1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class JobBaseInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class JobBaseInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of JobBaseInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,31 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 JobBaseInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(JobBaseInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java index e6f115efc86a..22aeaff3d77e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -17,23 +17,23 @@ @Immutable public final class ListNotebookKeysResultInner implements JsonSerializable { /* - * The primaryAccessKey property. + * The primary access key of the Notebook */ private String primaryAccessKey; /* - * The secondaryAccessKey property. + * The secondary access key of the Notebook */ private String secondaryAccessKey; /** * Creates an instance of ListNotebookKeysResultInner class. */ - public ListNotebookKeysResultInner() { + private ListNotebookKeysResultInner() { } /** - * Get the primaryAccessKey property: The primaryAccessKey property. + * Get the primaryAccessKey property: The primary access key of the Notebook. * * @return the primaryAccessKey value. */ @@ -42,7 +42,7 @@ public String primaryAccessKey() { } /** - * Get the secondaryAccessKey property: The secondaryAccessKey property. + * Get the secondaryAccessKey property: The secondary access key of the Notebook. * * @return the secondaryAccessKey value. */ @@ -50,14 +50,6 @@ public String secondaryAccessKey() { return this.secondaryAccessKey; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java index 6a4fbb94a968..c1abb981e45a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -17,18 +17,18 @@ @Immutable public final class ListStorageAccountKeysResultInner implements JsonSerializable { /* - * The userStorageKey property. + * The access key of the storage */ private String userStorageKey; /** * Creates an instance of ListStorageAccountKeysResultInner class. */ - public ListStorageAccountKeysResultInner() { + private ListStorageAccountKeysResultInner() { } /** - * Get the userStorageKey property: The userStorageKey property. + * Get the userStorageKey property: The access key of the storage. * * @return the userStorageKey value. */ @@ -36,14 +36,6 @@ public String userStorageKey() { return this.userStorageKey; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java index ce6ca9d857d1..1e5c605dfe6e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -18,17 +18,7 @@ @Immutable public final class ListWorkspaceKeysResultInner implements JsonSerializable { /* - * The userStorageKey property. - */ - private String userStorageKey; - - /* - * The userStorageResourceId property. - */ - private String userStorageResourceId; - - /* - * The appInsightsInstrumentationKey property. + * The access key of the workspace app insights */ private String appInsightsInstrumentationKey; @@ -42,32 +32,24 @@ public final class ListWorkspaceKeysResultInner implements JsonSerializable { + ManagedNetworkSettingsBasicResourceInner deserializedManagedNetworkSettingsBasicResourceInner + = new ManagedNetworkSettingsBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedNetworkSettingsBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedNetworkSettingsBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedNetworkSettingsBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedNetworkSettingsBasicResourceInner.properties + = ManagedNetworkSettingsInner.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedManagedNetworkSettingsBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNetworkSettingsBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java index 288819df29d0..9a0fb954386d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -9,7 +9,9 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; import com.azure.resourcemanager.machinelearning.models.OutboundRule; import java.io.IOException; import java.util.Map; @@ -18,7 +20,12 @@ * Managed Network settings for a machine learning workspace. */ @Fluent -public final class ManagedNetworkSettingsInner implements JsonSerializable { +public class ManagedNetworkSettingsInner implements JsonSerializable { + /* + * A flag to indicate if monitoring needs to be enabled for the managed network. + */ + private Boolean enableNetworkMonitor; + /* * Isolation mode for the managed network of a machine learning workspace. */ @@ -39,12 +46,50 @@ public final class ManagedNetworkSettingsInner implements JsonSerializable { - if (e != null) { - e.validate(); - } - }); - } - if (status() != null) { - status().validate(); - } + public FirewallSku firewallSku() { + return this.firewallSku; + } + + /** + * Set the firewallSku property: Firewall Sku used for FQDN Rules. + * + * @param firewallSku the firewallSku value to set. + * @return the ManagedNetworkSettingsInner object itself. + */ + public ManagedNetworkSettingsInner withFirewallSku(FirewallSku firewallSku) { + this.firewallSku = firewallSku; + return this; + } + + /** + * Get the managedNetworkKind property: The Kind of the managed network. Users can switch from V1 to V2 for granular + * access controls, but cannot switch back to V1 once V2 is enabled. + * + * @return the managedNetworkKind value. + */ + public ManagedNetworkKind managedNetworkKind() { + return this.managedNetworkKind; + } + + /** + * Set the managedNetworkKind property: The Kind of the managed network. Users can switch from V1 to V2 for granular + * access controls, but cannot switch back to V1 once V2 is enabled. + * + * @param managedNetworkKind the managedNetworkKind value to set. + * @return the ManagedNetworkSettingsInner object itself. + */ + public ManagedNetworkSettingsInner withManagedNetworkKind(ManagedNetworkKind managedNetworkKind) { + this.managedNetworkKind = managedNetworkKind; + return this; + } + + /** + * Get the firewallPublicIpAddress property: Public IP address assigned to the Azure Firewall. + * + * @return the firewallPublicIpAddress value. + */ + public String firewallPublicIpAddress() { + return this.firewallPublicIpAddress; + } + + /** + * Set the firewallPublicIpAddress property: Public IP address assigned to the Azure Firewall. + * + * @param firewallPublicIpAddress the firewallPublicIpAddress value to set. + * @return the ManagedNetworkSettingsInner object itself. + */ + ManagedNetworkSettingsInner withFirewallPublicIpAddress(String firewallPublicIpAddress) { + this.firewallPublicIpAddress = firewallPublicIpAddress; + return this; } /** @@ -138,9 +238,13 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableNetworkMonitor", this.enableNetworkMonitor); jsonWriter.writeStringField("isolationMode", this.isolationMode == null ? null : this.isolationMode.toString()); jsonWriter.writeMapField("outboundRules", this.outboundRules, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("status", this.status); + jsonWriter.writeStringField("firewallSku", this.firewallSku == null ? null : this.firewallSku.toString()); + jsonWriter.writeStringField("managedNetworkKind", + this.managedNetworkKind == null ? null : this.managedNetworkKind.toString()); return jsonWriter.writeEndObject(); } @@ -159,7 +263,10 @@ public static ManagedNetworkSettingsInner fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("isolationMode".equals(fieldName)) { + if ("enableNetworkMonitor".equals(fieldName)) { + deserializedManagedNetworkSettingsInner.enableNetworkMonitor + = reader.getNullable(JsonReader::getBoolean); + } else if ("isolationMode".equals(fieldName)) { deserializedManagedNetworkSettingsInner.isolationMode = IsolationMode.fromString(reader.getString()); } else if ("networkId".equals(fieldName)) { @@ -170,6 +277,13 @@ public static ManagedNetworkSettingsInner fromJson(JsonReader jsonReader) throws } else if ("status".equals(fieldName)) { deserializedManagedNetworkSettingsInner.status = ManagedNetworkProvisionStatusInner.fromJson(reader); + } else if ("firewallSku".equals(fieldName)) { + deserializedManagedNetworkSettingsInner.firewallSku = FirewallSku.fromString(reader.getString()); + } else if ("managedNetworkKind".equals(fieldName)) { + deserializedManagedNetworkSettingsInner.managedNetworkKind + = ManagedNetworkKind.fromString(reader.getString()); + } else if ("firewallPublicIpAddress".equals(fieldName)) { + deserializedManagedNetworkSettingsInner.firewallPublicIpAddress = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java new file mode 100644 index 000000000000..926d78567826 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.ManagedNetworkSettingsProperties; +import java.io.IOException; + +/** + * ManagedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ +@Fluent +public final class ManagedNetworkSettingsPropertiesBasicResourceInner extends ProxyResource { + /* + * The properties of the managed network settings of a machine learning workspace. + */ + private ManagedNetworkSettingsProperties 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 ManagedNetworkSettingsPropertiesBasicResourceInner class. + */ + public ManagedNetworkSettingsPropertiesBasicResourceInner() { + } + + /** + * Get the properties property: The properties of the managed network settings of a machine learning workspace. + * + * @return the properties value. + */ + public ManagedNetworkSettingsProperties properties() { + return this.properties; + } + + /** + * Set the properties property: The properties of the managed network settings of a machine learning workspace. + * + * @param properties the properties value to set. + * @return the ManagedNetworkSettingsPropertiesBasicResourceInner object itself. + */ + public ManagedNetworkSettingsPropertiesBasicResourceInner + withProperties(ManagedNetworkSettingsProperties 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedNetworkSettingsPropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNetworkSettingsPropertiesBasicResourceInner 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 ManagedNetworkSettingsPropertiesBasicResourceInner. + */ + public static ManagedNetworkSettingsPropertiesBasicResourceInner fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + ManagedNetworkSettingsPropertiesBasicResourceInner deserializedManagedNetworkSettingsPropertiesBasicResourceInner + = new ManagedNetworkSettingsPropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedManagedNetworkSettingsPropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedManagedNetworkSettingsPropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedManagedNetworkSettingsPropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedManagedNetworkSettingsPropertiesBasicResourceInner.properties + = ManagedNetworkSettingsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedManagedNetworkSettingsPropertiesBasicResourceInner.systemData + = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNetworkSettingsPropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java index 600c30acbe36..267f5c373943 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class MarketplaceSubscriptionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class MarketplaceSubscriptionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of MarketplaceSubscriptionInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 MarketplaceSubscriptionInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java index 1bd535de9b53..52bcbe39c32d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class ModelContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class ModelContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ModelContainerInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,31 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 ModelContainerInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(ModelContainerInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java index 7f2f08e98758..bc224b0b14ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -30,9 +29,9 @@ public final class ModelVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class ModelVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ModelVersionInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,31 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 ModelVersionInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(ModelVersionInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java index 92e2d3d03636..aa30f245fe36 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -17,34 +17,29 @@ @Immutable public final class NotebookAccessTokenResultInner implements JsonSerializable { /* - * The notebookResourceId property. - */ - private String notebookResourceId; - - /* - * The hostName property. + * The accessToken property. */ - private String hostname; + private String accessToken; /* - * The publicDns property. + * The expiresIn property. */ - private String publicDns; + private Integer expiresIn; /* - * The accessToken property. + * The hostName property. */ - private String accessToken; + private String hostname; /* - * The tokenType property. + * The notebookResourceId property. */ - private String tokenType; + private String notebookResourceId; /* - * The expiresIn property. + * The publicDns property. */ - private Integer expiresIn; + private String publicDns; /* * The refreshToken property. @@ -56,64 +51,60 @@ public final class NotebookAccessTokenResultInner implements JsonSerializable { /* * The fqdn property. @@ -23,19 +23,24 @@ public final class NotebookResourceInfoInner implements JsonSerializable tags) { 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 OnlineDeploymentInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineDeploymentInner.class); - /** * {@inheritDoc} */ @@ -239,8 +215,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -274,10 +250,10 @@ public static OnlineDeploymentInner fromJson(JsonReader jsonReader) throws IOExc deserializedOnlineDeploymentInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedOnlineDeploymentInner.properties = OnlineDeploymentProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedOnlineDeploymentInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedOnlineDeploymentInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedOnlineDeploymentInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedOnlineDeploymentInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java index 7170897d2235..1c7d14bdb1a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,7 +17,7 @@ import java.util.Map; /** - * The OnlineEndpoint model. + * Concrete tracked resource types can be created by aliasing this type using a specific property type. */ @Fluent public final class OnlineEndpointInner extends Resource { @@ -28,14 +27,14 @@ public final class OnlineEndpointInner extends Resource { private OnlineEndpointProperties properties; /* - * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + * Managed service identity (system assigned and/or user assigned identities) */ - private String kind; + private ManagedServiceIdentity identity; /* - * Managed service identity (system assigned and/or user assigned identities) + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. */ - private ManagedServiceIdentity identity; + private String kind; /* * Sku details required for ARM contract for Autoscaling. @@ -48,9 +47,9 @@ public final class OnlineEndpointInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -58,9 +57,9 @@ public final class OnlineEndpointInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of OnlineEndpointInner class. @@ -89,44 +88,44 @@ public OnlineEndpointInner withProperties(OnlineEndpointProperties properties) { } /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - public String kind() { - return this.kind; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param kind the kind value to set. + * @param identity the identity value to set. * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointInner withKind(String kind) { - this.kind = kind; + public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public String kind() { + return this.kind; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @param identity the identity value to set. + * @param kind the kind value to set. * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public OnlineEndpointInner withKind(String kind) { + this.kind = kind; return this; } @@ -160,13 +159,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,13 +179,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -207,28 +206,6 @@ public OnlineEndpointInner withTags(Map tags) { 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 OnlineEndpointInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointInner.class); - /** * {@inheritDoc} */ @@ -238,8 +215,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -273,10 +250,10 @@ public static OnlineEndpointInner fromJson(JsonReader jsonReader) throws IOExcep deserializedOnlineEndpointInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedOnlineEndpointInner.properties = OnlineEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedOnlineEndpointInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedOnlineEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedOnlineEndpointInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedOnlineEndpointInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java index 84135d31bcfa..20afa1714744 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ * * Details of a REST API operation, returned from the Resource Provider Operations API. */ -@Fluent +@Immutable public final class OperationInner implements JsonSerializable { /* * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: @@ -28,8 +28,8 @@ public final class OperationInner implements JsonSerializable { private String name; /* - * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for - * ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure + * Resource Manager/control-plane operations. */ private Boolean isDataAction; @@ -45,14 +45,14 @@ public final class OperationInner implements JsonSerializable { private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ private ActionType actionType; /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** @@ -67,7 +67,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -84,17 +84,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: Localized display information for this particular operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". @@ -106,8 +95,8 @@ public Origin origin() { } /** - * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ @@ -115,17 +104,6 @@ public ActionType actionType() { return this.actionType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java index 6795602d33bb..76940e142a58 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -15,7 +14,7 @@ import java.io.IOException; /** - * Outbound Rule Basic Resource for the managed network of a machine learning workspace. + * Concrete proxy resource types can be created by aliasing this type using a specific property type. */ @Fluent public final class OutboundRuleBasicResourceInner extends ProxyResource { @@ -30,9 +29,9 @@ public final class OutboundRuleBasicResourceInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class OutboundRuleBasicResourceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of OutboundRuleBasicResourceInner class. @@ -80,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,32 +99,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 OutboundRuleBasicResourceInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER = new ClientLogger(OutboundRuleBasicResourceInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java index c5a5b5cf9b8f..144671a5d49d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The PendingUploadResponseDto model. */ -@Fluent +@Immutable public final class PendingUploadResponseDtoInner implements JsonSerializable { /* * Container level read, write, list SAS @@ -29,14 +29,14 @@ public final class PendingUploadResponseDtoInner implements JsonSerializable tags; + private String location; /* - * The sku of the workspace. + * The tags property. */ - private Sku sku; + private Map tags; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -54,9 +54,9 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -64,9 +64,9 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of PrivateEndpointConnectionInner class. @@ -75,7 +75,7 @@ public PrivateEndpointConnectionInner() { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: Private endpoint connection properties. * * @return the innerProperties value. */ @@ -84,7 +84,7 @@ private PrivateEndpointConnectionProperties innerProperties() { } /** - * Get the identity property: The identity of the resource. + * Get the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -93,7 +93,7 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: The identity of the resource. + * Set the identity property: The managed service identities assigned to this resource. * * @param identity the identity value to set. * @return the PrivateEndpointConnectionInner object itself. @@ -104,62 +104,64 @@ public PrivateEndpointConnectionInner withIdentity(ManagedServiceIdentity identi } /** - * Get the location property: Specifies the location of the resource. + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * - * @return the location value. + * @return the sku value. */ - public String location() { - return this.location; + public Sku sku() { + return this.sku; } /** - * Set the location property: Specifies the location of the resource. + * Set the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * - * @param location the location value to set. + * @param sku the sku value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withLocation(String location) { - this.location = location; + public PrivateEndpointConnectionInner withSku(Sku sku) { + this.sku = sku; return this; } /** - * Get the tags property: Contains resource tags defined as key/value pairs. + * Get the location property: *Same as workspace location. * - * @return the tags value. + * @return the location value. */ - public Map tags() { - return this.tags; + public String location() { + return this.location; } /** - * Set the tags property: Contains resource tags defined as key/value pairs. + * Set the location property: *Same as workspace location. * - * @param tags the tags value to set. + * @param location the location value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withTags(Map tags) { - this.tags = tags; + public PrivateEndpointConnectionInner withLocation(String location) { + this.location = location; return this; } /** - * Get the sku property: The sku of the workspace. + * Get the tags property: The tags property. * - * @return the sku value. + * @return the tags value. */ - public Sku sku() { - return this.sku; + public Map tags() { + return this.tags; } /** - * Set the sku property: The sku of the workspace. + * Set the tags property: The tags property. * - * @param sku the sku value to set. + * @param tags the tags value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withSku(Sku sku) { - this.sku = sku; + public PrivateEndpointConnectionInner withTags(Map tags) { + this.tags = tags; return this; } @@ -173,13 +175,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -193,31 +195,31 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** - * Get the privateEndpoint property: The resource of private end point. + * Get the privateEndpoint property: The privateEndpoint property. * * @return the privateEndpoint value. */ - public PrivateEndpoint privateEndpoint() { + public WorkspacePrivateEndpointResource privateEndpoint() { return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); } /** - * Set the privateEndpoint property: The resource of private end point. + * Set the privateEndpoint property: The privateEndpoint property. * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + public PrivateEndpointConnectionInner withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint) { if (this.innerProperties() == null) { this.innerProperties = new PrivateEndpointConnectionProperties(); } @@ -226,8 +228,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. + * Get the privateLinkServiceConnectionState property: The connection state. * * @return the privateLinkServiceConnectionState value. */ @@ -236,8 +237,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. + * Set the privateLinkServiceConnectionState property: The connection state. * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionInner object itself. @@ -252,7 +252,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * Get the provisioningState property: The current provisioning state. * * @return the provisioningState value. */ @@ -260,23 +260,6 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ @@ -285,9 +268,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeStringField("location", this.location); jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -319,13 +302,13 @@ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) thr = PrivateEndpointConnectionProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.sku = Sku.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedPrivateEndpointConnectionInner.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java index 73c00d781c1c..142b967fa2f2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java @@ -1,38 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.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.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import java.io.IOException; /** - * Properties of the PrivateEndpointConnectProperties. + * Private endpoint connection properties. */ @Fluent public final class PrivateEndpointConnectionProperties implements JsonSerializable { /* - * The resource of private end point. + * The privateEndpoint property. */ - private PrivateEndpoint privateEndpoint; + private WorkspacePrivateEndpointResource privateEndpoint; /* - * A collection of information about the state of the connection between service consumer and provider. + * The connection state. */ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; /* - * The provisioning state of the private endpoint connection resource. + * The current provisioning state. */ private PrivateEndpointConnectionProvisioningState provisioningState; @@ -43,28 +42,27 @@ public PrivateEndpointConnectionProperties() { } /** - * Get the privateEndpoint property: The resource of private end point. + * Get the privateEndpoint property: The privateEndpoint property. * * @return the privateEndpoint value. */ - public PrivateEndpoint privateEndpoint() { + public WorkspacePrivateEndpointResource privateEndpoint() { return this.privateEndpoint; } /** - * Set the privateEndpoint property: The resource of private end point. + * Set the privateEndpoint property: The privateEndpoint property. * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + public PrivateEndpointConnectionProperties withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint) { this.privateEndpoint = privateEndpoint; return this; } /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. + * Get the privateLinkServiceConnectionState property: The connection state. * * @return the privateLinkServiceConnectionState value. */ @@ -73,8 +71,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. + * Set the privateLinkServiceConnectionState property: The connection state. * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. @@ -86,7 +83,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * Get the provisioningState property: The current provisioning state. * * @return the provisioningState value. */ @@ -94,34 +91,14 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.provisioningState; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); return jsonWriter.writeEndObject(); } @@ -131,7 +108,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateEndpointConnectionProperties 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 PrivateEndpointConnectionProperties. */ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { @@ -142,11 +118,12 @@ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("privateLinkServiceConnectionState".equals(fieldName)) { + if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint + = WorkspacePrivateEndpointResource.fromJson(reader); + } else if ("privateLinkServiceConnectionState".equals(fieldName)) { deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedPrivateEndpointConnectionProperties.provisioningState = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..e3803f282ed9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Immutable; +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.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * A private link resource. + */ +@Immutable +public final class PrivateLinkResourceInner extends ProxyResource { + /* + * The identity property. + */ + private ManagedServiceIdentity identity; + + /* + * Same as workspace location. + */ + private String location; + + /* + * Properties of a private link resource. + */ + private PrivateLinkResourceProperties innerProperties; + + /* + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier + */ + private Sku sku; + + /* + * The tags property. + */ + private Map tags; + + /* + * 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 PrivateLinkResourceInner class. + */ + private PrivateLinkResourceInner() { + } + + /** + * Get the identity property: The identity property. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Get the location property: Same as workspace location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the innerProperties property: Properties of a private link resource. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Get the tags property: The tags property. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * 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; + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceInner 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 PrivateLinkResourceInner. + */ + public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceInner.type = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedPrivateLinkResourceInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedPrivateLinkResourceInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResourceInner.innerProperties + = PrivateLinkResourceProperties.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedPrivateLinkResourceInner.sku = Sku.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java deleted file mode 100644 index 7c0b27237e55..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import java.io.IOException; -import java.util.List; - -/** - * A list of private link resources. - */ -@Fluent -public final class PrivateLinkResourceListResultInner implements JsonSerializable { - /* - * Array of private link resources - */ - private List value; - - /** - * Creates an instance of PrivateLinkResourceListResultInner class. - */ - public PrivateLinkResourceListResultInner() { - } - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResultInner object itself. - */ - public PrivateLinkResourceListResultInner withValue(List value) { - this.value = value; - 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)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceListResultInner 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 PrivateLinkResourceListResultInner. - */ - public static PrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceListResultInner deserializedPrivateLinkResourceListResultInner - = new PrivateLinkResourceListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResource.fromJson(reader1)); - deserializedPrivateLinkResourceListResultInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceListResultInner; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java index 856715b8d766..74f53299e702 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Properties of a private link resource. */ -@Fluent +@Immutable public final class PrivateLinkResourceProperties implements JsonSerializable { /* * The private link resource group id. @@ -35,7 +35,7 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredZoneNames() { return this.requiredZoneNames; } - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - 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("groupId", this.groupId); + jsonWriter.writeArrayField("requiredMembers", this.requiredMembers, + (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java new file mode 100644 index 000000000000..d5cc9fb7455e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.RaiBlocklistItemProperties; +import java.io.IOException; + +/** + * RaiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ +@Fluent +public final class RaiBlocklistItemPropertiesBasicResourceInner extends ProxyResource { + /* + * RAI Custom Blocklist Item properties. + */ + private RaiBlocklistItemProperties 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 RaiBlocklistItemPropertiesBasicResourceInner class. + */ + public RaiBlocklistItemPropertiesBasicResourceInner() { + } + + /** + * Get the properties property: RAI Custom Blocklist Item properties. + * + * @return the properties value. + */ + public RaiBlocklistItemProperties properties() { + return this.properties; + } + + /** + * Set the properties property: RAI Custom Blocklist Item properties. + * + * @param properties the properties value to set. + * @return the RaiBlocklistItemPropertiesBasicResourceInner object itself. + */ + public RaiBlocklistItemPropertiesBasicResourceInner withProperties(RaiBlocklistItemProperties 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistItemPropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemPropertiesBasicResourceInner 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 RaiBlocklistItemPropertiesBasicResourceInner. + */ + public static RaiBlocklistItemPropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemPropertiesBasicResourceInner deserializedRaiBlocklistItemPropertiesBasicResourceInner + = new RaiBlocklistItemPropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.properties + = RaiBlocklistItemProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemPropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java new file mode 100644 index 000000000000..890bb1e4ce4c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.RaiBlocklistProperties; +import java.io.IOException; + +/** + * RaiBlocklistPropertiesBasicResource is a preview-only resource. + */ +@Fluent +public final class RaiBlocklistPropertiesBasicResourceInner extends ProxyResource { + /* + * RAI Custom Blocklist properties. + */ + private RaiBlocklistProperties 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 RaiBlocklistPropertiesBasicResourceInner class. + */ + public RaiBlocklistPropertiesBasicResourceInner() { + } + + /** + * Get the properties property: RAI Custom Blocklist properties. + * + * @return the properties value. + */ + public RaiBlocklistProperties properties() { + return this.properties; + } + + /** + * Set the properties property: RAI Custom Blocklist properties. + * + * @param properties the properties value to set. + * @return the RaiBlocklistPropertiesBasicResourceInner object itself. + */ + public RaiBlocklistPropertiesBasicResourceInner withProperties(RaiBlocklistProperties 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistPropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistPropertiesBasicResourceInner 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 RaiBlocklistPropertiesBasicResourceInner. + */ + public static RaiBlocklistPropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistPropertiesBasicResourceInner deserializedRaiBlocklistPropertiesBasicResourceInner + = new RaiBlocklistPropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.properties + = RaiBlocklistProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistPropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java new file mode 100644 index 000000000000..948dedaf3d20 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.models.RaiPolicyProperties; +import java.io.IOException; + +/** + * Azure OpenAI Content Filters resource. + */ +@Fluent +public final class RaiPolicyPropertiesBasicResourceInner extends ProxyResource { + /* + * Azure OpenAI Content Filters properties. + */ + private RaiPolicyProperties 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 RaiPolicyPropertiesBasicResourceInner class. + */ + public RaiPolicyPropertiesBasicResourceInner() { + } + + /** + * Get the properties property: Azure OpenAI Content Filters properties. + * + * @return the properties value. + */ + public RaiPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Azure OpenAI Content Filters properties. + * + * @param properties the properties value to set. + * @return the RaiPolicyPropertiesBasicResourceInner object itself. + */ + public RaiPolicyPropertiesBasicResourceInner withProperties(RaiPolicyProperties 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiPolicyPropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyPropertiesBasicResourceInner 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 RaiPolicyPropertiesBasicResourceInner. + */ + public static RaiPolicyPropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyPropertiesBasicResourceInner deserializedRaiPolicyPropertiesBasicResourceInner + = new RaiPolicyPropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.properties = RaiPolicyProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyPropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java index 446a0a7f6dcf..037f29ecb39b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; @@ -21,10 +21,15 @@ import java.util.Map; /** - * The Registry model. + * Concrete tracked resource types can be created by aliasing this type using a specific property type. */ @Fluent public final class RegistryInner extends Resource { + /* + * [Required] Additional attributes of the entity. + */ + private RegistryProperties innerProperties = new RegistryProperties(); + /* * Managed service identity (system assigned and/or user assigned identities) */ @@ -35,11 +40,6 @@ public final class RegistryInner extends Resource { */ private String kind; - /* - * [Required] Additional attributes of the entity. - */ - private RegistryProperties innerProperties = new RegistryProperties(); - /* * Sku details required for ARM contract for Autoscaling. */ @@ -51,9 +51,9 @@ public final class RegistryInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -61,9 +61,9 @@ public final class RegistryInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of RegistryInner class. @@ -71,6 +71,15 @@ public final class RegistryInner extends Resource { public RegistryInner() { } + /** + * Get the innerProperties property: [Required] Additional attributes of the entity. + * + * @return the innerProperties value. + */ + private RegistryProperties innerProperties() { + return this.innerProperties; + } + /** * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * @@ -113,15 +122,6 @@ public RegistryInner withKind(String kind) { return this; } - /** - * Get the innerProperties property: [Required] Additional attributes of the entity. - * - * @return the innerProperties value. - */ - private RegistryProperties innerProperties() { - return this.innerProperties; - } - /** * Get the sku property: Sku details required for ARM contract for Autoscaling. * @@ -152,13 +152,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -172,13 +172,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -268,6 +268,29 @@ public RegistryInner withManagedResourceGroup(ArmResourceId managedResourceGroup return this; } + /** + * Get the managedResourceGroupSettings property: Managed resource group specific settings. + * + * @return the managedResourceGroupSettings value. + */ + public ManagedResourceGroupSettings managedResourceGroupSettings() { + return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupSettings(); + } + + /** + * Set the managedResourceGroupSettings property: Managed resource group specific settings. + * + * @param managedResourceGroupSettings the managedResourceGroupSettings value to set. + * @return the RegistryInner object itself. + */ + public RegistryInner withManagedResourceGroupSettings(ManagedResourceGroupSettings managedResourceGroupSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new RegistryProperties(); + } + this.innerProperties().withManagedResourceGroupSettings(managedResourceGroupSettings); + return this; + } + /** * Get the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. * @@ -365,28 +388,6 @@ public RegistryInner withRegionDetails(List regionDeta return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property innerProperties in model RegistryInner")); - } else { - innerProperties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RegistryInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java index 3c3f8d242062..cc97f229f521 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -129,20 +129,6 @@ public RegistryPrivateEndpointConnectionProperties withProvisioningState(String return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (registryPrivateLinkServiceConnectionState() != null) { - registryPrivateLinkServiceConnectionState().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java index 6ddc52a4f052..0aab5d309720 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; import java.io.IOException; @@ -35,6 +36,11 @@ public final class RegistryProperties implements JsonSerializable regio return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedResourceGroup() != null) { - managedResourceGroup().validate(); - } - if (registryPrivateEndpointConnections() != null) { - registryPrivateEndpointConnections().forEach(e -> e.validate()); - } - if (regionDetails() != null) { - regionDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -233,6 +243,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("discoveryUrl", this.discoveryUrl); jsonWriter.writeStringField("intellectualPropertyPublisher", this.intellectualPropertyPublisher); jsonWriter.writeJsonField("managedResourceGroup", this.managedResourceGroup); + jsonWriter.writeJsonField("managedResourceGroupSettings", this.managedResourceGroupSettings); jsonWriter.writeStringField("mlFlowRegistryUri", this.mlFlowRegistryUri); jsonWriter.writeArrayField("registryPrivateEndpointConnections", this.registryPrivateEndpointConnections, (writer, element) -> writer.writeJson(element)); @@ -262,6 +273,9 @@ public static RegistryProperties fromJson(JsonReader jsonReader) throws IOExcept deserializedRegistryProperties.intellectualPropertyPublisher = reader.getString(); } else if ("managedResourceGroup".equals(fieldName)) { deserializedRegistryProperties.managedResourceGroup = ArmResourceId.fromJson(reader); + } else if ("managedResourceGroupSettings".equals(fieldName)) { + deserializedRegistryProperties.managedResourceGroupSettings + = ManagedResourceGroupSettings.fromJson(reader); } else if ("mlFlowRegistryUri".equals(fieldName)) { deserializedRegistryProperties.mlFlowRegistryUri = reader.getString(); } else if ("registryPrivateEndpointConnections".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java index bfe2dbbb5075..f39296a0b962 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -39,6 +39,8 @@ public final class ResourceQuotaInner implements JsonSerializable tags) { 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 ServerlessEndpointInner")); - } else { - properties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointInner.class); - /** * {@inheritDoc} */ @@ -239,8 +215,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -274,10 +250,10 @@ public static ServerlessEndpointInner fromJson(JsonReader jsonReader) throws IOE deserializedServerlessEndpointInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedServerlessEndpointInner.properties = ServerlessEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedServerlessEndpointInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedServerlessEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedServerlessEndpointInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedServerlessEndpointInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java index cb38303f4796..1f3c5eac395d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -18,22 +18,27 @@ @Fluent public final class SharedPrivateLinkResourceProperty implements JsonSerializable { /* - * The resource id that private link links to. + * group id of the private link */ - private String privateLinkResourceId; + private String groupId; /* - * The private link resource group id. + * the resource id that private link links to */ - private String groupId; + private String privateLinkResourceId; /* - * Request message. + * Request message */ private String requestMessage; /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + * Connection status of the service consumer with the service provider\r\nPossible state transitions\r\nPending -> + * Approved (Service provider approves the connection request)\r\nPending -> Rejected (Service provider rejects the + * connection request)\r\nPending -> Disconnected (Service provider deletes the connection)\r\nApproved -> Rejected + * (Service provider rejects the approved connection)\r\nApproved -> Disconnected (Service provider deletes the + * connection)\r\nRejected -> Pending (Service consumer re-initiates the connection request that was + * rejected)\r\nRejected -> Disconnected (Service provider deletes the connection) */ private PrivateEndpointServiceConnectionStatus status; @@ -44,42 +49,42 @@ public SharedPrivateLinkResourceProperty() { } /** - * Get the privateLinkResourceId property: The resource id that private link links to. + * Get the groupId property: group id of the private link. * - * @return the privateLinkResourceId value. + * @return the groupId value. */ - public String privateLinkResourceId() { - return this.privateLinkResourceId; + public String groupId() { + return this.groupId; } /** - * Set the privateLinkResourceId property: The resource id that private link links to. + * Set the groupId property: group id of the private link. * - * @param privateLinkResourceId the privateLinkResourceId value to set. + * @param groupId the groupId value to set. * @return the SharedPrivateLinkResourceProperty object itself. */ - public SharedPrivateLinkResourceProperty withPrivateLinkResourceId(String privateLinkResourceId) { - this.privateLinkResourceId = privateLinkResourceId; + public SharedPrivateLinkResourceProperty withGroupId(String groupId) { + this.groupId = groupId; return this; } /** - * Get the groupId property: The private link resource group id. + * Get the privateLinkResourceId property: the resource id that private link links to. * - * @return the groupId value. + * @return the privateLinkResourceId value. */ - public String groupId() { - return this.groupId; + public String privateLinkResourceId() { + return this.privateLinkResourceId; } /** - * Set the groupId property: The private link resource group id. + * Set the privateLinkResourceId property: the resource id that private link links to. * - * @param groupId the groupId value to set. + * @param privateLinkResourceId the privateLinkResourceId value to set. * @return the SharedPrivateLinkResourceProperty object itself. */ - public SharedPrivateLinkResourceProperty withGroupId(String groupId) { - this.groupId = groupId; + public SharedPrivateLinkResourceProperty withPrivateLinkResourceId(String privateLinkResourceId) { + this.privateLinkResourceId = privateLinkResourceId; return this; } @@ -104,8 +109,13 @@ public SharedPrivateLinkResourceProperty withRequestMessage(String requestMessag } /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. + * Get the status property: Connection status of the service consumer with the service provider\r\nPossible state + * transitions\r\nPending -> Approved (Service provider approves the connection request)\r\nPending -> + * Rejected (Service provider rejects the connection request)\r\nPending -> Disconnected (Service provider + * deletes the connection)\r\nApproved -> Rejected (Service provider rejects the approved connection)\r\nApproved + * -> Disconnected (Service provider deletes the connection)\r\nRejected -> Pending (Service consumer + * re-initiates the connection request that was rejected)\r\nRejected -> Disconnected (Service provider deletes + * the connection). * * @return the status value. */ @@ -114,8 +124,13 @@ public PrivateEndpointServiceConnectionStatus status() { } /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. + * Set the status property: Connection status of the service consumer with the service provider\r\nPossible state + * transitions\r\nPending -> Approved (Service provider approves the connection request)\r\nPending -> + * Rejected (Service provider rejects the connection request)\r\nPending -> Disconnected (Service provider + * deletes the connection)\r\nApproved -> Rejected (Service provider rejects the approved connection)\r\nApproved + * -> Disconnected (Service provider deletes the connection)\r\nRejected -> Pending (Service consumer + * re-initiates the connection request that was rejected)\r\nRejected -> Disconnected (Service provider deletes + * the connection). * * @param status the status value to set. * @return the SharedPrivateLinkResourceProperty object itself. @@ -125,22 +140,14 @@ public SharedPrivateLinkResourceProperty withStatus(PrivateEndpointServiceConnec 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("privateLinkResourceId", this.privateLinkResourceId); jsonWriter.writeStringField("groupId", this.groupId); + jsonWriter.writeStringField("privateLinkResourceId", this.privateLinkResourceId); jsonWriter.writeStringField("requestMessage", this.requestMessage); jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); return jsonWriter.writeEndObject(); @@ -162,10 +169,10 @@ public static SharedPrivateLinkResourceProperty fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("privateLinkResourceId".equals(fieldName)) { - deserializedSharedPrivateLinkResourceProperty.privateLinkResourceId = reader.getString(); - } else if ("groupId".equals(fieldName)) { + if ("groupId".equals(fieldName)) { deserializedSharedPrivateLinkResourceProperty.groupId = reader.getString(); + } else if ("privateLinkResourceId".equals(fieldName)) { + deserializedSharedPrivateLinkResourceProperty.privateLinkResourceId = reader.getString(); } else if ("requestMessage".equals(fieldName)) { deserializedSharedPrivateLinkResourceProperty.requestMessage = reader.getString(); } else if ("status".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java index e3de72408417..bdffc9237cf1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,8 +16,13 @@ /** * Fulfills ARM Contract requirement to list all available SKUS for a resource. */ -@Fluent +@Immutable public final class SkuResourceInner implements JsonSerializable { + /* + * Gets or sets the Sku Capacity. + */ + private SkuCapacity capacity; + /* * The resource type name. */ @@ -28,44 +33,10 @@ public final class SkuResourceInner implements JsonSerializable e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java new file mode 100644 index 000000000000..a8d561b95b76 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.PTUDeploymentUsage; +import java.io.IOException; +import java.util.List; + +/** + * The UsageAndQuotaDetails model. + */ +@Immutable +public final class UsageAndQuotaDetailsInner implements JsonSerializable { + /* + * Model collection name + */ + private String modelCollection; + + /* + * The total number of quota + */ + private Long quota; + + /* + * Usage details for each deployment + */ + private List usageDetails; + + /** + * Creates an instance of UsageAndQuotaDetailsInner class. + */ + private UsageAndQuotaDetailsInner() { + } + + /** + * Get the modelCollection property: Model collection name. + * + * @return the modelCollection value. + */ + public String modelCollection() { + return this.modelCollection; + } + + /** + * Get the quota property: The total number of quota. + * + * @return the quota value. + */ + public Long quota() { + return this.quota; + } + + /** + * Get the usageDetails property: Usage details for each deployment. + * + * @return the usageDetails value. + */ + public List usageDetails() { + return this.usageDetails; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("modelCollection", this.modelCollection); + jsonWriter.writeNumberField("quota", this.quota); + jsonWriter.writeArrayField("usageDetails", this.usageDetails, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UsageAndQuotaDetailsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UsageAndQuotaDetailsInner 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 UsageAndQuotaDetailsInner. + */ + public static UsageAndQuotaDetailsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UsageAndQuotaDetailsInner deserializedUsageAndQuotaDetailsInner = new UsageAndQuotaDetailsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("modelCollection".equals(fieldName)) { + deserializedUsageAndQuotaDetailsInner.modelCollection = reader.getString(); + } else if ("quota".equals(fieldName)) { + deserializedUsageAndQuotaDetailsInner.quota = reader.getNullable(JsonReader::getLong); + } else if ("usageDetails".equals(fieldName)) { + List usageDetails + = reader.readArray(reader1 -> PTUDeploymentUsage.fromJson(reader1)); + deserializedUsageAndQuotaDetailsInner.usageDetails = usageDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedUsageAndQuotaDetailsInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java index fe0db708401b..1def24d221b3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -56,7 +56,7 @@ public final class UsageInner implements JsonSerializable { /** * Creates an instance of UsageInner class. */ - public UsageInner() { + private UsageInner() { } /** @@ -122,17 +122,6 @@ public UsageName name() { return this.name; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java index b6f1536ddcf8..33658634fa67 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The List Virtual Machine size operation response. */ -@Fluent +@Immutable public final class VirtualMachineSizeListResultInner implements JsonSerializable { /* * The list of virtual machine sizes supported by AmlCompute. @@ -26,7 +26,7 @@ public final class VirtualMachineSizeListResultInner implements JsonSerializable /** * Creates an instance of VirtualMachineSizeListResultInner class. */ - public VirtualMachineSizeListResultInner() { + private VirtualMachineSizeListResultInner() { } /** @@ -38,28 +38,6 @@ public List value() { return this.value; } - /** - * Set the value property: The list of virtual machine sizes supported by AmlCompute. - * - * @param value the value value to set. - * @return the VirtualMachineSizeListResultInner object itself. - */ - public VirtualMachineSizeListResultInner withValue(List value) { - this.value = value; - 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} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java index 372b93698a8c..b1be4180057e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; 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; import com.azure.json.JsonWriter; @@ -15,7 +14,7 @@ import java.io.IOException; /** - * The WorkspaceConnectionPropertiesV2BasicResource model. + * Concrete proxy resource types can be created by aliasing this type using a specific property type. */ @Fluent public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends ProxyResource { @@ -30,9 +29,9 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends Pro private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +39,9 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends Pro private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceInner class. @@ -81,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -101,33 +100,15 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; - } - - /** - * 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 WorkspaceConnectionPropertiesV2BasicResourceInner")); - } else { - properties().validate(); - } + public String id() { + return this.id; } - private static final ClientLogger LOGGER - = new ClientLogger(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java index b335ff448efc..ec3a6d67b549 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -13,12 +13,14 @@ import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import java.io.IOException; import java.util.List; @@ -30,12 +32,12 @@ @Fluent public final class WorkspaceInner extends ProxyResource { /* - * The properties of the machine learning workspace. + * Additional attributes of the entity. */ - private WorkspacePropertiesInner innerProperties; + private WorkspacePropertiesInner innerProperties = new WorkspacePropertiesInner(); /* - * The identity of the resource. + * The managed service identities assigned to this resource. */ private ManagedServiceIdentity identity; @@ -45,19 +47,19 @@ public final class WorkspaceInner extends ProxyResource { private String kind; /* - * Specifies the location of the resource. + * The location property. */ private String location; /* - * Contains resource tags defined as key/value pairs. + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier */ - private Map tags; + private Sku sku; /* - * The sku of the workspace. + * The tags property. */ - private Sku sku; + private Map tags; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -65,9 +67,9 @@ public final class WorkspaceInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -75,9 +77,9 @@ public final class WorkspaceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkspaceInner class. @@ -86,7 +88,7 @@ public WorkspaceInner() { } /** - * Get the innerProperties property: The properties of the machine learning workspace. + * Get the innerProperties property: Additional attributes of the entity. * * @return the innerProperties value. */ @@ -95,7 +97,7 @@ private WorkspacePropertiesInner innerProperties() { } /** - * Get the identity property: The identity of the resource. + * Get the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -104,7 +106,7 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: The identity of the resource. + * Set the identity property: The managed service identities assigned to this resource. * * @param identity the identity value to set. * @return the WorkspaceInner object itself. @@ -135,7 +137,7 @@ public WorkspaceInner withKind(String kind) { } /** - * Get the location property: Specifies the location of the resource. + * Get the location property: The location property. * * @return the location value. */ @@ -144,7 +146,7 @@ public String location() { } /** - * Set the location property: Specifies the location of the resource. + * Set the location property: The location property. * * @param location the location value to set. * @return the WorkspaceInner object itself. @@ -155,42 +157,44 @@ public WorkspaceInner withLocation(String location) { } /** - * Get the tags property: Contains resource tags defined as key/value pairs. + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * - * @return the tags value. + * @return the sku value. */ - public Map tags() { - return this.tags; + public Sku sku() { + return this.sku; } /** - * Set the tags property: Contains resource tags defined as key/value pairs. + * Set the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * - * @param tags the tags value to set. + * @param sku the sku value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withTags(Map tags) { - this.tags = tags; + public WorkspaceInner withSku(Sku sku) { + this.sku = sku; return this; } /** - * Get the sku property: The sku of the workspace. + * Get the tags property: The tags property. * - * @return the sku value. + * @return the tags value. */ - public Sku sku() { - return this.sku; + public Map tags() { + return this.tags; } /** - * Set the sku property: The sku of the workspace. + * Set the tags property: The tags property. * - * @param sku the sku value to set. + * @param tags the tags value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withSku(Sku sku) { - this.sku = sku; + public WorkspaceInner withTags(Map tags) { + this.tags = tags; return this; } @@ -204,13 +208,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -224,115 +228,140 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** - * Get the workspaceId property: The immutable id associated with this workspace. + * Get the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - public String workspaceId() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); + public String agentsEndpointUri() { + return this.innerProperties() == null ? null : this.innerProperties().agentsEndpointUri(); } /** - * Get the description property: The description of this workspace. + * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @return the description value. + * @return the allowPublicAccessWhenBehindVnet value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerProperties() == null ? null : this.innerProperties().allowPublicAccessWhenBehindVnet(); } /** - * Set the description property: The description of this workspace. + * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @param description the description value to set. + * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withDescription(String description) { + public WorkspaceInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withDescription(description); + this.innerProperties().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); return this; } /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. + * Get the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerProperties() == null ? null : this.innerProperties().allowRoleAssignmentOnRG(); } /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * Set the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @param friendlyName the friendlyName value to set. + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withFriendlyName(String friendlyName) { + public WorkspaceInner withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withFriendlyName(friendlyName); + this.innerProperties().withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); return this; } /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - public String keyVault() { - return this.innerProperties() == null ? null : this.innerProperties().keyVault(); + public String applicationInsights() { + return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); } /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @param keyVault the keyVault value to set. + * @param applicationInsights the applicationInsights value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withKeyVault(String keyVault) { + public WorkspaceInner withApplicationInsights(String applicationInsights) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withKeyVault(keyVault); + this.innerProperties().withApplicationInsights(applicationInsights); return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * Get the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); + public List associatedWorkspaces() { + return this.innerProperties() == null ? null : this.innerProperties().associatedWorkspaces(); } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Set the associatedWorkspaces property: The associatedWorkspaces property. * - * @param applicationInsights the applicationInsights value to set. + * @param associatedWorkspaces the associatedWorkspaces value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withApplicationInsights(String applicationInsights) { + public WorkspaceInner withAssociatedWorkspaces(List associatedWorkspaces) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withApplicationInsights(applicationInsights); + this.innerProperties().withAssociatedWorkspaces(associatedWorkspaces); + return this; + } + + /** + * Get the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistries(); + } + + /** + * Set the containerRegistries property: The containerRegistries property. + * + * @param containerRegistries the containerRegistries value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withContainerRegistries(List containerRegistries) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withContainerRegistries(containerRegistries); return this; } @@ -360,27 +389,25 @@ public WorkspaceInner withContainerRegistry(String containerRegistry) { } /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * Get the description property: The description of this workspace. * - * @return the storageAccount value. + * @return the description value. */ - public String storageAccount() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccount(); + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); } /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * Set the description property: The description of this workspace. * - * @param storageAccount the storageAccount value to set. + * @param description the description value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withStorageAccount(String storageAccount) { + public WorkspaceInner withDescription(String description) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withStorageAccount(storageAccount); + this.innerProperties().withDescription(description); return this; } @@ -410,241 +437,398 @@ public WorkspaceInner withDiscoveryUrl(String discoveryUrl) { } /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the encryption property: The encryption settings of Azure ML workspace. + * Get the enableDataIsolation property: The enableDataIsolation property. * - * @return the encryption value. + * @return the enableDataIsolation value. */ - public EncryptionProperty encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + public Boolean enableDataIsolation() { + return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); } /** - * Set the encryption property: The encryption settings of Azure ML workspace. + * Set the enableDataIsolation property: The enableDataIsolation property. * - * @param encryption the encryption value to set. + * @param enableDataIsolation the enableDataIsolation value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withEncryption(EncryptionProperty encryption) { + public WorkspaceInner withEnableDataIsolation(Boolean enableDataIsolation) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withEncryption(encryption); + this.innerProperties().withEnableDataIsolation(enableDataIsolation); return this; } /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Get the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @return the hbiWorkspace value. + * @return the enableServiceSideCmkEncryption value. */ - public Boolean hbiWorkspace() { - return this.innerProperties() == null ? null : this.innerProperties().hbiWorkspace(); + public Boolean enableServiceSideCmkEncryption() { + return this.innerProperties() == null ? null : this.innerProperties().enableServiceSideCmkEncryption(); } /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Set the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @param hbiWorkspace the hbiWorkspace value to set. + * @param enableServiceSideCmkEncryption the enableServiceSideCmkEncryption value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withHbiWorkspace(Boolean hbiWorkspace) { + public WorkspaceInner withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withHbiWorkspace(hbiWorkspace); + this.innerProperties().withEnableServiceSideCmkEncryption(enableServiceSideCmkEncryption); return this; } /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Get the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the enableSimplifiedCmk value. */ - public String serviceProvisionedResourceGroup() { - return this.innerProperties() == null ? null : this.innerProperties().serviceProvisionedResourceGroup(); + public Boolean enableSimplifiedCmk() { + return this.innerProperties() == null ? null : this.innerProperties().enableSimplifiedCmk(); } /** - * Get the privateLinkCount property: Count of private connections in the workspace. + * Set the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the privateLinkCount value. + * @param enableSimplifiedCmk the enableSimplifiedCmk value to set. + * @return the WorkspaceInner object itself. */ - public Integer privateLinkCount() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkCount(); + public WorkspaceInner withEnableSimplifiedCmk(Boolean enableSimplifiedCmk) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withEnableSimplifiedCmk(enableSimplifiedCmk); + return this; } /** - * Get the imageBuildCompute property: The compute name for image build. + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @return the imageBuildCompute value. + * @return the enableSoftwareBillOfMaterials value. */ - public String imageBuildCompute() { - return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); + public Boolean enableSoftwareBillOfMaterials() { + return this.innerProperties() == null ? null : this.innerProperties().enableSoftwareBillOfMaterials(); } /** - * Set the imageBuildCompute property: The compute name for image build. + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @param imageBuildCompute the imageBuildCompute value to set. + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withImageBuildCompute(String imageBuildCompute) { + public WorkspaceInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withImageBuildCompute(imageBuildCompute); + this.innerProperties().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); return this; } /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Get the encryption property: The encryption property. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the encryption value. */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerProperties() == null ? null : this.innerProperties().allowPublicAccessWhenBehindVnet(); + public EncryptionProperty encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); } /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Set the encryption property: The encryption property. * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. + * @param encryption the encryption value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { + public WorkspaceInner withEncryption(EncryptionProperty encryption) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + this.innerProperties().withEncryption(encryption); return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Get the existingWorkspaces property: The existingWorkspaces property. * - * @return the publicNetworkAccess value. + * @return the existingWorkspaces value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + public List existingWorkspaces() { + return this.innerProperties() == null ? null : this.innerProperties().existingWorkspaces(); } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Set the existingWorkspaces property: The existingWorkspaces property. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param existingWorkspaces the existingWorkspaces value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public WorkspaceInner withExistingWorkspaces(List existingWorkspaces) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.innerProperties().withExistingWorkspaces(existingWorkspaces); return this; } /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); - } - - /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Get the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serverlessComputeSettings value. + * @return the featureStoreSettings value. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); } /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Set the featureStoreSettings property: Settings for feature store type workspace. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @param featureStoreSettings the featureStoreSettings value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + public WorkspaceInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); + this.innerProperties().withFeatureStoreSettings(featureStoreSettings); return this; } /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the sharedPrivateLinkResources value. + * @return the friendlyName value. */ - public List sharedPrivateLinkResources() { - return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources(); + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); } /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. + * @param friendlyName the friendlyName value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + public WorkspaceInner withFriendlyName(String friendlyName) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withSharedPrivateLinkResources(sharedPrivateLinkResources); + this.innerProperties().withFriendlyName(friendlyName); return this; } /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. + * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @return the notebookInfo value. + * @return the hbiWorkspace value. */ - public NotebookResourceInfoInner notebookInfo() { - return this.innerProperties() == null ? null : this.innerProperties().notebookInfo(); + public Boolean hbiWorkspace() { + return this.innerProperties() == null ? null : this.innerProperties().hbiWorkspace(); } /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @return the serviceManagedResourcesSettings value. + * @param hbiWorkspace the hbiWorkspace value to set. + * @return the WorkspaceInner object itself. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); + public WorkspaceInner withHbiWorkspace(Boolean hbiWorkspace) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withHbiWorkspace(hbiWorkspace); + return this; } /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Get the hubResourceId property: The hubResourceId property. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @return the hubResourceId value. + */ + public String hubResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().hubResourceId(); + } + + /** + * Set the hubResourceId property: The hubResourceId property. + * + * @param hubResourceId the hubResourceId value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + public WorkspaceInner withHubResourceId(String hubResourceId) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + this.innerProperties().withHubResourceId(hubResourceId); + return this; + } + + /** + * Get the imageBuildCompute property: The compute name for image build. + * + * @return the imageBuildCompute value. + */ + public String imageBuildCompute() { + return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); + } + + /** + * Set the imageBuildCompute property: The compute name for image build. + * + * @param imageBuildCompute the imageBuildCompute value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withImageBuildCompute(String imageBuildCompute) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withImageBuildCompute(imageBuildCompute); + return this; + } + + /** + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. + */ + public List ipAllowlist() { + return this.innerProperties() == null ? null : this.innerProperties().ipAllowlist(); + } + + /** + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @param ipAllowlist the ipAllowlist value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withIpAllowlist(List ipAllowlist) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withIpAllowlist(ipAllowlist); return this; } + /** + * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @return the keyVault value. + */ + public String keyVault() { + return this.innerProperties() == null ? null : this.innerProperties().keyVault(); + } + + /** + * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. + * + * @param keyVault the keyVault value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withKeyVault(String keyVault) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withKeyVault(keyVault); + return this; + } + + /** + * Get the keyVaults property: The keyVaults property. + * + * @return the keyVaults value. + */ + public List keyVaults() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaults(); + } + + /** + * Set the keyVaults property: The keyVaults property. + * + * @param keyVaults the keyVaults value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withKeyVaults(List keyVaults) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withKeyVaults(keyVaults); + return this; + } + + /** + * Get the managedNetwork property: The managedNetwork property. + * + * @return the managedNetwork value. + */ + public ManagedNetworkSettingsInner managedNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); + } + + /** + * Set the managedNetwork property: The managedNetwork property. + * + * @param managedNetwork the managedNetwork value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withManagedNetwork(managedNetwork); + return this; + } + + /** + * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. + * + * @return the mlFlowTrackingUri value. + */ + public String mlFlowTrackingUri() { + return this.innerProperties() == null ? null : this.innerProperties().mlFlowTrackingUri(); + } + + /** + * Get the networkAcls property: A set of rules governing the network accessibility of the workspace. + * + * @return the networkAcls value. + */ + public NetworkAcls networkAcls() { + return this.innerProperties() == null ? null : this.innerProperties().networkAcls(); + } + + /** + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. + * + * @param networkAcls the networkAcls value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withNetworkAcls(NetworkAcls networkAcls) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withNetworkAcls(networkAcls); + return this; + } + + /** + * Get the notebookInfo property: The notebook info of Azure ML workspace. + * + * @return the notebookInfo value. + */ + public NotebookResourceInfoInner notebookInfo() { + return this.innerProperties() == null ? null : this.innerProperties().notebookInfo(); + } + /** * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the * workspace identity. @@ -671,171 +855,298 @@ public WorkspaceInner withPrimaryUserAssignedIdentity(String primaryUserAssigned } /** - * Get the tenantId property: The tenant id associated with this workspace. + * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the tenantId value. + * @return the privateEndpointConnections value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } /** - * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Get the privateLinkCount property: Count of private connections in the workspace. * - * @return the storageHnsEnabled value. + * @return the privateLinkCount value. */ - public Boolean storageHnsEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().storageHnsEnabled(); + public Integer privateLinkCount() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkCount(); } /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * Get the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the mlFlowTrackingUri value. + * @return the provisionNetworkNow value. */ - public String mlFlowTrackingUri() { - return this.innerProperties() == null ? null : this.innerProperties().mlFlowTrackingUri(); + public Boolean provisionNetworkNow() { + return this.innerProperties() == null ? null : this.innerProperties().provisionNetworkNow(); } /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Set the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the v1LegacyMode value. + * @param provisionNetworkNow the provisionNetworkNow value to set. + * @return the WorkspaceInner object itself. */ - public Boolean v1LegacyMode() { - return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); + public WorkspaceInner withProvisionNetworkNow(Boolean provisionNetworkNow) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withProvisionNetworkNow(provisionNetworkNow); + return this; } /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. * - * @param v1LegacyMode the v1LegacyMode value to set. + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { + public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withV1LegacyMode(v1LegacyMode); + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the managedNetwork value. + * @return the serverlessComputeSettings value. */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); } /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param managedNetwork the managedNetwork value to set. + * @param serverlessComputeSettings the serverlessComputeSettings value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + public WorkspaceInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withManagedNetwork(managedNetwork); + this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); return this; } /** - * Get the featureStoreSettings property: Settings for feature store type workspace. + * Get the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the featureStoreSettings value. + * @return the serviceManagedResourcesSettings value. */ - public FeatureStoreSettings featureStoreSettings() { - return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); } /** - * Set the featureStoreSettings property: Settings for feature store type workspace. + * Set the serviceManagedResourcesSettings property: The service managed resource settings. * - * @param featureStoreSettings the featureStoreSettings value to set. + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + public WorkspaceInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withFeatureStoreSettings(featureStoreSettings); + this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } /** - * Get the associatedWorkspaces property: The associatedWorkspaces property. + * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. * - * @return the associatedWorkspaces value. + * @return the serviceProvisionedResourceGroup value. */ - public List associatedWorkspaces() { - return this.innerProperties() == null ? null : this.innerProperties().associatedWorkspaces(); + public String serviceProvisionedResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().serviceProvisionedResourceGroup(); } /** - * Set the associatedWorkspaces property: The associatedWorkspaces property. + * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * - * @param associatedWorkspaces the associatedWorkspaces value to set. + * @return the sharedPrivateLinkResources value. + */ + public List sharedPrivateLinkResources() { + return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources(); + } + + /** + * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withAssociatedWorkspaces(List associatedWorkspaces) { + public WorkspaceInner withSharedPrivateLinkResources(List sharedPrivateLinkResources) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withAssociatedWorkspaces(associatedWorkspaces); + this.innerProperties().withSharedPrivateLinkResources(sharedPrivateLinkResources); return this; } /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @return the enableDataIsolation value. + * @return the softDeleteRetentionInDays value. */ - public Boolean enableDataIsolation() { - return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); + public Integer softDeleteRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().softDeleteRetentionInDays(); } /** - * Set the enableDataIsolation property: The enableDataIsolation property. + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @param enableDataIsolation the enableDataIsolation value to set. + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withEnableDataIsolation(Boolean enableDataIsolation) { + public WorkspaceInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withEnableDataIsolation(enableDataIsolation); + this.innerProperties().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } /** - * Get the hubResourceId property: The hubResourceId property. + * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. * - * @return the hubResourceId value. + * @return the storageAccount value. */ - public String hubResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().hubResourceId(); + public String storageAccount() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccount(); } /** - * Set the hubResourceId property: The hubResourceId property. + * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. * - * @param hubResourceId the hubResourceId value to set. + * @param storageAccount the storageAccount value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withHubResourceId(String hubResourceId) { + public WorkspaceInner withStorageAccount(String storageAccount) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withHubResourceId(hubResourceId); + this.innerProperties().withStorageAccount(storageAccount); + return this; + } + + /** + * Get the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + public List storageAccounts() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccounts(); + } + + /** + * Set the storageAccounts property: The storageAccounts property. + * + * @param storageAccounts the storageAccounts value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withStorageAccounts(List storageAccounts) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withStorageAccounts(storageAccounts); + return this; + } + + /** + * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) + * enabled. + * + * @return the storageHnsEnabled value. + */ + public Boolean storageHnsEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().storageHnsEnabled(); + } + + /** + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerProperties() == null ? null : this.innerProperties().systemDatastoresAuthMode(); + } + + /** + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } + + /** + * Get the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + public Boolean v1LegacyMode() { + return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); + } + + /** + * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @param v1LegacyMode the v1LegacyMode value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withV1LegacyMode(v1LegacyMode); return this; } @@ -863,20 +1174,12 @@ public WorkspaceInner withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConf } /** - * Validates the instance. + * Get the workspaceId property: The immutable id associated with this workspace. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the workspaceId value. */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } + public String workspaceId() { + return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); } /** @@ -889,8 +1192,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -924,11 +1227,11 @@ public static WorkspaceInner fromJson(JsonReader jsonReader) throws IOException deserializedWorkspaceInner.kind = reader.getString(); } else if ("location".equals(fieldName)) { deserializedWorkspaceInner.location = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedWorkspaceInner.sku = Sku.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedWorkspaceInner.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedWorkspaceInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedWorkspaceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java index 76f9377dcb92..74d6b2b9202e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -11,11 +11,13 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import java.io.IOException; import java.util.List; @@ -26,30 +28,34 @@ @Fluent public final class WorkspacePropertiesInner implements JsonSerializable { /* - * The immutable id associated with this workspace. + * The URI of agents endpoint associated with this workspace. */ - private String workspaceId; + private String agentsEndpointUri; /* - * The description of this workspace. + * The flag to indicate whether to allow public access when behind VNet. */ - private String description; + private Boolean allowPublicAccessWhenBehindVnet; /* - * The friendly name for this workspace. This name in mutable + * The flag to indicate whether we will do role assignment for the workspace MSI on resource group level. */ - private String friendlyName; + private Boolean allowRoleAssignmentOnRG; /* - * ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been - * created + * ARM id of the application insights associated with this workspace. */ - private String keyVault; + private String applicationInsights; /* - * ARM id of the application insights associated with this workspace. + * The associatedWorkspaces property. */ - private String applicationInsights; + private List associatedWorkspaces; + + /* + * The containerRegistries property. + */ + private List containerRegistries; /* * ARM id of the container registry associated with this workspace. @@ -57,10 +63,9 @@ public final class WorkspacePropertiesInner implements JsonSerializable existingWorkspaces; /* - * The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK - * workspace + * Settings for feature store type workspace. */ - private String serviceProvisionedResourceGroup; + private FeatureStoreSettings featureStoreSettings; /* - * Count of private connections in the workspace + * The friendly name for this workspace. This name in mutable */ - private Integer privateLinkCount; + private String friendlyName; + + /* + * The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + */ + private Boolean hbiWorkspace; + + /* + * The hubResourceId property. + */ + private String hubResourceId; /* * The compute name for image build @@ -100,39 +128,40 @@ public final class WorkspacePropertiesInner implements JsonSerializable ipAllowlist; /* - * Whether requests from Public Network are allowed. + * ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been + * created */ - private PublicNetworkAccess publicNetworkAccess; + private String keyVault; /* - * The list of private endpoint connections in the workspace. + * The keyVaults property. */ - private List privateEndpointConnections; + private List keyVaults; /* - * Settings for serverless compute created in the workspace + * The managedNetwork property. */ - private ServerlessComputeSettings serverlessComputeSettings; + private ManagedNetworkSettingsInner managedNetwork; /* - * The list of shared private link resources in this workspace. + * The URI associated with this workspace that machine learning flow must point at to set up tracking. */ - private List sharedPrivateLinkResources; + private String mlFlowTrackingUri; /* - * The notebook info of Azure ML workspace. + * A set of rules governing the network accessibility of the workspace. */ - private NotebookResourceInfoInner notebookInfo; + private NetworkAcls networkAcls; /* - * The service managed resource settings. + * The notebook info of Azure ML workspace. */ - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; + private NotebookResourceInfoInner notebookInfo; /* * The user assigned identity resource id that represents the workspace identity. @@ -140,55 +169,99 @@ public final class WorkspacePropertiesInner implements JsonSerializable privateEndpointConnections; /* - * If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + * Count of private connections in the workspace */ - private Boolean storageHnsEnabled; + private Integer privateLinkCount; /* - * The URI associated with this workspace that machine learning flow must point at to set up tracking. + * Set to trigger the provisioning of the managed VNet with the default Options when creating a Workspace with the + * managed VNet enabled, or else it does nothing. */ - private String mlFlowTrackingUri; + private Boolean provisionNetworkNow; /* - * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + * The current deployment state of workspace resource. The provisioningState is to indicate states for resource + * provisioning. */ - private Boolean v1LegacyMode; + private ProvisioningState provisioningState; /* - * Managed Network settings for a machine learning workspace. + * Whether requests from Public Network are allowed. */ - private ManagedNetworkSettingsInner managedNetwork; + private PublicNetworkAccess publicNetworkAccess; /* - * Settings for feature store type workspace. + * Settings for serverless compute in a workspace */ - private FeatureStoreSettings featureStoreSettings; + private ServerlessComputeSettings serverlessComputeSettings; /* - * The associatedWorkspaces property. + * The service managed resource settings. */ - private List associatedWorkspaces; + private ServiceManagedResourcesSettings serviceManagedResourcesSettings; /* - * The enableDataIsolation property. + * The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK + * workspace */ - private Boolean enableDataIsolation; + private String serviceProvisionedResourceGroup; /* - * The hubResourceId property. + * The list of shared private link resources in this workspace. */ - private String hubResourceId; + private List sharedPrivateLinkResources; + + /* + * Retention time in days after workspace get soft deleted. + */ + private Integer softDeleteRetentionInDays; + + /* + * ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been + * created + */ + private String storageAccount; + + /* + * The storageAccounts property. + */ + private List storageAccounts; + + /* + * If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + */ + private Boolean storageHnsEnabled; + + /* + * The auth mode used for accessing the system datastores of the workspace. + */ + private SystemDatastoresAuthMode systemDatastoresAuthMode; + + /* + * The tenant id associated with this workspace. + */ + private String tenantId; + + /* + * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + */ + private Boolean v1LegacyMode; /* * WorkspaceHub's configuration object. */ private WorkspaceHubConfig workspaceHubConfig; + /* + * The immutable id associated with this workspace. + */ + private String workspaceId; + /** * Creates an instance of WorkspacePropertiesInner class. */ @@ -196,93 +269,115 @@ public WorkspacePropertiesInner() { } /** - * Get the workspaceId property: The immutable id associated with this workspace. + * Get the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - public String workspaceId() { - return this.workspaceId; + public String agentsEndpointUri() { + return this.agentsEndpointUri; } /** - * Get the description property: The description of this workspace. + * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @return the description value. + * @return the allowPublicAccessWhenBehindVnet value. */ - public String description() { - return this.description; + public Boolean allowPublicAccessWhenBehindVnet() { + return this.allowPublicAccessWhenBehindVnet; } /** - * Set the description property: The description of this workspace. + * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @param description the description value to set. + * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withDescription(String description) { - this.description = description; + public WorkspacePropertiesInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { + this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; return this; } /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. + * Get the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - public String friendlyName() { - return this.friendlyName; + public Boolean allowRoleAssignmentOnRG() { + return this.allowRoleAssignmentOnRG; } /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * Set the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @param friendlyName the friendlyName value to set. + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; + public WorkspacePropertiesInner withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { + this.allowRoleAssignmentOnRG = allowRoleAssignmentOnRG; return this; } /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - public String keyVault() { - return this.keyVault; + public String applicationInsights() { + return this.applicationInsights; } /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @param keyVault the keyVault value to set. + * @param applicationInsights the applicationInsights value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withKeyVault(String keyVault) { - this.keyVault = keyVault; + public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { + this.applicationInsights = applicationInsights; return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * Get the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - public String applicationInsights() { - return this.applicationInsights; + public List associatedWorkspaces() { + return this.associatedWorkspaces; } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Set the associatedWorkspaces property: The associatedWorkspaces property. * - * @param applicationInsights the applicationInsights value to set. + * @param associatedWorkspaces the associatedWorkspaces value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; + public WorkspacePropertiesInner withAssociatedWorkspaces(List associatedWorkspaces) { + this.associatedWorkspaces = associatedWorkspaces; + return this; + } + + /** + * Get the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.containerRegistries; + } + + /** + * Set the containerRegistries property: The containerRegistries property. + * + * @param containerRegistries the containerRegistries value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withContainerRegistries(List containerRegistries) { + this.containerRegistries = containerRegistries; return this; } @@ -307,24 +402,22 @@ public WorkspacePropertiesInner withContainerRegistry(String containerRegistry) } /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * Get the description property: The description of this workspace. * - * @return the storageAccount value. + * @return the description value. */ - public String storageAccount() { - return this.storageAccount; + public String description() { + return this.description; } /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * Set the description property: The description of this workspace. * - * @param storageAccount the storageAccount value to set. + * @param description the description value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; + public WorkspacePropertiesInner withDescription(String description) { + this.description = description; return this; } @@ -351,293 +444,293 @@ public WorkspacePropertiesInner withDiscoveryUrl(String discoveryUrl) { } /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. + * Get the enableDataIsolation property: The enableDataIsolation property. * - * @return the provisioningState value. + * @return the enableDataIsolation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public Boolean enableDataIsolation() { + return this.enableDataIsolation; } /** - * Get the encryption property: The encryption settings of Azure ML workspace. + * Set the enableDataIsolation property: The enableDataIsolation property. * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * - * @param encryption the encryption value to set. + * @param enableDataIsolation the enableDataIsolation value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withEncryption(EncryptionProperty encryption) { - this.encryption = encryption; + public WorkspacePropertiesInner withEnableDataIsolation(Boolean enableDataIsolation) { + this.enableDataIsolation = enableDataIsolation; return this; } /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Get the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @return the hbiWorkspace value. + * @return the enableServiceSideCmkEncryption value. */ - public Boolean hbiWorkspace() { - return this.hbiWorkspace; + public Boolean enableServiceSideCmkEncryption() { + return this.enableServiceSideCmkEncryption; } /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Set the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @param hbiWorkspace the hbiWorkspace value to set. + * @param enableServiceSideCmkEncryption the enableServiceSideCmkEncryption value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withHbiWorkspace(Boolean hbiWorkspace) { - this.hbiWorkspace = hbiWorkspace; + public WorkspacePropertiesInner withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption) { + this.enableServiceSideCmkEncryption = enableServiceSideCmkEncryption; return this; } /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Get the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the enableSimplifiedCmk value. */ - public String serviceProvisionedResourceGroup() { - return this.serviceProvisionedResourceGroup; + public Boolean enableSimplifiedCmk() { + return this.enableSimplifiedCmk; } /** - * Get the privateLinkCount property: Count of private connections in the workspace. + * Set the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the privateLinkCount value. + * @param enableSimplifiedCmk the enableSimplifiedCmk value to set. + * @return the WorkspacePropertiesInner object itself. */ - public Integer privateLinkCount() { - return this.privateLinkCount; + public WorkspacePropertiesInner withEnableSimplifiedCmk(Boolean enableSimplifiedCmk) { + this.enableSimplifiedCmk = enableSimplifiedCmk; + return this; } /** - * Get the imageBuildCompute property: The compute name for image build. + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @return the imageBuildCompute value. + * @return the enableSoftwareBillOfMaterials value. */ - public String imageBuildCompute() { - return this.imageBuildCompute; + public Boolean enableSoftwareBillOfMaterials() { + return this.enableSoftwareBillOfMaterials; } /** - * Set the imageBuildCompute property: The compute name for image build. + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @param imageBuildCompute the imageBuildCompute value to set. + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; + public WorkspacePropertiesInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + this.enableSoftwareBillOfMaterials = enableSoftwareBillOfMaterials; return this; } /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Get the encryption property: The encryption property. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the encryption value. */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.allowPublicAccessWhenBehindVnet; + public EncryptionProperty encryption() { + return this.encryption; } /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Set the encryption property: The encryption property. * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. + * @param encryption the encryption value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; + public WorkspacePropertiesInner withEncryption(EncryptionProperty encryption) { + this.encryption = encryption; return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Get the existingWorkspaces property: The existingWorkspaces property. * - * @return the publicNetworkAccess value. + * @return the existingWorkspaces value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + public List existingWorkspaces() { + return this.existingWorkspaces; } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Set the existingWorkspaces property: The existingWorkspaces property. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param existingWorkspaces the existingWorkspaces value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + public WorkspacePropertiesInner withExistingWorkspaces(List existingWorkspaces) { + this.existingWorkspaces = existingWorkspaces; return this; } /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * Get the featureStoreSettings property: Settings for feature store type workspace. * - * @return the privateEndpointConnections value. + * @return the featureStoreSettings value. */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; + public FeatureStoreSettings featureStoreSettings() { + return this.featureStoreSettings; } /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Set the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serverlessComputeSettings value. + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspacePropertiesInner object itself. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.serverlessComputeSettings; + public WorkspacePropertiesInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + this.featureStoreSettings = featureStoreSettings; + return this; } /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the friendlyName value. */ - public WorkspacePropertiesInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - this.serverlessComputeSettings = serverlessComputeSettings; - return this; + public String friendlyName() { + return this.friendlyName; } /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the sharedPrivateLinkResources value. + * @param friendlyName the friendlyName value to set. + * @return the WorkspacePropertiesInner object itself. */ - public List sharedPrivateLinkResources() { - return this.sharedPrivateLinkResources; + public WorkspacePropertiesInner withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; } /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the hbiWorkspace value. */ - public WorkspacePropertiesInner - withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.sharedPrivateLinkResources = sharedPrivateLinkResources; - return this; + public Boolean hbiWorkspace() { + return this.hbiWorkspace; } /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. + * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @return the notebookInfo value. + * @param hbiWorkspace the hbiWorkspace value to set. + * @return the WorkspacePropertiesInner object itself. */ - public NotebookResourceInfoInner notebookInfo() { - return this.notebookInfo; + public WorkspacePropertiesInner withHbiWorkspace(Boolean hbiWorkspace) { + this.hbiWorkspace = hbiWorkspace; + return this; } /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Get the hubResourceId property: The hubResourceId property. * - * @return the serviceManagedResourcesSettings value. + * @return the hubResourceId value. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; + public String hubResourceId() { + return this.hubResourceId; } /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Set the hubResourceId property: The hubResourceId property. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @param hubResourceId the hubResourceId value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; + public WorkspacePropertiesInner withHubResourceId(String hubResourceId) { + this.hubResourceId = hubResourceId; return this; } /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Get the imageBuildCompute property: The compute name for image build. * - * @return the primaryUserAssignedIdentity value. + * @return the imageBuildCompute value. */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; + public String imageBuildCompute() { + return this.imageBuildCompute; } /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Set the imageBuildCompute property: The compute name for image build. * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @param imageBuildCompute the imageBuildCompute value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; + public WorkspacePropertiesInner withImageBuildCompute(String imageBuildCompute) { + this.imageBuildCompute = imageBuildCompute; return this; } /** - * Get the tenantId property: The tenant id associated with this workspace. + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the tenantId value. + * @return the ipAllowlist value. */ - public String tenantId() { - return this.tenantId; + public List ipAllowlist() { + return this.ipAllowlist; } /** - * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the storageHnsEnabled value. + * @param ipAllowlist the ipAllowlist value to set. + * @return the WorkspacePropertiesInner object itself. */ - public Boolean storageHnsEnabled() { - return this.storageHnsEnabled; + public WorkspacePropertiesInner withIpAllowlist(List ipAllowlist) { + this.ipAllowlist = ipAllowlist; + return this; } /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. * - * @return the mlFlowTrackingUri value. + * @return the keyVault value. */ - public String mlFlowTrackingUri() { - return this.mlFlowTrackingUri; + public String keyVault() { + return this.keyVault; } /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. * - * @return the v1LegacyMode value. + * @param keyVault the keyVault value to set. + * @return the WorkspacePropertiesInner object itself. */ - public Boolean v1LegacyMode() { - return this.v1LegacyMode; + public WorkspacePropertiesInner withKeyVault(String keyVault) { + this.keyVault = keyVault; + return this; } /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Get the keyVaults property: The keyVaults property. * - * @param v1LegacyMode the v1LegacyMode value to set. + * @return the keyVaults value. + */ + public List keyVaults() { + return this.keyVaults; + } + + /** + * Set the keyVaults property: The keyVaults property. + * + * @param keyVaults the keyVaults value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { - this.v1LegacyMode = v1LegacyMode; + public WorkspacePropertiesInner withKeyVaults(List keyVaults) { + this.keyVaults = keyVaults; return this; } /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * Get the managedNetwork property: The managedNetwork property. * * @return the managedNetwork value. */ @@ -646,7 +739,7 @@ public ManagedNetworkSettingsInner managedNetwork() { } /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * Set the managedNetwork property: The managedNetwork property. * * @param managedNetwork the managedNetwork value to set. * @return the WorkspacePropertiesInner object itself. @@ -657,82 +750,330 @@ public WorkspacePropertiesInner withManagedNetwork(ManagedNetworkSettingsInner m } /** - * Get the featureStoreSettings property: Settings for feature store type workspace. + * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. * - * @return the featureStoreSettings value. + * @return the mlFlowTrackingUri value. */ - public FeatureStoreSettings featureStoreSettings() { - return this.featureStoreSettings; + public String mlFlowTrackingUri() { + return this.mlFlowTrackingUri; } /** - * Set the featureStoreSettings property: Settings for feature store type workspace. + * Get the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @param featureStoreSettings the featureStoreSettings value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the networkAcls value. */ - public WorkspacePropertiesInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - this.featureStoreSettings = featureStoreSettings; - return this; + public NetworkAcls networkAcls() { + return this.networkAcls; } /** - * Get the associatedWorkspaces property: The associatedWorkspaces property. + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the associatedWorkspaces value. + * @param networkAcls the networkAcls value to set. + * @return the WorkspacePropertiesInner object itself. */ - public List associatedWorkspaces() { - return this.associatedWorkspaces; + public WorkspacePropertiesInner withNetworkAcls(NetworkAcls networkAcls) { + this.networkAcls = networkAcls; + return this; } /** - * Set the associatedWorkspaces property: The associatedWorkspaces property. + * Get the notebookInfo property: The notebook info of Azure ML workspace. * - * @param associatedWorkspaces the associatedWorkspaces value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the notebookInfo value. */ - public WorkspacePropertiesInner withAssociatedWorkspaces(List associatedWorkspaces) { - this.associatedWorkspaces = associatedWorkspaces; - return this; + public NotebookResourceInfoInner notebookInfo() { + return this.notebookInfo; } /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @return the enableDataIsolation value. + * @return the primaryUserAssignedIdentity value. */ - public Boolean enableDataIsolation() { - return this.enableDataIsolation; + public String primaryUserAssignedIdentity() { + return this.primaryUserAssignedIdentity; } /** - * Set the enableDataIsolation property: The enableDataIsolation property. + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @param enableDataIsolation the enableDataIsolation value to set. + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withEnableDataIsolation(Boolean enableDataIsolation) { - this.enableDataIsolation = enableDataIsolation; + public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; return this; } /** - * Get the hubResourceId property: The hubResourceId property. + * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the hubResourceId value. + * @return the privateEndpointConnections value. */ - public String hubResourceId() { - return this.hubResourceId; + public List privateEndpointConnections() { + return this.privateEndpointConnections; } /** - * Set the hubResourceId property: The hubResourceId property. + * Get the privateLinkCount property: Count of private connections in the workspace. * - * @param hubResourceId the hubResourceId value to set. + * @return the privateLinkCount value. + */ + public Integer privateLinkCount() { + return this.privateLinkCount; + } + + /** + * Get the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. + * + * @return the provisionNetworkNow value. + */ + public Boolean provisionNetworkNow() { + return this.provisionNetworkNow; + } + + /** + * Set the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. + * + * @param provisionNetworkNow the provisionNetworkNow value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withHubResourceId(String hubResourceId) { - this.hubResourceId = hubResourceId; + public WorkspacePropertiesInner withProvisionNetworkNow(Boolean provisionNetworkNow) { + this.provisionNetworkNow = provisionNetworkNow; + return this; + } + + /** + * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.serverlessComputeSettings; + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + this.serverlessComputeSettings = serverlessComputeSettings; + return this; + } + + /** + * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @return the serviceManagedResourcesSettings value. + */ + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.serviceManagedResourcesSettings; + } + + /** + * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; + return this; + } + + /** + * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. + * + * @return the serviceProvisionedResourceGroup value. + */ + public String serviceProvisionedResourceGroup() { + return this.serviceProvisionedResourceGroup; + } + + /** + * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @return the sharedPrivateLinkResources value. + */ + public List sharedPrivateLinkResources() { + return this.sharedPrivateLinkResources; + } + + /** + * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * + * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner + withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + this.sharedPrivateLinkResources = sharedPrivateLinkResources; + return this; + } + + /** + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + public Integer softDeleteRetentionInDays() { + return this.softDeleteRetentionInDays; + } + + /** + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + this.softDeleteRetentionInDays = softDeleteRetentionInDays; + return this; + } + + /** + * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @return the storageAccount value. + */ + public String storageAccount() { + return this.storageAccount; + } + + /** + * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @param storageAccount the storageAccount value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withStorageAccount(String storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Get the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + public List storageAccounts() { + return this.storageAccounts; + } + + /** + * Set the storageAccounts property: The storageAccounts property. + * + * @param storageAccounts the storageAccounts value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withStorageAccounts(List storageAccounts) { + this.storageAccounts = storageAccounts; + return this; + } + + /** + * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) + * enabled. + * + * @return the storageHnsEnabled value. + */ + public Boolean storageHnsEnabled() { + return this.storageHnsEnabled; + } + + /** + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.systemDatastoresAuthMode; + } + + /** + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { + this.systemDatastoresAuthMode = systemDatastoresAuthMode; + return this; + } + + /** + * Get the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + public Boolean v1LegacyMode() { + return this.v1LegacyMode; + } + + /** + * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @param v1LegacyMode the v1LegacyMode value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { + this.v1LegacyMode = v1LegacyMode; return this; } @@ -757,38 +1098,12 @@ public WorkspacePropertiesInner withWorkspaceHubConfig(WorkspaceHubConfig worksp } /** - * Validates the instance. + * Get the workspaceId property: The immutable id associated with this workspace. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the workspaceId value. */ - public void validate() { - if (encryption() != null) { - encryption().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (serverlessComputeSettings() != null) { - serverlessComputeSettings().validate(); - } - if (sharedPrivateLinkResources() != null) { - sharedPrivateLinkResources().forEach(e -> e.validate()); - } - if (notebookInfo() != null) { - notebookInfo().validate(); - } - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - if (managedNetwork() != null) { - managedNetwork().validate(); - } - if (featureStoreSettings() != null) { - featureStoreSettings().validate(); - } - if (workspaceHubConfig() != null) { - workspaceHubConfig().validate(); - } + public String workspaceId() { + return this.workspaceId; } /** @@ -797,31 +1112,48 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("keyVault", this.keyVault); + jsonWriter.writeBooleanField("allowPublicAccessWhenBehindVnet", this.allowPublicAccessWhenBehindVnet); + jsonWriter.writeBooleanField("allowRoleAssignmentOnRG", this.allowRoleAssignmentOnRG); jsonWriter.writeStringField("applicationInsights", this.applicationInsights); + jsonWriter.writeArrayField("associatedWorkspaces", this.associatedWorkspaces, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("containerRegistries", this.containerRegistries, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("containerRegistry", this.containerRegistry); - jsonWriter.writeStringField("storageAccount", this.storageAccount); + jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("discoveryUrl", this.discoveryUrl); + jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); + jsonWriter.writeBooleanField("enableServiceSideCMKEncryption", this.enableServiceSideCmkEncryption); + jsonWriter.writeBooleanField("enableSimplifiedCmk", this.enableSimplifiedCmk); + jsonWriter.writeBooleanField("enableSoftwareBillOfMaterials", this.enableSoftwareBillOfMaterials); jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeArrayField("existingWorkspaces", this.existingWorkspaces, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); + jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeBooleanField("hbiWorkspace", this.hbiWorkspace); + jsonWriter.writeStringField("hubResourceId", this.hubResourceId); jsonWriter.writeStringField("imageBuildCompute", this.imageBuildCompute); - jsonWriter.writeBooleanField("allowPublicAccessWhenBehindVnet", this.allowPublicAccessWhenBehindVnet); + jsonWriter.writeArrayField("ipAllowlist", this.ipAllowlist, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("keyVault", this.keyVault); + jsonWriter.writeArrayField("keyVaults", this.keyVaults, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); + jsonWriter.writeJsonField("networkAcls", this.networkAcls); + jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); + jsonWriter.writeBooleanField("provisionNetworkNow", this.provisionNetworkNow); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); + jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); jsonWriter.writeArrayField("sharedPrivateLinkResources", this.sharedPrivateLinkResources, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); - jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); - jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); - jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); - jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); - jsonWriter.writeArrayField("associatedWorkspaces", this.associatedWorkspaces, + jsonWriter.writeNumberField("softDeleteRetentionInDays", this.softDeleteRetentionInDays); + jsonWriter.writeStringField("storageAccount", this.storageAccount); + jsonWriter.writeArrayField("storageAccounts", this.storageAccounts, (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); - jsonWriter.writeStringField("hubResourceId", this.hubResourceId); + jsonWriter.writeStringField("systemDatastoresAuthMode", + this.systemDatastoresAuthMode == null ? null : this.systemDatastoresAuthMode.toString()); + jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); jsonWriter.writeJsonField("workspaceHubConfig", this.workspaceHubConfig); return jsonWriter.writeEndObject(); } @@ -841,81 +1173,121 @@ public static WorkspacePropertiesInner fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("workspaceId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.workspaceId = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedWorkspacePropertiesInner.description = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedWorkspacePropertiesInner.friendlyName = reader.getString(); - } else if ("keyVault".equals(fieldName)) { - deserializedWorkspacePropertiesInner.keyVault = reader.getString(); + if ("agentsEndpointUri".equals(fieldName)) { + deserializedWorkspacePropertiesInner.agentsEndpointUri = reader.getString(); + } else if ("allowPublicAccessWhenBehindVnet".equals(fieldName)) { + deserializedWorkspacePropertiesInner.allowPublicAccessWhenBehindVnet + = reader.getNullable(JsonReader::getBoolean); + } else if ("allowRoleAssignmentOnRG".equals(fieldName)) { + deserializedWorkspacePropertiesInner.allowRoleAssignmentOnRG + = reader.getNullable(JsonReader::getBoolean); } else if ("applicationInsights".equals(fieldName)) { deserializedWorkspacePropertiesInner.applicationInsights = reader.getString(); + } else if ("associatedWorkspaces".equals(fieldName)) { + List associatedWorkspaces = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.associatedWorkspaces = associatedWorkspaces; + } else if ("containerRegistries".equals(fieldName)) { + List containerRegistries = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.containerRegistries = containerRegistries; } else if ("containerRegistry".equals(fieldName)) { deserializedWorkspacePropertiesInner.containerRegistry = reader.getString(); - } else if ("storageAccount".equals(fieldName)) { - deserializedWorkspacePropertiesInner.storageAccount = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedWorkspacePropertiesInner.description = reader.getString(); } else if ("discoveryUrl".equals(fieldName)) { deserializedWorkspacePropertiesInner.discoveryUrl = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedWorkspacePropertiesInner.provisioningState - = ProvisioningState.fromString(reader.getString()); + } else if ("enableDataIsolation".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableDataIsolation + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableServiceSideCMKEncryption".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableServiceSideCmkEncryption + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSimplifiedCmk".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableSimplifiedCmk + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSoftwareBillOfMaterials".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableSoftwareBillOfMaterials + = reader.getNullable(JsonReader::getBoolean); } else if ("encryption".equals(fieldName)) { deserializedWorkspacePropertiesInner.encryption = EncryptionProperty.fromJson(reader); + } else if ("existingWorkspaces".equals(fieldName)) { + List existingWorkspaces = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.existingWorkspaces = existingWorkspaces; + } else if ("featureStoreSettings".equals(fieldName)) { + deserializedWorkspacePropertiesInner.featureStoreSettings = FeatureStoreSettings.fromJson(reader); + } else if ("friendlyName".equals(fieldName)) { + deserializedWorkspacePropertiesInner.friendlyName = reader.getString(); } else if ("hbiWorkspace".equals(fieldName)) { deserializedWorkspacePropertiesInner.hbiWorkspace = reader.getNullable(JsonReader::getBoolean); - } else if ("serviceProvisionedResourceGroup".equals(fieldName)) { - deserializedWorkspacePropertiesInner.serviceProvisionedResourceGroup = reader.getString(); - } else if ("privateLinkCount".equals(fieldName)) { - deserializedWorkspacePropertiesInner.privateLinkCount = reader.getNullable(JsonReader::getInt); + } else if ("hubResourceId".equals(fieldName)) { + deserializedWorkspacePropertiesInner.hubResourceId = reader.getString(); } else if ("imageBuildCompute".equals(fieldName)) { deserializedWorkspacePropertiesInner.imageBuildCompute = reader.getString(); - } else if ("allowPublicAccessWhenBehindVnet".equals(fieldName)) { - deserializedWorkspacePropertiesInner.allowPublicAccessWhenBehindVnet - = reader.getNullable(JsonReader::getBoolean); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedWorkspacePropertiesInner.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); + } else if ("ipAllowlist".equals(fieldName)) { + List ipAllowlist = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.ipAllowlist = ipAllowlist; + } else if ("keyVault".equals(fieldName)) { + deserializedWorkspacePropertiesInner.keyVault = reader.getString(); + } else if ("keyVaults".equals(fieldName)) { + List keyVaults = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.keyVaults = keyVaults; + } else if ("managedNetwork".equals(fieldName)) { + deserializedWorkspacePropertiesInner.managedNetwork = ManagedNetworkSettingsInner.fromJson(reader); + } else if ("mlFlowTrackingUri".equals(fieldName)) { + deserializedWorkspacePropertiesInner.mlFlowTrackingUri = reader.getString(); + } else if ("networkAcls".equals(fieldName)) { + deserializedWorkspacePropertiesInner.networkAcls = NetworkAcls.fromJson(reader); + } else if ("notebookInfo".equals(fieldName)) { + deserializedWorkspacePropertiesInner.notebookInfo = NotebookResourceInfoInner.fromJson(reader); + } else if ("primaryUserAssignedIdentity".equals(fieldName)) { + deserializedWorkspacePropertiesInner.primaryUserAssignedIdentity = reader.getString(); } else if ("privateEndpointConnections".equals(fieldName)) { List privateEndpointConnections = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); deserializedWorkspacePropertiesInner.privateEndpointConnections = privateEndpointConnections; + } else if ("privateLinkCount".equals(fieldName)) { + deserializedWorkspacePropertiesInner.privateLinkCount = reader.getNullable(JsonReader::getInt); + } else if ("provisionNetworkNow".equals(fieldName)) { + deserializedWorkspacePropertiesInner.provisionNetworkNow + = reader.getNullable(JsonReader::getBoolean); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkspacePropertiesInner.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedWorkspacePropertiesInner.publicNetworkAccess + = PublicNetworkAccess.fromString(reader.getString()); } else if ("serverlessComputeSettings".equals(fieldName)) { deserializedWorkspacePropertiesInner.serverlessComputeSettings = ServerlessComputeSettings.fromJson(reader); + } else if ("serviceManagedResourcesSettings".equals(fieldName)) { + deserializedWorkspacePropertiesInner.serviceManagedResourcesSettings + = ServiceManagedResourcesSettings.fromJson(reader); + } else if ("serviceProvisionedResourceGroup".equals(fieldName)) { + deserializedWorkspacePropertiesInner.serviceProvisionedResourceGroup = reader.getString(); } else if ("sharedPrivateLinkResources".equals(fieldName)) { List sharedPrivateLinkResources = reader.readArray(reader1 -> SharedPrivateLinkResource.fromJson(reader1)); deserializedWorkspacePropertiesInner.sharedPrivateLinkResources = sharedPrivateLinkResources; - } else if ("notebookInfo".equals(fieldName)) { - deserializedWorkspacePropertiesInner.notebookInfo = NotebookResourceInfoInner.fromJson(reader); - } else if ("serviceManagedResourcesSettings".equals(fieldName)) { - deserializedWorkspacePropertiesInner.serviceManagedResourcesSettings - = ServiceManagedResourcesSettings.fromJson(reader); - } else if ("primaryUserAssignedIdentity".equals(fieldName)) { - deserializedWorkspacePropertiesInner.primaryUserAssignedIdentity = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.tenantId = reader.getString(); + } else if ("softDeleteRetentionInDays".equals(fieldName)) { + deserializedWorkspacePropertiesInner.softDeleteRetentionInDays + = reader.getNullable(JsonReader::getInt); + } else if ("storageAccount".equals(fieldName)) { + deserializedWorkspacePropertiesInner.storageAccount = reader.getString(); + } else if ("storageAccounts".equals(fieldName)) { + List storageAccounts = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.storageAccounts = storageAccounts; } else if ("storageHnsEnabled".equals(fieldName)) { deserializedWorkspacePropertiesInner.storageHnsEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("mlFlowTrackingUri".equals(fieldName)) { - deserializedWorkspacePropertiesInner.mlFlowTrackingUri = reader.getString(); + } else if ("systemDatastoresAuthMode".equals(fieldName)) { + deserializedWorkspacePropertiesInner.systemDatastoresAuthMode + = SystemDatastoresAuthMode.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedWorkspacePropertiesInner.tenantId = reader.getString(); } else if ("v1LegacyMode".equals(fieldName)) { deserializedWorkspacePropertiesInner.v1LegacyMode = reader.getNullable(JsonReader::getBoolean); - } else if ("managedNetwork".equals(fieldName)) { - deserializedWorkspacePropertiesInner.managedNetwork = ManagedNetworkSettingsInner.fromJson(reader); - } else if ("featureStoreSettings".equals(fieldName)) { - deserializedWorkspacePropertiesInner.featureStoreSettings = FeatureStoreSettings.fromJson(reader); - } else if ("associatedWorkspaces".equals(fieldName)) { - List associatedWorkspaces = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkspacePropertiesInner.associatedWorkspaces = associatedWorkspaces; - } else if ("enableDataIsolation".equals(fieldName)) { - deserializedWorkspacePropertiesInner.enableDataIsolation - = reader.getNullable(JsonReader::getBoolean); - } else if ("hubResourceId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.hubResourceId = reader.getString(); } else if ("workspaceHubConfig".equals(fieldName)) { deserializedWorkspacePropertiesInner.workspaceHubConfig = WorkspaceHubConfig.fromJson(reader); + } else if ("workspaceId".equals(fieldName)) { + deserializedWorkspacePropertiesInner.workspaceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java index b032dc624ca5..c24702e0b197 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.fluent.models; @@ -11,24 +11,62 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; import java.io.IOException; +import java.util.List; /** - * The parameters for updating the properties of a machine learning workspace. + * The parameters for updating a machine learning workspace. */ @Fluent public final class WorkspacePropertiesUpdateParametersInner implements JsonSerializable { + /* + * The allowRoleAssignmentOnRG property. + */ + private Boolean allowRoleAssignmentOnRG; + + /* + * ARM id of the application insights associated with this workspace. + */ + private String applicationInsights; + + /* + * ARM id of the container registry associated with this workspace. + */ + private String containerRegistry; + /* * The description of this workspace. */ private String description; /* - * The friendly name for this workspace. + * The enableDataIsolation property. + */ + private Boolean enableDataIsolation; + + /* + * Flag to tell if SoftwareBillOfMaterials should be enabled for this workspace + */ + private Boolean enableSoftwareBillOfMaterials; + + /* + * The encryption property. + */ + private EncryptionUpdateProperties encryption; + + /* + * Settings for feature store type workspace. + */ + private FeatureStoreSettings featureStoreSettings; + + /* + * The friendly name for this workspace. This name in mutable */ private String friendlyName; @@ -38,66 +76,121 @@ public final class WorkspacePropertiesUpdateParametersInner private String imageBuildCompute; /* - * The service managed resource settings. + * The list of IPv4 addresses that are allowed to access the workspace. */ - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; + private List ipAllowlist; /* - * The user assigned identity resource id that represents the workspace identity. + * The managedNetwork property. */ - private String primaryUserAssignedIdentity; + private ManagedNetworkSettingsInner managedNetwork; /* - * Settings for serverless compute created in the workspace + * A set of rules governing the network accessibility of the workspace. */ - private ServerlessComputeSettings serverlessComputeSettings; + private NetworkAcls networkAcls; /* - * Whether requests from Public Network are allowed. + * The user assigned identity resource id that represents the workspace identity. */ - private PublicNetworkAccess publicNetworkAccess; + private String primaryUserAssignedIdentity; /* - * ARM id of the application insights associated with this workspace. + * Whether requests from Public Network are allowed. */ - private String applicationInsights; + private PublicNetworkAccess publicNetworkAccess; /* - * ARM id of the container registry associated with this workspace. + * Settings for serverless compute in a workspace */ - private String containerRegistry; + private ServerlessComputeSettings serverlessComputeSettings; /* - * Settings for feature store type workspace. + * The service managed resource settings. */ - private FeatureStoreSettings featureStoreSettings; + private ServiceManagedResourcesSettings serviceManagedResourcesSettings; /* - * Managed Network settings for a machine learning workspace. + * Retention time in days after workspace get soft deleted. */ - private ManagedNetworkSettingsInner managedNetwork; + private Integer softDeleteRetentionInDays; /* - * The enableDataIsolation property. + * The auth mode used for accessing the system datastores of the workspace. */ - private Boolean enableDataIsolation; + private SystemDatastoresAuthMode systemDatastoresAuthMode; /* * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. */ private Boolean v1LegacyMode; - /* - * The encryption property. - */ - private EncryptionUpdateProperties encryption; - /** * Creates an instance of WorkspacePropertiesUpdateParametersInner class. */ public WorkspacePropertiesUpdateParametersInner() { } + /** + * Get the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @return the allowRoleAssignmentOnRG value. + */ + public Boolean allowRoleAssignmentOnRG() { + return this.allowRoleAssignmentOnRG; + } + + /** + * Set the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { + this.allowRoleAssignmentOnRG = allowRoleAssignmentOnRG; + return this; + } + + /** + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. + */ + public String applicationInsights() { + return this.applicationInsights; + } + + /** + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @param applicationInsights the applicationInsights value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withApplicationInsights(String applicationInsights) { + this.applicationInsights = applicationInsights; + return this; + } + + /** + * Get the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @return the containerRegistry value. + */ + public String containerRegistry() { + return this.containerRegistry; + } + + /** + * Set the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @param containerRegistry the containerRegistry value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withContainerRegistry(String containerRegistry) { + this.containerRegistry = containerRegistry; + return this; + } + /** * Get the description property: The description of this workspace. * @@ -119,7 +212,91 @@ public WorkspacePropertiesUpdateParametersInner withDescription(String descripti } /** - * Get the friendlyName property: The friendly name for this workspace. + * Get the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. + */ + public Boolean enableDataIsolation() { + return this.enableDataIsolation; + } + + /** + * Set the enableDataIsolation property: The enableDataIsolation property. + * + * @param enableDataIsolation the enableDataIsolation value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withEnableDataIsolation(Boolean enableDataIsolation) { + this.enableDataIsolation = enableDataIsolation; + return this; + } + + /** + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + public Boolean enableSoftwareBillOfMaterials() { + return this.enableSoftwareBillOfMaterials; + } + + /** + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + this.enableSoftwareBillOfMaterials = enableSoftwareBillOfMaterials; + return this; + } + + /** + * Get the encryption property: The encryption property. + * + * @return the encryption value. + */ + public EncryptionUpdateProperties encryption() { + return this.encryption; + } + + /** + * Set the encryption property: The encryption property. + * + * @param encryption the encryption value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withEncryption(EncryptionUpdateProperties encryption) { + this.encryption = encryption; + return this; + } + + /** + * Get the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + public FeatureStoreSettings featureStoreSettings() { + return this.featureStoreSettings; + } + + /** + * Set the featureStoreSettings property: Settings for feature store type workspace. + * + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner + withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + this.featureStoreSettings = featureStoreSettings; + return this; + } + + /** + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. * * @return the friendlyName value. */ @@ -128,7 +305,7 @@ public String friendlyName() { } /** - * Set the friendlyName property: The friendly name for this workspace. + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. * * @param friendlyName the friendlyName value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. @@ -159,188 +336,190 @@ public WorkspacePropertiesUpdateParametersInner withImageBuildCompute(String ima } /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the ipAllowlist value. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; + public List ipAllowlist() { + return this.ipAllowlist; } /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @param ipAllowlist the ipAllowlist value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; + public WorkspacePropertiesUpdateParametersInner withIpAllowlist(List ipAllowlist) { + this.ipAllowlist = ipAllowlist; return this; } /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Get the managedNetwork property: The managedNetwork property. * - * @return the primaryUserAssignedIdentity value. + * @return the managedNetwork value. */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; + public ManagedNetworkSettingsInner managedNetwork() { + return this.managedNetwork; } /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Set the managedNetwork property: The managedNetwork property. * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @param managedNetwork the managedNetwork value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner - withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; + public WorkspacePropertiesUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + this.managedNetwork = managedNetwork; return this; } /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Get the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the serverlessComputeSettings value. + * @return the networkAcls value. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.serverlessComputeSettings; + public NetworkAcls networkAcls() { + return this.networkAcls; } /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @param networkAcls the networkAcls value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner - withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - this.serverlessComputeSettings = serverlessComputeSettings; + public WorkspacePropertiesUpdateParametersInner withNetworkAcls(NetworkAcls networkAcls) { + this.networkAcls = networkAcls; return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @return the publicNetworkAccess value. + * @return the primaryUserAssignedIdentity value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + public String primaryUserAssignedIdentity() { + return this.primaryUserAssignedIdentity; } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + public WorkspacePropertiesUpdateParametersInner + withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the applicationInsights value. + * @return the publicNetworkAccess value. */ - public String applicationInsights() { - return this.applicationInsights; + public PublicNetworkAccess publicNetworkAccess() { + return this.publicNetworkAccess; } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @param applicationInsights the applicationInsights value to set. + * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; + public WorkspacePropertiesUpdateParametersInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; return this; } /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the containerRegistry value. + * @return the serverlessComputeSettings value. */ - public String containerRegistry() { - return this.containerRegistry; + public ServerlessComputeSettings serverlessComputeSettings() { + return this.serverlessComputeSettings; } /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param containerRegistry the containerRegistry value to set. + * @param serverlessComputeSettings the serverlessComputeSettings value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; + public WorkspacePropertiesUpdateParametersInner + withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + this.serverlessComputeSettings = serverlessComputeSettings; return this; } /** - * Get the featureStoreSettings property: Settings for feature store type workspace. + * Get the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the featureStoreSettings value. + * @return the serviceManagedResourcesSettings value. */ - public FeatureStoreSettings featureStoreSettings() { - return this.featureStoreSettings; + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.serviceManagedResourcesSettings; } /** - * Set the featureStoreSettings property: Settings for feature store type workspace. + * Set the serviceManagedResourcesSettings property: The service managed resource settings. * - * @param featureStoreSettings the featureStoreSettings value to set. + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ public WorkspacePropertiesUpdateParametersInner - withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - this.featureStoreSettings = featureStoreSettings; + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; return this; } /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @return the managedNetwork value. + * @return the softDeleteRetentionInDays value. */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.managedNetwork; + public Integer softDeleteRetentionInDays() { + return this.softDeleteRetentionInDays; } /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @param managedNetwork the managedNetwork value to set. + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - this.managedNetwork = managedNetwork; + public WorkspacePropertiesUpdateParametersInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + this.softDeleteRetentionInDays = softDeleteRetentionInDays; return this; } /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @return the enableDataIsolation value. + * @return the systemDatastoresAuthMode value. */ - public Boolean enableDataIsolation() { - return this.enableDataIsolation; + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.systemDatastoresAuthMode; } /** - * Set the enableDataIsolation property: The enableDataIsolation property. + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @param enableDataIsolation the enableDataIsolation value to set. + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withEnableDataIsolation(Boolean enableDataIsolation) { - this.enableDataIsolation = enableDataIsolation; + public WorkspacePropertiesUpdateParametersInner + withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { + this.systemDatastoresAuthMode = systemDatastoresAuthMode; return this; } @@ -366,70 +545,34 @@ public WorkspacePropertiesUpdateParametersInner withV1LegacyMode(Boolean v1Legac return this; } - /** - * Get the encryption property: The encryption property. - * - * @return the encryption value. - */ - public EncryptionUpdateProperties encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption property. - * - * @param encryption the encryption value to set. - * @return the WorkspacePropertiesUpdateParametersInner object itself. - */ - public WorkspacePropertiesUpdateParametersInner withEncryption(EncryptionUpdateProperties encryption) { - this.encryption = encryption; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - if (serverlessComputeSettings() != null) { - serverlessComputeSettings().validate(); - } - if (featureStoreSettings() != null) { - featureStoreSettings().validate(); - } - if (managedNetwork() != null) { - managedNetwork().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("allowRoleAssignmentOnRG", this.allowRoleAssignmentOnRG); + jsonWriter.writeStringField("applicationInsights", this.applicationInsights); + jsonWriter.writeStringField("containerRegistry", this.containerRegistry); jsonWriter.writeStringField("description", this.description); + jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); + jsonWriter.writeBooleanField("enableSoftwareBillOfMaterials", this.enableSoftwareBillOfMaterials); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeStringField("imageBuildCompute", this.imageBuildCompute); - jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); + jsonWriter.writeArrayField("ipAllowlist", this.ipAllowlist, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); + jsonWriter.writeJsonField("networkAcls", this.networkAcls); jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); - jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeStringField("applicationInsights", this.applicationInsights); - jsonWriter.writeStringField("containerRegistry", this.containerRegistry); - jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); - jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); - jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); + jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); + jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); + jsonWriter.writeNumberField("softDeleteRetentionInDays", this.softDeleteRetentionInDays); + jsonWriter.writeStringField("systemDatastoresAuthMode", + this.systemDatastoresAuthMode == null ? null : this.systemDatastoresAuthMode.toString()); jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); - jsonWriter.writeJsonField("encryption", this.encryption); return jsonWriter.writeEndObject(); } @@ -449,43 +592,60 @@ public static WorkspacePropertiesUpdateParametersInner fromJson(JsonReader jsonR String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { + if ("allowRoleAssignmentOnRG".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.allowRoleAssignmentOnRG + = reader.getNullable(JsonReader::getBoolean); + } else if ("applicationInsights".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.applicationInsights = reader.getString(); + } else if ("containerRegistry".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.containerRegistry = reader.getString(); + } else if ("description".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.description = reader.getString(); + } else if ("enableDataIsolation".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.enableDataIsolation + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSoftwareBillOfMaterials".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.enableSoftwareBillOfMaterials + = reader.getNullable(JsonReader::getBoolean); + } else if ("encryption".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.encryption + = EncryptionUpdateProperties.fromJson(reader); + } else if ("featureStoreSettings".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.featureStoreSettings + = FeatureStoreSettings.fromJson(reader); } else if ("friendlyName".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.friendlyName = reader.getString(); } else if ("imageBuildCompute".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.imageBuildCompute = reader.getString(); - } else if ("serviceManagedResourcesSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.serviceManagedResourcesSettings - = ServiceManagedResourcesSettings.fromJson(reader); + } else if ("ipAllowlist".equals(fieldName)) { + List ipAllowlist = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesUpdateParametersInner.ipAllowlist = ipAllowlist; + } else if ("managedNetwork".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.managedNetwork + = ManagedNetworkSettingsInner.fromJson(reader); + } else if ("networkAcls".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.networkAcls = NetworkAcls.fromJson(reader); } else if ("primaryUserAssignedIdentity".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.primaryUserAssignedIdentity = reader.getString(); - } else if ("serverlessComputeSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.serverlessComputeSettings - = ServerlessComputeSettings.fromJson(reader); } else if ("publicNetworkAccess".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.publicNetworkAccess = PublicNetworkAccess.fromString(reader.getString()); - } else if ("applicationInsights".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.applicationInsights = reader.getString(); - } else if ("containerRegistry".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.containerRegistry = reader.getString(); - } else if ("featureStoreSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.featureStoreSettings - = FeatureStoreSettings.fromJson(reader); - } else if ("managedNetwork".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.managedNetwork - = ManagedNetworkSettingsInner.fromJson(reader); - } else if ("enableDataIsolation".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.enableDataIsolation - = reader.getNullable(JsonReader::getBoolean); + } else if ("serverlessComputeSettings".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.serverlessComputeSettings + = ServerlessComputeSettings.fromJson(reader); + } else if ("serviceManagedResourcesSettings".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.serviceManagedResourcesSettings + = ServiceManagedResourcesSettings.fromJson(reader); + } else if ("softDeleteRetentionInDays".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.softDeleteRetentionInDays + = reader.getNullable(JsonReader::getInt); + } else if ("systemDatastoresAuthMode".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.systemDatastoresAuthMode + = SystemDatastoresAuthMode.fromString(reader.getString()); } else if ("v1LegacyMode".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.v1LegacyMode = reader.getNullable(JsonReader::getBoolean); - } else if ("encryption".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.encryption - = EncryptionUpdateProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java new file mode 100644 index 000000000000..c56bd1f300e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java @@ -0,0 +1,645 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; +import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The parameters for updating a machine learning workspace. + */ +@Fluent +public final class WorkspaceUpdateParametersInner implements JsonSerializable { + /* + * The identity property. + */ + private ManagedServiceIdentity identity; + + /* + * The properties that the machine learning workspace will be updated with. + */ + private WorkspacePropertiesUpdateParametersInner innerProperties; + + /* + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier + */ + private Sku sku; + + /* + * The resource tags for the machine learning workspace. + */ + private Map tags; + + /** + * Creates an instance of WorkspaceUpdateParametersInner class. + */ + public WorkspaceUpdateParametersInner() { + } + + /** + * Get the identity property: The identity property. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity property. + * + * @param identity the identity value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the innerProperties property: The properties that the machine learning workspace will be updated with. + * + * @return the innerProperties value. + */ + private WorkspacePropertiesUpdateParametersInner innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. + * + * @return the sku value. + */ + public Sku sku() { + return this.sku; + } + + /** + * Set the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. + * + * @param sku the sku value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get the tags property: The resource tags for the machine learning workspace. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The resource tags for the machine learning workspace. + * + * @param tags the tags value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @return the allowRoleAssignmentOnRG value. + */ + public Boolean allowRoleAssignmentOnRG() { + return this.innerProperties() == null ? null : this.innerProperties().allowRoleAssignmentOnRG(); + } + + /** + * Set the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); + return this; + } + + /** + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. + */ + public String applicationInsights() { + return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); + } + + /** + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @param applicationInsights the applicationInsights value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withApplicationInsights(String applicationInsights) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withApplicationInsights(applicationInsights); + return this; + } + + /** + * Get the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @return the containerRegistry value. + */ + public String containerRegistry() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); + } + + /** + * Set the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @param containerRegistry the containerRegistry value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withContainerRegistry(String containerRegistry) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withContainerRegistry(containerRegistry); + return this; + } + + /** + * Get the description property: The description of this workspace. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: The description of this workspace. + * + * @param description the description value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. + */ + public Boolean enableDataIsolation() { + return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); + } + + /** + * Set the enableDataIsolation property: The enableDataIsolation property. + * + * @param enableDataIsolation the enableDataIsolation value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withEnableDataIsolation(Boolean enableDataIsolation) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withEnableDataIsolation(enableDataIsolation); + return this; + } + + /** + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + public Boolean enableSoftwareBillOfMaterials() { + return this.innerProperties() == null ? null : this.innerProperties().enableSoftwareBillOfMaterials(); + } + + /** + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); + return this; + } + + /** + * Get the encryption property: The encryption property. + * + * @return the encryption value. + */ + public EncryptionUpdateProperties encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); + } + + /** + * Set the encryption property: The encryption property. + * + * @param encryption the encryption value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withEncryption(EncryptionUpdateProperties encryption) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withEncryption(encryption); + return this; + } + + /** + * Get the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + public FeatureStoreSettings featureStoreSettings() { + return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); + } + + /** + * Set the featureStoreSettings property: Settings for feature store type workspace. + * + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withFeatureStoreSettings(featureStoreSettings); + return this; + } + + /** + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName the friendlyName value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withFriendlyName(String friendlyName) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withFriendlyName(friendlyName); + return this; + } + + /** + * Get the imageBuildCompute property: The compute name for image build. + * + * @return the imageBuildCompute value. + */ + public String imageBuildCompute() { + return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); + } + + /** + * Set the imageBuildCompute property: The compute name for image build. + * + * @param imageBuildCompute the imageBuildCompute value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withImageBuildCompute(String imageBuildCompute) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withImageBuildCompute(imageBuildCompute); + return this; + } + + /** + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @return the ipAllowlist value. + */ + public List ipAllowlist() { + return this.innerProperties() == null ? null : this.innerProperties().ipAllowlist(); + } + + /** + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. + * + * @param ipAllowlist the ipAllowlist value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withIpAllowlist(List ipAllowlist) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withIpAllowlist(ipAllowlist); + return this; + } + + /** + * Get the managedNetwork property: The managedNetwork property. + * + * @return the managedNetwork value. + */ + public ManagedNetworkSettingsInner managedNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); + } + + /** + * Set the managedNetwork property: The managedNetwork property. + * + * @param managedNetwork the managedNetwork value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withManagedNetwork(managedNetwork); + return this; + } + + /** + * Get the networkAcls property: A set of rules governing the network accessibility of the workspace. + * + * @return the networkAcls value. + */ + public NetworkAcls networkAcls() { + return this.innerProperties() == null ? null : this.innerProperties().networkAcls(); + } + + /** + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. + * + * @param networkAcls the networkAcls value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withNetworkAcls(NetworkAcls networkAcls) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withNetworkAcls(networkAcls); + return this; + } + + /** + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @return the primaryUserAssignedIdentity value. + */ + public String primaryUserAssignedIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); + } + + /** + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. + * + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + return this; + } + + /** + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @return the publicNetworkAccess value. + */ + public PublicNetworkAccess publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @return the serverlessComputeSettings value. + */ + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + } + + /** + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner + withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); + return this; + } + + /** + * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @return the serviceManagedResourcesSettings value. + */ + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); + } + + /** + * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + return this; + } + + /** + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + public Integer softDeleteRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().softDeleteRetentionInDays(); + } + + /** + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); + return this; + } + + /** + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerProperties() == null ? null : this.innerProperties().systemDatastoresAuthMode(); + } + + /** + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner + withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } + + /** + * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + public Boolean v1LegacyMode() { + return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); + } + + /** + * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @param v1LegacyMode the v1LegacyMode value to set. + * @return the WorkspaceUpdateParametersInner object itself. + */ + public WorkspaceUpdateParametersInner withV1LegacyMode(Boolean v1LegacyMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withV1LegacyMode(v1LegacyMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceUpdateParametersInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceUpdateParametersInner 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 WorkspaceUpdateParametersInner. + */ + public static WorkspaceUpdateParametersInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceUpdateParametersInner deserializedWorkspaceUpdateParametersInner + = new WorkspaceUpdateParametersInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("identity".equals(fieldName)) { + deserializedWorkspaceUpdateParametersInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedWorkspaceUpdateParametersInner.innerProperties + = WorkspacePropertiesUpdateParametersInner.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedWorkspaceUpdateParametersInner.sku = Sku.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWorkspaceUpdateParametersInner.tags = tags; + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceUpdateParametersInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java index d9c8caf695b0..b275ebc78c65 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for AzureMachineLearningWorkspaces. + * Package containing the inner data models for MachineLearning. * These APIs allow end users to operate on Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.fluent.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java index f2f5bd32c612..c632996a3ed9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for AzureMachineLearningWorkspaces. + * Package containing the service clients for MachineLearning. * These APIs allow end users to operate on Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.fluent; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java new file mode 100644 index 000000000000..4ef7446f6113 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; + +public final class AccountApiKeysImpl implements AccountApiKeys { + private AccountApiKeysInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + AccountApiKeysImpl(AccountApiKeysInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String key1() { + return this.innerModel().key1(); + } + + public String key2() { + return this.innerModel().key2(); + } + + public AccountApiKeysInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java index ac8f925a38ad..b889e2bdb3a8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java new file mode 100644 index 000000000000..226b13e70d72 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.models.AvailableQuota; +import com.azure.resourcemanager.machinelearning.models.AvailableQuotaProperties; + +public final class AvailableQuotaImpl implements AvailableQuota { + private AvailableQuotaInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + AvailableQuotaImpl(AvailableQuotaInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public AvailableQuotaProperties properties() { + return this.innerModel().properties(); + } + + public AvailableQuotaInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java index 438b2bd3c355..67ecc56ab272 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -51,14 +51,14 @@ public BatchDeploymentProperties properties() { return this.innerModel().properties(); } - public String kind() { - return this.innerModel().kind(); - } - public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public String kind() { + return this.innerModel().kind(); + } + public Sku sku() { return this.innerModel().sku(); } @@ -196,13 +196,13 @@ public BatchDeploymentImpl withTags(Map tags) { } } - public BatchDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); + public BatchDeploymentImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public BatchDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public BatchDeploymentImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } @@ -217,6 +217,6 @@ public BatchDeploymentImpl withProperties(PartialBatchDeployment properties) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java index e4285f70aec1..2385f09209a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,13 +28,14 @@ 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.BinaryData; 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.machinelearning.fluent.BatchDeploymentsClient; import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.BatchDeploymentTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,1223 +53,1012 @@ public final class BatchDeploymentsClientImpl implements BatchDeploymentsClient /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of BatchDeploymentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { + BatchDeploymentsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(BatchDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchDeployments to be used by the + * The interface defining all the services for MachineLearningManagementClientBatchDeployments to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientBatchDeployments") public interface BatchDeploymentsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchDeploymentInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchDeploymentInner body, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 201 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BatchDeploymentInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists Batch inference deployments in the workspace. + * Get batch inference deployment by id. + * + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), orderBy, top, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists Batch inference deployments in the workspace. + * Get batch inference deployment by id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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(), resourceGroupName, workspaceName, - endpointName, this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists Batch inference deployments in the workspace. + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference deployments in the workspace. + * @return batch inference deployment by id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint 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 paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. + * Gets a batch inference deployment by id on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists Batch inference deployments in the workspace. + * Get batch inference deployment by id. + * + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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 paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Batch inference deployments in the workspace. + * @return batch inference deployment by id. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint 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 paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. + * Gets a batch inference deployment by id along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, deploymentName, accept, context); } /** - * Lists Batch inference deployments in the workspace. + * Get batch inference deployment by id. + * + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, BatchDeploymentInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, Context.NONE); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, BatchDeploymentInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + BatchDeploymentInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); + public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + BatchDeploymentInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(response, + BatchDeploymentInner.class, BatchDeploymentInner.class, Context.NONE); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getSyncPoller(); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 workspaceName, String endpointName, - String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + BatchDeploymentInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return this.client.getLroResult(response, + BatchDeploymentInner.class, BatchDeploymentInner.class, context); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, BatchDeploymentInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); + public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body) + .getFinalResult(); } /** - * Delete Batch Inference deployment (asynchronous). + * Creates/updates a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, BatchDeploymentInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .getFinalResult(); } /** - * Gets a batch inference deployment by id. + * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a batch inference deployment by id. + * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - endpointName, deploymentName, this.client.getApiVersion(), accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, Context.NONE); } /** - * Gets a batch inference deployment by id. + * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context); } /** - * Gets a batch inference deployment by id. + * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BatchDeploymentInner> beginUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); } /** - * Gets a batch inference deployment by id. + * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param deploymentName The identifier for the Batch deployments. + * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + Response response + = updateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(response, + BatchDeploymentInner.class, BatchDeploymentInner.class, Context.NONE); } /** * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { + Response response + = updateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return this.client.getLroResult(response, + BatchDeploymentInner.class, BatchDeploymentInner.class, context); } /** * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); + private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body).getFinalResult(); } /** * Update a batch inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @param body Batch inference deployment definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, context); + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, + Context context) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .getFinalResult(); } /** - * Update a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Update a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + Context.NONE); } /** - * Update a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, context); } /** - * Update a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Update a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Update a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resourceGroupName, - String workspaceName, String endpointName, String deploymentName, BatchDeploymentInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + beginDelete(resourceGroupName, workspaceName, endpointName, deploymentName).getFinalResult(); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @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, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + beginDelete(resourceGroupName, workspaceName, endpointName, deploymentName, context).getFinalResult(); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, - endpointName, deploymentName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchDeploymentInner.class, BatchDeploymentInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, orderBy, top, skip, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - BatchDeploymentInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a paginated list of BatchDeployment entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, BatchDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, orderBy, top, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @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}. + * @return a paginated list of BatchDeployment entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, BatchDeploymentInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, orderBy, top, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Creates/updates a batch inference deployment (asynchronous). + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @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. + * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, BatchDeploymentInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * Lists Batch inference deployments in the workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1280,13 +1070,6 @@ public BatchDeploymentInner createOrUpdate(String resourceGroupName, String work */ @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(), @@ -1295,6 +1078,28 @@ private Mono> listNextSinglePageAsync(String } /** + * Lists Batch inference deployments in the workspace. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of BatchDeployment entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Batch inference deployments in the workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1302,22 +1107,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of BatchDeployment entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java index b6a201a6a73d..846c7e603f21 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,38 +27,12 @@ public BatchDeploymentsImpl(BatchDeploymentsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BatchDeploymentImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BatchDeploymentImpl(inner.getValue(), this.manager())); } public BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, @@ -72,6 +46,28 @@ public BatchDeployment get(String resourceGroupName, String workspaceName, Strin } } + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); + } + public BatchDeployment getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java index f9067b4de92c..7ae5e26f9341 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -53,14 +53,14 @@ public BatchEndpointProperties properties() { return this.innerModel().properties(); } - public String kind() { - return this.innerModel().kind(); - } - public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public String kind() { + return this.innerModel().kind(); + } + public Sku sku() { return this.innerModel().sku(); } @@ -201,13 +201,13 @@ public BatchEndpointImpl withTags(Map tags) { } } - public BatchEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); + public BatchEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public BatchEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public BatchEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } @@ -222,6 +222,6 @@ public BatchEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java index e1bf9be205ea..ba07f377ca8b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -36,7 +37,7 @@ import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.BatchEndpointTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -54,663 +55,483 @@ public final class BatchEndpointsClientImpl implements BatchEndpointsClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of BatchEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + BatchEndpointsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(BatchEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchEndpoints to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientBatchEndpoints to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientBatchEndpoints") public interface BatchEndpointsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BatchEndpointInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BatchEndpointInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchEndpointInner body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists Batch inference endpoint in the workspace. + * Get batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - Integer count, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), count, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists Batch inference endpoint in the workspace. + * Get batch inference endpoint by name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @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 paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - Integer count, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), count, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists Batch inference endpoint in the workspace. + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, - String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference endpoint in the workspace. + * @return batch inference endpoint by name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. + * Gets a batch inference endpoint by name on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Integer count = null; - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists Batch inference endpoint in the workspace. + * Get batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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 paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, - String skip, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Batch inference endpoint in the workspace. + * @return batch inference endpoint by name. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + * Gets a batch inference endpoint by name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final Integer count = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, accept, context); } /** - * Lists Batch inference endpoint in the workspace. + * Get batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, - String skip, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). + * + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). + * + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, BatchEndpointInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + Context.NONE); } /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, BatchEndpointInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, context); } /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); + private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); } /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint 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 resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(response, BatchEndpointInner.class, + BatchEndpointInner.class, Context.NONE); } /** - * Delete Batch Inference Endpoint (asynchronous). + * Create a batch inference endpoint (asynchronous). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - deleteAsync(resourceGroupName, workspaceName, endpointName).block(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, BatchEndpointInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(response, BatchEndpointInner.class, + BatchEndpointInner.class, context); } /** - * Gets a batch inference endpoint by name. + * Create a batch inference endpoint (asynchronous). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a batch inference endpoint by name. + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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(), resourceGroupName, workspaceName, - endpointName, this.client.getApiVersion(), accept, context); + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, BatchEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets a batch inference endpoint by name. + * Create a batch inference endpoint (asynchronous). * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a batch inference endpoint by name. + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. + * @param body Batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, body).getFinalResult(); } /** - * Gets a batch inference endpoint by name. + * Create a batch inference endpoint (asynchronous). + * + * Creates a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Name for the Batch Endpoint. + * @param body Batch inference endpoint definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + BatchEndpointInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, body, context).getFinalResult(); } /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -718,139 +539,127 @@ private Mono>> updateWithResponseAsync(String resource * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, PartialMinimalTrackedResourceWithIdentity body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + Context.NONE); } /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + context); } /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - context = this.client.mergeContext(context); + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, context); + BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); } /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(response, BatchEndpointInner.class, + BatchEndpointInner.class, Context.NONE); } /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchEndpointInner> beginUpdate(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(response, BatchEndpointInner.class, + BatchEndpointInner.class, context); } /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, @@ -863,391 +672,374 @@ private Mono updateAsync(String resourceGroupName, String wo * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, body).getFinalResult(); } /** * Update a batch inference endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @param body Mutable batch inference endpoint definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); + PartialMinimalTrackedResourceWithIdentity body, Context context) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, body, context).getFinalResult(); } /** - * Update a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String endpointName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, Context.NONE); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, context); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchEndpointInner.class, BatchEndpointInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, endpointName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @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, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, endpointName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, BatchEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String workspaceName, String endpointName) { + beginDelete(resourceGroupName, workspaceName, endpointName).getFinalResult(); } /** - * Creates a batch inference endpoint (asynchronous). + * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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 resourceGroupName, String workspaceName, - String endpointName, BatchEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { + beginDelete(resourceGroupName, workspaceName, endpointName, context).getFinalResult(); } /** - * Creates a batch inference endpoint (asynchronous). + * Lists Batch inference endpoint in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of endpoints to be retrieved in a page of results. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + Integer count, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, count, skip, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates a batch inference endpoint (asynchronous). + * Lists Batch inference endpoint in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of endpoints to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, + String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists Batch inference endpoint in the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final Integer count = null; + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Lists Batch inference endpoint in the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of endpoints to be retrieved in a page of results. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - BatchEndpointInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + Integer count, String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, count, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists batch Inference Endpoint keys. + * Lists Batch inference endpoint in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of endpoints to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + Integer count, String skip, Context context) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, count, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists batch Inference Endpoint keys. + * Lists Batch inference endpoint in the workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final Integer count = null; + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, count, skip), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Lists Batch inference endpoint in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of endpoints to be retrieved in a page of results. + * @param skip Continuation token for pagination. * @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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, + String skip, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, count, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Lists batch Inference Endpoint keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } + String workspaceName, String endpointName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists batch Inference Endpoint keys. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1264,8 +1056,8 @@ private Mono listKeysAsync(String resourceGroupName, Stri * Lists batch Inference Endpoint keys. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. @@ -1275,15 +1067,17 @@ private Mono listKeysAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + final String accept = "application/json"; + return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context); } /** * Lists batch Inference Endpoint keys. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1295,6 +1089,8 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace } /** + * Lists Batch inference endpoint in the workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1306,13 +1102,6 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace */ @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(), @@ -1321,6 +1110,28 @@ private Mono> listNextSinglePageAsync(String n } /** + * Lists Batch inference endpoint in the workspace. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Batch inference endpoint in the workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1328,22 +1139,14 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java index f784fb27bdfd..4829f8fff8ff 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,16 +29,21 @@ public BatchEndpointsImpl(BatchEndpointsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BatchEndpointImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, count, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); + public BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { + BatchEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new BatchEndpointImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String endpointName) { @@ -49,37 +54,24 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BatchEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); } - public BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { - BatchEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new BatchEndpointImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, count, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); } public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context) { Response inner = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointAuthKeysImpl(inner.getValue(), this.manager())); } public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java new file mode 100644 index 000000000000..7d2b2f7d9375 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; +import com.azure.resourcemanager.machinelearning.models.CapabilityHost; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; + +public final class CapabilityHostImpl implements CapabilityHost, CapabilityHost.Definition, CapabilityHost.Update { + private CapabilityHostInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public CapabilityHostProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CapabilityHostInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + public CapabilityHostImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public CapabilityHost create() { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public CapabilityHost create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + CapabilityHostImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new CapabilityHostInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public CapabilityHostImpl update() { + return this; + } + + public CapabilityHost apply() { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public CapabilityHost apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + CapabilityHostImpl(CapabilityHostInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "capabilityHosts"); + } + + public CapabilityHost refresh() { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getValue(); + return this; + } + + public CapabilityHost refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .getWithResponse(resourceGroupName, workspaceName, name, context) + .getValue(); + return this; + } + + public CapabilityHostImpl withProperties(CapabilityHostProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java new file mode 100644 index 000000000000..5636e53d4d03 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.BinaryData; +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.machinelearning.fluent.CapabilityHostsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; +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 CapabilityHostsClient. + */ +public final class CapabilityHostsClientImpl implements CapabilityHostsClient { + /** + * The proxy service used to perform REST calls. + */ + private final CapabilityHostsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of CapabilityHostsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CapabilityHostsClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(CapabilityHostsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientCapabilityHosts to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientCapabilityHosts") + public interface CapabilityHostsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/capabilityHosts/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/capabilityHosts/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/capabilityHosts/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CapabilityHostInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/capabilityHosts/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CapabilityHostInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/capabilityHosts/{name}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/capabilityHosts/{name}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + } + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 capabilityHost along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 capabilityHost on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 capabilityHost along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); + } + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 capabilityHost. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CapabilityHostInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, CapabilityHostInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @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 azure Resource Manager resource envelope along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, CapabilityHostInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, CapabilityHostInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CapabilityHostInner.class, CapabilityHostInner.class, this.client.getContext()); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CapabilityHostInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, CapabilityHostInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, CapabilityHostInner.class, + CapabilityHostInner.class, Context.NONE); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, CapabilityHostInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, CapabilityHostInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, CapabilityHostInner.class, + CapabilityHostInner.class, context); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body).getFinalResult(); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @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 azure Resource Manager resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body, context).getFinalResult(); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 resourceGroupName, String workspaceName, + String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, Context.NONE); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 resourceGroupName, String workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name) { + beginDelete(resourceGroupName, workspaceName, name).getFinalResult(); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + beginDelete(resourceGroupName, workspaceName, name, context).getFinalResult(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java new file mode 100644 index 000000000000..c0f31f63915e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.CapabilityHostsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; +import com.azure.resourcemanager.machinelearning.models.CapabilityHost; +import com.azure.resourcemanager.machinelearning.models.CapabilityHosts; + +public final class CapabilityHostsImpl implements CapabilityHosts { + private static final ClientLogger LOGGER = new ClientLogger(CapabilityHostsImpl.class); + + private final CapabilityHostsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public CapabilityHostsImpl(CapabilityHostsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CapabilityHostImpl(inner.getValue(), this.manager())); + } + + public CapabilityHost get(String resourceGroupName, String workspaceName, String name) { + CapabilityHostInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new CapabilityHostImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, context); + } + + public CapabilityHost 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, name, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, context); + } + + private CapabilityHostsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public CapabilityHostImpl define(String name) { + return new CapabilityHostImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java index e8d4e9866fe9..c83e2ff72f6d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java index ff26ff2c637a..087cc8583a6d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.CodeContainerResourceArmPaginatedResult; import reactor.core.publisher.Mono; /** @@ -45,278 +45,290 @@ public final class CodeContainersClientImpl implements CodeContainersClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of CodeContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - CodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + CodeContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(CodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeContainers to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientCodeContainers to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientCodeContainers") public interface CodeContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CodeContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CodeContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return containers. + * + * Get container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return containers. + * + * Get container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param name Container name. This is case-sensitive. + * @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 paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + * @return containers. + * + * Get container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + * @return containers. + * + * Get container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * List containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, CodeContainerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, CodeContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CodeContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** @@ -325,37 +337,17 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @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 workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -389,7 +381,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** @@ -408,309 +401,188 @@ public void delete(String resourceGroupName, String workspaceName, String name) } /** - * Get container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, 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 container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, CodeContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, CodeContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, CodeContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Create or update container. + * List containers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * 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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - CodeContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -718,22 +590,14 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java index 1e84c22d3534..c609b056a018 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,16 +27,21 @@ public CodeContainersImpl(CodeContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CodeContainerImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + public CodeContainer get(String resourceGroupName, String workspaceName, String name) { + CodeContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new CodeContainerImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -48,25 +53,16 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); } - public CodeContainer get(String resourceGroupName, String workspaceName, String name) { - CodeContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new CodeContainerImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); } public CodeContainer getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java index b6f4d8c32443..565b8e5e9631 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java index 8a613f482344..bf4b6f5cdbc9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,6 +28,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -35,7 +36,7 @@ import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.CodeVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; import java.nio.ByteBuffer; @@ -54,354 +55,334 @@ public final class CodeVersionsClientImpl implements CodeVersionsClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of CodeVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - CodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + CodeVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(CodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeVersions to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientCodeVersions to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientCodeVersions") public interface CodeVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("hash") String hash, @QueryParam("hashVersion") String hashVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CodeVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CodeVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("hash") String hash, + @QueryParam("hashVersion") String hashVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("hash") String hash, + @QueryParam("hashVersion") String hashVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/publish") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> publish(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CodeVersionInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/publish") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, + Response publishSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrGetStartPendingUpload( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, + Response createOrGetStartPendingUploadSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String orderBy, Integer top, String skip, String hash, String hashVersion) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, hash, - hashVersion, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String orderBy, Integer top, String skip, String hash, String hashVersion, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, hash, hashVersion, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String hash, String hashVersion) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String hash = null; - final String hashVersion = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** - * List versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - hash, hashVersion, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, CodeVersionInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String hash = null; - final String hashVersion = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, CodeVersionInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, CodeVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public CodeVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + CodeVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** @@ -411,7 +392,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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. @@ -419,32 +399,11 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); + String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -481,7 +440,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context); } /** @@ -501,313 +461,191 @@ public void delete(String resourceGroupName, String workspaceName, String name, } /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, String hash, String hashVersion) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, orderBy, top, skip, hash, + hashVersion, 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 version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String hash, String hashVersion) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String hash = null; + final String hashVersion = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, CodeVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String hash, String hashVersion) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, CodeVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, CodeVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String hash = null; + final String hashVersion = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, CodeVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String hash, String hashVersion, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, + hash, hashVersion, context), nextLink -> listNextSinglePage(nextLink, context)); } /** - * Create or update version. + * Publish version asset into registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - CodeVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -817,36 +655,11 @@ public CodeVersionInner createOrUpdate(String resourceGroupName, String workspac @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -855,48 +668,21 @@ private Mono>> publishWithResponseAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + Context.NONE); } /** @@ -904,21 +690,22 @@ private Mono>> publishWithResponseAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body, Context context) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context); } /** @@ -926,10 +713,9 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. - * @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. @@ -937,12 +723,11 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); + String name, String version, DestinationAsset body) { Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -950,8 +735,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -961,7 +746,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + Response response = publishWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -969,8 +755,8 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -981,7 +767,9 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + Response response + = publishWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -989,8 +777,8 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1009,29 +797,8 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1040,7 +807,7 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** @@ -1048,8 +815,8 @@ public void publish(String resourceGroupName, String workspaceName, String name, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1059,7 +826,7 @@ public void publish(String resourceGroupName, String workspaceName, String name, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** @@ -1078,90 +845,15 @@ public void publish(String resourceGroupName, String workspaceName, String name, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrGetStartPendingUploadWithResponseAsync( String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, - this.client.getApiVersion(), body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, + version, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Generate a storage location and credential for the client to upload a code asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context); - } - /** * Generate a storage location and credential for the client to upload a code asset to. * @@ -1199,8 +891,11 @@ private Mono createOrGetStartPendingUploadAsync(S @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, String workspaceName, String name, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, workspaceName, name, version, body, - context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrGetStartPendingUploadSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** @@ -1224,6 +919,8 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1235,13 +932,6 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour */ @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(), @@ -1250,6 +940,28 @@ private Mono> listNextSinglePageAsync(String nex } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1257,22 +969,14 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java index bb1942b7ee99..40fa62aeef94 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -31,16 +31,21 @@ public CodeVersionsImpl(CodeVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CodeVersionImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String hash, String hashVersion, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + public CodeVersion get(String resourceGroupName, String workspaceName, String name, String version) { + CodeVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new CodeVersionImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -52,25 +57,16 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } - public CodeVersion get(String resourceGroupName, String workspaceName, String name, String version) { - CodeVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new CodeVersionImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String hash, String hashVersion, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, orderBy, top, skip, hash, hashVersion, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); } public void publish(String resourceGroupName, String workspaceName, String name, String version, @@ -87,12 +83,8 @@ public Response createOrGetStartPendingUploadWithRespo String workspaceName, String name, String version, PendingUploadRequestDto body, Context context) { Response inner = this.serviceClient() .createOrGetStartPendingUploadWithResponse(resourceGroupName, workspaceName, name, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); } public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String workspaceName, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java index 5fab8426172d..872f00381e88 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java index a8089666e0ec..196258c9712f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ComponentContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -46,287 +46,276 @@ public final class ComponentContainersClientImpl implements ComponentContainersC /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ComponentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComponentContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentContainers to be used by the + * The interface defining all the services for MachineLearningManagementClientComponentContainers to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientComponentContainers") public interface ComponentContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComponentContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComponentContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container 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 paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container 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 paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container 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 paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * List component containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ComponentContainerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List component containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, ComponentContainerInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List component containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. + * @param body Container entity to create or update. * @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 paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ComponentContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ComponentContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** @@ -335,37 +324,17 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container 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 resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -399,7 +368,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** @@ -418,309 +388,196 @@ public void delete(String resourceGroupName, String workspaceName, String name) } /** - * Get container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip, ListViewType listViewType) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, listViewType, 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 container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ComponentContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ComponentContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, ComponentContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ComponentContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Create or update container. + * List component containers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * 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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ComponentContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List component containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List component containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -728,22 +585,14 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java index b5fddfcb84d1..0b34015986fb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,16 +28,21 @@ public ComponentContainersImpl(ComponentContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentContainerImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + public ComponentContainer get(String resourceGroupName, String workspaceName, String name) { + ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ComponentContainerImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -49,25 +54,16 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); } - public ComponentContainer get(String resourceGroupName, String workspaceName, String name) { - ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ComponentContainerImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); } public ComponentContainer getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java index e1092e8d81ec..762ad9a48ca2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java index 0f38d5ff1acf..f784413c0737 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,13 +28,14 @@ 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.BinaryData; 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.machinelearning.fluent.ComponentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ComponentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; @@ -53,336 +54,312 @@ public final class ComponentVersionsClientImpl implements ComponentVersionsClien /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ComponentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComponentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComponentVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentVersions to be used by the + * The interface defining all the services for MachineLearningManagementClientComponentVersions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientComponentVersions") public interface ComponentVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ComponentVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ComponentVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ComponentVersionInner body, + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}/publish") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> publish(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}/publish") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response publishSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, listViewType, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, version, accept, context); } /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** - * List component versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, ComponentVersionInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List component versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, ComponentVersionInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List component versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, ComponentVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public ComponentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, ComponentVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** @@ -392,7 +369,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @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. @@ -400,32 +376,11 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); + String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -462,7 +417,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context); } /** @@ -482,304 +438,176 @@ public void delete(String resourceGroupName, String workspaceName, String name, } /** - * Get version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, orderBy, top, skip, + listViewType, 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 version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ComponentVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, ListViewType listViewType) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ComponentVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, ComponentVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, ComponentVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, ComponentVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -798,36 +626,11 @@ public ComponentVersionInner createOrUpdate(String resourceGroupName, String wor @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -839,45 +642,18 @@ private Mono>> publishWithResponseAsync(String resourc * @param name Container name. * @param version Version identifier. * @param body Destination registry info. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + Context.NONE); } /** @@ -888,18 +664,19 @@ private Mono>> publishWithResponseAsync(String resourc * @param name Container name. * @param version Version identifier. * @param body Destination registry info. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body, Context context) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context); } /** @@ -910,7 +687,6 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * @param name Container name. * @param version Version identifier. * @param body Destination registry info. - * @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. @@ -918,12 +694,11 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); + String name, String version, DestinationAsset body) { Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -942,7 +717,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + Response response = publishWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -962,7 +738,9 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + Response response + = publishWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -985,27 +763,6 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Publish version asset into registry. * @@ -1021,7 +778,7 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** @@ -1040,10 +797,12 @@ public void publish(String resourceGroupName, String workspaceName, String name, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** + * List component versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1055,13 +814,6 @@ public void publish(String resourceGroupName, String workspaceName, String name, */ @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(), @@ -1070,6 +822,28 @@ private Mono> listNextSinglePageAsync(Strin } /** + * List component versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List component versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1077,22 +851,14 @@ private Mono> listNextSinglePageAsync(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 a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java index e224fb8fd311..83a334fc0fc5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,16 +29,21 @@ public ComponentVersionsImpl(ComponentVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentVersionImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + public ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version) { + ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new ComponentVersionImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -50,25 +55,16 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); } - public ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version) { - ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ComponentVersionImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); } public void publish(String resourceGroupName, String workspaceName, String name, String version, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java index 89ef140519cf..d9252dbf8f0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -13,12 +13,18 @@ import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; import com.azure.resourcemanager.machinelearning.models.Compute; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; import com.azure.resourcemanager.machinelearning.models.ComputeResource; import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; import java.util.Collections; +import java.util.List; import java.util.Map; public final class ComputeResourceImpl implements ComputeResource, ComputeResource.Definition, ComputeResource.Update { @@ -38,8 +44,8 @@ public String type() { return this.innerModel().type(); } - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); + public Compute properties() { + return this.innerModel().properties(); } public String location() { @@ -59,12 +65,12 @@ public Sku sku() { return this.innerModel().sku(); } - public SystemData systemData() { - return this.innerModel().systemData(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } - public Compute properties() { - return this.innerModel().properties(); + public SystemData systemData() { + return this.innerModel().systemData(); } public Region region() { @@ -165,6 +171,15 @@ public ComputeResource refresh(Context context) { return this; } + public Response updateCustomServicesWithResponse(List customServices, Context context) { + return serviceManager.computes() + .updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, context); + } + + public void updateCustomServices(List customServices) { + serviceManager.computes().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + public PagedIterable listNodes() { return serviceManager.computes().listNodes(resourceGroupName, workspaceName, computeName); } @@ -181,6 +196,15 @@ public ComputeSecrets listKeys() { return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); } + public Response updateDataMountsWithResponse(List dataMounts, Context context) { + return serviceManager.computes() + .updateDataMountsWithResponse(resourceGroupName, workspaceName, computeName, dataMounts, context); + } + + public void updateDataMounts(List dataMounts) { + serviceManager.computes().updateDataMounts(resourceGroupName, workspaceName, computeName, dataMounts); + } + public void start() { serviceManager.computes().start(resourceGroupName, workspaceName, computeName); } @@ -205,6 +229,32 @@ public void restart(Context context) { serviceManager.computes().restart(resourceGroupName, workspaceName, computeName, context); } + public Response updateIdleShutdownSettingWithResponse(IdleShutdownSetting parameters, Context context) { + return serviceManager.computes() + .updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + } + + public void updateIdleShutdownSetting(IdleShutdownSetting parameters) { + serviceManager.computes().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + + public Response getAllowedResizeSizesWithResponse(Context context) { + return serviceManager.computes() + .getAllowedResizeSizesWithResponse(resourceGroupName, workspaceName, computeName, context); + } + + public VirtualMachineSizeListResult getAllowedResizeSizes() { + return serviceManager.computes().getAllowedResizeSizes(resourceGroupName, workspaceName, computeName); + } + + public void resize(ResizeSchema parameters) { + serviceManager.computes().resize(resourceGroupName, workspaceName, computeName, parameters); + } + + public void resize(ResizeSchema parameters, Context context) { + serviceManager.computes().resize(resourceGroupName, workspaceName, computeName, parameters, context); + } + public ComputeResourceImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -220,8 +270,8 @@ public ComputeResourceImpl withTags(Map tags) { return this; } - public ComputeResourceImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public ComputeResourceImpl withProperties(Compute properties) { + this.innerModel().withProperties(properties); return this; } @@ -230,8 +280,8 @@ public ComputeResourceImpl withSku(Sku sku) { return this; } - public ComputeResourceImpl withProperties(Compute properties) { - this.innerModel().withProperties(properties); + public ComputeResourceImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java index d27df3a916c5..d58722e1fa40 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java index b08cb2b83e5c..db26454e4ab0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -36,12 +37,18 @@ import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; +import com.azure.resourcemanager.machinelearning.implementation.models.AmlComputeNodesInformation; +import com.azure.resourcemanager.machinelearning.implementation.models.PaginatedComputeResourcesList; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; import java.nio.ByteBuffer; +import java.util.List; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -57,134 +64,323 @@ public final class ComputesClientImpl implements ComputesClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ComputesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { + ComputesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesComputes to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientComputes to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientComputes") public interface ComputesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComputeResourceInner parameters, @HeaderParam("Accept") String accept, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComputeResourceInner parameters, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComputeResourceInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterUpdateParameters parameters, @HeaderParam("Accept") String accept, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterUpdateParameters parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ClusterUpdateParameters parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, + @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, + @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateCustomServices(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") List customServices, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateCustomServicesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") List customServices, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodes(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listNodes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNodesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateDataMounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateDataMounts(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") List dataMounts, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateDataMounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateDataMountsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") List dataMounts, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> start(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response startSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> stop(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response stopSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> restart(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("computeName") String computeName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response restartSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateIdleShutdownSetting(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") IdleShutdownSetting parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateIdleShutdownSettingSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") IdleShutdownSetting parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/getAllowedVmSizesForResize") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAllowedResizeSizes(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/getAllowedVmSizesForResize") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getAllowedResizeSizesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/resize") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resize(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ResizeSchema parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/resize") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resizeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") ResizeSchema parameters, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -192,1004 +388,1291 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNodesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNodesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Gets computes in specified workspace. + * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use + * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return compute definition by its name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets computes in specified workspace. + * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use + * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return compute definition by its name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String computeName) { + return getWithResponseAsync(resourceGroupName, workspaceName, computeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets computes in specified workspace. + * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use + * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @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 computes in specified workspace as paginated response with {@link PagedFlux}. + * @return compute definition by its name along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String computeName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, accept, context); } /** - * Gets computes in specified workspace. + * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use + * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedFlux}. + * @return compute definition by its name. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName) { + return getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); } /** - * Gets computes in specified workspace. + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedFlux}. + * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName, ComputeResourceInner parameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets computes in specified workspace. + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedIterable}. + * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String computeName, ComputeResourceInner parameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, accept, + parameters, Context.NONE); } /** - * Gets computes in specified workspace. + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. * @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 computes in specified workspace as paginated response with {@link PagedIterable}. + * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String computeName, ComputeResourceInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, accept, + parameters, context); } /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); } /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. + * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(response, + ComputeResourceInner.class, ComputeResourceInner.class, Context.NONE); + } + + /** + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. + * @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 machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + return this.client.getLroResult(response, + ComputeResourceInner.class, ComputeResourceInner.class, context); + } + + /** + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String computeName, ComputeResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, + ComputeResourceInner parameters) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, computeName, parameters).getFinalResult(); + } + + /** + * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. + * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Payload with Machine Learning compute definition. + * @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 machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, + ComputeResourceInner parameters, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, computeName, parameters, context).getFinalResult(); + } + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, ClusterUpdateParameters parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - computeName, this.client.getApiVersion(), accept, context); + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name on successful completion of {@link Mono}. + * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String computeName) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response updateWithResponse(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, accept, + parameters, Context.NONE); } /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, accept, + parameters, context); + } + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ComputeResourceInner> beginUpdateAsync( + String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); + } + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, + String workspaceName, String computeName, ClusterUpdateParameters parameters) { + Response response = updateWithResponse(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(response, + ComputeResourceInner.class, ComputeResourceInner.class, Context.NONE); + } + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @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 machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, + String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context) { + Response response + = updateWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + return this.client.getLroResult(response, + ComputeResourceInner.class, ComputeResourceInner.class, context); + } + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters) { + return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters) { + return beginUpdate(resourceGroupName, workspaceName, computeName, parameters).getFinalResult(); + } + + /** + * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable + * operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters Additional parameters for cluster update. + * @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 machine Learning compute object wrapped into ARM resource envelope. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, + ClusterUpdateParameters parameters, Context context) { + return beginUpdate(resourceGroupName, workspaceName, computeName, parameters, context).getFinalResult(); + } + + /** + * Deletes specified Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, + underlyingResourceAction, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, underlyingResourceAction, + Context.NONE); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. * @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 compute definition by its name along with {@link Response}. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, underlyingResourceAction, + context); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, computeName, underlyingResourceAction); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction) { + return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction) { + beginDelete(resourceGroupName, workspaceName, computeName, underlyingResourceAction).getFinalResult(); + } + + /** + * Deletes specified Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from + * workspace if 'Detach'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String computeName, + UnderlyingResourceAction underlyingResourceAction, Context context) { + beginDelete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).getFinalResult(); + } + + /** + * Gets computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return computes in specified workspace along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, 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 computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return computes in specified workspace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 computes in specified workspace as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return computes in specified workspace along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. + * Gets computes in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 compute definition by its name. + * @return computes in specified workspace along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName) { - return getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Gets computes in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. + * @param workspaceName Azure Machine Learning Workspace 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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * @return computes in specified workspace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Gets computes in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * @return computes in specified workspace as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, ComputeResourceInner parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Updates the custom services list. The list of custom services provided shall be overwritten. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. + * @param customServices New list of Custom Services. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 machine Learning compute object wrapped into ARM resource envelope. + * @return the {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateCustomServicesWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, List customServices) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.updateCustomServices(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, + customServices, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Updates the custom services list. The list of custom services provided shall be overwritten. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. + * @param customServices New list of Custom Services. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 machine Learning compute object wrapped into ARM resource envelope. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateCustomServicesAsync(String resourceGroupName, String workspaceName, String computeName, + List customServices) { + return updateCustomServicesWithResponseAsync(resourceGroupName, workspaceName, computeName, customServices) + .flatMap(ignored -> Mono.empty()); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Updates the custom services list. The list of custom services provided shall be overwritten. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. + * @param customServices New list of Custom Services. + * @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 machine Learning compute object wrapped into ARM resource envelope. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, + String computeName, List customServices, Context context) { + final String contentType = "application/json"; + return service.updateCustomServicesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, customServices, + context); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Updates the custom services list. The list of custom services provided shall be overwritten. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. + * @param customServices New list of Custom Services. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 machine Learning compute object wrapped into ARM resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices) { + updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, Context.NONE); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String computeName, ComputeResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> listNodesSinglePageAsync(String resourceGroupName, + String workspaceName, String computeName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNodes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @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 machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String computeName, ComputeResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, + String computeName) { + return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName), + nextLink -> listNodesNextSinglePageAsync(nextLink)); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); + private PagedResponse listNodesSinglePage(String resourceGroupName, String workspaceName, + String computeName) { + final String accept = "application/json"; + Response res + = service.listNodesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), + res.getValue().nextLink(), null); } /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. * @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 machine Learning compute object wrapped into ARM resource envelope. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String computeName, - ComputeResourceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); + private PagedResponse listNodesSinglePage(String resourceGroupName, String workspaceName, + String computeName, Context context) { + final String accept = "application/json"; + Response res + = service.listNodesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), + res.getValue().nextLink(), null); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, ClusterUpdateParameters parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName) { + return new PagedIterable<>(() -> listNodesSinglePage(resourceGroupName, workspaceName, computeName), + nextLink -> listNodesNextSinglePage(nextLink)); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. * @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 machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, ClusterUpdateParameters parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), parameters, accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNodes(String resourceGroupName, String workspaceName, + String computeName, Context context) { + return new PagedIterable<>(() -> listNodesSinglePage(resourceGroupName, workspaceName, computeName, context), + nextLink -> listNodesNextSinglePage(nextLink, context)); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 machine Learning compute object wrapped into ARM resource envelope. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ComputeResourceInner.class, ComputeResourceInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync(String resourceGroupName, String workspaceName, + String computeName) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. + * @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 machine Learning compute object wrapped into ARM resource envelope. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String computeName, Context context) { + final String accept = "application/json"; + return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, context); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @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 machine Learning compute object wrapped into ARM resource envelope. + * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate(String resourceGroupName, - String workspaceName, String computeName, ClusterUpdateParameters parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName) { + return listKeysWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Update Data Mounts of a Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. + * @param dataMounts The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> updateDataMountsWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, List dataMounts) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.updateDataMounts(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, dataMounts, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Update Data Mounts of a Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. + * @param dataMounts The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateDataMountsAsync(String resourceGroupName, String workspaceName, String computeName, + List dataMounts) { + return updateDataMountsWithResponseAsync(resourceGroupName, workspaceName, computeName, dataMounts) + .flatMap(ignored -> Mono.empty()); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Update Data Mounts of a Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. + * @param dataMounts The parameters for creating or updating a machine learning workspace. + * @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 machine Learning compute object wrapped into ARM resource envelope. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); + public Response updateDataMountsWithResponse(String resourceGroupName, String workspaceName, + String computeName, List dataMounts, Context context) { + final String contentType = "application/json"; + return service.updateDataMountsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, dataMounts, + context); } /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. + * Update Data Mounts of a Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. + * @param dataMounts The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update(String resourceGroupName, String workspaceName, String computeName, - ClusterUpdateParameters parameters, Context context) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); + public void updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts) { + updateDataMountsWithResponse(resourceGroupName, workspaceName, computeName, dataMounts, Context.NONE); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono.error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName) { return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono.error( - new IllegalArgumentException("Parameter underlyingResourceAction 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, - workspaceName, computeName, this.client.getApiVersion(), underlyingResourceAction, accept, context); + private Response startWithResponse(String resourceGroupName, String workspaceName, String computeName) { + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, Context.NONE); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response startWithResponse(String resourceGroupName, String workspaceName, String computeName, + Context context) { + return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, context); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); + private PollerFlux, Void> beginStartAsync(String resourceGroupName, String workspaceName, + String computeName) { + Mono>> mono = startWithResponseAsync(resourceGroupName, workspaceName, computeName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) - .getSyncPoller(); + public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, + String computeName) { + Response response = startWithResponse(resourceGroupName, workspaceName, computeName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. * @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. @@ -1197,390 +1680,225 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String computeName, UnderlyingResourceAction underlyingResourceAction, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) - .getSyncPoller(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, + String computeName, Context context) { + Response response = startWithResponse(resourceGroupName, workspaceName, computeName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).last() + private Mono startAsync(String resourceGroupName, String workspaceName, String computeName) { + return beginStartAsync(resourceGroupName, workspaceName, computeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).block(); + public void start(String resourceGroupName, String workspaceName, String computeName) { + beginStart(resourceGroupName, workspaceName, computeName).getFinalResult(); } /** - * Deletes specified Machine Learning compute. + * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String computeName, - UnderlyingResourceAction underlyingResourceAction, Context context) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).block(); + public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { + beginStart(resourceGroupName, workspaceName, computeName, context).getFinalResult(); } /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync(String resourceGroupName, - String workspaceName, String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName) { return FluxUtil - .withContext(context -> service.listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), res.getValue().nextLink(), null)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync(String resourceGroupName, - String workspaceName, String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNodes(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - computeName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().nodes(), res.getValue().nextLink(), null)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, - String computeName) { - return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName), - nextLink -> listNodesNextSinglePageAsync(nextLink)); + private Response stopWithResponse(String resourceGroupName, String workspaceName, String computeName) { + return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, Context.NONE); } /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return new PagedFlux<>(() -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName, context), - nextLink -> listNodesNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response stopWithResponse(String resourceGroupName, String workspaceName, String computeName, + Context context) { + return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, computeName, context); } /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes(String resourceGroupName, String workspaceName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, String computeName) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @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 details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName, context)); + Mono>> mono = stopWithResponseAsync(resourceGroupName, workspaceName, computeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, + String computeName) { + Response response = stopWithResponse(resourceGroupName, workspaceName, computeName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, + String computeName, Context context) { + Response response = stopWithResponse(resourceGroupName, workspaceName, computeName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) on successful - * completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName, - String computeName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName) { + return beginStopAsync(resourceGroupName, workspaceName, computeName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc) along with - * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); + public void stop(String resourceGroupName, String workspaceName, String computeName) { + beginStop(resourceGroupName, workspaceName, computeName).getFinalResult(); } /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). + * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @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 secrets related to Machine Learning compute (storage keys, service credentials, etc). */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName) { - return listKeysWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); + public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { + beginStop(resourceGroupName, workspaceName, computeName, context).getFinalResult(); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1588,118 +1906,75 @@ public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceNa * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, + private Mono>> restartWithResponseAsync(String resourceGroupName, String workspaceName, String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); + private Response restartWithResponse(String resourceGroupName, String workspaceName, + String computeName) { + return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, Context.NONE); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response restartWithResponse(String resourceGroupName, String workspaceName, String computeName, + Context context) { + return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, context); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @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> beginStartAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = startWithResponseAsync(resourceGroupName, workspaceName, computeName, context); + private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String workspaceName, + String computeName) { + Mono>> mono = restartWithResponseAsync(resourceGroupName, workspaceName, computeName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1707,16 +1982,17 @@ private PollerFlux, Void> beginStartAsync(String resourceGroupN * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, + public SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, String computeName) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); + Response response = restartWithResponse(resourceGroupName, workspaceName, computeName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1725,66 +2001,49 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, + public SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, String computeName, Context context) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 startAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStartAsync(resourceGroupName, workspaceName, computeName).last() - .flatMap(this.client::getLroFinalResultOrError); + Response response = restartWithResponse(resourceGroupName, workspaceName, computeName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @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 startAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStartAsync(resourceGroupName, workspaceName, computeName, context).last() + private Mono restartAsync(String resourceGroupName, String workspaceName, String computeName) { + return beginRestartAsync(resourceGroupName, workspaceName, computeName).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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 start(String resourceGroupName, String workspaceName, String computeName) { - startAsync(resourceGroupName, workspaceName, computeName).block(); + public void restart(String resourceGroupName, String workspaceName, String computeName) { + beginRestart(resourceGroupName, workspaceName, computeName).getFinalResult(); } /** - * Posts a start action to a compute instance. + * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1792,372 +2051,283 @@ public void start(String resourceGroupName, String workspaceName, String compute * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { - startAsync(resourceGroupName, workspaceName, computeName, context).block(); + public void restart(String resourceGroupName, String workspaceName, String computeName, Context context) { + beginRestart(resourceGroupName, workspaceName, computeName, context).getFinalResult(); } /** - * Posts a stop action to a compute instance. + * Updates the idle shutdown setting of a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 resourceGroupName, String workspaceName, - String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono> updateIdleShutdownSettingWithResponseAsync(String resourceGroupName, + String workspaceName, String computeName, IdleShutdownSetting parameters) { + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.updateIdleShutdownSetting(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + computeName, contentType, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Posts a stop action to a compute instance. + * Updates the idle shutdown setting of a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName 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(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginStopAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private Mono updateIdleShutdownSettingAsync(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters) { + return updateIdleShutdownSettingWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters) + .flatMap(ignored -> Mono.empty()); } /** - * Posts a stop action to a compute instance. + * Updates the idle shutdown setting of a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = stopWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context) { + final String contentType = "application/json"; + return service.updateIdleShutdownSettingSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, parameters, context); } /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginStop(String resourceGroupName, String workspaceName, - String computeName) { - return this.beginStopAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a stop action to a compute instance. + * Updates the idle shutdown setting of a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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> beginStop(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return this.beginStopAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters) { + updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, Context.NONE); } /** - * Posts a stop action to a compute instance. + * Returns supported virtual machine sizes for resize. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the List Virtual Machine size operation response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStopAsync(resourceGroupName, workspaceName, computeName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono> + getAllowedResizeSizesWithResponseAsync(String resourceGroupName, String workspaceName, String computeName) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getAllowedResizeSizes(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Posts a stop action to a compute instance. + * Returns supported virtual machine sizes for resize. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the List Virtual Machine size operation response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStopAsync(resourceGroupName, workspaceName, computeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono getAllowedResizeSizesAsync(String resourceGroupName, + String workspaceName, String computeName) { + return getAllowedResizeSizesWithResponseAsync(resourceGroupName, workspaceName, computeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Posts a stop action to a compute instance. + * Returns supported virtual machine sizes for resize. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @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 Virtual Machine size operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName) { - stopAsync(resourceGroupName, workspaceName, computeName).block(); + public Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context) { + final String accept = "application/json"; + return service.getAllowedResizeSizesSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, accept, context); } /** - * Posts a stop action to a compute instance. + * Returns supported virtual machine sizes for resize. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @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 Virtual Machine size operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { - stopAsync(resourceGroupName, workspaceName, computeName, context).block(); + public VirtualMachineSizeListResultInner getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName) { + return getAllowedResizeSizesWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE) + .getValue(); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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>> restartWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono>> resizeWithResponseAsync(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters) { + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, computeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.resize(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. + * @param parameters The object for updating VM size setting of specified Compute Instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync(String resourceGroupName, String workspaceName, - String computeName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restart(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, computeName, this.client.getApiVersion(), accept, context); + private Response resizeWithResponse(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters) { + final String contentType = "application/json"; + return service.resizeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, parameters, + Context.NONE); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String workspaceName, - String computeName) { - Mono>> mono = restartWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response resizeWithResponse(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters, Context context) { + final String contentType = "application/json"; + return service.resizeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, computeName, contentType, parameters, + context); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. + * @param parameters The object for updating VM size setting of specified Compute Instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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> beginRestartAsync(String resourceGroupName, String workspaceName, - String computeName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, Void> beginResizeAsync(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters) { Mono>> mono - = restartWithResponseAsync(resourceGroupName, workspaceName, computeName, context); + = resizeWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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> beginRestart(String resourceGroupName, String workspaceName, - String computeName) { - return this.beginRestartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); + public SyncPoller, Void> beginResize(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters) { + Response response = resizeWithResponse(resourceGroupName, workspaceName, computeName, parameters); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. * @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. @@ -2165,76 +2335,83 @@ public SyncPoller, Void> beginRestart(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, - String computeName, Context context) { - return this.beginRestartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); + public SyncPoller, Void> beginResize(String resourceGroupName, String workspaceName, + String computeName, ResizeSchema parameters, Context context) { + Response response + = resizeWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 restartAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName).last() + private Mono resizeAsync(String resourceGroupName, String workspaceName, String computeName, + ResizeSchema parameters) { + return beginResizeAsync(resourceGroupName, workspaceName, computeName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. + * @param parameters The object for updating VM size setting of specified Compute Instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 restartAsync(String resourceGroupName, String workspaceName, String computeName, - Context context) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters) { + beginResize(resourceGroupName, workspaceName, computeName, parameters).getFinalResult(); } /** - * Posts a restart action to a compute instance. + * Updates the size of a Compute Instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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 restart(String resourceGroupName, String workspaceName, String computeName) { - restartAsync(resourceGroupName, workspaceName, computeName).block(); + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context) { + beginResize(resourceGroupName, workspaceName, computeName, parameters, context).getFinalResult(); } /** - * Posts a restart action to a compute instance. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. + * @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 computes in specified workspace along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String workspaceName, String computeName, Context context) { - restartAsync(resourceGroupName, workspaceName, computeName, context).block(); + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); } /** @@ -2244,23 +2421,15 @@ public void restart(String resourceGroupName, String workspaceName, String compu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return computes in specified workspace along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2271,23 +2440,15 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return computes in specified workspace along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2297,17 +2458,11 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of AmlCompute Nodes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNodesNextSinglePageAsync(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.listNodesNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -2316,6 +2471,25 @@ private Mono> listNodesNextSinglePageAs .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNodesNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNodesNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2324,22 +2498,15 @@ private Mono> listNodesNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of AmlCompute Nodes along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesNextSinglePageAsync(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.")); - } + private PagedResponse listNodesNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNodesNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().nodes(), res.getValue().nextLink(), null)); + Response res + = service.listNodesNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().nodes(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java index ceab9a7511a8..d3a037aa277b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -12,11 +12,18 @@ import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.Computes; import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; +import com.azure.resourcemanager.machinelearning.models.Computes; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; +import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; +import java.util.List; public final class ComputesImpl implements Computes { private static final ClientLogger LOGGER = new ClientLogger(ComputesImpl.class); @@ -31,28 +38,12 @@ public ComputesImpl(ComputesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String computeName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComputeResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComputeResourceImpl(inner.getValue(), this.manager())); } public ComputeResource get(String resourceGroupName, String workspaceName, String computeName) { @@ -74,6 +65,29 @@ public void delete(String resourceGroupName, String workspaceName, String comput this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); + } + + public Response updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, + String computeName, List customServices, Context context) { + return this.serviceClient() + .updateCustomServicesWithResponse(resourceGroupName, workspaceName, computeName, customServices, context); + } + + public void updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices) { + this.serviceClient().updateCustomServices(resourceGroupName, workspaceName, computeName, customServices); + } + public PagedIterable listNodes(String resourceGroupName, String workspaceName, String computeName) { return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName); @@ -88,12 +102,8 @@ public Response listKeysWithResponse(String resourceGroupName, S String computeName, Context context) { Response inner = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComputeSecretsImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComputeSecretsImpl(inner.getValue(), this.manager())); } public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName) { @@ -105,6 +115,17 @@ public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, S } } + public Response updateDataMountsWithResponse(String resourceGroupName, String workspaceName, + String computeName, List dataMounts, Context context) { + return this.serviceClient() + .updateDataMountsWithResponse(resourceGroupName, workspaceName, computeName, dataMounts, context); + } + + public void updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts) { + this.serviceClient().updateDataMounts(resourceGroupName, workspaceName, computeName, dataMounts); + } + public void start(String resourceGroupName, String workspaceName, String computeName) { this.serviceClient().start(resourceGroupName, workspaceName, computeName); } @@ -129,6 +150,45 @@ public void restart(String resourceGroupName, String workspaceName, String compu this.serviceClient().restart(resourceGroupName, workspaceName, computeName, context); } + public Response updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context) { + return this.serviceClient() + .updateIdleShutdownSettingWithResponse(resourceGroupName, workspaceName, computeName, parameters, context); + } + + public void updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters) { + this.serviceClient().updateIdleShutdownSetting(resourceGroupName, workspaceName, computeName, parameters); + } + + public Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context) { + Response inner = this.serviceClient() + .getAllowedResizeSizesWithResponse(resourceGroupName, workspaceName, computeName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); + } + + public VirtualMachineSizeListResult getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName) { + VirtualMachineSizeListResultInner inner + = this.serviceClient().getAllowedResizeSizes(resourceGroupName, workspaceName, computeName); + if (inner != null) { + return new VirtualMachineSizeListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters) { + this.serviceClient().resize(resourceGroupName, workspaceName, computeName, parameters); + } + + public void resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context) { + this.serviceClient().resize(resourceGroupName, workspaceName, computeName, parameters, context); + } + public ComputeResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java new file mode 100644 index 000000000000..4fb2cdf6c13c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java @@ -0,0 +1,1099 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.management.polling.PollResult; +import com.azure.core.util.BinaryData; +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.core.util.serializer.TypeReference; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import java.nio.ByteBuffer; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistItemsClient. + */ +public final class ConnectionRaiBlocklistItemsClientImpl implements ConnectionRaiBlocklistItemsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistItemsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistItemsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistItemsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistItemsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientConnectionRaiBlocklistItems to be used + * by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientConnectionRaiBlocklistItems") + public interface ConnectionRaiBlocklistItemsService { + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> addBulk(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") List body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response addBulkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") List body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteBulk(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") List body, + Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteBulkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") List body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiBlocklistItemPropertiesBasicResourceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiBlocklistItemPropertiesBasicResourceInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, Context context); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addBulkWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.addBulk(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response addBulkWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.addBulkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, accept, body, Context.NONE); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response addBulkWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.addBulkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, accept, body, context); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux>, List> + beginAddBulkAsync(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body) { + Mono>> mono + = addBulkWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client + ., List>getLroResult( + mono, this.client.getHttpPipeline(), + new TypeReference>() { + }.getJavaType(), new TypeReference>() { + }.getJavaType(), this.client.getContext()); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body) { + Response response + = addBulkWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client + ., List>getLroResult( + response, new TypeReference>() { + }.getJavaType(), new TypeReference>() { + }.getJavaType(), Context.NONE); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body, Context context) { + Response response + = addBulkWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context); + return this.client + ., List>getLroResult( + response, new TypeReference>() { + }.getJavaType(), new TypeReference>() { + }.getJavaType(), context); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addBulkAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, List body) { + return beginAddBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + return beginAddBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).getFinalResult(); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context) { + return beginAddBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context) + .getFinalResult(); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> deleteBulkWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.deleteBulk(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteBulkWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + final String contentType = "application/json"; + return service.deleteBulkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, body, Context.NONE); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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) + private Response deleteBulkWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context) { + final String contentType = "application/json"; + return service.deleteBulkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, body, context); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteBulkAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + Mono>> mono + = deleteBulkWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + Response response + = deleteBulkWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context) { + Response response + = deleteBulkWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleteBulkAsync(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body) { + return beginDeleteBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body) { + beginDeleteBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).getFinalResult(); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body, Context context) { + beginDeleteBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context) + .getFinalResult(); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, accept, context); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistItemPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + Context.NONE).getValue(); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, contentType, accept, body, Context.NONE); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, contentType, accept, body, context); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 {@link PollerFlux} for polling of raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body) { + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), RaiBlocklistItemPropertiesBasicResourceInner.class, + RaiBlocklistItemPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body) { + Response response = createWithResponse(resourceGroupName, workspaceName, connectionName, + raiBlocklistName, raiBlocklistItemName, body); + return this.client + .getLroResult( + response, RaiBlocklistItemPropertiesBasicResourceInner.class, + RaiBlocklistItemPropertiesBasicResourceInner.class, Context.NONE); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body, Context context) { + Response response = createWithResponse(resourceGroupName, workspaceName, connectionName, + raiBlocklistName, raiBlocklistItemName, body, context); + return this.client + .getLroResult( + response, RaiBlocklistItemPropertiesBasicResourceInner.class, + RaiBlocklistItemPropertiesBasicResourceInner.class, context); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body) { + return beginCreate(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + body).getFinalResult(); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body 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 raiBlocklistItemPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, Context context) { + return beginCreate(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + body, context).getFinalResult(); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, Context.NONE); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, context); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, connectionName, + raiBlocklistName, raiBlocklistItemName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, connectionName, + raiBlocklistName, raiBlocklistItemName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String connectionName, + String raiBlocklistName, String raiBlocklistItemName) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName) { + beginDelete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName) + .getFinalResult(); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, Context context) { + beginDelete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, context) + .getFinalResult(); + } + + private static final TypeReference> TYPE_REFERENCE_LIST_RAI_BLOCKLIST_ITEM_PROPERTIES_BASIC_RESOURCE_INNER + = new TypeReference>() { + }; +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java new file mode 100644 index 000000000000..cc7072c8363e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ConnectionRaiBlocklistItemsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItems; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ConnectionRaiBlocklistItemsImpl implements ConnectionRaiBlocklistItems { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistItemsImpl.class); + + private final ConnectionRaiBlocklistItemsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistItemsImpl(ConnectionRaiBlocklistItemsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + List inner + = this.serviceClient().addBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context) { + List inner = this.serviceClient() + .addBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public void deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body) { + this.serviceClient().deleteBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + } + + public void deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body, Context context) { + this.serviceClient() + .deleteBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context); + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiBlocklistItemPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public RaiBlocklistItemPropertiesBasicResource get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + RaiBlocklistItemPropertiesBasicResourceInner inner = this.serviceClient() + .get(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); + if (inner != null) { + return new RaiBlocklistItemPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, Context context) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, context); + } + + public RaiBlocklistItemPropertiesBasicResource 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, context); + } + + private ConnectionRaiBlocklistItemsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RaiBlocklistItemPropertiesBasicResourceImpl define(String name) { + return new RaiBlocklistItemPropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java new file mode 100644 index 000000000000..7d9c873fdf7e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java @@ -0,0 +1,307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * ConnectionRaiBlocklistItemsOperationsClient. + */ +public final class ConnectionRaiBlocklistItemsOperationsClientImpl + implements ConnectionRaiBlocklistItemsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistItemsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistItemsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistItemsOperationsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistItemsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientConnectionRaiBlocklistItemsOperations + * to be used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientConnectionRaiBlocklistItemsOperations") + public interface ConnectionRaiBlocklistItemsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + 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 custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, connectionName, raiBlocklistName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * 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 custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * 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 custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * 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 custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java new file mode 100644 index 000000000000..df2e4a0fc7fd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItemsOperations; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; + +public final class ConnectionRaiBlocklistItemsOperationsImpl implements ConnectionRaiBlocklistItemsOperations { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistItemsOperationsImpl.class); + + private final ConnectionRaiBlocklistItemsOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistItemsOperationsImpl(ConnectionRaiBlocklistItemsOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private ConnectionRaiBlocklistItemsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java new file mode 100644 index 000000000000..b4f260d3ec05 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java @@ -0,0 +1,602 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.BinaryData; +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.machinelearning.fluent.ConnectionRaiBlocklistsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +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 ConnectionRaiBlocklistsClient. + */ +public final class ConnectionRaiBlocklistsClientImpl implements ConnectionRaiBlocklistsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientConnectionRaiBlocklists to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientConnectionRaiBlocklists") + public interface ConnectionRaiBlocklistsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiBlocklistPropertiesBasicResourceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiBlocklistPropertiesBasicResourceInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + Context context); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, accept, context); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, Context.NONE) + .getValue(); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, accept, body, Context.NONE); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + contentType, accept, body, context); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 {@link PollerFlux} for polling of raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiBlocklistPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), RaiBlocklistPropertiesBasicResourceInner.class, + RaiBlocklistPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body) { + Response response + = createWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client + .getLroResult(response, + RaiBlocklistPropertiesBasicResourceInner.class, RaiBlocklistPropertiesBasicResourceInner.class, + Context.NONE); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 {@link SyncPoller} for polling of raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body, Context context) { + Response response + = createWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context); + return this.client + .getLroResult(response, + RaiBlocklistPropertiesBasicResourceInner.class, RaiBlocklistPropertiesBasicResourceInner.class, + context); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body) { + return beginCreate(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).getFinalResult(); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body The body 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 raiBlocklistPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + Context context) { + return beginCreate(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context) + .getFinalResult(); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String connectionName, String raiBlocklistName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + Context.NONE); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiBlocklistName, + context); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String connectionName, + String raiBlocklistName) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String connectionName, String raiBlocklistName) { + beginDelete(resourceGroupName, workspaceName, connectionName, raiBlocklistName).getFinalResult(); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Context context) { + beginDelete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context).getFinalResult(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java new file mode 100644 index 000000000000..5e9e7dc06028 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ConnectionRaiBlocklistsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklists; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; + +public final class ConnectionRaiBlocklistsImpl implements ConnectionRaiBlocklists { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistsImpl.class); + + private final ConnectionRaiBlocklistsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistsImpl(ConnectionRaiBlocklistsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiBlocklistPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public RaiBlocklistPropertiesBasicResource get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + RaiBlocklistPropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + if (inner != null) { + return new RaiBlocklistPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context); + } + + public RaiBlocklistPropertiesBasicResource 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String connectionName = ResourceManagerUtils.getValueFromIdByName(id, "connections"); + if (connectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connections'.", id))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context); + } + + private ConnectionRaiBlocklistsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RaiBlocklistPropertiesBasicResourceImpl define(String name) { + return new RaiBlocklistPropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsClientImpl.java new file mode 100644 index 000000000000..b4c99a7045fe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsClientImpl.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistsOperationsClient. + */ +public final class ConnectionRaiBlocklistsOperationsClientImpl implements ConnectionRaiBlocklistsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistsOperationsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientConnectionRaiBlocklistsOperations to + * be used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientConnectionRaiBlocklistsOperations") + public interface ConnectionRaiBlocklistsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, 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 custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String connectionName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String connectionName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, connectionName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, connectionName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * 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 custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * 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 custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * 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 custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsImpl.java new file mode 100644 index 000000000000..f29d06db475f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistsOperations; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; + +public final class ConnectionRaiBlocklistsOperationsImpl implements ConnectionRaiBlocklistsOperations { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistsOperationsImpl.class); + + private final ConnectionRaiBlocklistsOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistsOperationsImpl(ConnectionRaiBlocklistsOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private ConnectionRaiBlocklistsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java new file mode 100644 index 000000000000..22a99e1a2d3a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.BinaryData; +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.machinelearning.fluent.ConnectionRaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +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 ConnectionRaiPoliciesClient. + */ +public final class ConnectionRaiPoliciesClientImpl implements ConnectionRaiPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ConnectionRaiPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiPoliciesClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(ConnectionRaiPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientConnectionRaiPolicies to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientConnectionRaiPolicies") + public interface ConnectionRaiPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiPolicyPropertiesBasicResourceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiPolicyPropertiesBasicResourceInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + Context context); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiPolicyName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiPolicyName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiPolicyName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiPolicyName, accept, context); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, Context.NONE) + .getValue(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiPolicyName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiPolicyName, + contentType, accept, body, Context.NONE); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiPolicyName, + contentType, accept, body, context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link PollerFlux} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + Response response + = createWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, body); + return this.client.getLroResult( + response, RaiPolicyPropertiesBasicResourceInner.class, RaiPolicyPropertiesBasicResourceInner.class, + Context.NONE); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, Context context) { + Response response + = createWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, context); + return this.client.getLroResult( + response, RaiPolicyPropertiesBasicResourceInner.class, RaiPolicyPropertiesBasicResourceInner.class, + context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + return beginCreate(resourceGroupName, workspaceName, connectionName, raiPolicyName, body).getFinalResult(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context) { + return beginCreate(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, context) + .getFinalResult(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String connectionName, String raiPolicyName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiPolicyName, + Context.NONE); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, raiPolicyName, context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String connectionName, + String raiPolicyName) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String connectionName, String raiPolicyName) { + beginDelete(resourceGroupName, workspaceName, connectionName, raiPolicyName).getFinalResult(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + Context context) { + beginDelete(resourceGroupName, workspaceName, connectionName, raiPolicyName, context).getFinalResult(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java new file mode 100644 index 000000000000..bbda9392b086 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ConnectionRaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPolicies; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class ConnectionRaiPoliciesImpl implements ConnectionRaiPolicies { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiPoliciesImpl.class); + + private final ConnectionRaiPoliciesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiPoliciesImpl(ConnectionRaiPoliciesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiPolicyPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName) { + RaiPolicyPropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, connectionName, raiPolicyName); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + RaiPolicyPropertiesBasicResourceInner inner + = this.serviceClient().create(resourceGroupName, workspaceName, connectionName, raiPolicyName, body); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context) { + RaiPolicyPropertiesBasicResourceInner inner = this.serviceClient() + .create(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, context); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName, raiPolicyName); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName, raiPolicyName, context); + } + + private ConnectionRaiPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsClientImpl.java new file mode 100644 index 000000000000..c9cf7b78086a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsClientImpl.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiPoliciesOperationsClient. + */ +public final class ConnectionRaiPoliciesOperationsClientImpl implements ConnectionRaiPoliciesOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiPoliciesOperationsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ConnectionRaiPoliciesOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiPoliciesOperationsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(ConnectionRaiPoliciesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientConnectionRaiPoliciesOperations to be + * used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientConnectionRaiPoliciesOperations") + public interface ConnectionRaiPoliciesOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String connectionName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String connectionName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String connectionName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, connectionName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, connectionName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * 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 azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * 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 azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * 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 azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsImpl.java new file mode 100644 index 000000000000..97ea3e2bbbac --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPoliciesOperations; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class ConnectionRaiPoliciesOperationsImpl implements ConnectionRaiPoliciesOperations { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiPoliciesOperationsImpl.class); + + private final ConnectionRaiPoliciesOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiPoliciesOperationsImpl(ConnectionRaiPoliciesOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private ConnectionRaiPoliciesOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java new file mode 100644 index 000000000000..ed9246b8e6cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java @@ -0,0 +1,1179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.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.BinaryData; +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.machinelearning.fluent.ConnectionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.implementation.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult; +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 ConnectionsClient. + */ +public final class ConnectionsClientImpl implements ConnectionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionsClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(ConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientConnections to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientConnections") + public interface ConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listConnectionModels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAllModels(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listConnectionModels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getAllModelsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/models") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getModels(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/models") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getModelsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeployment( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getDeploymentSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdateDeployment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointDeploymentResourcePropertiesBasicResourceInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateDeploymentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointDeploymentResourcePropertiesBasicResourceInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteDeployment(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteDeploymentSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeployments( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listDeploymentsSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getModelsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getModelsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeploymentsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listDeploymentsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAllModelsWithResponseAsync(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getAllModels(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAllModelsAsync(String resourceGroupName, String workspaceName) { + return getAllModelsWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, + Context context) { + final String accept = "application/json"; + return service.getAllModelsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + } + + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointModelsInner getAllModels(String resourceGroupName, String workspaceName) { + return getAllModelsWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getModels(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, 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 available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getModelsAsync(String resourceGroupName, String workspaceName, + String connectionName) { + return new PagedFlux<>(() -> getModelsSinglePageAsync(resourceGroupName, workspaceName, connectionName), + nextLink -> getModelsNextSinglePageAsync(nextLink)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsSinglePage(String resourceGroupName, + String workspaceName, String connectionName) { + final String accept = "application/json"; + Response res = service.getModelsSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 available models under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsSinglePage(String resourceGroupName, + String workspaceName, String connectionName, Context context) { + final String accept = "application/json"; + Response res + = service.getModelsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName) { + return new PagedIterable<>(() -> getModelsSinglePage(resourceGroupName, workspaceName, connectionName), + nextLink -> getModelsNextSinglePage(nextLink)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, Context context) { + return new PagedIterable<>(() -> getModelsSinglePage(resourceGroupName, workspaceName, connectionName, context), + nextLink -> getModelsNextSinglePage(nextLink, context)); + } + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under the Azure OpenAI connection by name along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeploymentWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeployment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under the Azure OpenAI connection by name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeploymentAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + return getDeploymentWithResponseAsync(resourceGroupName, workspaceName, connectionName, deploymentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deployments under the Azure OpenAI connection by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentWithResponse( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, Context context) { + final String accept = "application/json"; + return service.getDeploymentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, accept, + context); + } + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under the Azure OpenAI connection by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner getDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + return getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, Context.NONE) + .getValue(); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateDeploymentWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdateDeployment(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, deploymentName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateDeploymentWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateDeploymentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, + contentType, accept, body, Context.NONE); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateDeploymentWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateDeploymentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, + contentType, accept, body, context); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + Mono>> mono = createOrUpdateDeploymentWithResponseAsync(resourceGroupName, + workspaceName, connectionName, deploymentName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + Response response = createOrUpdateDeploymentWithResponse(resourceGroupName, workspaceName, + connectionName, deploymentName, body); + return this.client + .getLroResult( + response, EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, Context.NONE); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + Response response = createOrUpdateDeploymentWithResponse(resourceGroupName, workspaceName, + connectionName, deploymentName, body, context); + return this.client + .getLroResult( + response, EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, context); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateDeploymentAsync( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + body).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, body) + .getFinalResult(); + } + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + return beginCreateOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, body, + context).getFinalResult(); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteDeploymentWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + return FluxUtil + .withContext(context -> service.deleteDeployment(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteDeploymentWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName) { + return service.deleteDeploymentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, + Context.NONE); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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) + private Response deleteDeploymentWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName, Context context) { + return service.deleteDeploymentSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, context); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteDeploymentAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + Mono>> mono + = deleteDeploymentWithResponseAsync(resourceGroupName, workspaceName, connectionName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName) { + Response response + = deleteDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName, Context context) { + Response response + = deleteDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName) { + return beginDeleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName) { + beginDeleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName).getFinalResult(); + } + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, Context context) { + beginDeleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, context) + .getFinalResult(); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listDeploymentsSinglePageAsync(String resourceGroupName, String workspaceName, String connectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeployments(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, 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 all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + listDeploymentsAsync(String resourceGroupName, String workspaceName, String connectionName) { + return new PagedFlux<>(() -> listDeploymentsSinglePageAsync(resourceGroupName, workspaceName, connectionName), + nextLink -> listDeploymentsNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listDeploymentsSinglePage(String resourceGroupName, String workspaceName, String connectionName) { + final String accept = "application/json"; + Response res = service.listDeploymentsSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 all the deployments under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeploymentsSinglePage( + String resourceGroupName, String workspaceName, String connectionName, Context context) { + final String accept = "application/json"; + Response res + = service.listDeploymentsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listDeployments(String resourceGroupName, String workspaceName, String connectionName) { + return new PagedIterable<>(() -> listDeploymentsSinglePage(resourceGroupName, workspaceName, connectionName), + nextLink -> listDeploymentsNextSinglePage(nextLink)); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listDeployments(String resourceGroupName, String workspaceName, String connectionName, Context context) { + return new PagedIterable<>( + () -> listDeploymentsSinglePage(resourceGroupName, workspaceName, connectionName, context), + nextLink -> listDeploymentsNextSinglePage(nextLink, context)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * 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 available models under the Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getModelsNext(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 available models under the Azure OpenAI connection. + * + * 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 available models under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.getModelsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * 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 available models under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.getModelsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * 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 all the deployments under the Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listDeploymentsNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeploymentsNext(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 all the deployments under the Azure OpenAI connection. + * + * 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 all the deployments under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listDeploymentsNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listDeploymentsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * 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 all the deployments under the Azure OpenAI connection along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listDeploymentsNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listDeploymentsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java new file mode 100644 index 000000000000..52e6948ed565 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ConnectionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.models.Connections; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModels; + +public final class ConnectionsImpl implements Connections { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionsImpl.class); + + private final ConnectionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionsImpl(ConnectionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().getAllModelsWithResponse(resourceGroupName, workspaceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointModelsImpl(inner.getValue(), this.manager())); + } + + public EndpointModels getAllModels(String resourceGroupName, String workspaceName) { + EndpointModelsInner inner = this.serviceClient().getAllModels(resourceGroupName, workspaceName); + if (inner != null) { + return new EndpointModelsImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName) { + PagedIterable inner + = this.serviceClient().getModels(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())); + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, Context context) { + PagedIterable inner + = this.serviceClient().getModels(resourceGroupName, workspaceName, connectionName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())); + } + + public Response getDeploymentWithResponse( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, Context context) { + Response inner = this.serviceClient() + .getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public EndpointDeploymentResourcePropertiesBasicResource getDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner + = this.serviceClient().getDeployment(resourceGroupName, workspaceName, connectionName, deploymentName); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointDeploymentResourcePropertiesBasicResource createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner = this.serviceClient() + .createOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, body); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointDeploymentResourcePropertiesBasicResource createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner = this.serviceClient() + .createOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, body, context); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName) { + this.serviceClient().deleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName); + } + + public void deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, Context context) { + this.serviceClient() + .deleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, context); + } + + public PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName) { + PagedIterable inner + = this.serviceClient().listDeployments(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName, Context context) { + PagedIterable inner + = this.serviceClient().listDeployments(resourceGroupName, workspaceName, connectionName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + private ConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java index c64667ba9a2e..18fe94aa8f78 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java index 685436988041..48bd34d4e802 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.DataContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -46,287 +46,276 @@ public final class DataContainersClientImpl implements DataContainersClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of DataContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - DataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + DataContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(DataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataContainers to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientDataContainers to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientDataContainers") public interface DataContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DataContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DataContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container 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 paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container 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 paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container 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 paginated list of DataContainer entities as paginated response with {@link PagedFlux}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DataContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * List data containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataContainer entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, DataContainerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List data containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + DataContainerInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List data containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. + * @param body Container entity to create or update. * @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 paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, DataContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + DataContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** @@ -335,37 +324,17 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container 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 resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -399,7 +368,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** @@ -418,309 +388,196 @@ public void delete(String resourceGroupName, String workspaceName, String name) } /** - * Get container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, listViewType, 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 container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DataContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DataContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - DataContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, DataContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Create or update container. + * List data containers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. + * 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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - DataContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List data containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List data containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -728,22 +585,14 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java index 863435b62704..8b26f5a95609 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,16 +28,21 @@ public DataContainersImpl(DataContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataContainerImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + public DataContainer get(String resourceGroupName, String workspaceName, String name) { + DataContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new DataContainerImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -49,25 +54,16 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); } - public DataContainer get(String resourceGroupName, String workspaceName, String name) { - DataContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DataContainerImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); } public DataContainer getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java index 816fc0dbc6f7..e0c971d7ad5c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -56,7 +56,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String version; - public DataVersionBaseImpl withExistingData(String resourceGroupName, String workspaceName, String name) { + public DataVersionBaseImpl withExistingDatum(String resourceGroupName, String workspaceName, String name) { this.resourceGroupName = resourceGroupName; this.workspaceName = workspaceName; this.name = name; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java index b795ed9d26d6..852e3c741894 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,13 +28,14 @@ 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.BinaryData; 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.machinelearning.fluent.DataVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.DataVersionBaseResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; @@ -53,355 +54,314 @@ public final class DataVersionsClientImpl implements DataVersionsClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of DataVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - DataVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + DataVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(DataVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataVersions to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientDataVersions to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientDataVersions") public interface DataVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("$tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DataVersionBaseInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DataVersionBaseInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("$tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("$tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}/publish") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> publish(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DataVersionBaseInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}/publish") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response publishSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, String tags, - ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, tags, - listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, String tags, - ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, tags, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, version, accept, context); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** - * List data versions in the data container. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - tags, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, DataVersionBaseInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List data versions in the data container. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, DataVersionBaseInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List data versions in the data container. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. + * @param body Version entity to create or update. * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, DataVersionBaseInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public DataVersionBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, DataVersionBaseInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** @@ -411,7 +371,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. * @param version Version identifier. - * @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. @@ -419,32 +378,11 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); + String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -481,7 +419,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context); } /** @@ -501,304 +440,194 @@ public void delete(String resourceGroupName, String workspaceName, String name, } /** - * Get version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, String tags, + ListViewType listViewType) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, orderBy, top, skip, tags, + listViewType, 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 version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, DataVersionBaseInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, DataVersionBaseInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, DataVersionBaseInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, DataVersionBaseInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, DataVersionBaseInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, + tags, listViewType, context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -817,36 +646,11 @@ public DataVersionBaseInner createOrUpdate(String resourceGroupName, String work @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -858,45 +662,18 @@ private Mono>> publishWithResponseAsync(String resourc * @param name Container name. * @param version Version identifier. * @param body Destination registry info. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + Context.NONE); } /** @@ -907,18 +684,19 @@ private Mono>> publishWithResponseAsync(String resourc * @param name Container name. * @param version Version identifier. * @param body Destination registry info. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body, Context context) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context); } /** @@ -929,7 +707,6 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * @param name Container name. * @param version Version identifier. * @param body Destination registry info. - * @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. @@ -937,12 +714,11 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); + String name, String version, DestinationAsset body) { Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -961,7 +737,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + Response response = publishWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -981,7 +758,9 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + Response response + = publishWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1004,27 +783,6 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, .flatMap(this.client::getLroFinalResultOrError); } - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Publish version asset into registry. * @@ -1040,7 +798,7 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** @@ -1059,10 +817,12 @@ public void publish(String resourceGroupName, String workspaceName, String name, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** + * List data versions in the data container + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1074,13 +834,6 @@ public void publish(String resourceGroupName, String workspaceName, String name, */ @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(), @@ -1089,6 +842,28 @@ private Mono> listNextSinglePageAsync(String } /** + * List data versions in the data container + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List data versions in the data container + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1096,22 +871,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java index 3907bbab9123..3d0501e3b4a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,16 +29,21 @@ public DataVersionsImpl(DataVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataVersionBaseImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + public DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version) { + DataVersionBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new DataVersionBaseImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -50,25 +55,16 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataVersionBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); } - public DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version) { - DataVersionBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new DataVersionBaseImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); } public void publish(String resourceGroupName, String workspaceName, String name, String version, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java index 5aa80a944ac6..837b53da1b01 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -11,6 +11,7 @@ import com.azure.resourcemanager.machinelearning.models.Datastore; import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; public final class DatastoreImpl implements Datastore, Datastore.Definition, Datastore.Update { private DatastoreInner innerObject; @@ -138,8 +139,9 @@ public Datastore refresh(Context context) { return this; } - public Response listSecretsWithResponse(Context context) { - return serviceManager.datastores().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); + public Response listSecretsWithResponse(SecretExpiry body, Context context) { + return serviceManager.datastores() + .listSecretsWithResponse(resourceGroupName, workspaceName, name, body, context); } public DatastoreSecrets listSecrets() { @@ -162,6 +164,6 @@ public DatastoreImpl withSkipValidation(Boolean skipValidation) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java index e54cb14dbd11..dc3e0db95023 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java index 98b657dec320..f80aac2c44c6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -32,7 +32,8 @@ import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.DatastoreResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -50,398 +51,331 @@ public final class DatastoresClientImpl implements DatastoresClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of DatastoresClientImpl. * * @param client the instance of the service client containing this operation class. */ - DatastoresClientImpl(AzureMachineLearningWorkspacesImpl client) { + DatastoresClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesDatastores to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientDatastores to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientDatastores") public interface DatastoresService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("count") Integer count, @QueryParam("isDefault") Boolean isDefault, - @QueryParam("names") String names, @QueryParam("searchText") String searchText, - @QueryParam("orderBy") String orderBy, @QueryParam("orderByAsc") Boolean orderByAsc, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("skipValidation") Boolean skipValidation, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DatastoreInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("skipValidation") Boolean skipValidation, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DatastoreInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @QueryParam("count") Integer count, + @QueryParam("isDefault") Boolean isDefault, @QueryParam("names") String names, + @QueryParam("searchText") String searchText, @QueryParam("orderBy") String orderBy, + @QueryParam("orderByAsc") Boolean orderByAsc, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("skipValidation") Boolean skipValidation, @BodyParam("application/json") DatastoreInner body, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @QueryParam("count") Integer count, + @QueryParam("isDefault") Boolean isDefault, @QueryParam("names") String names, + @QueryParam("searchText") String searchText, @QueryParam("orderBy") String orderBy, + @QueryParam("orderByAsc") Boolean orderByAsc, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSecrets(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listSecrets(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecretExpiry body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSecretsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SecretExpiry body, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore 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 paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return datastore along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, Boolean isDefault, List names, String searchText, String orderBy, - Boolean orderByAsc) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { final String accept = "application/json"; - String namesConverted = (names == null) - ? null - : names.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, count, isDefault, namesConverted, - searchText, orderBy, orderByAsc, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore 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 paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return datastore on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, Boolean isDefault, List names, String searchText, String orderBy, - Boolean orderByAsc, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - String namesConverted = (names == null) - ? null - : names.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")); - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, count, isDefault, namesConverted, searchText, orderBy, orderByAsc, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. + * @return datastore along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, - names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore 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 paginated list of Datastore entities as paginated response with {@link PagedFlux}. + * @return datastore. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final Boolean isDefault = null; - final List names = null; - final String searchText = null; - final String orderBy = null; - final Boolean orderByAsc = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, - names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DatastoreInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * List datastores. + * Create or update datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. + * @param body Datastore entity to create or update. + * @param skipValidation Flag to skip validation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Datastore entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, - names, searchText, orderBy, orderByAsc, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, DatastoreInner body, Boolean skipValidation) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skipValidation, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List datastores. + * Create or update datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. + * @param body Datastore entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Datastore entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final Boolean isDefault = null; - final List names = null; - final String searchText = null; - final String orderBy = null; - final Boolean orderByAsc = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, isDefault, names, - searchText, orderBy, orderByAsc)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + DatastoreInner body) { + final Boolean skipValidation = null; + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List datastores. + * Create or update datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. + * @param body Datastore entity to create or update. + * @param skipValidation Flag to skip validation. * @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 paginated list of Datastore entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, isDefault, names, - searchText, orderBy, orderByAsc, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, DatastoreInner body, Boolean skipValidation, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skipValidation, contentType, + accept, body, context); } /** - * Delete datastore. + * Create or update datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. + * @param body Datastore entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + DatastoreInner body) { + final Boolean skipValidation = null; + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, skipValidation, Context.NONE) + .getValue(); } /** * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore 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 resourceGroupName, String workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -457,7 +391,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -468,14 +402,15 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -487,296 +422,213 @@ public void delete(String resourceGroupName, String workspaceName, String name) } /** - * Get datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param isDefault Filter down to the workspace default datastore. + * @param names Names of datastores to return. + * @param searchText Text to search for in the datastore names. + * @param orderBy Order by property (createdtime | modifiedtime | name). + * @param orderByAsc Order by property in ascending order. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer count, Boolean isDefault, List names, String searchText, String orderBy, + Boolean orderByAsc) { final String accept = "application/json"; + String namesConverted = (names == null) + ? null + : names.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, count, isDefault, + namesConverted, searchText, orderBy, orderByAsc, 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 datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore 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 datastore along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore 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 datastore on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param isDefault Filter down to the workspace default datastore. + * @param names Names of datastores to return. + * @param searchText Text to search for in the datastore names. + * @param orderBy Order by property (createdtime | modifiedtime | name). + * @param orderByAsc Order by property in ascending order. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. + * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, + names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. + * @param workspaceName Azure Machine Learning Workspace 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 datastore. + * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + final Boolean isDefault = null; + final List names = null; + final String searchText = null; + final String orderBy = null; + final Boolean orderByAsc = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, isDefault, + names, searchText, orderBy, orderByAsc), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param isDefault Filter down to the workspace default datastore. + * @param names Names of datastores to return. + * @param searchText Text to search for in the datastore names. + * @param orderBy Order by property (createdtime | modifiedtime | name). + * @param orderByAsc Order by property in ascending order. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of Datastore entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DatastoreInner body, Boolean skipValidation) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String skip, + Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skipValidation, body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + String namesConverted = (names == null) + ? null + : names.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, count, + isDefault, namesConverted, searchText, orderBy, orderByAsc, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param isDefault Filter down to the workspace default datastore. + * @param names Names of datastores to return. + * @param searchText Text to search for in the datastore names. + * @param orderBy Order by property (createdtime | modifiedtime | name). + * @param orderByAsc Order by property in ascending order. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of Datastore entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, DatastoreInner body, Boolean skipValidation, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String skip, + Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), skipValidation, body, accept, context); + String namesConverted = (names == null) + ? null + : names.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, count, + isDefault, namesConverted, searchText, orderBy, orderByAsc, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. + * @param workspaceName Azure Machine Learning Workspace 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - DatastoreInner body) { - final Boolean skipValidation = null; - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + final Boolean isDefault = null; + final List names = null; + final String searchText = null; + final String orderBy = null; + final Boolean orderByAsc = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, count, isDefault, names, + searchText, orderBy, orderByAsc), nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param isDefault Filter down to the workspace default datastore. + * @param names Names of datastores to return. + * @param searchText Text to search for in the datastore names. + * @param orderBy Order by property (createdtime | modifiedtime | name). + * @param orderByAsc Order by property in ascending order. * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, DatastoreInner body, Boolean skipValidation, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, context) - .block(); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - DatastoreInner body) { - final Boolean skipValidation = null; - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, skipValidation, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Integer count, Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, count, isDefault, names, + searchText, orderBy, orderByAsc, context), nextLink -> listNextSinglePage(nextLink, context)); } /** * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. + * @param body Secret expiry information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -784,29 +636,11 @@ public DatastoreInner createOrUpdate(String resourceGroupName, String workspaceN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + String workspaceName, String name, SecretExpiry body) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -814,46 +648,7 @@ private Mono> listSecretsWithResponseAsync(Strin * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore 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 datastore secrets along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -862,7 +657,8 @@ private Mono> listSecretsWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listSecretsAsync(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name) + final SecretExpiry body = null; + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -870,8 +666,9 @@ private Mono listSecretsAsync(String resourceGroupName, S * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. + * @param body Secret expiry information. * @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. @@ -880,15 +677,17 @@ private Mono listSecretsAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + String name, SecretExpiry body, Context context) { + final String accept = "application/json"; + return service.listSecretsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, body, context); } /** * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -897,10 +696,13 @@ public Response listSecretsWithResponse(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) public DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + final SecretExpiry body = null; + return listSecretsWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** + * List datastores. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -912,13 +714,6 @@ public DatastoreSecretsInner listSecrets(String resourceGroupName, String worksp */ @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(), @@ -927,6 +722,28 @@ private Mono> listNextSinglePageAsync(String nextL } /** + * List datastores. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Datastore entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List datastores. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -934,22 +751,14 @@ private Mono> listNextSinglePageAsync(String nextL * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of Datastore entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java index fa7812fdde1c..edfad01e3fa9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -13,8 +13,9 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; import com.azure.resourcemanager.machinelearning.models.Datastore; -import com.azure.resourcemanager.machinelearning.models.Datastores; import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; +import com.azure.resourcemanager.machinelearning.models.Datastores; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; import java.util.List; public final class DatastoresImpl implements Datastores { @@ -30,17 +31,21 @@ public DatastoresImpl(DatastoresClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DatastoreImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc, - context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); + public Datastore get(String resourceGroupName, String workspaceName, String name) { + DatastoreInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new DatastoreImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -52,37 +57,25 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DatastoreImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } - public Datastore get(String resourceGroupName, String workspaceName, String name) { - DatastoreInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DatastoreImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc, + context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); } public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { + String name, SecretExpiry body, Context context) { Response inner - = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DatastoreSecretsImpl(inner.getValue(), this.manager())); - } else { - return null; - } + = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, body, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DatastoreSecretsImpl(inner.getValue(), this.manager())); } public DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java new file mode 100644 index 000000000000..7e6f939ca784 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner; +import com.azure.resourcemanager.machinelearning.models.DeltaModelCurrentState; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusResponse; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class DeltaModelStatusResponseImpl implements DeltaModelStatusResponse { + private DeltaModelStatusResponseInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + DeltaModelStatusResponseImpl(DeltaModelStatusResponseInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Integer actualInstanceCount() { + return this.innerModel().actualInstanceCount(); + } + + public Map> deltaModels() { + Map> inner = this.innerModel().deltaModels(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Integer expectedInstanceCount() { + return this.innerModel().expectedInstanceCount(); + } + + public String revisionId() { + return this.innerModel().revisionId(); + } + + public String targetBaseModel() { + return this.innerModel().targetBaseModel(); + } + + public DeltaModelStatusResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java index c4e57feffea9..769a1ff67863 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java index 887a49f6b5cc..c1f6f485e405 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java index d407a063e1c6..1a34f4eab400 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java index 9746d7e9d794..701cf9e9c918 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -22,10 +22,6 @@ public String accessToken() { return this.innerModel().accessToken(); } - public String tokenType() { - return this.innerModel().tokenType(); - } - public Long expiryTimeUtc() { return this.innerModel().expiryTimeUtc(); } @@ -34,6 +30,10 @@ public Long refreshAfterTimeUtc() { return this.innerModel().refreshAfterTimeUtc(); } + public String tokenType() { + return this.innerModel().tokenType(); + } + public EndpointAuthTokenInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java new file mode 100644 index 000000000000..562d2a06b96f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; + +public final class EndpointDeploymentResourcePropertiesBasicResourceImpl implements + EndpointDeploymentResourcePropertiesBasicResource, EndpointDeploymentResourcePropertiesBasicResource.Definition, + EndpointDeploymentResourcePropertiesBasicResource.Update { + private EndpointDeploymentResourcePropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public EndpointDeploymentResourceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public EndpointDeploymentResourcePropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String endpointName; + + private String deploymentName; + + public EndpointDeploymentResourcePropertiesBasicResourceImpl withExistingEndpoint(String resourceGroupName, + String workspaceName, String endpointName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.endpointName = endpointName; + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getEndpointDeployments() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), + Context.NONE); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEndpointDeployments() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); + return this; + } + + EndpointDeploymentResourcePropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new EndpointDeploymentResourcePropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.deploymentName = name; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl update() { + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource apply() { + this.innerObject = serviceManager.serviceClient() + .getEndpointDeployments() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), + Context.NONE); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEndpointDeployments() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); + return this; + } + + EndpointDeploymentResourcePropertiesBasicResourceImpl( + EndpointDeploymentResourcePropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "endpoints"); + this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deployments"); + } + + public EndpointDeploymentResourcePropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getEndpointDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) + .getValue(); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEndpointDeployments() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) + .getValue(); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl + withProperties(EndpointDeploymentResourceProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java new file mode 100644 index 000000000000..9ab7b4444f1e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java @@ -0,0 +1,1132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.BinaryData; +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.machinelearning.fluent.EndpointDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +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 EndpointDeploymentsClient. + */ +public final class EndpointDeploymentsClientImpl implements EndpointDeploymentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EndpointDeploymentsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of EndpointDeploymentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EndpointDeploymentsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(EndpointDeploymentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientEndpointDeployments to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientEndpointDeployments") + public interface EndpointDeploymentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointDeploymentResourcePropertiesBasicResourceInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointDeploymentResourcePropertiesBasicResourceInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInWorkspace( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("endpointType") EndpointType endpointType, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getInWorkspaceSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("endpointType") EndpointType endpointType, @QueryParam("$skip") String skip, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInWorkspaceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getInWorkspaceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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 deployments under endpoint resource by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, deploymentName, accept, context); + } + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return deployments under endpoint resource by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, Context.NONE); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client + .getLroResult( + response, EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, Context.NONE); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointDeploymentResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return this.client + .getLroResult( + response, EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, context); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body) + .getFinalResult(); + } + + /** + * Create or update endpoint deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .getFinalResult(); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + Context.NONE); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + beginDelete(resourceGroupName, workspaceName, endpointName, deploymentName).getFinalResult(); + } + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + beginDelete(resourceGroupName, workspaceName, endpointName, deploymentName, context).getFinalResult(); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSinglePageAsync(String resourceGroupName, String workspaceName, String endpointName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, 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 all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String endpointName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listSinglePage(String resourceGroupName, String workspaceName, String endpointName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 all the deployments under the endpoint resource scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listSinglePage(String resourceGroupName, String workspaceName, String endpointName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, endpointName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, endpointName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInWorkspaceSinglePageAsync( + String resourceGroupName, String workspaceName, EndpointType endpointType, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getInWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointType, skip, 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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + getInWorkspaceAsync(String resourceGroupName, String workspaceName, EndpointType endpointType, String skip) { + return new PagedFlux<>( + () -> getInWorkspaceSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip), + nextLink -> getInWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + getInWorkspaceAsync(String resourceGroupName, String workspaceName) { + final EndpointType endpointType = null; + final String skip = null; + return new PagedFlux<>( + () -> getInWorkspaceSinglePageAsync(resourceGroupName, workspaceName, endpointType, skip), + nextLink -> getInWorkspaceNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getInWorkspaceSinglePage( + String resourceGroupName, String workspaceName, EndpointType endpointType, String skip) { + final String accept = "application/json"; + Response res = service.getInWorkspaceSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointType, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param skip Continuation token for pagination. + * @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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getInWorkspaceSinglePage( + String resourceGroupName, String workspaceName, EndpointType endpointType, String skip, Context context) { + final String accept = "application/json"; + Response res + = service.getInWorkspaceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointType, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + getInWorkspace(String resourceGroupName, String workspaceName) { + final EndpointType endpointType = null; + final String skip = null; + return new PagedIterable<>(() -> getInWorkspaceSinglePage(resourceGroupName, workspaceName, endpointType, skip), + nextLink -> getInWorkspaceNextSinglePage(nextLink)); + } + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param skip Continuation token for pagination. + * @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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getInWorkspace( + String resourceGroupName, String workspaceName, EndpointType endpointType, String skip, Context context) { + return new PagedIterable<>( + () -> getInWorkspaceSinglePage(resourceGroupName, workspaceName, endpointType, skip, context), + nextLink -> getInWorkspaceNextSinglePage(nextLink, context)); + } + + /** + * Get all the deployments under the endpoint resource scope + * + * 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 all the deployments under the endpoint resource scope along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listNextSinglePageAsync(String nextLink) { + 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 all the deployments under the endpoint resource scope + * + * 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 all the deployments under the endpoint resource scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the endpoint resource scope + * + * 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 all the deployments under the endpoint resource scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the workspace scope + * + * 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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getInWorkspaceNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getInWorkspaceNext(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 all the deployments under the workspace scope + * + * 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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + getInWorkspaceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.getInWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get all the deployments under the workspace scope + * + * 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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + getInWorkspaceNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.getInWorkspaceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java new file mode 100644 index 000000000000..46feeb027ee1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.EndpointDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointDeployments; +import com.azure.resourcemanager.machinelearning.models.EndpointType; + +public final class EndpointDeploymentsImpl implements EndpointDeployments { + private static final ClientLogger LOGGER = new ClientLogger(EndpointDeploymentsImpl.class); + + private final EndpointDeploymentsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public EndpointDeploymentsImpl(EndpointDeploymentsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public EndpointDeploymentResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName) { + PagedIterable inner + = this.serviceClient().getInWorkspace(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context) { + PagedIterable inner + = this.serviceClient().getInWorkspace(resourceGroupName, workspaceName, endpointType, skip, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public EndpointDeploymentResourcePropertiesBasicResource 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String deploymentName = ResourceManagerUtils.getValueFromIdByName(id, "deployments"); + if (deploymentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + this.delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + private EndpointDeploymentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl define(String name) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java new file mode 100644 index 000000000000..45f976e6f533 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointKeys; + +public final class EndpointKeysImpl implements EndpointKeys { + private EndpointKeysInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + EndpointKeysImpl(EndpointKeysInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public AccountApiKeys keys() { + AccountApiKeysInner inner = this.innerModel().keys(); + if (inner != null) { + return new AccountApiKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointKeysInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java new file mode 100644 index 000000000000..734587667ec4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModelSkuProperties; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class EndpointModelPropertiesImpl implements EndpointModelProperties { + private EndpointModelPropertiesInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + EndpointModelPropertiesImpl(EndpointModelPropertiesInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Map capabilities() { + Map inner = this.innerModel().capabilities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public EndpointModelDeprecationProperties deprecation() { + return this.innerModel().deprecation(); + } + + public Map finetuneCapabilities() { + Map inner = this.innerModel().finetuneCapabilities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String format() { + return this.innerModel().format(); + } + + public Boolean isDefaultVersion() { + return this.innerModel().isDefaultVersion(); + } + + public ModelLifecycleStatus lifecycleStatus() { + return this.innerModel().lifecycleStatus(); + } + + public Integer maxCapacity() { + return this.innerModel().maxCapacity(); + } + + public String name() { + return this.innerModel().name(); + } + + public List skus() { + List inner = this.innerModel().skus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String version() { + return this.innerModel().version(); + } + + public EndpointModelPropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java new file mode 100644 index 000000000000..b6deb3cadf85 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModels; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class EndpointModelsImpl implements EndpointModels { + private EndpointModelsInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + EndpointModelsImpl(EndpointModelsInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public EndpointModelsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java index a9770051f489..042040783b2e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -23,10 +23,23 @@ public final class EndpointPropertiesBaseImpl implements EndpointPropertiesBase this.serviceManager = serviceManager; } + public EndpointAuthMode authMode() { + return this.innerModel().authMode(); + } + public String description() { return this.innerModel().description(); } + public EndpointAuthKeys keys() { + EndpointAuthKeysInner inner = this.innerModel().keys(); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + public Map properties() { Map inner = this.innerModel().properties(); if (inner != null) { @@ -44,19 +57,6 @@ public String swaggerUri() { return this.innerModel().swaggerUri(); } - public EndpointAuthMode authMode() { - return this.innerModel().authMode(); - } - - public EndpointAuthKeys keys() { - EndpointAuthKeysInner inner = this.innerModel().keys(); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - public EndpointPropertiesBaseInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java new file mode 100644 index 000000000000..586106f90054 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; + +public final class EndpointResourcePropertiesBasicResourceImpl implements EndpointResourcePropertiesBasicResource, + EndpointResourcePropertiesBasicResource.Definition, EndpointResourcePropertiesBasicResource.Update { + private EndpointResourcePropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public EndpointResourceProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public EndpointResourcePropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String endpointName; + + public EndpointResourcePropertiesBasicResourceImpl withExistingWorkspace(String resourceGroupName, + String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public EndpointResourcePropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public EndpointResourcePropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); + return this; + } + + EndpointResourcePropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new EndpointResourcePropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.endpointName = name; + } + + public EndpointResourcePropertiesBasicResourceImpl update() { + return this; + } + + public EndpointResourcePropertiesBasicResource apply() { + this.innerObject = serviceManager.serviceClient() + .getEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public EndpointResourcePropertiesBasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); + return this; + } + + EndpointResourcePropertiesBasicResourceImpl(EndpointResourcePropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "endpoints"); + } + + public EndpointResourcePropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) + .getValue(); + return this; + } + + public EndpointResourcePropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getEndpoints() + .getWithResponse(resourceGroupName, workspaceName, endpointName, context) + .getValue(); + return this; + } + + public Response listKeysWithResponse(Context context) { + return serviceManager.endpoints().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + } + + public EndpointKeys listKeys() { + return serviceManager.endpoints().listKeys(resourceGroupName, workspaceName, endpointName); + } + + public Response regenerateKeysWithResponse(RegenerateServiceAccountKeyContent body, + Context context) { + return serviceManager.endpoints() + .regenerateKeysWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + } + + public AccountApiKeys regenerateKeys(RegenerateServiceAccountKeyContent body) { + return serviceManager.endpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); + } + + public EndpointResourcePropertiesBasicResourceImpl withProperties(EndpointResourceProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java new file mode 100644 index 000000000000..47532301c954 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java @@ -0,0 +1,1141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.BinaryData; +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.machinelearning.fluent.EndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.EndpointResourcePropertiesBasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; +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 EndpointsClient. + */ +public final class EndpointsClientImpl implements EndpointsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EndpointsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of EndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EndpointsClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(EndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientEndpoints to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientEndpoints") + public interface EndpointsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointResourcePropertiesBasicResourceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") EndpointResourcePropertiesBasicResourceInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("endpointType") EndpointType endpointType, + @QueryParam("includeOnlineEndpoints") Boolean includeOnlineEndpoints, + @QueryParam("includeServerlessEndpoints") Boolean includeServerlessEndpoints, + @QueryParam("includeConnections") Boolean includeConnections, @QueryParam("$skip") String skip, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("endpointType") EndpointType endpointType, + @QueryParam("includeOnlineEndpoints") Boolean includeOnlineEndpoints, + @QueryParam("includeServerlessEndpoints") Boolean includeServerlessEndpoints, + @QueryParam("includeConnections") Boolean includeConnections, @QueryParam("$skip") String skip, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/listKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/listKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/models") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getModels(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/models") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getModelsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/regenerateKey") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegenerateServiceAccountKeyContent body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/regenerateKey") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response regenerateKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegenerateServiceAccountKeyContent body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getModelsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getModelsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource + * + * Gets endpoint resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource + * + * Gets endpoint resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String endpointName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 endpoint resource + * + * Gets endpoint resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, accept, context); + } + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpoint resource + * + * Gets endpoint resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointResourcePropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, EndpointResourcePropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + Context.NONE); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + context); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointResourcePropertiesBasicResourceInner.class, + EndpointResourcePropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, body); + return this.client + .getLroResult( + response, EndpointResourcePropertiesBasicResourceInner.class, + EndpointResourcePropertiesBasicResourceInner.class, Context.NONE); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, EndpointResourcePropertiesBasicResourceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + EndpointResourcePropertiesBasicResourceInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + return this.client + .getLroResult( + response, EndpointResourcePropertiesBasicResourceInner.class, + EndpointResourcePropertiesBasicResourceInner.class, context); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String workspaceName, String endpointName, EndpointResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, body).getFinalResult(); + } + + /** + * Create or update endpoint resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body Endpoint resource object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointResourcePropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointResourcePropertiesBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String endpointName, EndpointResourcePropertiesBasicResourceInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, body, context).getFinalResult(); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of EndpointResourcePropertiesBasicResource items along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, EndpointType endpointType, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, EndpointType endpointType, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName) { + final EndpointType endpointType = null; + final Boolean includeOnlineEndpoints = null; + final Boolean includeServerlessEndpoints = null; + final Boolean includeConnections = null; + final String skip = null; + final String expand = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of EndpointResourcePropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, EndpointType endpointType, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, includeServerlessEndpoints, + includeConnections, skip, expand, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @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 paged collection of EndpointResourcePropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, EndpointType endpointType, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, includeServerlessEndpoints, + includeConnections, skip, expand, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName) { + final EndpointType endpointType = null; + final Boolean includeOnlineEndpoints = null; + final Boolean includeServerlessEndpoints = null; + final Boolean includeConnections = null; + final String skip = null; + final String expand = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @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 paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, EndpointType endpointType, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync(String resourceGroupName, String workspaceName, String endpointName) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + final String accept = "application/json"; + return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context); + } + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { + return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getModels(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, 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 available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getModelsAsync(String resourceGroupName, String workspaceName, + String endpointName) { + return new PagedFlux<>(() -> getModelsSinglePageAsync(resourceGroupName, workspaceName, endpointName), + nextLink -> getModelsNextSinglePageAsync(nextLink)); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsSinglePage(String resourceGroupName, + String workspaceName, String endpointName) { + final String accept = "application/json"; + Response res + = service.getModelsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 available models under the endpoint resource along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsSinglePage(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + final String accept = "application/json"; + Response res + = service.getModelsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName) { + return new PagedIterable<>(() -> getModelsSinglePage(resourceGroupName, workspaceName, endpointName), + nextLink -> getModelsNextSinglePage(nextLink)); + } + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + return new PagedIterable<>(() -> getModelsSinglePage(resourceGroupName, workspaceName, endpointName, context), + nextLink -> getModelsNextSinglePage(nextLink, context)); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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> regenerateKeysWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, RegenerateServiceAccountKeyContent body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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 regenerateKeysAsync(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body) { + return regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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 regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.regenerateKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + context); + } + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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 AccountApiKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body) { + return regenerateKeysWithResponse(resourceGroupName, workspaceName, endpointName, body, Context.NONE) + .getValue(); + } + + /** + * List All the endpoints under this workspace + * + * 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 paged collection of EndpointResourcePropertiesBasicResource items along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List All the endpoints under this workspace + * + * 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 paged collection of EndpointResourcePropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List All the endpoints under this workspace + * + * 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 paged collection of EndpointResourcePropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get available models under the endpoint resource. + * + * 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 available models under the endpoint resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getModelsNext(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 available models under the endpoint resource. + * + * 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 available models under the endpoint resource along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.getModelsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get available models under the endpoint resource. + * + * 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 available models under the endpoint resource along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getModelsNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.getModelsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java new file mode 100644 index 000000000000..3e188006ded5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.EndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointKeys; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +import com.azure.resourcemanager.machinelearning.models.Endpoints; +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; + +public final class EndpointsImpl implements Endpoints { + private static final ClientLogger LOGGER = new ClientLogger(EndpointsImpl.class); + + private final EndpointsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public EndpointsImpl(EndpointsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointResourcePropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public EndpointResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, + String endpointName) { + EndpointResourcePropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new EndpointResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + EndpointType endpointType, Boolean includeOnlineEndpoints, Boolean includeServerlessEndpoints, + Boolean includeConnections, String skip, String expand, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, includeServerlessEndpoints, + includeConnections, skip, expand, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointKeysImpl(inner.getValue(), this.manager())); + } + + public EndpointKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { + EndpointKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new EndpointKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName) { + PagedIterable inner + = this.serviceClient().getModels(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())); + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + PagedIterable inner + = this.serviceClient().getModels(resourceGroupName, workspaceName, endpointName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())); + } + + public Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context) { + Response inner = this.serviceClient() + .regenerateKeysWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AccountApiKeysImpl(inner.getValue(), this.manager())); + } + + public AccountApiKeys regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body) { + AccountApiKeysInner inner + = this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); + if (inner != null) { + return new AccountApiKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointResourcePropertiesBasicResource 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, context); + } + + private EndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public EndpointResourcePropertiesBasicResourceImpl define(String name) { + return new EndpointResourcePropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java index e41b0dc669e8..209372b990a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java index d2590aaddd14..8d15a2f43358 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -46,287 +46,276 @@ public final class EnvironmentContainersClientImpl implements EnvironmentContain /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of EnvironmentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - EnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + EnvironmentContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(EnvironmentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentContainers to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for MachineLearningManagementClientEnvironmentContainers to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientEnvironmentContainers") public interface EnvironmentContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EnvironmentContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EnvironmentContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. + * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * List environment containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, EnvironmentContainerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List environment containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, EnvironmentContainerInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List environment containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String workspaceName, String name, EnvironmentContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + EnvironmentContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** @@ -335,37 +324,17 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @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 workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -399,7 +368,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** @@ -418,309 +388,196 @@ public void delete(String resourceGroupName, String workspaceName, String name) } /** - * Get container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip, ListViewType listViewType) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, listViewType, 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 container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, EnvironmentContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, EnvironmentContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, ListViewType listViewType, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, EnvironmentContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String workspaceName, String name, EnvironmentContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Create or update container. + * List environment containers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * 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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - EnvironmentContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List environment containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List environment containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -728,22 +585,14 @@ private Mono> listNextSinglePageAsync(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 a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java index 688d360e5bed..3d3652c39976 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,16 +28,21 @@ public EnvironmentContainersImpl(EnvironmentContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EnvironmentContainerImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + public EnvironmentContainer get(String resourceGroupName, String workspaceName, String name) { + EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new EnvironmentContainerImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -49,25 +54,16 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); } - public EnvironmentContainer get(String resourceGroupName, String workspaceName, String name) { - EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new EnvironmentContainerImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); } public EnvironmentContainer getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java index 4741ee27fdcb..5ff4614cd3c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java index 0a9014a771ca..b2364307e7fa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,14 +28,15 @@ 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.BinaryData; 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.machinelearning.fluent.EnvironmentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -53,336 +54,312 @@ public final class EnvironmentVersionsClientImpl implements EnvironmentVersionsC /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of EnvironmentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - EnvironmentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + EnvironmentVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(EnvironmentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentVersions to be used by the + * The interface defining all the services for MachineLearningManagementClientEnvironmentVersions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientEnvironmentVersions") public interface EnvironmentVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EnvironmentVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EnvironmentVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") EnvironmentVersionInner body, + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}/publish") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> publish(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}/publish") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response publishSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), orderBy, top, skip, listViewType, - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, name, - this.client.getApiVersion(), orderBy, top, skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** - * List versions. + * Creates or updates an EnvironmentVersion. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. + * @param body Definition of EnvironmentVersion. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, - listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, EnvironmentVersionInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Creates or updates an EnvironmentVersion. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Definition of EnvironmentVersion. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, String version, EnvironmentVersionInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Creates or updates an EnvironmentVersion. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param version Version identifier. This is case-sensitive. + * @param body Definition of EnvironmentVersion. * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, EnvironmentVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Creates or updates an EnvironmentVersion. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Definition of EnvironmentVersion. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, EnvironmentVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** @@ -392,7 +369,6 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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. @@ -400,32 +376,11 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); + String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -462,7 +417,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context); } /** @@ -482,304 +438,176 @@ public void delete(String resourceGroupName, String workspaceName, String name, } /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String orderBy, Integer top, String skip, ListViewType listViewType) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, orderBy, top, skip, + listViewType, 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 version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, workspaceName, - name, version, this.client.getApiVersion(), accept, context); - } - - /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, EnvironmentVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, ListViewType listViewType) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates or updates an EnvironmentVersion. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. + * @param name Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, EnvironmentVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates or updates an EnvironmentVersion. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, EnvironmentVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Creates or updates an EnvironmentVersion. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. + * @param name Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, EnvironmentVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, EnvironmentVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -787,8 +615,8 @@ public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String w * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -798,36 +626,11 @@ public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String w @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -836,48 +639,21 @@ private Mono>> publishWithResponseAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + Context.NONE); } /** @@ -885,21 +661,22 @@ private Mono>> publishWithResponseAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body, Context context) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context); } /** @@ -907,10 +684,9 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. - * @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. @@ -918,12 +694,11 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); + String name, String version, DestinationAsset body) { Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -931,8 +706,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -942,7 +717,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + Response response = publishWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -950,8 +726,8 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -962,7 +738,9 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + Response response + = publishWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -970,8 +748,8 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -990,29 +768,8 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1021,7 +778,7 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** @@ -1029,8 +786,8 @@ public void publish(String resourceGroupName, String workspaceName, String name, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1040,10 +797,12 @@ public void publish(String resourceGroupName, String workspaceName, String name, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1055,13 +814,6 @@ public void publish(String resourceGroupName, String workspaceName, String name, */ @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(), @@ -1070,6 +822,28 @@ private Mono> listNextSinglePageAsync(Str } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1077,22 +851,14 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java index 67ec016573b2..516793ca9d00 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,17 +29,21 @@ public EnvironmentVersionsImpl(EnvironmentVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EnvironmentVersionImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + public EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version) { + EnvironmentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new EnvironmentVersionImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -51,25 +55,17 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); } - public EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version) { - EnvironmentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new EnvironmentVersionImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); } public void publish(String resourceGroupName, String workspaceName, String name, String version, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java index 230f8d479695..7afaac8a6947 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; +import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag; import java.util.Collections; import java.util.List; @@ -21,8 +21,8 @@ public final class ExternalFqdnResponseImpl implements ExternalFqdnResponse { this.serviceManager = serviceManager; } - public List value() { - List inner = this.innerModel().value(); + public List value() { + List inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java index 547f0617bbd3..558735159c0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java index ffb1aec315db..0ab375be7be1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.FeaturesClient; import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.FeatureResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.FeatureResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import reactor.core.publisher.Mono; @@ -43,122 +43,183 @@ public final class FeaturesClientImpl implements FeaturesClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of FeaturesClientImpl. * * @param client the instance of the service client containing this operation class. */ - FeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { + FeaturesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(FeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeatures to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientFeatures to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientFeatures") public interface FeaturesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("featuresetName") String featuresetName, - @PathParam("featuresetVersion") String featuresetVersion, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("featureName") String featureName, @QueryParam("description") String description, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @PathParam("featuresetVersion") String featuresetVersion, @PathParam("featureName") String featureName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("featuresetName") String featuresetName, @PathParam("featuresetVersion") String featuresetVersion, @PathParam("featureName") String featureName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("featuresetName") String featuresetName, + @PathParam("featuresetVersion") String featuresetVersion, @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, @QueryParam("featureName") String featureName, + @QueryParam("description") String description, @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("pageSize") Integer pageSize, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("featuresetName") String featuresetName, + @PathParam("featuresetVersion") String featuresetVersion, @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, @QueryParam("featureName") String featureName, + @QueryParam("description") String description, @QueryParam("listViewType") ListViewType listViewType, + @QueryParam("pageSize") Integer pageSize, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List Features. + * Get feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName 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 paginated list of Feature entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return feature along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String featuresetName, String featuresetVersion, String skip, String tags, String featureName, - String description, ListViewType listViewType, Integer pageSize) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String featuresetName, String featuresetVersion, String featureName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, featuresetName, featuresetVersion, this.client.getApiVersion(), skip, - tags, featureName, description, listViewType, pageSize, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, featuresetName, featuresetVersion, + featureName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName 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 feature on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion, String featureName) { + return getWithResponseAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName 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 feature along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion, String featureName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, accept, context); + } + + /** + * Get feature. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName 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 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureInner get(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion, String featureName) { + return getWithResponse(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, + Context.NONE).getValue(); + } + /** * List Features. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. * @param skip Continuation token for pagination. * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. * @param featureName feature name. @@ -166,7 +227,6 @@ private Mono> listSinglePageAsync(String resourceGro * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for * including/excluding (for example) archived entities. * @param pageSize Page size. - * @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. @@ -176,37 +236,15 @@ private Mono> listSinglePageAsync(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, String skip, String tags, String featureName, - String description, ListViewType listViewType, Integer pageSize, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); - } + String description, ListViewType listViewType, Integer pageSize) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - featuresetName, featuresetVersion, this.client.getApiVersion(), skip, tags, featureName, description, - listViewType, pageSize, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, featuresetName, featuresetVersion, + skip, tags, featureName, description, listViewType, pageSize, 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())); } /** @@ -214,8 +252,8 @@ private Mono> listSinglePageAsync(String resourceGro * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. * @param skip Continuation token for pagination. * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. * @param featureName feature name. @@ -242,8 +280,8 @@ private PagedFlux listAsync(String resourceGroupName, String works * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version 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. @@ -268,8 +306,40 @@ private PagedFlux listAsync(String resourceGroupName, String works * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of Feature entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String featuresetName, String featuresetVersion, String skip, String tags, String featureName, + String description, ListViewType listViewType, Integer pageSize) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, + description, listViewType, pageSize, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Features. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. * @param skip Continuation token for pagination. * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. * @param featureName feature name. @@ -281,16 +351,19 @@ private PagedFlux listAsync(String resourceGroupName, String works * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Feature entities as paginated response with {@link PagedFlux}. + * @return a paginated list of Feature entities along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, - featureName, description, listViewType, pageSize, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String featuresetName, String featuresetVersion, String skip, String tags, String featureName, + String description, ListViewType listViewType, Integer pageSize, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, + description, listViewType, pageSize, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -298,8 +371,8 @@ private PagedFlux listAsync(String resourceGroupName, String works * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version 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. @@ -314,8 +387,9 @@ public PagedIterable list(String resourceGroupName, String workspa final String description = null; final ListViewType listViewType = null; final Integer pageSize = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, - tags, featureName, description, listViewType, pageSize)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, featuresetName, + featuresetVersion, skip, tags, featureName, description, listViewType, pageSize), + nextLink -> listNextSinglePage(nextLink)); } /** @@ -323,8 +397,8 @@ public PagedIterable list(String resourceGroupName, String workspa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. * @param skip Continuation token for pagination. * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. * @param featureName feature name. @@ -342,195 +416,56 @@ public PagedIterable list(String resourceGroupName, String workspa public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, String skip, String tags, String featureName, String description, ListViewType listViewType, Integer pageSize, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, - tags, featureName, description, listViewType, pageSize, context)); + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, + featureName, description, listViewType, pageSize, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Get feature. + * List Features. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return feature along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String featuresetName, String featuresetVersion, String featureName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get feature. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @param context The context to associate with this operation. + * @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 feature along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of Feature entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String featuresetName, String featuresetVersion, String featureName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (featuresetName == null) { - return Mono.error(new IllegalArgumentException("Parameter featuresetName is required and cannot be null.")); - } - if (featuresetVersion == null) { - return Mono - .error(new IllegalArgumentException("Parameter featuresetVersion is required and cannot be null.")); - } - if (featureName == null) { - return Mono.error(new IllegalArgumentException("Parameter featureName is required and cannot be null.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - featuresetName, featuresetVersion, featureName, this.client.getApiVersion(), accept, context); - } - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return feature on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName) { - return getWithResponseAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get feature. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @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 feature along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, - context).block(); + 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 feature. + * List Features. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeatureInner get(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName) { - return getWithResponse(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, - Context.NONE).getValue(); - } - - /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of Feature entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List Features. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -538,22 +473,14 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of Feature entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java index 537bedc6a1a2..917897ab5f6e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,32 +28,12 @@ public FeaturesImpl(FeaturesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, featuresetName, featuresetVersion); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, - description, listViewType, pageSize, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, String featureName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, workspaceName, featuresetName, featuresetVersion, featureName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeatureImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FeatureImpl(inner.getValue(), this.manager())); } public Feature get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, @@ -67,6 +47,22 @@ public Feature get(String resourceGroupName, String workspaceName, String featur } } + public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, featuresetName, featuresetVersion); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion, String skip, String tags, String featureName, String description, + ListViewType listViewType, Integer pageSize, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, featuresetName, featuresetVersion, skip, tags, featureName, + description, listViewType, pageSize, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeatureImpl(inner1, this.manager())); + } + private FeaturesClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java index 9d51268e1f83..d5583174444f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java index 7f5883a132fc..04e0e978836b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.FeaturesetContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -51,900 +52,741 @@ public final class FeaturesetContainersClientImpl implements FeaturesetContainer /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of FeaturesetContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - FeaturesetContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + FeaturesetContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(FeaturesetContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturesetContainers to be used by the + * The interface defining all the services for MachineLearningManagementClientFeaturesetContainers to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientFeaturesetContainers") public interface FeaturesetContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getEntity(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @QueryParam("pageSize") Integer pageSize, @QueryParam("name") String name, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getEntitySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FeaturesetContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FeaturesetContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getEntity(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("name") String name, @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturesetContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("name") String name, @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getEntityWithResponseAsync(String resourceGroupName, + String workspaceName, String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, - description, createdBy, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getEntity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, description, createdBy, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user 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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getEntityAsync(String resourceGroupName, String workspaceName, String name) { + return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntityWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + final String accept = "application/json"; + return service.getEntitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { + return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, FeaturesetContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + FeaturesetContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + FeaturesetContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, FeaturesetContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), FeaturesetContainerInner.class, FeaturesetContainerInner.class, + this.client.getContext()); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, + FeaturesetContainerInner.class, FeaturesetContainerInner.class, Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, + FeaturesetContainerInner.class, FeaturesetContainerInner.class, context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, FeaturesetContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturesetContainerInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body).getFinalResult(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturesetContainerInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body, context).getFinalResult(); } /** * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @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) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @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 container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getEntityAsync(String resourceGroupName, String workspaceName, String name) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { - return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturesetContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturesetContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String name) { + beginDelete(resourceGroupName, workspaceName, name).getFinalResult(); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetContainerInner.class, FeaturesetContainerInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + beginDelete(resourceGroupName, workspaceName, name, context).getFinalResult(); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetContainerInner.class, FeaturesetContainerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, + String description, String createdBy) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, + name, description, createdBy, 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())); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetContainerInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, FeaturesetContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturesetContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, + String createdBy) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, tags, + listViewType, pageSize, name, description, createdBy, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturesetContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, + String createdBy, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, tags, + listViewType, pageSize, name, description, createdBy, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy), nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturesetContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy, context), nextLink -> listNextSinglePage(nextLink, context)); } /** + * List featurestore entity containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -956,13 +798,6 @@ public FeaturesetContainerInner createOrUpdate(String resourceGroupName, String */ @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(), @@ -971,6 +806,28 @@ private Mono> listNextSinglePageAsync(St } /** + * List featurestore entity containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List featurestore entity containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -978,22 +835,14 @@ private Mono> listNextSinglePageAsync(St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a paginated list of FeaturesetContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java index 122e2a41360d..3f828c29d66e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,18 +28,21 @@ public FeaturesetContainersImpl(FeaturesetContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); + public Response getEntityWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + Response inner + = this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FeaturesetContainerImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy, - context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); + public FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name) { + FeaturesetContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); + if (inner != null) { + return new FeaturesetContainerImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -50,25 +53,18 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, context); } - public Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - Response inner - = this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturesetContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); } - public FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name) { - FeaturesetContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); - if (inner != null) { - return new FeaturesetContainerImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, + Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy, + context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetContainerImpl(inner1, this.manager())); } public FeaturesetContainer getEntityById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java index 274f7f04de24..1d0fbd8bb206 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java index 79b10298eb8f..93a4f23219fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java index a333bc84f26a..8979984882bb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,6 +28,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -35,8 +36,8 @@ import com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -54,999 +55,822 @@ public final class FeaturesetVersionsClientImpl implements FeaturesetVersionsCli /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of FeaturesetVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - FeaturesetVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + FeaturesetVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(FeaturesetVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturesetVersions to be used by the + * The interface defining all the services for MachineLearningManagementClientFeaturesetVersions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientFeaturesetVersions") public interface FeaturesetVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, - @QueryParam("versionName") String versionName, @QueryParam("version") String version, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @QueryParam("stage") String stage, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FeaturesetVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FeaturesetVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("versionName") String versionName, @QueryParam("version") String version, + @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, + @QueryParam("stage") String stage, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("versionName") String versionName, @QueryParam("version") String version, + @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, + @QueryParam("stage") String stage, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> backfill(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") FeaturesetVersionInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FeaturesetVersionBackfillRequest body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> backfill(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response backfillSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturesetVersionBackfillRequest body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FeaturesetVersionBackfillRequest body, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, name, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, versionName, version, description, - createdBy, stage, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, FeaturesetVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, FeaturesetVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, FeaturesetVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, FeaturesetVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), FeaturesetVersionInner.class, FeaturesetVersionInner.class, + this.client.getContext()); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version).getSyncPoller(); + public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(response, + FeaturesetVersionInner.class, FeaturesetVersionInner.class, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).getSyncPoller(); + public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(response, + FeaturesetVersionInner.class, FeaturesetVersionInner.class, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, String version, FeaturesetVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, FeaturesetVersionInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); + public FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, FeaturesetVersionInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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) - public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, version, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @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 version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, workspaceName, - name, version, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String name, String version) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, version); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, version, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, version).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturesetVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + beginDelete(resourceGroupName, workspaceName, name, version).getFinalResult(); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetVersionInner.class, FeaturesetVersionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { + beginDelete(resourceGroupName, workspaceName, name, version, context).getFinalResult(); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturesetVersionInner.class, FeaturesetVersionInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, + String versionName, String version, String description, String createdBy, String stage) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, tags, listViewType, + pageSize, versionName, version, description, createdBy, stage, 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())); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, + listViewType, pageSize, versionName, version, description, createdBy, stage), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturesetVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, + listViewType, pageSize, versionName, version, description, createdBy, stage), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, + String version, String description, String createdBy, String stage) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, + tags, listViewType, pageSize, versionName, version, description, createdBy, stage, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, + String version, String description, String createdBy, String stage, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, + tags, listViewType, pageSize, versionName, version, description, createdBy, stage, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, name, skip, tags, + listViewType, pageSize, versionName, version, description, createdBy, stage), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturesetVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturesetVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, + versionName, version, description, createdBy, stage, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -1059,36 +883,12 @@ public FeaturesetVersionInner createOrUpdate(String resourceGroupName, String wo @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> backfillWithResponseAsync(String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionBackfillRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.backfill(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.backfill(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1096,86 +896,59 @@ private Mono>> backfillWithResponseAsync(String resour * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response payload for creating a backfill request for a given feature set version along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> backfillWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionBackfillRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response backfillWithResponse(String resourceGroupName, String workspaceName, String name, + String version, FeaturesetVersionBackfillRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.backfill(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + return service.backfillSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + Context.NONE); } /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. + * @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 response payload for creating a backfill request for a given - * feature set version. + * @return response payload for creating a backfill request for a given feature set version along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturesetVersionBackfillResponseInner> - beginBackfillAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body) { - Mono>> mono - = backfillWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult( - mono, this.client.getHttpPipeline(), FeaturesetVersionBackfillResponseInner.class, - FeaturesetVersionBackfillResponseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response backfillWithResponse(String resourceGroupName, String workspaceName, String name, + String version, FeaturesetVersionBackfillRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.backfillSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. - * @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. @@ -1185,20 +958,19 @@ private Mono>> backfillWithResponseAsync(String resour @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, FeaturesetVersionBackfillResponseInner> beginBackfillAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturesetVersionBackfillRequest body, Context context) { - context = this.client.mergeContext(context); + FeaturesetVersionBackfillRequest body) { Mono>> mono - = backfillWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + = backfillWithResponseAsync(resourceGroupName, workspaceName, name, version, body); return this.client.getLroResult( mono, this.client.getHttpPipeline(), FeaturesetVersionBackfillResponseInner.class, - FeaturesetVersionBackfillResponseInner.class, context); + FeaturesetVersionBackfillResponseInner.class, this.client.getContext()); } /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -1212,14 +984,17 @@ private Mono>> backfillWithResponseAsync(String resour public SyncPoller, FeaturesetVersionBackfillResponseInner> beginBackfill(String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionBackfillRequest body) { - return this.beginBackfillAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + Response response = backfillWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult( + response, FeaturesetVersionBackfillResponseInner.class, FeaturesetVersionBackfillResponseInner.class, + Context.NONE); } /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -1234,14 +1009,18 @@ private Mono>> backfillWithResponseAsync(String resour public SyncPoller, FeaturesetVersionBackfillResponseInner> beginBackfill(String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionBackfillRequest body, Context context) { - return this.beginBackfillAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + Response response + = backfillWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult( + response, FeaturesetVersionBackfillResponseInner.class, FeaturesetVersionBackfillResponseInner.class, + context); } /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -1262,29 +1041,7 @@ private Mono backfillAsync(String resour * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Feature set version backfill request entity. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return response payload for creating a backfill request for a given feature set version on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono backfillAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturesetVersionBackfillRequest body, Context context) { - return beginBackfillAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Backfill. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -1296,14 +1053,14 @@ private Mono backfillAsync(String resour @ServiceMethod(returns = ReturnType.SINGLE) public FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionBackfillRequest body) { - return backfillAsync(resourceGroupName, workspaceName, name, version, body).block(); + return beginBackfill(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -1316,10 +1073,12 @@ public FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, String workspaceName, String name, String version, FeaturesetVersionBackfillRequest body, Context context) { - return backfillAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + return beginBackfill(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1331,13 +1090,6 @@ public FeaturesetVersionBackfillResponseInner backfill(String resourceGroupName, */ @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(), @@ -1346,6 +1098,28 @@ private Mono> listNextSinglePageAsync(Stri } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1353,22 +1127,14 @@ private Mono> listNextSinglePageAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturesetVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of FeaturesetVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java index cba5f48c169d..fa558532f233 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -31,18 +31,21 @@ public FeaturesetVersionsImpl(FeaturesetVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FeaturesetVersionImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, - description, createdBy, stage, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); + public FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version) { + FeaturesetVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new FeaturesetVersionImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String name, String version) { @@ -53,25 +56,18 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturesetVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); } - public FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version) { - FeaturesetVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new FeaturesetVersionImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, + description, createdBy, stage, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturesetVersionImpl(inner1, this.manager())); } public FeaturesetVersionBackfillResponse backfill(String resourceGroupName, String workspaceName, String name, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java index a6a9c1374e6c..1afbe50be96f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java index 3be33e68d178..710aa349832a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.FeaturestoreEntityContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -51,909 +52,749 @@ public final class FeaturestoreEntityContainersClientImpl implements Featurestor /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of FeaturestoreEntityContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - FeaturestoreEntityContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + FeaturestoreEntityContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(FeaturestoreEntityContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturestoreEntityContainers to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for MachineLearningManagementClientFeaturestoreEntityContainers to be + * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientFeaturestoreEntityContainers") public interface FeaturestoreEntityContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getEntity(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @QueryParam("pageSize") Integer pageSize, @QueryParam("name") String name, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getEntitySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FeaturestoreEntityContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") FeaturestoreEntityContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getEntity(@HostParam("$host") String endpoint, + Mono> list( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("name") String name, @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturestoreEntityContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("name") String name, @QueryParam("description") String description, + @QueryParam("createdBy") String createdBy, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getEntityWithResponseAsync(String resourceGroupName, + String workspaceName, String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, - description, createdBy, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getEntity(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, - String description, String createdBy, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, name, description, createdBy, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user 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 paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, - String createdBy) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getEntityAsync(String resourceGroupName, String workspaceName, + String name) { + return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @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 paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, - String createdBy, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, - pageSize, name, description, createdBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List featurestore entity containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String name = null; - final String description = null; - final String createdBy = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntityWithResponse(String resourceGroupName, + String workspaceName, String name, Context context) { + final String accept = "application/json"; + return service.getEntitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context); } /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, - String createdBy, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, name, - description, createdBy, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { + return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, FeaturestoreEntityContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, FeaturestoreEntityContainerInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), FeaturestoreEntityContainerInner.class, + FeaturestoreEntityContainerInner.class, this.client.getContext()); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + public SyncPoller, FeaturestoreEntityContainerInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, + FeaturestoreEntityContainerInner.class, FeaturestoreEntityContainerInner.class, Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + public SyncPoller, FeaturestoreEntityContainerInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, + FeaturestoreEntityContainerInner.class, FeaturestoreEntityContainerInner.class, context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, FeaturestoreEntityContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body).getFinalResult(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + FeaturestoreEntityContainerInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body, context).getFinalResult(); } /** * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @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) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @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 container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getEntityWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getEntity(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getEntityAsync(String resourceGroupName, String workspaceName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, String name) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getEntityWithResponse(String resourceGroupName, - String workspaceName, String name, Context context) { - return getEntityWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. + * @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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityContainerInner getEntity(String resourceGroupName, String workspaceName, String name) { - return getEntityWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturestoreEntityContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, FeaturestoreEntityContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String name) { + beginDelete(resourceGroupName, workspaceName, name).getFinalResult(); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityContainerInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityContainerInner.class, - FeaturestoreEntityContainerInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + beginDelete(resourceGroupName, workspaceName, name, context).getFinalResult(); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityContainerInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityContainerInner.class, - FeaturestoreEntityContainerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, + String description, String createdBy) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, tags, listViewType, pageSize, + name, description, createdBy, 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())); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityContainerInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, + String createdBy) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityContainerInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturestoreEntityContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, + String description, String createdBy) { + final String accept = "application/json"; + Response res = service.listSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, FeaturestoreEntityContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String skip, String tags, ListViewType listViewType, Integer pageSize, String name, + String description, String createdBy, Context context) { + final String accept = "application/json"; + Response res = service.listSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, skip, tags, listViewType, pageSize, name, description, createdBy, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String name = null; + final String description = null; + final String createdBy = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy), nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - FeaturestoreEntityContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String skip, String tags, ListViewType listViewType, Integer pageSize, String name, String description, + String createdBy, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, tags, listViewType, + pageSize, name, description, createdBy, context), nextLink -> listNextSinglePage(nextLink, context)); } /** + * List featurestore entity containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -965,13 +806,6 @@ public FeaturestoreEntityContainerInner createOrUpdate(String resourceGroupName, */ @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(), @@ -980,6 +814,28 @@ private Mono> listNextSinglePage } /** + * List featurestore entity containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List featurestore entity containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -987,23 +843,14 @@ private Mono> listNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a paginated list of FeaturestoreEntityContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java index 0c435229ee6e..2e57fac23568 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,6 +28,31 @@ public FeaturestoreEntityContainersImpl(FeaturestoreEntityContainersClient inner this.serviceManager = serviceManager; } + public Response getEntityWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + Response inner + = this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FeaturestoreEntityContainerImpl(inner.getValue(), this.manager())); + } + + public FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name) { + FeaturestoreEntityContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); + if (inner != null) { + return new FeaturestoreEntityContainerImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String name) { + this.serviceClient().delete(resourceGroupName, workspaceName, name); + } + + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, context); + } + public PagedIterable list(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); @@ -45,35 +70,6 @@ public PagedIterable list(String resourceGroupName, inner1 -> new FeaturestoreEntityContainerImpl(inner1, this.manager())); } - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, context); - } - - public Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - Response inner - = this.serviceClient().getEntityWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturestoreEntityContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name) { - FeaturestoreEntityContainerInner inner = this.serviceClient().getEntity(resourceGroupName, workspaceName, name); - if (inner != null) { - return new FeaturestoreEntityContainerImpl(inner, this.manager()); - } else { - return null; - } - } - public FeaturestoreEntityContainer getEntityById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java index 077a40278446..1491640a2ad5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java index 852d0513b6ca..8cf796a977fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.FeaturestoreEntityVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -51,990 +52,805 @@ public final class FeaturestoreEntityVersionsClientImpl implements FeaturestoreE /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of FeaturestoreEntityVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - FeaturestoreEntityVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + FeaturestoreEntityVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(FeaturestoreEntityVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesFeaturestoreEntityVersions to be used + * The interface defining all the services for MachineLearningManagementClientFeaturestoreEntityVersions to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientFeaturestoreEntityVersions") public interface FeaturestoreEntityVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, - @QueryParam("versionName") String versionName, @QueryParam("version") String version, - @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, - @QueryParam("stage") String stage, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FeaturestoreEntityVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") FeaturestoreEntityVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("versionName") String versionName, @QueryParam("version") String version, + @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, + @QueryParam("stage") String stage, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") FeaturestoreEntityVersionInner body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("name") String name, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("pageSize") Integer pageSize, + @QueryParam("versionName") String versionName, @QueryParam("version") String version, + @QueryParam("description") String description, @QueryParam("createdBy") String createdBy, + @QueryParam("stage") String stage, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, - String versionName, String version, String description, String createdBy, String stage, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, name, - this.client.getApiVersion(), skip, tags, listViewType, pageSize, versionName, version, description, - createdBy, stage, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, - String version, String description, String createdBy, String stage) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, - listViewType, pageSize, versionName, version, description, createdBy, stage), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, - String version, String description, String createdBy, String stage, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String name) { - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - final Integer pageSize = null; - final String versionName = null; - final String version = null; - final String description = null; - final String createdBy = null; - final String stage = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, - String version, String description, String createdBy, String stage, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, - versionName, version, description, createdBy, stage, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public FeaturestoreEntityVersionInner get(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, FeaturestoreEntityVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, FeaturestoreEntityVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + String version, FeaturestoreEntityVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, FeaturestoreEntityVersionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, String version, + FeaturestoreEntityVersionInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), FeaturestoreEntityVersionInner.class, FeaturestoreEntityVersionInner.class, + this.client.getContext()); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version).getSyncPoller(); + public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, + FeaturestoreEntityVersionInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(response, + FeaturestoreEntityVersionInner.class, FeaturestoreEntityVersionInner.class, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).getSyncPoller(); + public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, String version, + FeaturestoreEntityVersionInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(response, + FeaturestoreEntityVersionInner.class, FeaturestoreEntityVersionInner.class, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, String version, FeaturestoreEntityVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, FeaturestoreEntityVersionInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteAsync(resourceGroupName, workspaceName, name, version).block(); + public FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + String version, FeaturestoreEntityVersionInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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) - public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, version, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @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 version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, workspaceName, - name, version, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String name, String version) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, name, version); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, version); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityVersionInner get(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, version, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturestoreEntityVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { + return beginDeleteAsync(resourceGroupName, workspaceName, name, version).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, FeaturestoreEntityVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + beginDelete(resourceGroupName, workspaceName, name, version).getFinalResult(); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityVersionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityVersionInner.class, FeaturestoreEntityVersionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { + beginDelete(resourceGroupName, workspaceName, name, version, context).getFinalResult(); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, FeaturestoreEntityVersionInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), FeaturestoreEntityVersionInner.class, FeaturestoreEntityVersionInner.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String name, String skip, String tags, ListViewType listViewType, Integer pageSize, + String versionName, String version, String description, String createdBy, String stage) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, tags, listViewType, + pageSize, versionName, version, description, createdBy, stage, 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())); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, + String version, String description, String createdBy, String stage) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, + listViewType, pageSize, versionName, version, description, createdBy, stage), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, FeaturestoreEntityVersionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, - FeaturestoreEntityVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, tags, + listViewType, pageSize, versionName, version, description, createdBy, stage), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturestoreEntityVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, + String version, String description, String createdBy, String stage) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, + tags, listViewType, pageSize, versionName, version, description, createdBy, stage, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, String version, FeaturestoreEntityVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, + String version, String description, String createdBy, String stage, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, + tags, listViewType, pageSize, versionName, version, description, createdBy, stage, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String name) { + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + final Integer pageSize = null; + final String versionName = null; + final String version = null; + final String description = null; + final String createdBy = null; + final String stage = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, name, skip, tags, + listViewType, pageSize, versionName, version, description, createdBy, stage), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. * @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 azure Resource Manager resource envelope. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - String version, FeaturestoreEntityVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String name, String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, + String version, String description, String createdBy, String stage, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, + versionName, version, description, createdBy, stage, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1046,13 +862,6 @@ public FeaturestoreEntityVersionInner createOrUpdate(String resourceGroupName, S */ @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(), @@ -1061,6 +870,28 @@ private Mono> listNextSinglePageAs } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1068,23 +899,14 @@ private Mono> listNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a paginated list of FeaturestoreEntityVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java index 10ad272b5a59..354887bc917b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,39 +28,12 @@ public FeaturestoreEntityVersionsImpl(FeaturestoreEntityVersionsClient innerClie this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, - description, createdBy, stage, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version, context); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, String version, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new FeaturestoreEntityVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new FeaturestoreEntityVersionImpl(inner.getValue(), this.manager())); } public FeaturestoreEntityVersion get(String resourceGroupName, String workspaceName, String name, String version) { @@ -73,6 +46,29 @@ public FeaturestoreEntityVersion get(String resourceGroupName, String workspaceN } } + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version); + } + + public void delete(String resourceGroupName, String workspaceName, String name, String version, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, name, version, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, skip, tags, listViewType, pageSize, versionName, version, + description, createdBy, stage, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new FeaturestoreEntityVersionImpl(inner1, this.manager())); + } + public FeaturestoreEntityVersion getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java index a27f24baf480..208f91f80bf7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java new file mode 100644 index 000000000000..7842da8e2e31 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo; +import com.azure.resourcemanager.machinelearning.models.GroupStatus; + +public final class GroupStatusImpl implements GroupStatus { + private GroupStatusInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + GroupStatusImpl(GroupStatusInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ActualCapacityInfo actualCapacityInfo() { + return this.innerModel().actualCapacityInfo(); + } + + public Integer endpointCount() { + return this.innerModel().endpointCount(); + } + + public Integer requestedCapacity() { + return this.innerModel().requestedCapacity(); + } + + public GroupStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java new file mode 100644 index 000000000000..6eb1609bd66b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpoint; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class InferenceEndpointImpl + implements InferenceEndpoint, InferenceEndpoint.Definition, InferenceEndpoint.Update { + private InferenceEndpointInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 InferenceEndpointProperties properties() { + return this.innerModel().properties(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InferenceEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String poolName; + + private String endpointName; + + public InferenceEndpointImpl withExistingInferencePool(String resourceGroupName, String workspaceName, + String poolName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.poolName = poolName; + return this; + } + + public InferenceEndpoint create() { + this.innerObject = serviceManager.serviceClient() + .getInferenceEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, poolName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public InferenceEndpoint create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferenceEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, poolName, endpointName, this.innerModel(), context); + return this; + } + + InferenceEndpointImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new InferenceEndpointInner(); + this.serviceManager = serviceManager; + this.endpointName = name; + } + + public InferenceEndpointImpl update() { + return this; + } + + public InferenceEndpoint apply() { + this.innerObject = serviceManager.serviceClient() + .getInferenceEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, poolName, endpointName, this.innerModel(), Context.NONE); + return this; + } + + public InferenceEndpoint apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferenceEndpoints() + .createOrUpdate(resourceGroupName, workspaceName, poolName, endpointName, this.innerModel(), context); + return this; + } + + InferenceEndpointImpl(InferenceEndpointInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "inferencePools"); + this.endpointName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "endpoints"); + } + + public InferenceEndpoint refresh() { + this.innerObject = serviceManager.serviceClient() + .getInferenceEndpoints() + .getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, Context.NONE) + .getValue(); + return this; + } + + public InferenceEndpoint refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferenceEndpoints() + .getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, context) + .getValue(); + return this; + } + + public InferenceEndpointImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InferenceEndpointImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InferenceEndpointImpl withProperties(InferenceEndpointProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public InferenceEndpointImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public InferenceEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public InferenceEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public InferenceEndpointImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java new file mode 100644 index 000000000000..02562d5c30d5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java @@ -0,0 +1,1105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.BinaryData; +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.machinelearning.fluent.InferenceEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.implementation.models.InferenceEndpointTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import java.nio.ByteBuffer; +import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in InferenceEndpointsClient. + */ +public final class InferenceEndpointsClientImpl implements InferenceEndpointsClient { + /** + * The proxy service used to perform REST calls. + */ + private final InferenceEndpointsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of InferenceEndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferenceEndpointsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(InferenceEndpointsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientInferenceEndpoints to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientInferenceEndpoints") + public interface InferenceEndpointsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InferenceEndpointInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InferenceEndpointInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") Map body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") Map body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints/{endpointName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("endpointName") String endpointName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/endpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 inferenceEndpoint along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 inferenceEndpoint on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String poolName, + String endpointName) { + return getWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 inferenceEndpoint along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String poolName, String endpointName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, endpointName, accept, context); + } + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 inferenceEndpoint. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner get(String resourceGroupName, String workspaceName, String poolName, + String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, Context.NONE).getValue(); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String poolName, String endpointName, InferenceEndpointInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String poolName, String endpointName, InferenceEndpointInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, contentType, + accept, body, Context.NONE); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String poolName, String endpointName, InferenceEndpointInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, contentType, + accept, body, context); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + InferenceEndpointInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InferenceEndpointInner.class, InferenceEndpointInner.class, + this.client.getContext()); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + InferenceEndpointInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, poolName, endpointName, body); + return this.client.getLroResult(response, + InferenceEndpointInner.class, InferenceEndpointInner.class, Context.NONE); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + InferenceEndpointInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, poolName, endpointName, body, context); + return this.client.getLroResult(response, + InferenceEndpointInner.class, InferenceEndpointInner.class, context); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName, InferenceEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, poolName, endpointName, body).getFinalResult(); + } + + /** + * Create or update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body InferenceEndpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String endpointName, InferenceEndpointInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, poolName, endpointName, body, context) + .getFinalResult(); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName, Map body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Map body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, contentType, + accept, body, Context.NONE); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Map body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, contentType, + accept, body, context); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceEndpointInner> beginUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String endpointName, + Map body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), InferenceEndpointInner.class, InferenceEndpointInner.class, + this.client.getContext()); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Map body) { + Response response + = updateWithResponse(resourceGroupName, workspaceName, poolName, endpointName, body); + return this.client.getLroResult(response, + InferenceEndpointInner.class, InferenceEndpointInner.class, Context.NONE); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceEndpointInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String endpointName, Map body, Context context) { + Response response + = updateWithResponse(resourceGroupName, workspaceName, poolName, endpointName, body, context); + return this.client.getLroResult(response, + InferenceEndpointInner.class, InferenceEndpointInner.class, context); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Map body) { + return beginUpdateAsync(resourceGroupName, workspaceName, poolName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Map body) { + return beginUpdate(resourceGroupName, workspaceName, poolName, endpointName, body).getFinalResult(); + } + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceEndpointInner update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Map body, Context context) { + return beginUpdate(resourceGroupName, workspaceName, poolName, endpointName, body, context).getFinalResult(); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 resourceGroupName, String workspaceName, + String poolName, String endpointName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, Context.NONE); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, endpointName, context); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String poolName, String endpointName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, poolName, endpointName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String poolName, String endpointName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, poolName, endpointName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String poolName, String endpointName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, poolName, endpointName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 resourceGroupName, String workspaceName, String poolName, + String endpointName) { + return beginDeleteAsync(resourceGroupName, workspaceName, poolName, endpointName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName) { + beginDelete(resourceGroupName, workspaceName, poolName, endpointName).getFinalResult(); + } + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Context context) { + beginDelete(resourceGroupName, workspaceName, poolName, endpointName, context).getFinalResult(); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferenceEndpoint entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, Integer count, String skip, String tags, String properties, + OrderString orderBy) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferenceEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool 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 paginated list of InferenceEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferenceEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String poolName, Integer count, String skip, String tags, String properties, OrderString orderBy) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, + count, skip, tags, properties, orderBy, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String poolName, Integer count, String skip, String tags, String properties, OrderString orderBy, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool 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 paginated list of InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy, context), nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List Inference Endpoints. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceEndpoint entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Inference Endpoints. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Endpoints. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java new file mode 100644 index 000000000000..28300ec8c5df --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.InferenceEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpoint; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpoints; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import java.util.Map; + +public final class InferenceEndpointsImpl implements InferenceEndpoints { + private static final ClientLogger LOGGER = new ClientLogger(InferenceEndpointsImpl.class); + + private final InferenceEndpointsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public InferenceEndpointsImpl(InferenceEndpointsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InferenceEndpointImpl(inner.getValue(), this.manager())); + } + + public InferenceEndpoint get(String resourceGroupName, String workspaceName, String poolName, String endpointName) { + InferenceEndpointInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, poolName, endpointName); + if (inner != null) { + return new InferenceEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Map body) { + InferenceEndpointInner inner + = this.serviceClient().update(resourceGroupName, workspaceName, poolName, endpointName, body); + if (inner != null) { + return new InferenceEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Map body, Context context) { + InferenceEndpointInner inner + = this.serviceClient().update(resourceGroupName, workspaceName, poolName, endpointName, body, context); + if (inner != null) { + return new InferenceEndpointImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, endpointName); + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, endpointName, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceEndpointImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceEndpointImpl(inner1, this.manager())); + } + + public InferenceEndpoint 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, endpointName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, endpointName, Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, endpointName, context); + } + + private InferenceEndpointsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public InferenceEndpointImpl define(String name) { + return new InferenceEndpointImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java new file mode 100644 index 000000000000..04dc2b2939d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.models.GroupStatus; +import com.azure.resourcemanager.machinelearning.models.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class InferenceGroupImpl implements InferenceGroup, InferenceGroup.Definition, InferenceGroup.Update { + private InferenceGroupInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 InferenceGroupProperties properties() { + return this.innerModel().properties(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InferenceGroupInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String poolName; + + private String groupName; + + private PartialMinimalTrackedResourceWithSku updateBody; + + public InferenceGroupImpl withExistingInferencePool(String resourceGroupName, String workspaceName, + String poolName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.poolName = poolName; + return this; + } + + public InferenceGroup create() { + this.innerObject = serviceManager.serviceClient() + .getInferenceGroups() + .createOrUpdate(resourceGroupName, workspaceName, poolName, groupName, this.innerModel(), Context.NONE); + return this; + } + + public InferenceGroup create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferenceGroups() + .createOrUpdate(resourceGroupName, workspaceName, poolName, groupName, this.innerModel(), context); + return this; + } + + InferenceGroupImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new InferenceGroupInner(); + this.serviceManager = serviceManager; + this.groupName = name; + } + + public InferenceGroupImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithSku(); + return this; + } + + public InferenceGroup apply() { + this.innerObject = serviceManager.serviceClient() + .getInferenceGroups() + .update(resourceGroupName, workspaceName, poolName, groupName, updateBody, Context.NONE); + return this; + } + + public InferenceGroup apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferenceGroups() + .update(resourceGroupName, workspaceName, poolName, groupName, updateBody, context); + return this; + } + + InferenceGroupImpl(InferenceGroupInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.poolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "inferencePools"); + this.groupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "groups"); + } + + public InferenceGroup refresh() { + this.innerObject = serviceManager.serviceClient() + .getInferenceGroups() + .getWithResponse(resourceGroupName, workspaceName, poolName, groupName, Context.NONE) + .getValue(); + return this; + } + + public InferenceGroup refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferenceGroups() + .getWithResponse(resourceGroupName, workspaceName, poolName, groupName, context) + .getValue(); + return this; + } + + public Response getStatusWithResponse(Context context) { + return serviceManager.inferenceGroups() + .getStatusWithResponse(resourceGroupName, workspaceName, poolName, groupName, context); + } + + public GroupStatus getStatus() { + return serviceManager.inferenceGroups().getStatus(resourceGroupName, workspaceName, poolName, groupName); + } + + public InferenceGroupImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InferenceGroupImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InferenceGroupImpl withProperties(InferenceGroupProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public InferenceGroupImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public InferenceGroupImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public InferenceGroupImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public InferenceGroupImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public InferenceGroupImpl withSku(PartialSku sku) { + this.updateBody.withSku(sku); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java new file mode 100644 index 000000000000..35f8cd69c5d8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java @@ -0,0 +1,2040 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.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.BinaryData; +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.machinelearning.fluent.InferenceGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.InferenceGroupTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.SkuResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.StringArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; +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 InferenceGroupsClient. + */ +public final class InferenceGroupsClientImpl implements InferenceGroupsClient { + /** + * The proxy service used to perform REST calls. + */ + private final InferenceGroupsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of InferenceGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferenceGroupsClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(InferenceGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientInferenceGroups to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientInferenceGroups") + public interface InferenceGroupsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InferenceGroupInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") InferenceGroupInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @QueryParam("count") Integer count, + @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/deltaModels/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeltaModelsStatusAsync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeltaModelStatusRequest body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/deltaModels/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getDeltaModelsStatusAsyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeltaModelStatusRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/deltaModels/list") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeltaModelsAsync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeltaModelListRequest body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/deltaModels/list") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listDeltaModelsAsyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DeltaModelListRequest body, + Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/deltaModels/modify") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> modifyDeltaModelsAsync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") DeltaModelModifyRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/deltaModels/modify") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response modifyDeltaModelsAsyncSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") DeltaModelModifyRequest body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{poolName}/groups/{groupName}/skus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSkusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("poolName") String poolName, @PathParam("groupName") String groupName, + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeltaModelsAsyncNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listDeltaModelsAsyncNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkusNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSkusNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + return getWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, groupName, accept, context); + } + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner get(String resourceGroupName, String workspaceName, String poolName, String groupName) { + return getWithResponse(resourceGroupName, workspaceName, poolName, groupName, Context.NONE).getValue(); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, InferenceGroupInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, InferenceGroupInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, InferenceGroupInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, accept, + body, context); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceGroupInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String poolName, String groupName, InferenceGroupInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferenceGroupInner.class, InferenceGroupInner.class, this.client.getContext()); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceGroupInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String groupName, InferenceGroupInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(response, InferenceGroupInner.class, + InferenceGroupInner.class, Context.NONE); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceGroupInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String poolName, String groupName, InferenceGroupInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, poolName, groupName, body, context); + return this.client.getLroResult(response, InferenceGroupInner.class, + InferenceGroupInner.class, context); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, InferenceGroupInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, poolName, groupName, body).getFinalResult(); + } + + /** + * Create or update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body InferenceGroup entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner createOrUpdate(String resourceGroupName, String workspaceName, String poolName, + String groupName, InferenceGroupInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, poolName, groupName, body, context) + .getFinalResult(); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, PartialMinimalTrackedResourceWithSku body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, PartialMinimalTrackedResourceWithSku body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, accept, + body, Context.NONE); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, PartialMinimalTrackedResourceWithSku body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, accept, + body, context); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferenceGroupInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferenceGroupInner.class, InferenceGroupInner.class, this.client.getContext()); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body) { + Response response = updateWithResponse(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(response, InferenceGroupInner.class, + InferenceGroupInner.class, Context.NONE); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferenceGroupInner> beginUpdate(String resourceGroupName, + String workspaceName, String poolName, String groupName, PartialMinimalTrackedResourceWithSku body, + Context context) { + Response response + = updateWithResponse(resourceGroupName, workspaceName, poolName, groupName, body, context); + return this.client.getLroResult(response, InferenceGroupInner.class, + InferenceGroupInner.class, context); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, PartialMinimalTrackedResourceWithSku body) { + return beginUpdateAsync(resourceGroupName, workspaceName, poolName, groupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body) { + return beginUpdate(resourceGroupName, workspaceName, poolName, groupName, body).getFinalResult(); + } + + /** + * Update InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body Online Endpoint entity to apply during 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 inferenceGroup is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferenceGroupInner update(String resourceGroupName, String workspaceName, String poolName, String groupName, + PartialMinimalTrackedResourceWithSku body, Context context) { + return beginUpdate(resourceGroupName, workspaceName, poolName, groupName, body, context).getFinalResult(); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, Context.NONE); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, context); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String poolName, String groupName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, poolName, groupName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String poolName, String groupName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, poolName, groupName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, String poolName, String groupName) { + return beginDeleteAsync(resourceGroupName, workspaceName, poolName, groupName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String poolName, String groupName) { + beginDelete(resourceGroupName, workspaceName, poolName, groupName).getFinalResult(); + } + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String poolName, String groupName, + Context context) { + beginDelete(resourceGroupName, workspaceName, poolName, groupName, context).getFinalResult(); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferenceGroup entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String poolName, Integer count, String skip, String tags, String properties, OrderString orderBy) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferenceGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool 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 paginated list of InferenceGroup entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferenceGroup entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String poolName, Integer count, String skip, String tags, String properties, OrderString orderBy) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, + count, skip, tags, properties, orderBy, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceGroup entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String poolName, Integer count, String skip, String tags, String properties, OrderString orderBy, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool 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 paginated list of InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, poolName, count, skip, tags, + properties, orderBy, context), nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeltaModelsStatusAsyncWithResponseAsync( + String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelStatusRequest body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDeltaModelsStatusAsync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + poolName, groupName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeltaModelsStatusAsyncAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body) { + return getDeltaModelsStatusAsyncWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 contract returning to user the delta models along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getDeltaModelsStatusAsyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, accept, + body, context); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeltaModelStatusResponseInner getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelStatusRequest body) { + return getDeltaModelsStatusAsyncWithResponse(resourceGroupName, workspaceName, poolName, groupName, body, + Context.NONE).getValue(); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of String entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeltaModelsAsyncSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelListRequest body) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDeltaModelsAsync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, accept, body, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of String entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeltaModelsAsyncAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body) { + return new PagedFlux<>( + () -> listDeltaModelsAsyncSinglePageAsync(resourceGroupName, workspaceName, poolName, groupName, body), + nextLink -> listDeltaModelsAsyncNextSinglePageAsync(nextLink)); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of String entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeltaModelsAsyncSinglePage(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelListRequest body) { + final String accept = "application/json"; + Response res = service.listDeltaModelsAsyncSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, + groupName, accept, body, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 paginated list of String entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeltaModelsAsyncSinglePage(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelListRequest body, Context context) { + final String accept = "application/json"; + Response res = service.listDeltaModelsAsyncSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, + groupName, accept, body, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body) { + return new PagedIterable<>( + () -> listDeltaModelsAsyncSinglePage(resourceGroupName, workspaceName, poolName, groupName, body), + nextLink -> listDeltaModelsAsyncNextSinglePage(nextLink)); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context) { + return new PagedIterable<>( + () -> listDeltaModelsAsyncSinglePage(resourceGroupName, workspaceName, poolName, groupName, body, context), + nextLink -> listDeltaModelsAsyncNextSinglePage(nextLink, context)); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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>> modifyDeltaModelsAsyncWithResponseAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body) { + final String contentType = "application/json"; + return FluxUtil + .withContext(context -> service.modifyDeltaModelsAsync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + poolName, groupName, contentType, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response modifyDeltaModelsAsyncWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelModifyRequest body) { + final String contentType = "application/json"; + return service.modifyDeltaModelsAsyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, body, + Context.NONE); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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) + private Response modifyDeltaModelsAsyncWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelModifyRequest body, Context context) { + final String contentType = "application/json"; + return service.modifyDeltaModelsAsyncSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, contentType, body, + context); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginModifyDeltaModelsAsyncAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body) { + Mono>> mono + = modifyDeltaModelsAsyncWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginModifyDeltaModelsAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body) { + Response response + = modifyDeltaModelsAsyncWithResponse(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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> beginModifyDeltaModelsAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body, Context context) { + Response response + = modifyDeltaModelsAsyncWithResponse(resourceGroupName, workspaceName, poolName, groupName, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 modifyDeltaModelsAsyncAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body) { + return beginModifyDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body) { + beginModifyDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body).getFinalResult(); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body, Context context) { + beginModifyDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body, context) + .getFinalResult(); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStatusWithResponseAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getStatus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getStatusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + return getStatusWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStatusWithResponse(String resourceGroupName, String workspaceName, + String poolName, String groupName, Context context) { + final String accept = "application/json"; + return service.getStatusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, accept, context); + } + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GroupStatusInner getStatus(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + return getStatusWithResponse(resourceGroupName, workspaceName, poolName, groupName, Context.NONE).getValue(); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, Integer count, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, count, skip, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip) { + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, poolName, groupName, count, skip), + nextLink -> listSkusNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + final Integer count = null; + final String skip = null; + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, poolName, groupName, count, skip), + nextLink -> listSkusNextSinglePageAsync(nextLink)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of SkuResource entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSkusSinglePage(String resourceGroupName, String workspaceName, + String poolName, String groupName, Integer count, String skip) { + final String accept = "application/json"; + Response res = service.listSkusSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, + groupName, count, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @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 paginated list of SkuResource entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSkusSinglePage(String resourceGroupName, String workspaceName, + String poolName, String groupName, Integer count, String skip, Context context) { + final String accept = "application/json"; + Response res = service.listSkusSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, + groupName, count, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + final Integer count = null; + final String skip = null; + return new PagedIterable<>( + () -> listSkusSinglePage(resourceGroupName, workspaceName, poolName, groupName, count, skip), + nextLink -> listSkusNextSinglePage(nextLink)); + } + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @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 paginated list of SkuResource entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context) { + return new PagedIterable<>( + () -> listSkusSinglePage(resourceGroupName, workspaceName, poolName, groupName, count, skip, context), + nextLink -> listSkusNextSinglePage(nextLink, context)); + } + + /** + * List Inference Groups. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceGroup entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Inference Groups. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceGroup entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Groups. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceGroup entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeltaModelsAsyncNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listDeltaModelsAsyncNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeltaModelsAsyncNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listDeltaModelsAsyncNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDeltaModelsAsyncNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listDeltaModelsAsyncNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Group Skus. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Inference Group Skus. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSkusNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listSkusNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Group Skus. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSkusNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listSkusNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java new file mode 100644 index 000000000000..74c7efe33c3b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.InferenceGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner; +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusResponse; +import com.azure.resourcemanager.machinelearning.models.GroupStatus; +import com.azure.resourcemanager.machinelearning.models.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.InferenceGroups; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.SkuResource; + +public final class InferenceGroupsImpl implements InferenceGroups { + private static final ClientLogger LOGGER = new ClientLogger(InferenceGroupsImpl.class); + + private final InferenceGroupsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public InferenceGroupsImpl(InferenceGroupsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, poolName, groupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InferenceGroupImpl(inner.getValue(), this.manager())); + } + + public InferenceGroup get(String resourceGroupName, String workspaceName, String poolName, String groupName) { + InferenceGroupInner inner = this.serviceClient().get(resourceGroupName, workspaceName, poolName, groupName); + if (inner != null) { + return new InferenceGroupImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String groupName) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, groupName); + } + + public void delete(String resourceGroupName, String workspaceName, String poolName, String groupName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, poolName, groupName, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, poolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceGroupImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, poolName, count, skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferenceGroupImpl(inner1, this.manager())); + } + + public Response getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context) { + Response inner = this.serviceClient() + .getDeltaModelsStatusAsyncWithResponse(resourceGroupName, workspaceName, poolName, groupName, body, + context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeltaModelStatusResponseImpl(inner.getValue(), this.manager())); + } + + public DeltaModelStatusResponse getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelStatusRequest body) { + DeltaModelStatusResponseInner inner = this.serviceClient() + .getDeltaModelsStatusAsync(resourceGroupName, workspaceName, poolName, groupName, body); + if (inner != null) { + return new DeltaModelStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body) { + return this.serviceClient().listDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body); + } + + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context) { + return this.serviceClient() + .listDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body, context); + } + + public void modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body) { + this.serviceClient().modifyDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body); + } + + public void modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body, Context context) { + this.serviceClient() + .modifyDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body, context); + } + + public Response getStatusWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context) { + Response inner = this.serviceClient() + .getStatusWithResponse(resourceGroupName, workspaceName, poolName, groupName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GroupStatusImpl(inner.getValue(), this.manager())); + } + + public GroupStatus getStatus(String resourceGroupName, String workspaceName, String poolName, String groupName) { + GroupStatusInner inner = this.serviceClient().getStatus(resourceGroupName, workspaceName, poolName, groupName); + if (inner != null) { + return new GroupStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName) { + PagedIterable inner + = this.serviceClient().listSkus(resourceGroupName, workspaceName, poolName, groupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + } + + public PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context) { + PagedIterable inner = this.serviceClient() + .listSkus(resourceGroupName, workspaceName, poolName, groupName, count, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); + } + + public InferenceGroup 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, groupName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, poolName, groupName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, groupName, Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String poolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (poolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + String groupName = ResourceManagerUtils.getValueFromIdByName(id, "groups"); + if (groupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'groups'.", id))); + } + this.delete(resourceGroupName, workspaceName, poolName, groupName, context); + } + + private InferenceGroupsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public InferenceGroupImpl define(String name) { + return new InferenceGroupImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java new file mode 100644 index 000000000000..e8e3b748b171 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.Map; + +public final class InferencePoolImpl implements InferencePool, InferencePool.Definition, InferencePool.Update { + private InferencePoolInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager 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 InferencePoolProperties properties() { + return this.innerModel().properties(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public InferencePoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String inferencePoolName; + + private PartialMinimalTrackedResourceWithSkuAndIdentity updateBody; + + public InferencePoolImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public InferencePool create() { + this.innerObject = serviceManager.serviceClient() + .getInferencePools() + .createOrUpdate(resourceGroupName, workspaceName, inferencePoolName, this.innerModel(), Context.NONE); + return this; + } + + public InferencePool create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferencePools() + .createOrUpdate(resourceGroupName, workspaceName, inferencePoolName, this.innerModel(), context); + return this; + } + + InferencePoolImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new InferencePoolInner(); + this.serviceManager = serviceManager; + this.inferencePoolName = name; + } + + public InferencePoolImpl update() { + this.updateBody = new PartialMinimalTrackedResourceWithSkuAndIdentity(); + return this; + } + + public InferencePool apply() { + this.innerObject = serviceManager.serviceClient() + .getInferencePools() + .update(resourceGroupName, workspaceName, inferencePoolName, updateBody, Context.NONE); + return this; + } + + public InferencePool apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferencePools() + .update(resourceGroupName, workspaceName, inferencePoolName, updateBody, context); + return this; + } + + InferencePoolImpl(InferencePoolInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.inferencePoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "inferencePools"); + } + + public InferencePool refresh() { + this.innerObject = serviceManager.serviceClient() + .getInferencePools() + .getWithResponse(resourceGroupName, workspaceName, inferencePoolName, Context.NONE) + .getValue(); + return this; + } + + public InferencePool refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getInferencePools() + .getWithResponse(resourceGroupName, workspaceName, inferencePoolName, context) + .getValue(); + return this; + } + + public InferencePoolImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public InferencePoolImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public InferencePoolImpl withProperties(InferencePoolProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public InferencePoolImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBody.withTags(tags); + return this; + } + } + + public InferencePoolImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public InferencePoolImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public InferencePoolImpl withSku(Sku sku) { + this.innerModel().withSku(sku); + return this; + } + + public InferencePoolImpl withIdentity(PartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); + return this; + } + + public InferencePoolImpl withSku(PartialSku sku) { + this.updateBody.withSku(sku); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java new file mode 100644 index 000000000000..a2f7caaece73 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java @@ -0,0 +1,1056 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.BinaryData; +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.machinelearning.fluent.InferencePoolsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.implementation.models.InferencePoolTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +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 InferencePoolsClient. + */ +public final class InferencePoolsClientImpl implements InferencePoolsClient { + /** + * The proxy service used to perform REST calls. + */ + private final InferencePoolsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of InferencePoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferencePoolsClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(InferencePoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientInferencePools to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientInferencePools") + public interface InferencePoolsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") InferencePoolInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") InferencePoolInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools/{inferencePoolName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("inferencePoolName") String inferencePoolName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/inferencePools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @QueryParam("tags") String tags, + @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + return getWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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 inferencePool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, inferencePoolName, accept, context); + } + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferencePool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner get(String resourceGroupName, String workspaceName, String inferencePoolName) { + return getWithResponse(resourceGroupName, workspaceName, inferencePoolName, Context.NONE).getValue(); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, InferencePoolInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, contentType, accept, + body, Context.NONE); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, InferencePoolInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, contentType, accept, + body, context); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferencePoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String inferencePoolName, InferencePoolInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferencePoolInner.class, InferencePoolInner.class, this.client.getContext()); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, inferencePoolName, body); + return this.client.getLroResult(response, InferencePoolInner.class, + InferencePoolInner.class, Context.NONE); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferencePoolInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, InferencePoolInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, inferencePoolName, body, context); + return this.client.getLroResult(response, InferencePoolInner.class, + InferencePoolInner.class, context); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, InferencePoolInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, inferencePoolName, body).getFinalResult(); + } + + /** + * Create or update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body InferencePool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner createOrUpdate(String resourceGroupName, String workspaceName, String inferencePoolName, + InferencePoolInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, inferencePoolName, body, context).getFinalResult(); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, contentType, accept, + body, Context.NONE); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, contentType, accept, + body, context); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, InferencePoolInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + InferencePoolInner.class, InferencePoolInner.class, this.client.getContext()); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + Response response = updateWithResponse(resourceGroupName, workspaceName, inferencePoolName, body); + return this.client.getLroResult(response, InferencePoolInner.class, + InferencePoolInner.class, Context.NONE); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, InferencePoolInner> beginUpdate(String resourceGroupName, + String workspaceName, String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body, + Context context) { + Response response + = updateWithResponse(resourceGroupName, workspaceName, inferencePoolName, body, context); + return this.client.getLroResult(response, InferencePoolInner.class, + InferencePoolInner.class, context); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, + String inferencePoolName, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return beginUpdateAsync(resourceGroupName, workspaceName, inferencePoolName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return beginUpdate(resourceGroupName, workspaceName, inferencePoolName, body).getFinalResult(); + } + + /** + * Update InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param body Inference Pool entity to apply during 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 inferencePool is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InferencePoolInner update(String resourceGroupName, String workspaceName, String inferencePoolName, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + return beginUpdate(resourceGroupName, workspaceName, inferencePoolName, body, context).getFinalResult(); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String inferencePoolName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, Context.NONE); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, inferencePoolName, context); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String inferencePoolName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, inferencePoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String inferencePoolName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, inferencePoolName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, inferencePoolName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String inferencePoolName) { + return beginDeleteAsync(resourceGroupName, workspaceName, inferencePoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String inferencePoolName) { + beginDelete(resourceGroupName, workspaceName, inferencePoolName).getFinalResult(); + } + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String inferencePoolName, Context context) { + beginDelete(resourceGroupName, workspaceName, inferencePoolName, context).getFinalResult(); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferencePool entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + Integer count, String skip, String tags, String properties, OrderString orderBy) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, count, skip, tags, properties, + orderBy, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferencePool entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Integer count, + String skip, String tags, String properties, OrderString orderBy) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated list of InferencePool entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of InferencePool entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + Integer count, String skip, String tags, String properties, OrderString orderBy) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, count, skip, tags, properties, orderBy, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferencePool entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, count, skip, tags, properties, orderBy, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated list of InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final Integer count = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferencePool entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, + String skip, String tags, String properties, OrderString orderBy, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List InferencePools. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferencePool entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List InferencePools. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferencePool entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List InferencePools. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferencePool entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java new file mode 100644 index 000000000000..341f3244a671 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.InferencePoolsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.InferencePools; +import com.azure.resourcemanager.machinelearning.models.OrderString; + +public final class InferencePoolsImpl implements InferencePools { + private static final ClientLogger LOGGER = new ClientLogger(InferencePoolsImpl.class); + + private final InferencePoolsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public InferencePoolsImpl(InferencePoolsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String inferencePoolName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, inferencePoolName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new InferencePoolImpl(inner.getValue(), this.manager())); + } + + public InferencePool get(String resourceGroupName, String workspaceName, String inferencePoolName) { + InferencePoolInner inner = this.serviceClient().get(resourceGroupName, workspaceName, inferencePoolName); + if (inner != null) { + return new InferencePoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String inferencePoolName) { + this.serviceClient().delete(resourceGroupName, workspaceName, inferencePoolName); + } + + public void delete(String resourceGroupName, String workspaceName, String inferencePoolName, Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, inferencePoolName, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferencePoolImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + String tags, String properties, OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, count, skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new InferencePoolImpl(inner1, this.manager())); + } + + public InferencePool 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, inferencePoolName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, inferencePoolName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + this.delete(resourceGroupName, workspaceName, inferencePoolName, Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String inferencePoolName = ResourceManagerUtils.getValueFromIdByName(id, "inferencePools"); + if (inferencePoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'inferencePools'.", id))); + } + this.delete(resourceGroupName, workspaceName, inferencePoolName, context); + } + + private InferencePoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public InferencePoolImpl define(String name) { + return new InferencePoolImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java index c17a0899f164..87f09909d0fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java index 34892a85f2da..563be1c4a451 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,13 +28,14 @@ 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.BinaryData; 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.machinelearning.fluent.JobsClient; import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.JobBaseResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -52,296 +53,314 @@ public final class JobsClientImpl implements JobsClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of JobsClientImpl. * * @param client the instance of the service client containing this operation class. */ - JobsClientImpl(AzureMachineLearningWorkspacesImpl client) { + JobsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesJobs to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for MachineLearningManagementClientJobs to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientJobs") public interface JobsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("jobType") String jobType, @QueryParam("tag") String tag, - @QueryParam("listViewType") ListViewType listViewType, @QueryParam("properties") String properties, - @HeaderParam("Accept") String accept, Context context); + @PathParam("id") String id, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") JobBaseInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") JobBaseInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("id") String id, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("jobType") String jobType, @QueryParam("tag") String tag, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("properties") String properties, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobBaseInner body, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @QueryParam("jobType") String jobType, @QueryParam("tag") String tag, + @QueryParam("listViewType") ListViewType listViewType, @QueryParam("properties") String properties, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancel(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> cancel(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("id") String id, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response cancelSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("id") String id, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists Jobs in the workspace. + * Gets a Job by name/id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of JobBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, String jobType, String tag, ListViewType listViewType, String 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String id) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, jobType, tag, listViewType, - properties, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists Jobs in the workspace. + * Gets a Job by name/id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Job by name/id on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String id) { + return getWithResponseAsync(resourceGroupName, workspaceName, id) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets a Job by name/id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. * @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 paginated list of JobBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a Job by name/id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, String jobType, String tag, ListViewType listViewType, String 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + public Response getWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, jobType, tag, listViewType, properties, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, id, accept, context); } /** - * Lists Jobs in the workspace. + * Gets a Job by name/id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of JobBase entities as paginated response with {@link PagedFlux}. + * @return a Job by name/id. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String jobType, String tag, ListViewType listViewType, String properties) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public JobBaseInner get(String resourceGroupName, String workspaceName, String id) { + return getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); } /** - * Lists Jobs in the workspace. + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final String jobType = null; - final String tag = null; - final ListViewType listViewType = null; - final String properties = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String workspaceName, + String id, JobBaseInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists Jobs in the workspace. + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - String jobType, String tag, ListViewType listViewType, String properties, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, - listViewType, properties, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String id, + JobBaseInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists Jobs in the workspace. + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final String jobType = null; - final String tag = null; - final ListViewType listViewType = null; - final String properties = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, + JobBaseInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, contentType, accept, body, context); } /** - * Lists Jobs in the workspace. + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * + * Creates and executes a Job. + * For update case, the Tags in the definition passed in will replace Tags in the existing job. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. + * @param body Job definition object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, - String tag, ListViewType listViewType, String properties, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, id, body, Context.NONE).getValue(); } /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -351,28 +370,9 @@ public PagedIterable list(String resourceGroupName, String workspa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String id) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -380,67 +380,44 @@ private Mono>> deleteWithResponseAsync(String resource * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String id, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id 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, - workspaceName, id, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String id) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, Context.NONE); } /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String id) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, context); } /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. - * @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. @@ -448,18 +425,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String id, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id, context); + String id) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -468,14 +444,15 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, id).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, workspaceName, id); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -486,14 +463,15 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, workspaceName, id, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -510,25 +488,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, id, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -536,14 +496,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String workspaceName, String id) { - deleteAsync(resourceGroupName, workspaceName, id).block(); + beginDelete(resourceGroupName, workspaceName, id).getFinalResult(); } /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -552,295 +512,191 @@ public void delete(String resourceGroupName, String workspaceName, String id) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String workspaceName, String id, Context context) { - deleteAsync(resourceGroupName, workspaceName, id, context).block(); + beginDelete(resourceGroupName, workspaceName, id, context).getFinalResult(); } /** - * Gets a Job by name/id. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tag Jobs returned will have this tag key. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Job by name/id along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String id) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, String jobType, String tag, ListViewType listViewType, String properties) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, jobType, tag, listViewType, + properties, 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 a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 Job by name/id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, String id, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id 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(), resourceGroupName, workspaceName, - id, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job by name/id on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String id) { - return getWithResponseAsync(resourceGroupName, workspaceName, id) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a Job by name/id. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tag Jobs returned will have this tag key. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Job by name/id along with {@link Response}. + * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String id, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + String jobType, String tag, ListViewType listViewType, String properties) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets a Job by name/id. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace 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 Job by name/id. + * @return a paginated list of JobBase entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseInner get(String resourceGroupName, String workspaceName, String id) { - return getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final String jobType = null; + final String tag = null; + final ListViewType listViewType = null; + final String properties = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tag Jobs returned will have this tag key. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of JobBase entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String workspaceName, - String id, JobBaseInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String skip, + String jobType, String tag, ListViewType listViewType, String properties) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tag Jobs returned will have this tag key. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of JobBase entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String workspaceName, - String id, JobBaseInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String skip, + String jobType, String tag, ListViewType listViewType, String properties, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, id, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. + * @param workspaceName Azure Machine Learning Workspace 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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String id, - JobBaseInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final String jobType = null; + final String tag = null; + final ListViewType listViewType = null; + final String properties = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties), + nextLink -> listNextSinglePage(nextLink)); } /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tag Jobs returned will have this tag key. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. * @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 azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String id, - JobBaseInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); - } - - /** - * Creates and executes a Job. - * For update case, the Tags in the definition passed in will replace Tags in the existing job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, id, body, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, + String tag, ListViewType listViewType, String properties, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, jobType, tag, + listViewType, properties, context), nextLink -> listNextSinglePage(nextLink, context)); } /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -850,28 +706,9 @@ public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> cancelWithResponseAsync(String resourceGroupName, String workspaceName, String id) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, id, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.cancel(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -879,67 +716,44 @@ private Mono>> cancelWithResponseAsync(String resource * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync(String resourceGroupName, String workspaceName, - String id, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.cancel(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, id, this.client.getApiVersion(), accept, context); + private Response cancelWithResponse(String resourceGroupName, String workspaceName, String id) { + return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, Context.NONE); } /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String workspaceName, - String id) { - Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response cancelWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + return service.cancelSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, id, context); } /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. - * @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. @@ -947,18 +761,17 @@ private PollerFlux, Void> beginCancelAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginCancelAsync(String resourceGroupName, String workspaceName, - String id, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id, context); + String id) { + Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -967,14 +780,15 @@ private PollerFlux, Void> beginCancelAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id) { - return this.beginCancelAsync(resourceGroupName, workspaceName, id).getSyncPoller(); + Response response = cancelWithResponse(resourceGroupName, workspaceName, id); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -985,14 +799,15 @@ public SyncPoller, Void> beginCancel(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id, Context context) { - return this.beginCancelAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); + Response response = cancelWithResponse(resourceGroupName, workspaceName, id, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1009,25 +824,7 @@ private Mono cancelAsync(String resourceGroupName, String workspaceName, S * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @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 cancelAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginCancelAsync(resourceGroupName, workspaceName, id, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1035,14 +832,14 @@ private Mono cancelAsync(String resourceGroupName, String workspaceName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public void cancel(String resourceGroupName, String workspaceName, String id) { - cancelAsync(resourceGroupName, workspaceName, id).block(); + beginCancel(resourceGroupName, workspaceName, id).getFinalResult(); } /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1051,10 +848,12 @@ public void cancel(String resourceGroupName, String workspaceName, String id) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void cancel(String resourceGroupName, String workspaceName, String id, Context context) { - cancelAsync(resourceGroupName, workspaceName, id, context).block(); + beginCancel(resourceGroupName, workspaceName, id, context).getFinalResult(); } /** + * Lists Jobs in the workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1066,13 +865,6 @@ public void cancel(String resourceGroupName, String workspaceName, String id, Co */ @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(), @@ -1081,6 +873,28 @@ private Mono> listNextSinglePageAsync(String nextLin } /** + * Lists Jobs in the workspace. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of JobBase entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists Jobs in the workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1088,22 +902,14 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of JobBase entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java index 47f39f713b94..890d063e5190 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,16 +28,21 @@ public JobsImpl(JobsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String id, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new JobBaseImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, - String tag, ListViewType listViewType, String properties, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); + public JobBase get(String resourceGroupName, String workspaceName, String id) { + JobBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); + if (inner != null) { + return new JobBaseImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String id) { @@ -48,25 +53,16 @@ public void delete(String resourceGroupName, String workspaceName, String id, Co this.serviceClient().delete(resourceGroupName, workspaceName, id, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String id, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); } - public JobBase get(String resourceGroupName, String workspaceName, String id) { - JobBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); - if (inner != null) { - return new JobBaseImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, + String tag, ListViewType listViewType, String properties, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, properties, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); } public void cancel(String resourceGroupName, String workspaceName, String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java index 9202fd672f04..fd4b0e5c29e8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java index ed94a5476727..b8520ee9fb05 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java index 9e7be2fa5cb3..926c0694c9cb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -21,14 +21,6 @@ public final class ListWorkspaceKeysResultImpl implements ListWorkspaceKeysResul this.serviceManager = serviceManager; } - public String userStorageKey() { - return this.innerModel().userStorageKey(); - } - - public String userStorageResourceId() { - return this.innerModel().userStorageResourceId(); - } - public String appInsightsInstrumentationKey() { return this.innerModel().appInsightsInstrumentationKey(); } @@ -46,6 +38,14 @@ public ListNotebookKeysResult notebookAccessKeys() { } } + public String userStorageResourceId() { + return this.innerModel().userStorageResourceId(); + } + + public String userStorageKey() { + return this.innerModel().userStorageKey(); + } + public ListWorkspaceKeysResultInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientBuilder.java similarity index 63% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientBuilder.java index 35b7529d50c6..c4c65369799d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AzureMachineLearningWorkspacesImpl type. + * A builder for creating a new instance of the MachineLearningManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AzureMachineLearningWorkspacesImpl.class }) -public final class AzureMachineLearningWorkspacesBuilder { +@ServiceClientBuilder(serviceClients = { MachineLearningManagementClientImpl.class }) +public final class MachineLearningManagementClientBuilder { /* - * The ID of the target subscription. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @param endpoint the endpoint value. + * @return the MachineLearningManagementClientBuilder. */ - public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public MachineLearningManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @param subscriptionId the subscriptionId value. + * @return the MachineLearningManagementClientBuilder. */ - public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public MachineLearningManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the MachineLearningManagementClientBuilder. */ - public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment environment) { + public MachineLearningManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment enviro * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the MachineLearningManagementClientBuilder. */ - public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { + public MachineLearningManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the MachineLearningManagementClientBuilder. */ - public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaultPollInterval) { + public MachineLearningManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaul * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AzureMachineLearningWorkspacesBuilder. + * @return the MachineLearningManagementClientBuilder. */ - public AzureMachineLearningWorkspacesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public MachineLearningManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AzureMachineLearningWorkspacesImpl with the provided parameters. + * Builds an instance of MachineLearningManagementClientImpl with the provided parameters. * - * @return an instance of AzureMachineLearningWorkspacesImpl. + * @return an instance of MachineLearningManagementClientImpl. */ - public AzureMachineLearningWorkspacesImpl buildClient() { + public MachineLearningManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,8 +131,8 @@ public AzureMachineLearningWorkspacesImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureMachineLearningWorkspacesImpl client = new AzureMachineLearningWorkspacesImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + MachineLearningManagementClientImpl client = new MachineLearningManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientImpl.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientImpl.java index 9fb3b79b1f9b..4c4d81035021 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -13,27 +13,39 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.fluent.AzureMachineLearningWorkspaces; import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient; import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; import com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; import com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; import com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; +import com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient; +import com.azure.resourcemanager.machinelearning.fluent.EndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; import com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.FeaturesClient; @@ -41,8 +53,13 @@ import com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient; import com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient; +import com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient; +import com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient; +import com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient; import com.azure.resourcemanager.machinelearning.fluent.JobsClient; +import com.azure.resourcemanager.machinelearning.fluent.MachineLearningManagementClient; import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient; +import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient; import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient; import com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient; import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; @@ -50,9 +67,14 @@ import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; import com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient; +import com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient; import com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient; import com.azure.resourcemanager.machinelearning.fluent.RegistriesClient; import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient; import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient; @@ -82,31 +104,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AzureMachineLearningWorkspacesImpl type. + * Initializes a new instance of the MachineLearningManagementClientImpl type. */ -@ServiceClient(builder = AzureMachineLearningWorkspacesBuilder.class) -public final class AzureMachineLearningWorkspacesImpl implements AzureMachineLearningWorkspaces { - /** - * The ID of the target subscription. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - +@ServiceClient(builder = MachineLearningManagementClientBuilder.class) +public final class MachineLearningManagementClientImpl implements MachineLearningManagementClient { /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -115,12 +123,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -128,6 +136,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -184,6 +206,20 @@ public OperationsClient getOperations() { return this.operations; } + /** + * The EndpointDeploymentsClient object to access its operations. + */ + private final EndpointDeploymentsClient endpointDeployments; + + /** + * Gets the EndpointDeploymentsClient object to access its operations. + * + * @return the EndpointDeploymentsClient object. + */ + public EndpointDeploymentsClient getEndpointDeployments() { + return this.endpointDeployments; + } + /** * The WorkspacesClient object to access its operations. */ @@ -199,715 +235,986 @@ public WorkspacesClient getWorkspaces() { } /** - * The UsagesClient object to access its operations. + * The CodeContainersClient object to access its operations. */ - private final UsagesClient usages; + private final CodeContainersClient codeContainers; /** - * Gets the UsagesClient object to access its operations. + * Gets the CodeContainersClient object to access its operations. * - * @return the UsagesClient object. + * @return the CodeContainersClient object. */ - public UsagesClient getUsages() { - return this.usages; + public CodeContainersClient getCodeContainers() { + return this.codeContainers; } /** - * The VirtualMachineSizesClient object to access its operations. + * The RegistriesClient object to access its operations. */ - private final VirtualMachineSizesClient virtualMachineSizes; + private final RegistriesClient registries; /** - * Gets the VirtualMachineSizesClient object to access its operations. + * Gets the RegistriesClient object to access its operations. * - * @return the VirtualMachineSizesClient object. + * @return the RegistriesClient object. */ - public VirtualMachineSizesClient getVirtualMachineSizes() { - return this.virtualMachineSizes; + public RegistriesClient getRegistries() { + return this.registries; } /** - * The QuotasClient object to access its operations. + * The CodeVersionsClient object to access its operations. */ - private final QuotasClient quotas; + private final CodeVersionsClient codeVersions; /** - * Gets the QuotasClient object to access its operations. + * Gets the CodeVersionsClient object to access its operations. * - * @return the QuotasClient object. + * @return the CodeVersionsClient object. */ - public QuotasClient getQuotas() { - return this.quotas; + public CodeVersionsClient getCodeVersions() { + return this.codeVersions; } /** - * The ComputesClient object to access its operations. + * The ComponentContainersClient object to access its operations. */ - private final ComputesClient computes; + private final ComponentContainersClient componentContainers; /** - * Gets the ComputesClient object to access its operations. + * Gets the ComponentContainersClient object to access its operations. * - * @return the ComputesClient object. + * @return the ComponentContainersClient object. */ - public ComputesClient getComputes() { - return this.computes; + public ComponentContainersClient getComponentContainers() { + return this.componentContainers; } /** - * The PrivateEndpointConnectionsClient object to access its operations. + * The ComponentVersionsClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; + private final ComponentVersionsClient componentVersions; /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ComponentVersionsClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ComponentVersionsClient object. */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; + public ComponentVersionsClient getComponentVersions() { + return this.componentVersions; } /** - * The PrivateLinkResourcesClient object to access its operations. + * The DataContainersClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; + private final DataContainersClient dataContainers; /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the DataContainersClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the DataContainersClient object. */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; + public DataContainersClient getDataContainers() { + return this.dataContainers; } /** - * The WorkspaceConnectionsClient object to access its operations. + * The DataVersionsClient object to access its operations. */ - private final WorkspaceConnectionsClient workspaceConnections; + private final DataVersionsClient dataVersions; /** - * Gets the WorkspaceConnectionsClient object to access its operations. + * Gets the DataVersionsClient object to access its operations. * - * @return the WorkspaceConnectionsClient object. + * @return the DataVersionsClient object. */ - public WorkspaceConnectionsClient getWorkspaceConnections() { - return this.workspaceConnections; + public DataVersionsClient getDataVersions() { + return this.dataVersions; } /** - * The ManagedNetworkSettingsRulesClient object to access its operations. + * The EnvironmentContainersClient object to access its operations. */ - private final ManagedNetworkSettingsRulesClient managedNetworkSettingsRules; + private final EnvironmentContainersClient environmentContainers; /** - * Gets the ManagedNetworkSettingsRulesClient object to access its operations. + * Gets the EnvironmentContainersClient object to access its operations. * - * @return the ManagedNetworkSettingsRulesClient object. + * @return the EnvironmentContainersClient object. */ - public ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules() { - return this.managedNetworkSettingsRules; + public EnvironmentContainersClient getEnvironmentContainers() { + return this.environmentContainers; } /** - * The ManagedNetworkProvisionsClient object to access its operations. + * The EnvironmentVersionsClient object to access its operations. */ - private final ManagedNetworkProvisionsClient managedNetworkProvisions; + private final EnvironmentVersionsClient environmentVersions; /** - * Gets the ManagedNetworkProvisionsClient object to access its operations. + * Gets the EnvironmentVersionsClient object to access its operations. * - * @return the ManagedNetworkProvisionsClient object. + * @return the EnvironmentVersionsClient object. */ - public ManagedNetworkProvisionsClient getManagedNetworkProvisions() { - return this.managedNetworkProvisions; + public EnvironmentVersionsClient getEnvironmentVersions() { + return this.environmentVersions; } /** - * The RegistryCodeContainersClient object to access its operations. + * The ModelContainersClient object to access its operations. */ - private final RegistryCodeContainersClient registryCodeContainers; + private final ModelContainersClient modelContainers; /** - * Gets the RegistryCodeContainersClient object to access its operations. + * Gets the ModelContainersClient object to access its operations. * - * @return the RegistryCodeContainersClient object. + * @return the ModelContainersClient object. */ - public RegistryCodeContainersClient getRegistryCodeContainers() { - return this.registryCodeContainers; + public ModelContainersClient getModelContainers() { + return this.modelContainers; } /** - * The RegistryCodeVersionsClient object to access its operations. + * The ModelVersionsClient object to access its operations. */ - private final RegistryCodeVersionsClient registryCodeVersions; + private final ModelVersionsClient modelVersions; /** - * Gets the RegistryCodeVersionsClient object to access its operations. + * Gets the ModelVersionsClient object to access its operations. * - * @return the RegistryCodeVersionsClient object. + * @return the ModelVersionsClient object. */ - public RegistryCodeVersionsClient getRegistryCodeVersions() { - return this.registryCodeVersions; + public ModelVersionsClient getModelVersions() { + return this.modelVersions; } /** - * The RegistryComponentContainersClient object to access its operations. + * The BatchEndpointsClient object to access its operations. */ - private final RegistryComponentContainersClient registryComponentContainers; + private final BatchEndpointsClient batchEndpoints; /** - * Gets the RegistryComponentContainersClient object to access its operations. + * Gets the BatchEndpointsClient object to access its operations. * - * @return the RegistryComponentContainersClient object. + * @return the BatchEndpointsClient object. */ - public RegistryComponentContainersClient getRegistryComponentContainers() { - return this.registryComponentContainers; + public BatchEndpointsClient getBatchEndpoints() { + return this.batchEndpoints; } /** - * The RegistryComponentVersionsClient object to access its operations. + * The BatchDeploymentsClient object to access its operations. */ - private final RegistryComponentVersionsClient registryComponentVersions; + private final BatchDeploymentsClient batchDeployments; /** - * Gets the RegistryComponentVersionsClient object to access its operations. + * Gets the BatchDeploymentsClient object to access its operations. * - * @return the RegistryComponentVersionsClient object. + * @return the BatchDeploymentsClient object. */ - public RegistryComponentVersionsClient getRegistryComponentVersions() { - return this.registryComponentVersions; + public BatchDeploymentsClient getBatchDeployments() { + return this.batchDeployments; } /** - * The RegistryDataContainersClient object to access its operations. + * The CapabilityHostsClient object to access its operations. */ - private final RegistryDataContainersClient registryDataContainers; + private final CapabilityHostsClient capabilityHosts; /** - * Gets the RegistryDataContainersClient object to access its operations. + * Gets the CapabilityHostsClient object to access its operations. * - * @return the RegistryDataContainersClient object. + * @return the CapabilityHostsClient object. */ - public RegistryDataContainersClient getRegistryDataContainers() { - return this.registryDataContainers; + public CapabilityHostsClient getCapabilityHosts() { + return this.capabilityHosts; } /** - * The RegistryDataVersionsClient object to access its operations. + * The DatastoresClient object to access its operations. */ - private final RegistryDataVersionsClient registryDataVersions; + private final DatastoresClient datastores; /** - * Gets the RegistryDataVersionsClient object to access its operations. + * Gets the DatastoresClient object to access its operations. * - * @return the RegistryDataVersionsClient object. + * @return the DatastoresClient object. */ - public RegistryDataVersionsClient getRegistryDataVersions() { - return this.registryDataVersions; + public DatastoresClient getDatastores() { + return this.datastores; } /** - * The RegistryDataReferencesClient object to access its operations. + * The FeaturesetContainersClient object to access its operations. */ - private final RegistryDataReferencesClient registryDataReferences; + private final FeaturesetContainersClient featuresetContainers; /** - * Gets the RegistryDataReferencesClient object to access its operations. + * Gets the FeaturesetContainersClient object to access its operations. * - * @return the RegistryDataReferencesClient object. + * @return the FeaturesetContainersClient object. */ - public RegistryDataReferencesClient getRegistryDataReferences() { - return this.registryDataReferences; + public FeaturesetContainersClient getFeaturesetContainers() { + return this.featuresetContainers; } /** - * The RegistryEnvironmentContainersClient object to access its operations. + * The FeaturesClient object to access its operations. */ - private final RegistryEnvironmentContainersClient registryEnvironmentContainers; + private final FeaturesClient features; /** - * Gets the RegistryEnvironmentContainersClient object to access its operations. + * Gets the FeaturesClient object to access its operations. * - * @return the RegistryEnvironmentContainersClient object. + * @return the FeaturesClient object. */ - public RegistryEnvironmentContainersClient getRegistryEnvironmentContainers() { - return this.registryEnvironmentContainers; + public FeaturesClient getFeatures() { + return this.features; } /** - * The RegistryEnvironmentVersionsClient object to access its operations. + * The FeaturesetVersionsClient object to access its operations. */ - private final RegistryEnvironmentVersionsClient registryEnvironmentVersions; + private final FeaturesetVersionsClient featuresetVersions; /** - * Gets the RegistryEnvironmentVersionsClient object to access its operations. + * Gets the FeaturesetVersionsClient object to access its operations. * - * @return the RegistryEnvironmentVersionsClient object. + * @return the FeaturesetVersionsClient object. */ - public RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions() { - return this.registryEnvironmentVersions; + public FeaturesetVersionsClient getFeaturesetVersions() { + return this.featuresetVersions; } /** - * The RegistryModelContainersClient object to access its operations. + * The FeaturestoreEntityContainersClient object to access its operations. */ - private final RegistryModelContainersClient registryModelContainers; + private final FeaturestoreEntityContainersClient featurestoreEntityContainers; /** - * Gets the RegistryModelContainersClient object to access its operations. + * Gets the FeaturestoreEntityContainersClient object to access its operations. * - * @return the RegistryModelContainersClient object. + * @return the FeaturestoreEntityContainersClient object. */ - public RegistryModelContainersClient getRegistryModelContainers() { - return this.registryModelContainers; + public FeaturestoreEntityContainersClient getFeaturestoreEntityContainers() { + return this.featurestoreEntityContainers; } /** - * The RegistryModelVersionsClient object to access its operations. + * The FeaturestoreEntityVersionsClient object to access its operations. */ - private final RegistryModelVersionsClient registryModelVersions; + private final FeaturestoreEntityVersionsClient featurestoreEntityVersions; /** - * Gets the RegistryModelVersionsClient object to access its operations. + * Gets the FeaturestoreEntityVersionsClient object to access its operations. * - * @return the RegistryModelVersionsClient object. + * @return the FeaturestoreEntityVersionsClient object. */ - public RegistryModelVersionsClient getRegistryModelVersions() { - return this.registryModelVersions; + public FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions() { + return this.featurestoreEntityVersions; } /** - * The BatchEndpointsClient object to access its operations. + * The InferencePoolsClient object to access its operations. */ - private final BatchEndpointsClient batchEndpoints; + private final InferencePoolsClient inferencePools; /** - * Gets the BatchEndpointsClient object to access its operations. + * Gets the InferencePoolsClient object to access its operations. * - * @return the BatchEndpointsClient object. + * @return the InferencePoolsClient object. */ - public BatchEndpointsClient getBatchEndpoints() { - return this.batchEndpoints; + public InferencePoolsClient getInferencePools() { + return this.inferencePools; } /** - * The BatchDeploymentsClient object to access its operations. + * The InferenceEndpointsClient object to access its operations. */ - private final BatchDeploymentsClient batchDeployments; + private final InferenceEndpointsClient inferenceEndpoints; /** - * Gets the BatchDeploymentsClient object to access its operations. + * Gets the InferenceEndpointsClient object to access its operations. * - * @return the BatchDeploymentsClient object. + * @return the InferenceEndpointsClient object. */ - public BatchDeploymentsClient getBatchDeployments() { - return this.batchDeployments; + public InferenceEndpointsClient getInferenceEndpoints() { + return this.inferenceEndpoints; } /** - * The CodeContainersClient object to access its operations. + * The InferenceGroupsClient object to access its operations. */ - private final CodeContainersClient codeContainers; + private final InferenceGroupsClient inferenceGroups; /** - * Gets the CodeContainersClient object to access its operations. + * Gets the InferenceGroupsClient object to access its operations. * - * @return the CodeContainersClient object. + * @return the InferenceGroupsClient object. */ - public CodeContainersClient getCodeContainers() { - return this.codeContainers; + public InferenceGroupsClient getInferenceGroups() { + return this.inferenceGroups; } /** - * The CodeVersionsClient object to access its operations. + * The MarketplaceSubscriptionsClient object to access its operations. */ - private final CodeVersionsClient codeVersions; + private final MarketplaceSubscriptionsClient marketplaceSubscriptions; /** - * Gets the CodeVersionsClient object to access its operations. + * Gets the MarketplaceSubscriptionsClient object to access its operations. * - * @return the CodeVersionsClient object. + * @return the MarketplaceSubscriptionsClient object. */ - public CodeVersionsClient getCodeVersions() { - return this.codeVersions; + public MarketplaceSubscriptionsClient getMarketplaceSubscriptions() { + return this.marketplaceSubscriptions; } /** - * The ComponentContainersClient object to access its operations. + * The OnlineEndpointsClient object to access its operations. */ - private final ComponentContainersClient componentContainers; + private final OnlineEndpointsClient onlineEndpoints; + + /** + * Gets the OnlineEndpointsClient object to access its operations. + * + * @return the OnlineEndpointsClient object. + */ + public OnlineEndpointsClient getOnlineEndpoints() { + return this.onlineEndpoints; + } + + /** + * The OnlineDeploymentsClient object to access its operations. + */ + private final OnlineDeploymentsClient onlineDeployments; + + /** + * Gets the OnlineDeploymentsClient object to access its operations. + * + * @return the OnlineDeploymentsClient object. + */ + public OnlineDeploymentsClient getOnlineDeployments() { + return this.onlineDeployments; + } + + /** + * The SchedulesClient object to access its operations. + */ + private final SchedulesClient schedules; + + /** + * Gets the SchedulesClient object to access its operations. + * + * @return the SchedulesClient object. + */ + public SchedulesClient getSchedules() { + return this.schedules; + } + + /** + * The ServerlessEndpointsClient object to access its operations. + */ + private final ServerlessEndpointsClient serverlessEndpoints; + + /** + * Gets the ServerlessEndpointsClient object to access its operations. + * + * @return the ServerlessEndpointsClient object. + */ + public ServerlessEndpointsClient getServerlessEndpoints() { + return this.serverlessEndpoints; + } + + /** + * The RaiPoliciesClient object to access its operations. + */ + private final RaiPoliciesClient raiPolicies; + + /** + * Gets the RaiPoliciesClient object to access its operations. + * + * @return the RaiPoliciesClient object. + */ + public RaiPoliciesClient getRaiPolicies() { + return this.raiPolicies; + } + + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The ComputesClient object to access its operations. + */ + private final ComputesClient computes; + + /** + * Gets the ComputesClient object to access its operations. + * + * @return the ComputesClient object. + */ + public ComputesClient getComputes() { + return this.computes; + } + + /** + * The WorkspaceFeaturesClient object to access its operations. + */ + private final WorkspaceFeaturesClient workspaceFeatures; + + /** + * Gets the WorkspaceFeaturesClient object to access its operations. + * + * @return the WorkspaceFeaturesClient object. + */ + public WorkspaceFeaturesClient getWorkspaceFeatures() { + return this.workspaceFeatures; + } + + /** + * The ConnectionsClient object to access its operations. + */ + private final ConnectionsClient connections; + + /** + * Gets the ConnectionsClient object to access its operations. + * + * @return the ConnectionsClient object. + */ + public ConnectionsClient getConnections() { + return this.connections; + } + + /** + * The PrivateLinkResourcesClient object to access its operations. + */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + + /** + * The ManagedNetworkProvisionsClient object to access its operations. + */ + private final ManagedNetworkProvisionsClient managedNetworkProvisions; + + /** + * Gets the ManagedNetworkProvisionsClient object to access its operations. + * + * @return the ManagedNetworkProvisionsClient object. + */ + public ManagedNetworkProvisionsClient getManagedNetworkProvisions() { + return this.managedNetworkProvisions; + } + + /** + * The RegistryCodeContainersClient object to access its operations. + */ + private final RegistryCodeContainersClient registryCodeContainers; + + /** + * Gets the RegistryCodeContainersClient object to access its operations. + * + * @return the RegistryCodeContainersClient object. + */ + public RegistryCodeContainersClient getRegistryCodeContainers() { + return this.registryCodeContainers; + } + + /** + * The RegistryDataReferencesClient object to access its operations. + */ + private final RegistryDataReferencesClient registryDataReferences; + + /** + * Gets the RegistryDataReferencesClient object to access its operations. + * + * @return the RegistryDataReferencesClient object. + */ + public RegistryDataReferencesClient getRegistryDataReferences() { + return this.registryDataReferences; + } + + /** + * The RegistryCodeVersionsClient object to access its operations. + */ + private final RegistryCodeVersionsClient registryCodeVersions; + + /** + * Gets the RegistryCodeVersionsClient object to access its operations. + * + * @return the RegistryCodeVersionsClient object. + */ + public RegistryCodeVersionsClient getRegistryCodeVersions() { + return this.registryCodeVersions; + } + + /** + * The RegistryComponentContainersClient object to access its operations. + */ + private final RegistryComponentContainersClient registryComponentContainers; + + /** + * Gets the RegistryComponentContainersClient object to access its operations. + * + * @return the RegistryComponentContainersClient object. + */ + public RegistryComponentContainersClient getRegistryComponentContainers() { + return this.registryComponentContainers; + } + + /** + * The RegistryComponentVersionsClient object to access its operations. + */ + private final RegistryComponentVersionsClient registryComponentVersions; + + /** + * Gets the RegistryComponentVersionsClient object to access its operations. + * + * @return the RegistryComponentVersionsClient object. + */ + public RegistryComponentVersionsClient getRegistryComponentVersions() { + return this.registryComponentVersions; + } + + /** + * The RegistryDataContainersClient object to access its operations. + */ + private final RegistryDataContainersClient registryDataContainers; + + /** + * Gets the RegistryDataContainersClient object to access its operations. + * + * @return the RegistryDataContainersClient object. + */ + public RegistryDataContainersClient getRegistryDataContainers() { + return this.registryDataContainers; + } + + /** + * The RegistryDataVersionsClient object to access its operations. + */ + private final RegistryDataVersionsClient registryDataVersions; + + /** + * Gets the RegistryDataVersionsClient object to access its operations. + * + * @return the RegistryDataVersionsClient object. + */ + public RegistryDataVersionsClient getRegistryDataVersions() { + return this.registryDataVersions; + } + + /** + * The RegistryEnvironmentContainersClient object to access its operations. + */ + private final RegistryEnvironmentContainersClient registryEnvironmentContainers; /** - * Gets the ComponentContainersClient object to access its operations. + * Gets the RegistryEnvironmentContainersClient object to access its operations. * - * @return the ComponentContainersClient object. + * @return the RegistryEnvironmentContainersClient object. */ - public ComponentContainersClient getComponentContainers() { - return this.componentContainers; + public RegistryEnvironmentContainersClient getRegistryEnvironmentContainers() { + return this.registryEnvironmentContainers; } /** - * The ComponentVersionsClient object to access its operations. + * The RegistryEnvironmentVersionsClient object to access its operations. */ - private final ComponentVersionsClient componentVersions; + private final RegistryEnvironmentVersionsClient registryEnvironmentVersions; /** - * Gets the ComponentVersionsClient object to access its operations. + * Gets the RegistryEnvironmentVersionsClient object to access its operations. * - * @return the ComponentVersionsClient object. + * @return the RegistryEnvironmentVersionsClient object. */ - public ComponentVersionsClient getComponentVersions() { - return this.componentVersions; + public RegistryEnvironmentVersionsClient getRegistryEnvironmentVersions() { + return this.registryEnvironmentVersions; } /** - * The DataContainersClient object to access its operations. + * The RegistryModelContainersClient object to access its operations. */ - private final DataContainersClient dataContainers; + private final RegistryModelContainersClient registryModelContainers; /** - * Gets the DataContainersClient object to access its operations. + * Gets the RegistryModelContainersClient object to access its operations. * - * @return the DataContainersClient object. + * @return the RegistryModelContainersClient object. */ - public DataContainersClient getDataContainers() { - return this.dataContainers; + public RegistryModelContainersClient getRegistryModelContainers() { + return this.registryModelContainers; } /** - * The DataVersionsClient object to access its operations. + * The RegistryModelVersionsClient object to access its operations. */ - private final DataVersionsClient dataVersions; + private final RegistryModelVersionsClient registryModelVersions; /** - * Gets the DataVersionsClient object to access its operations. + * Gets the RegistryModelVersionsClient object to access its operations. * - * @return the DataVersionsClient object. + * @return the RegistryModelVersionsClient object. */ - public DataVersionsClient getDataVersions() { - return this.dataVersions; + public RegistryModelVersionsClient getRegistryModelVersions() { + return this.registryModelVersions; } /** - * The DatastoresClient object to access its operations. + * The JobsClient object to access its operations. */ - private final DatastoresClient datastores; + private final JobsClient jobs; /** - * Gets the DatastoresClient object to access its operations. + * Gets the JobsClient object to access its operations. * - * @return the DatastoresClient object. + * @return the JobsClient object. */ - public DatastoresClient getDatastores() { - return this.datastores; + public JobsClient getJobs() { + return this.jobs; } /** - * The EnvironmentContainersClient object to access its operations. + * The WorkspaceConnectionsClient object to access its operations. */ - private final EnvironmentContainersClient environmentContainers; + private final WorkspaceConnectionsClient workspaceConnections; /** - * Gets the EnvironmentContainersClient object to access its operations. + * Gets the WorkspaceConnectionsClient object to access its operations. * - * @return the EnvironmentContainersClient object. + * @return the WorkspaceConnectionsClient object. */ - public EnvironmentContainersClient getEnvironmentContainers() { - return this.environmentContainers; + public WorkspaceConnectionsClient getWorkspaceConnections() { + return this.workspaceConnections; } /** - * The EnvironmentVersionsClient object to access its operations. + * The ConnectionRaiBlocklistsClient object to access its operations. */ - private final EnvironmentVersionsClient environmentVersions; + private final ConnectionRaiBlocklistsClient connectionRaiBlocklists; /** - * Gets the EnvironmentVersionsClient object to access its operations. + * Gets the ConnectionRaiBlocklistsClient object to access its operations. * - * @return the EnvironmentVersionsClient object. + * @return the ConnectionRaiBlocklistsClient object. */ - public EnvironmentVersionsClient getEnvironmentVersions() { - return this.environmentVersions; + public ConnectionRaiBlocklistsClient getConnectionRaiBlocklists() { + return this.connectionRaiBlocklists; } /** - * The FeaturesetContainersClient object to access its operations. + * The ConnectionRaiBlocklistsOperationsClient object to access its operations. */ - private final FeaturesetContainersClient featuresetContainers; + private final ConnectionRaiBlocklistsOperationsClient connectionRaiBlocklistsOperations; /** - * Gets the FeaturesetContainersClient object to access its operations. + * Gets the ConnectionRaiBlocklistsOperationsClient object to access its operations. * - * @return the FeaturesetContainersClient object. + * @return the ConnectionRaiBlocklistsOperationsClient object. */ - public FeaturesetContainersClient getFeaturesetContainers() { - return this.featuresetContainers; + public ConnectionRaiBlocklistsOperationsClient getConnectionRaiBlocklistsOperations() { + return this.connectionRaiBlocklistsOperations; } /** - * The FeaturesClient object to access its operations. + * The ConnectionRaiBlocklistItemsClient object to access its operations. */ - private final FeaturesClient features; + private final ConnectionRaiBlocklistItemsClient connectionRaiBlocklistItems; /** - * Gets the FeaturesClient object to access its operations. + * Gets the ConnectionRaiBlocklistItemsClient object to access its operations. * - * @return the FeaturesClient object. + * @return the ConnectionRaiBlocklistItemsClient object. */ - public FeaturesClient getFeatures() { - return this.features; + public ConnectionRaiBlocklistItemsClient getConnectionRaiBlocklistItems() { + return this.connectionRaiBlocklistItems; } /** - * The FeaturesetVersionsClient object to access its operations. + * The ConnectionRaiBlocklistItemsOperationsClient object to access its operations. */ - private final FeaturesetVersionsClient featuresetVersions; + private final ConnectionRaiBlocklistItemsOperationsClient connectionRaiBlocklistItemsOperations; /** - * Gets the FeaturesetVersionsClient object to access its operations. + * Gets the ConnectionRaiBlocklistItemsOperationsClient object to access its operations. * - * @return the FeaturesetVersionsClient object. + * @return the ConnectionRaiBlocklistItemsOperationsClient object. */ - public FeaturesetVersionsClient getFeaturesetVersions() { - return this.featuresetVersions; + public ConnectionRaiBlocklistItemsOperationsClient getConnectionRaiBlocklistItemsOperations() { + return this.connectionRaiBlocklistItemsOperations; } /** - * The FeaturestoreEntityContainersClient object to access its operations. + * The ConnectionRaiPoliciesClient object to access its operations. */ - private final FeaturestoreEntityContainersClient featurestoreEntityContainers; + private final ConnectionRaiPoliciesClient connectionRaiPolicies; /** - * Gets the FeaturestoreEntityContainersClient object to access its operations. + * Gets the ConnectionRaiPoliciesClient object to access its operations. * - * @return the FeaturestoreEntityContainersClient object. + * @return the ConnectionRaiPoliciesClient object. */ - public FeaturestoreEntityContainersClient getFeaturestoreEntityContainers() { - return this.featurestoreEntityContainers; + public ConnectionRaiPoliciesClient getConnectionRaiPolicies() { + return this.connectionRaiPolicies; } /** - * The FeaturestoreEntityVersionsClient object to access its operations. + * The ConnectionRaiPoliciesOperationsClient object to access its operations. */ - private final FeaturestoreEntityVersionsClient featurestoreEntityVersions; + private final ConnectionRaiPoliciesOperationsClient connectionRaiPoliciesOperations; /** - * Gets the FeaturestoreEntityVersionsClient object to access its operations. + * Gets the ConnectionRaiPoliciesOperationsClient object to access its operations. * - * @return the FeaturestoreEntityVersionsClient object. + * @return the ConnectionRaiPoliciesOperationsClient object. */ - public FeaturestoreEntityVersionsClient getFeaturestoreEntityVersions() { - return this.featurestoreEntityVersions; + public ConnectionRaiPoliciesOperationsClient getConnectionRaiPoliciesOperations() { + return this.connectionRaiPoliciesOperations; } /** - * The JobsClient object to access its operations. + * The RaiPoliciesOperationsClient object to access its operations. */ - private final JobsClient jobs; + private final RaiPoliciesOperationsClient raiPoliciesOperations; /** - * Gets the JobsClient object to access its operations. + * Gets the RaiPoliciesOperationsClient object to access its operations. * - * @return the JobsClient object. + * @return the RaiPoliciesOperationsClient object. */ - public JobsClient getJobs() { - return this.jobs; + public RaiPoliciesOperationsClient getRaiPoliciesOperations() { + return this.raiPoliciesOperations; } /** - * The MarketplaceSubscriptionsClient object to access its operations. + * The EndpointsClient object to access its operations. */ - private final MarketplaceSubscriptionsClient marketplaceSubscriptions; + private final EndpointsClient endpoints; /** - * Gets the MarketplaceSubscriptionsClient object to access its operations. + * Gets the EndpointsClient object to access its operations. * - * @return the MarketplaceSubscriptionsClient object. + * @return the EndpointsClient object. */ - public MarketplaceSubscriptionsClient getMarketplaceSubscriptions() { - return this.marketplaceSubscriptions; + public EndpointsClient getEndpoints() { + return this.endpoints; } /** - * The ModelContainersClient object to access its operations. + * The ManagedNetworkSettingsRulesClient object to access its operations. */ - private final ModelContainersClient modelContainers; + private final ManagedNetworkSettingsRulesClient managedNetworkSettingsRules; /** - * Gets the ModelContainersClient object to access its operations. + * Gets the ManagedNetworkSettingsRulesClient object to access its operations. * - * @return the ModelContainersClient object. + * @return the ManagedNetworkSettingsRulesClient object. */ - public ModelContainersClient getModelContainers() { - return this.modelContainers; + public ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules() { + return this.managedNetworkSettingsRules; } /** - * The ModelVersionsClient object to access its operations. + * The OutboundRulesClient object to access its operations. */ - private final ModelVersionsClient modelVersions; + private final OutboundRulesClient outboundRules; /** - * Gets the ModelVersionsClient object to access its operations. + * Gets the OutboundRulesClient object to access its operations. * - * @return the ModelVersionsClient object. + * @return the OutboundRulesClient object. */ - public ModelVersionsClient getModelVersions() { - return this.modelVersions; + public OutboundRulesClient getOutboundRules() { + return this.outboundRules; } /** - * The OnlineEndpointsClient object to access its operations. + * The ManagedNetworkSettingsOperationsClient object to access its operations. */ - private final OnlineEndpointsClient onlineEndpoints; + private final ManagedNetworkSettingsOperationsClient managedNetworkSettingsOperations; /** - * Gets the OnlineEndpointsClient object to access its operations. + * Gets the ManagedNetworkSettingsOperationsClient object to access its operations. * - * @return the OnlineEndpointsClient object. + * @return the ManagedNetworkSettingsOperationsClient object. */ - public OnlineEndpointsClient getOnlineEndpoints() { - return this.onlineEndpoints; + public ManagedNetworkSettingsOperationsClient getManagedNetworkSettingsOperations() { + return this.managedNetworkSettingsOperations; } /** - * The OnlineDeploymentsClient object to access its operations. + * The OutboundRulesOperationsClient object to access its operations. */ - private final OnlineDeploymentsClient onlineDeployments; + private final OutboundRulesOperationsClient outboundRulesOperations; /** - * Gets the OnlineDeploymentsClient object to access its operations. + * Gets the OutboundRulesOperationsClient object to access its operations. * - * @return the OnlineDeploymentsClient object. + * @return the OutboundRulesOperationsClient object. */ - public OnlineDeploymentsClient getOnlineDeployments() { - return this.onlineDeployments; + public OutboundRulesOperationsClient getOutboundRulesOperations() { + return this.outboundRulesOperations; } /** - * The SchedulesClient object to access its operations. + * The UsagesClient object to access its operations. */ - private final SchedulesClient schedules; + private final UsagesClient usages; /** - * Gets the SchedulesClient object to access its operations. + * Gets the UsagesClient object to access its operations. * - * @return the SchedulesClient object. + * @return the UsagesClient object. */ - public SchedulesClient getSchedules() { - return this.schedules; + public UsagesClient getUsages() { + return this.usages; } /** - * The ServerlessEndpointsClient object to access its operations. + * The VirtualMachineSizesClient object to access its operations. */ - private final ServerlessEndpointsClient serverlessEndpoints; + private final VirtualMachineSizesClient virtualMachineSizes; /** - * Gets the ServerlessEndpointsClient object to access its operations. + * Gets the VirtualMachineSizesClient object to access its operations. * - * @return the ServerlessEndpointsClient object. + * @return the VirtualMachineSizesClient object. */ - public ServerlessEndpointsClient getServerlessEndpoints() { - return this.serverlessEndpoints; + public VirtualMachineSizesClient getVirtualMachineSizes() { + return this.virtualMachineSizes; } /** - * The RegistriesClient object to access its operations. + * The QuotasClient object to access its operations. */ - private final RegistriesClient registries; + private final QuotasClient quotas; /** - * Gets the RegistriesClient object to access its operations. + * Gets the QuotasClient object to access its operations. * - * @return the RegistriesClient object. + * @return the QuotasClient object. */ - public RegistriesClient getRegistries() { - return this.registries; + public QuotasClient getQuotas() { + return this.quotas; } /** - * The WorkspaceFeaturesClient object to access its operations. + * The PTUQuotasClient object to access its operations. */ - private final WorkspaceFeaturesClient workspaceFeatures; + private final PTUQuotasClient pTUQuotas; /** - * Gets the WorkspaceFeaturesClient object to access its operations. + * Gets the PTUQuotasClient object to access its operations. * - * @return the WorkspaceFeaturesClient object. + * @return the PTUQuotasClient object. */ - public WorkspaceFeaturesClient getWorkspaceFeatures() { - return this.workspaceFeatures; + public PTUQuotasClient getPTUQuotas() { + return this.pTUQuotas; } /** - * Initializes an instance of AzureMachineLearningWorkspaces client. + * Initializes an instance of MachineLearningManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - AzureMachineLearningWorkspacesImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + MachineLearningManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-04-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2026-05-15-preview"; this.operations = new OperationsClientImpl(this); + this.endpointDeployments = new EndpointDeploymentsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); - this.quotas = new QuotasClientImpl(this); - this.computes = new ComputesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); - this.managedNetworkSettingsRules = new ManagedNetworkSettingsRulesClientImpl(this); - this.managedNetworkProvisions = new ManagedNetworkProvisionsClientImpl(this); - this.registryCodeContainers = new RegistryCodeContainersClientImpl(this); - this.registryCodeVersions = new RegistryCodeVersionsClientImpl(this); - this.registryComponentContainers = new RegistryComponentContainersClientImpl(this); - this.registryComponentVersions = new RegistryComponentVersionsClientImpl(this); - this.registryDataContainers = new RegistryDataContainersClientImpl(this); - this.registryDataVersions = new RegistryDataVersionsClientImpl(this); - this.registryDataReferences = new RegistryDataReferencesClientImpl(this); - this.registryEnvironmentContainers = new RegistryEnvironmentContainersClientImpl(this); - this.registryEnvironmentVersions = new RegistryEnvironmentVersionsClientImpl(this); - this.registryModelContainers = new RegistryModelContainersClientImpl(this); - this.registryModelVersions = new RegistryModelVersionsClientImpl(this); - this.batchEndpoints = new BatchEndpointsClientImpl(this); - this.batchDeployments = new BatchDeploymentsClientImpl(this); this.codeContainers = new CodeContainersClientImpl(this); + this.registries = new RegistriesClientImpl(this); this.codeVersions = new CodeVersionsClientImpl(this); this.componentContainers = new ComponentContainersClientImpl(this); this.componentVersions = new ComponentVersionsClientImpl(this); this.dataContainers = new DataContainersClientImpl(this); this.dataVersions = new DataVersionsClientImpl(this); - this.datastores = new DatastoresClientImpl(this); this.environmentContainers = new EnvironmentContainersClientImpl(this); this.environmentVersions = new EnvironmentVersionsClientImpl(this); + this.modelContainers = new ModelContainersClientImpl(this); + this.modelVersions = new ModelVersionsClientImpl(this); + this.batchEndpoints = new BatchEndpointsClientImpl(this); + this.batchDeployments = new BatchDeploymentsClientImpl(this); + this.capabilityHosts = new CapabilityHostsClientImpl(this); + this.datastores = new DatastoresClientImpl(this); this.featuresetContainers = new FeaturesetContainersClientImpl(this); this.features = new FeaturesClientImpl(this); this.featuresetVersions = new FeaturesetVersionsClientImpl(this); this.featurestoreEntityContainers = new FeaturestoreEntityContainersClientImpl(this); this.featurestoreEntityVersions = new FeaturestoreEntityVersionsClientImpl(this); - this.jobs = new JobsClientImpl(this); + this.inferencePools = new InferencePoolsClientImpl(this); + this.inferenceEndpoints = new InferenceEndpointsClientImpl(this); + this.inferenceGroups = new InferenceGroupsClientImpl(this); this.marketplaceSubscriptions = new MarketplaceSubscriptionsClientImpl(this); - this.modelContainers = new ModelContainersClientImpl(this); - this.modelVersions = new ModelVersionsClientImpl(this); this.onlineEndpoints = new OnlineEndpointsClientImpl(this); this.onlineDeployments = new OnlineDeploymentsClientImpl(this); this.schedules = new SchedulesClientImpl(this); this.serverlessEndpoints = new ServerlessEndpointsClientImpl(this); - this.registries = new RegistriesClientImpl(this); + this.raiPolicies = new RaiPoliciesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.computes = new ComputesClientImpl(this); this.workspaceFeatures = new WorkspaceFeaturesClientImpl(this); + this.connections = new ConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.managedNetworkProvisions = new ManagedNetworkProvisionsClientImpl(this); + this.registryCodeContainers = new RegistryCodeContainersClientImpl(this); + this.registryDataReferences = new RegistryDataReferencesClientImpl(this); + this.registryCodeVersions = new RegistryCodeVersionsClientImpl(this); + this.registryComponentContainers = new RegistryComponentContainersClientImpl(this); + this.registryComponentVersions = new RegistryComponentVersionsClientImpl(this); + this.registryDataContainers = new RegistryDataContainersClientImpl(this); + this.registryDataVersions = new RegistryDataVersionsClientImpl(this); + this.registryEnvironmentContainers = new RegistryEnvironmentContainersClientImpl(this); + this.registryEnvironmentVersions = new RegistryEnvironmentVersionsClientImpl(this); + this.registryModelContainers = new RegistryModelContainersClientImpl(this); + this.registryModelVersions = new RegistryModelVersionsClientImpl(this); + this.jobs = new JobsClientImpl(this); + this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); + this.connectionRaiBlocklists = new ConnectionRaiBlocklistsClientImpl(this); + this.connectionRaiBlocklistsOperations = new ConnectionRaiBlocklistsOperationsClientImpl(this); + this.connectionRaiBlocklistItems = new ConnectionRaiBlocklistItemsClientImpl(this); + this.connectionRaiBlocklistItemsOperations = new ConnectionRaiBlocklistItemsOperationsClientImpl(this); + this.connectionRaiPolicies = new ConnectionRaiPoliciesClientImpl(this); + this.connectionRaiPoliciesOperations = new ConnectionRaiPoliciesOperationsClientImpl(this); + this.raiPoliciesOperations = new RaiPoliciesOperationsClientImpl(this); + this.endpoints = new EndpointsClientImpl(this); + this.managedNetworkSettingsRules = new ManagedNetworkSettingsRulesClientImpl(this); + this.outboundRules = new OutboundRulesClientImpl(this); + this.managedNetworkSettingsOperations = new ManagedNetworkSettingsOperationsClientImpl(this); + this.outboundRulesOperations = new OutboundRulesOperationsClientImpl(this); + this.usages = new UsagesClientImpl(this); + this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); + this.quotas = new QuotasClientImpl(this); + this.pTUQuotas = new PTUQuotasClientImpl(this); } /** @@ -947,6 +1254,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -1004,7 +1328,7 @@ private static final class HttpResponseImpl extends HttpResponse { super(null); this.statusCode = statusCode; this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); } public int getStatusCode() { @@ -1036,5 +1360,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AzureMachineLearningWorkspacesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(MachineLearningManagementClientImpl.class); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java index 1f1709890f1a..1d51ef3593d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java index 96e272d5478b..7353ee7996b7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -21,6 +21,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -44,35 +45,44 @@ public final class ManagedNetworkProvisionsClientImpl implements ManagedNetworkP /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ManagedNetworkProvisionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedNetworkProvisionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ManagedNetworkProvisionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ManagedNetworkProvisionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesManagedNetworkProvisions to be used by + * The interface defining all the services for MachineLearningManagementClientManagedNetworkProvisions to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientManagedNetworkProvisions") public interface ManagedNetworkProvisionsService { @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> provisionManagedNetwork(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> provisionManagedNetwork(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedNetworkProvisionOptions body, @HeaderParam("Accept") String accept, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedNetworkProvisionOptions body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response provisionManagedNetworkSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedNetworkProvisionOptions body, Context context); } @@ -80,7 +90,7 @@ Mono>> provisionManagedNetwork(@HostParam("$host") Str * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -91,29 +101,11 @@ Mono>> provisionManagedNetwork(@HostParam("$host") Str @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> provisionManagedNetworkWithResponseAsync(String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.provisionManagedNetwork(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context)) + context -> service.provisionManagedNetwork(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -121,47 +113,48 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body Managed Network Provisioning Options for a machine learning workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return status of the Provisioning for the managed network of a machine learning workspace along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response provisionManagedNetworkWithResponse(String resourceGroupName, String workspaceName, + ManagedNetworkProvisionOptions body) { + final String accept = "application/json"; + return service.provisionManagedNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, body, Context.NONE); + } + + /** + * Provisions the managed network of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @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 status of the Provisioning for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> provisionManagedNetworkWithResponseAsync(String resourceGroupName, - String workspaceName, ManagedNetworkProvisionOptions body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (body != null) { - body.validate(); - } + private Response provisionManagedNetworkWithResponse(String resourceGroupName, String workspaceName, + ManagedNetworkProvisionOptions body, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.provisionManagedNetwork(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context); + return service.provisionManagedNetworkSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, body, context); } /** * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -184,7 +177,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -206,32 +199,28 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine + * @return the {@link SyncPoller} for polling of status of the Provisioning for the managed network of a machine * learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedNetworkProvisionStatusInner> - beginProvisionManagedNetworkAsync(String resourceGroupName, String workspaceName, - ManagedNetworkProvisionOptions body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = provisionManagedNetworkWithResponseAsync(resourceGroupName, workspaceName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedNetworkProvisionStatusInner.class, - ManagedNetworkProvisionStatusInner.class, context); + public SyncPoller, ManagedNetworkProvisionStatusInner> + beginProvisionManagedNetwork(String resourceGroupName, String workspaceName, + ManagedNetworkProvisionOptions body) { + Response response = provisionManagedNetworkWithResponse(resourceGroupName, workspaceName, body); + return this.client.getLroResult( + response, ManagedNetworkProvisionStatusInner.class, ManagedNetworkProvisionStatusInner.class, Context.NONE); } /** * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -242,14 +231,16 @@ private Mono>> provisionManagedNetworkWithResponseAsyn public SyncPoller, ManagedNetworkProvisionStatusInner> beginProvisionManagedNetwork(String resourceGroupName, String workspaceName) { final ManagedNetworkProvisionOptions body = null; - return this.beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body).getSyncPoller(); + Response response = provisionManagedNetworkWithResponse(resourceGroupName, workspaceName, body); + return this.client.getLroResult( + response, ManagedNetworkProvisionStatusInner.class, ManagedNetworkProvisionStatusInner.class, Context.NONE); } /** * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -262,14 +253,17 @@ private Mono>> provisionManagedNetworkWithResponseAsyn public SyncPoller, ManagedNetworkProvisionStatusInner> beginProvisionManagedNetwork(String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context) { - return this.beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).getSyncPoller(); + Response response + = provisionManagedNetworkWithResponse(resourceGroupName, workspaceName, body, context); + return this.client.getLroResult( + response, ManagedNetworkProvisionStatusInner.class, ManagedNetworkProvisionStatusInner.class, context); } /** * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -288,7 +282,7 @@ private Mono provisionManagedNetworkAsync(St * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -307,27 +301,7 @@ private Mono provisionManagedNetworkAsync(St * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param body Managed Network Provisioning Options for a machine learning workspace. - * @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 status of the Provisioning for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono provisionManagedNetworkAsync(String resourceGroupName, - String workspaceName, ManagedNetworkProvisionOptions body, Context context) { - return beginProvisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Provisions the managed network of a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -336,14 +310,14 @@ private Mono provisionManagedNetworkAsync(St @ServiceMethod(returns = ReturnType.SINGLE) public ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName) { final ManagedNetworkProvisionOptions body = null; - return provisionManagedNetworkAsync(resourceGroupName, workspaceName, body).block(); + return beginProvisionManagedNetwork(resourceGroupName, workspaceName, body).getFinalResult(); } /** * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -354,6 +328,6 @@ public ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourc @ServiceMethod(returns = ReturnType.SINGLE) public ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourceGroupName, String workspaceName, ManagedNetworkProvisionOptions body, Context context) { - return provisionManagedNetworkAsync(resourceGroupName, workspaceName, body, context).block(); + return beginProvisionManagedNetwork(resourceGroupName, workspaceName, body, context).getFinalResult(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java index f4cf1d1ea9aa..ac0749820729 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -9,8 +9,8 @@ import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisions; public final class ManagedNetworkProvisionsImpl implements ManagedNetworkProvisions { private static final ClientLogger LOGGER = new ClientLogger(ManagedNetworkProvisionsImpl.class); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsBasicResourceImpl.java new file mode 100644 index 000000000000..5f5e61485815 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsBasicResourceImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsBasicResource; + +public final class ManagedNetworkSettingsBasicResourceImpl implements ManagedNetworkSettingsBasicResource { + private ManagedNetworkSettingsBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + ManagedNetworkSettingsBasicResourceImpl(ManagedNetworkSettingsBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager 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 ManagedNetworkSettings properties() { + ManagedNetworkSettingsInner inner = this.innerModel().properties(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ManagedNetworkSettingsBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java index 5f961f321633..5062d6f952ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; import com.azure.resourcemanager.machinelearning.models.OutboundRule; @@ -24,6 +26,10 @@ public final class ManagedNetworkSettingsImpl implements ManagedNetworkSettings this.serviceManager = serviceManager; } + public Boolean enableNetworkMonitor() { + return this.innerModel().enableNetworkMonitor(); + } + public IsolationMode isolationMode() { return this.innerModel().isolationMode(); } @@ -50,6 +56,18 @@ public ManagedNetworkProvisionStatus status() { } } + public FirewallSku firewallSku() { + return this.innerModel().firewallSku(); + } + + public ManagedNetworkKind managedNetworkKind() { + return this.innerModel().managedNetworkKind(); + } + + public String firewallPublicIpAddress() { + return this.innerModel().firewallPublicIpAddress(); + } + public ManagedNetworkSettingsInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsClientImpl.java new file mode 100644 index 000000000000..de4262ebd489 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsClientImpl.java @@ -0,0 +1,933 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.BinaryData; +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.machinelearning.fluent.ManagedNetworkSettingsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.ManagedNetworkListResult; +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 ManagedNetworkSettingsOperationsClient. + */ +public final class ManagedNetworkSettingsOperationsClientImpl implements ManagedNetworkSettingsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedNetworkSettingsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of ManagedNetworkSettingsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedNetworkSettingsOperationsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(ManagedNetworkSettingsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientManagedNetworkSettingsOperations to be + * used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientManagedNetworkSettingsOperations") + public interface ManagedNetworkSettingsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> put(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response putSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> patch(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response patchSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getWithResponseAsync(String resourceGroupName, String workspaceName, String managedNetworkName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, + String workspaceName, String managedNetworkName) { + return getWithResponseAsync(resourceGroupName, workspaceName, managedNetworkName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String managedNetworkName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, accept, context); + } + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNetworkSettingsPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String managedNetworkName) { + return getWithResponse(resourceGroupName, workspaceName, managedNetworkName, Context.NONE).getValue(); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> putWithResponseAsync(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.put(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response putWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, contentType, accept, body, Context.NONE); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response putWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.putSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, contentType, accept, body, context); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPutAsync(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body) { + Mono>> mono + = putWithResponseAsync(resourceGroupName, workspaceName, managedNetworkName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPut(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body) { + Response response = putWithResponse(resourceGroupName, workspaceName, managedNetworkName, body); + return this.client + .getLroResult( + response, ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, Context.NONE); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPut(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context) { + Response response + = putWithResponse(resourceGroupName, workspaceName, managedNetworkName, body, context); + return this.client + .getLroResult( + response, ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, context); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putAsync(String resourceGroupName, + String workspaceName, String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body) { + return beginPutAsync(resourceGroupName, workspaceName, managedNetworkName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNetworkSettingsPropertiesBasicResourceInner put(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body) { + return beginPut(resourceGroupName, workspaceName, managedNetworkName, body).getFinalResult(); + } + + /** + * PUT API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNetworkSettingsPropertiesBasicResourceInner put(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context) { + return beginPut(resourceGroupName, workspaceName, managedNetworkName, body, context).getFinalResult(); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> patchWithResponseAsync(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response patchWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body) { + final String accept = "application/json"; + return service.patchSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, accept, body, + Context.NONE); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response patchWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context) { + final String accept = "application/json"; + return service.patchSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, accept, body, + context); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPatchAsync(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body) { + Mono>> mono + = patchWithResponseAsync(resourceGroupName, workspaceName, managedNetworkName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPatchAsync(String resourceGroupName, String workspaceName, String managedNetworkName) { + final ManagedNetworkSettingsPropertiesBasicResourceInner body = null; + Mono>> mono + = patchWithResponseAsync(resourceGroupName, workspaceName, managedNetworkName, body); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPatch(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body) { + Response response = patchWithResponse(resourceGroupName, workspaceName, managedNetworkName, body); + return this.client + .getLroResult( + response, ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, Context.NONE); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPatch(String resourceGroupName, String workspaceName, String managedNetworkName) { + final ManagedNetworkSettingsPropertiesBasicResourceInner body = null; + Response response = patchWithResponse(resourceGroupName, workspaceName, managedNetworkName, body); + return this.client + .getLroResult( + response, ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, Context.NONE); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only + * resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, ManagedNetworkSettingsPropertiesBasicResourceInner> + beginPatch(String resourceGroupName, String workspaceName, String managedNetworkName, + ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context) { + Response response + = patchWithResponse(resourceGroupName, workspaceName, managedNetworkName, body, context); + return this.client + .getLroResult( + response, ManagedNetworkSettingsPropertiesBasicResourceInner.class, + ManagedNetworkSettingsPropertiesBasicResourceInner.class, context); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono patchAsync(String resourceGroupName, + String workspaceName, String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body) { + return beginPatchAsync(resourceGroupName, workspaceName, managedNetworkName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono patchAsync(String resourceGroupName, + String workspaceName, String managedNetworkName) { + final ManagedNetworkSettingsPropertiesBasicResourceInner body = null; + return beginPatchAsync(resourceGroupName, workspaceName, managedNetworkName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNetworkSettingsPropertiesBasicResourceInner patch(String resourceGroupName, String workspaceName, + String managedNetworkName) { + final ManagedNetworkSettingsPropertiesBasicResourceInner body = null; + return beginPatch(resourceGroupName, workspaceName, managedNetworkName, body).getFinalResult(); + } + + /** + * Patch API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 managedNetworkSettingsPropertiesBasicResource is a preview-only resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedNetworkSettingsPropertiesBasicResourceInner patch(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsPropertiesBasicResourceInner body, Context context) { + return beginPatch(resourceGroupName, workspaceName, managedNetworkName, body, context).getFinalResult(); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSinglePageAsync(String resourceGroupName, String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the managed network settings for a machine learning workspace. + * + * 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsImpl.java new file mode 100644 index 000000000000..2cfc410dd0cd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsImpl.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.ManagedNetworkSettingsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsOperations; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsPropertiesBasicResource; + +public final class ManagedNetworkSettingsOperationsImpl implements ManagedNetworkSettingsOperations { + private static final ClientLogger LOGGER = new ClientLogger(ManagedNetworkSettingsOperationsImpl.class); + + private final ManagedNetworkSettingsOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ManagedNetworkSettingsOperationsImpl(ManagedNetworkSettingsOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String managedNetworkName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, managedNetworkName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ManagedNetworkSettingsPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public ManagedNetworkSettingsPropertiesBasicResource get(String resourceGroupName, String workspaceName, + String managedNetworkName) { + ManagedNetworkSettingsPropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, managedNetworkName); + if (inner != null) { + return new ManagedNetworkSettingsPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, + String workspaceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ManagedNetworkSettingsPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, + String workspaceName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ManagedNetworkSettingsPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public ManagedNetworkSettingsPropertiesBasicResource 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String managedNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "managedNetworks"); + if (managedNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedNetworks'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, managedNetworkName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String managedNetworkName = ResourceManagerUtils.getValueFromIdByName(id, "managedNetworks"); + if (managedNetworkName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedNetworks'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, managedNetworkName, context); + } + + private ManagedNetworkSettingsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public ManagedNetworkSettingsPropertiesBasicResourceImpl define(String name) { + return new ManagedNetworkSettingsPropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java new file mode 100644 index 000000000000..f3bf4ad548ec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsPropertiesBasicResource; + +public final class ManagedNetworkSettingsPropertiesBasicResourceImpl + implements ManagedNetworkSettingsPropertiesBasicResource, ManagedNetworkSettingsPropertiesBasicResource.Definition, + ManagedNetworkSettingsPropertiesBasicResource.Update { + private ManagedNetworkSettingsPropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ManagedNetworkSettingsProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ManagedNetworkSettingsPropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String managedNetworkName; + + public ManagedNetworkSettingsPropertiesBasicResourceImpl withExistingWorkspace(String resourceGroupName, + String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public ManagedNetworkSettingsPropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getManagedNetworkSettingsOperations() + .put(resourceGroupName, workspaceName, managedNetworkName, this.innerModel(), Context.NONE); + return this; + } + + public ManagedNetworkSettingsPropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getManagedNetworkSettingsOperations() + .put(resourceGroupName, workspaceName, managedNetworkName, this.innerModel(), context); + return this; + } + + ManagedNetworkSettingsPropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new ManagedNetworkSettingsPropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.managedNetworkName = name; + } + + public ManagedNetworkSettingsPropertiesBasicResourceImpl update() { + return this; + } + + public ManagedNetworkSettingsPropertiesBasicResource apply() { + this.innerObject = serviceManager.serviceClient() + .getManagedNetworkSettingsOperations() + .patch(resourceGroupName, workspaceName, managedNetworkName, this.innerModel(), Context.NONE); + return this; + } + + public ManagedNetworkSettingsPropertiesBasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getManagedNetworkSettingsOperations() + .patch(resourceGroupName, workspaceName, managedNetworkName, this.innerModel(), context); + return this; + } + + ManagedNetworkSettingsPropertiesBasicResourceImpl(ManagedNetworkSettingsPropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.managedNetworkName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedNetworks"); + } + + public ManagedNetworkSettingsPropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getManagedNetworkSettingsOperations() + .getWithResponse(resourceGroupName, workspaceName, managedNetworkName, Context.NONE) + .getValue(); + return this; + } + + public ManagedNetworkSettingsPropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getManagedNetworkSettingsOperations() + .getWithResponse(resourceGroupName, workspaceName, managedNetworkName, context) + .getValue(); + return this; + } + + public ManagedNetworkSettingsPropertiesBasicResourceImpl + withProperties(ManagedNetworkSettingsProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java index ea48a2334edb..b4d000454d91 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.ManagedNetworkSettingsRulesClient; import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleListResult; +import com.azure.resourcemanager.machinelearning.implementation.models.OutboundRuleListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,861 +51,708 @@ public final class ManagedNetworkSettingsRulesClientImpl implements ManagedNetwo /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ManagedNetworkSettingsRulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ManagedNetworkSettingsRulesClientImpl(AzureMachineLearningWorkspacesImpl client) { + ManagedNetworkSettingsRulesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ManagedNetworkSettingsRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesManagedNetworkSettingsRules to be used + * The interface defining all the services for MachineLearningManagementClientManagedNetworkSettingsRules to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientManagedNetworkSettingsRules") public interface ManagedNetworkSettingsRulesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleName") String ruleName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("ruleName") String ruleName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("ruleName") String ruleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") OutboundRuleBasicResourceInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("ruleName") String ruleName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") OutboundRuleBasicResourceInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("ruleName") String ruleName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("ruleName") String ruleName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("ruleName") String ruleName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("ruleName") String ruleName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("ruleName") String ruleName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OutboundRuleBasicResourceInner body, @HeaderParam("Accept") String accept, - Context context); + @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); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String ruleName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, ruleName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return an outbound rule from the managed network of a machine learning workspace on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the managed network outbound rules for a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String workspaceName, + String ruleName) { + return getWithResponseAsync(resourceGroupName, workspaceName, ruleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedFlux}. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String ruleName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, ruleName, accept, context); } /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. + * @return an outbound rule from the managed network of a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName) { + return getWithResponse(resourceGroupName, workspaceName, ruleName, Context.NONE).getValue(); } /** - * Lists the managed network outbound rules for a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, ruleName, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String ruleName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String ruleName, OutboundRuleBasicResourceInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, ruleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, ruleName, contentType, accept, body, + Context.NONE); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String ruleName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String ruleName, OutboundRuleBasicResourceInner body, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, ruleName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, ruleName, contentType, accept, body, + context); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String ruleName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, ruleName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + private PollerFlux, OutboundRuleBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String ruleName, + OutboundRuleBasicResourceInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, this.client.getContext()); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @param context The context to associate with this operation. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String ruleName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, ruleName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleName, body); + return this.client.getLroResult(response, + OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, Context.NONE); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String ruleName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, ruleName).getSyncPoller(); + public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, ruleName, body, context); + return this.client.getLroResult(response, + OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, context); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @param context The context to associate with this operation. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String ruleName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, ruleName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String ruleName, OutboundRuleBasicResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleName) { - return beginDeleteAsync(resourceGroupName, workspaceName, ruleName).last() - .flatMap(this.client::getLroFinalResultOrError); + public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String ruleName, OutboundRuleBasicResourceInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, ruleName, body).getFinalResult(); } /** - * Deletes an outbound rule from the managed network of a machine learning workspace. + * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, ruleName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String ruleName, OutboundRuleBasicResourceInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, ruleName, body, context).getFinalResult(); } /** * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String workspaceName, String ruleName) { - deleteAsync(resourceGroupName, workspaceName, ruleName).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String ruleName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, ruleName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @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 void delete(String resourceGroupName, String workspaceName, String ruleName, Context context) { - deleteAsync(resourceGroupName, workspaceName, ruleName, context).block(); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, ruleName, Context.NONE); } /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. + * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, ruleName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String ruleName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, ruleName, context); } /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName 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(), resourceGroupName, workspaceName, - ruleName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String ruleName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, ruleName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an outbound rule from the managed network of a machine learning workspace on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + Response response = deleteWithResponse(resourceGroupName, workspaceName, ruleName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. * @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 an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String ruleName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, ruleName, context).block(); + Response response = deleteWithResponse(resourceGroupName, workspaceName, ruleName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an outbound rule from the managed network of a machine learning workspace. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String ruleName) { - return getWithResponse(resourceGroupName, workspaceName, ruleName, Context.NONE).getValue(); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String ruleName) { + return beginDeleteAsync(resourceGroupName, workspaceName, ruleName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return outbound Rule Basic Resource for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, ruleName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public void delete(String resourceGroupName, String workspaceName, String ruleName) { + beginDelete(resourceGroupName, workspaceName, ruleName).getFinalResult(); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (ruleName == null) { - return Mono.error(new IllegalArgumentException("Parameter ruleName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, ruleName, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String ruleName, Context context) { + beginDelete(resourceGroupName, workspaceName, ruleName, context).getFinalResult(); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OutboundRuleBasicResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OutboundRuleBasicResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String ruleName, - OutboundRuleBasicResourceInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, ruleName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, - context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String ruleName, OutboundRuleBasicResourceInner body, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).getSyncPoller(); + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 outbound Rule Basic Resource for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 outbound Rule Basic Resource for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return outbound Rule Basic Resource for the managed network of a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body).block(); - } - - /** - * Creates or updates an outbound rule in the managed network of a machine learning workspace. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param body Outbound Rule to be created or updated in the managed network of a machine learning workspace. - * @param context The context to associate with this operation. + * @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 outbound Rule Basic Resource for the managed network of a machine learning workspace. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, - String ruleName, OutboundRuleBasicResourceInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, ruleName, body, context).block(); + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); } /** + * Lists the managed network outbound rules for a machine learning workspace. + * * 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 list of outbound rules for the managed network of a machine learning workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * Lists the managed network outbound rules for a machine learning workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -912,23 +760,14 @@ private Mono> listNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java index 4e0e44e021e6..01160dfec8bc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,17 +27,21 @@ public ManagedNetworkSettingsRulesImpl(ManagedNetworkSettingsRulesClient innerCl this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, + String ruleName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OutboundRuleBasicResourceImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + public OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName) { + OutboundRuleBasicResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleName); + if (inner != null) { + return new OutboundRuleBasicResourceImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String ruleName) { @@ -48,25 +52,17 @@ public void delete(String resourceGroupName, String workspaceName, String ruleNa this.serviceClient().delete(resourceGroupName, workspaceName, ruleName, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, - String ruleName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, ruleName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OutboundRuleBasicResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); } - public OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName) { - OutboundRuleBasicResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, ruleName); - if (inner != null) { - return new OutboundRuleBasicResourceImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); } public OutboundRuleBasicResource getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java index 57985f853d60..3adbd079166d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java index 926936abcdd4..9daa43bdccd3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.MarketplaceSubscriptionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.MarketplaceSubscriptionResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,845 +51,684 @@ public final class MarketplaceSubscriptionsClientImpl implements MarketplaceSubs /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of MarketplaceSubscriptionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - MarketplaceSubscriptionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + MarketplaceSubscriptionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(MarketplaceSubscriptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesMarketplaceSubscriptions to be used by + * The interface defining all the services for MachineLearningManagementClientMarketplaceSubscriptions to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientMarketplaceSubscriptions") public interface MarketplaceSubscriptionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MarketplaceSubscriptionInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") MarketplaceSubscriptionInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/marketplaceSubscriptions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MarketplaceSubscriptionInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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 paginated list of MarketplaceSubscription entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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 paginated list of MarketplaceSubscription entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String skip, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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 paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, MarketplaceSubscriptionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during 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. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, MarketplaceSubscriptionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, + this.client.getContext()); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + public SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, + MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, Context.NONE); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during 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. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + public SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, + MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, context); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, MarketplaceSubscriptionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body).getFinalResult(); } /** - * Delete Marketplace Subscription (asynchronous). + * Create or update Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param body Marketplace Subscription entity to apply during 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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + MarketplaceSubscriptionInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body, context).getFinalResult(); } /** * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get container. + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container 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 container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, Context.NONE); } /** - * Get container. + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container 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 container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** - * Get container. + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container 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 container on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get container. + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container 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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get container. + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container 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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceSubscriptionInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update Marketplace Subscription (asynchronous). + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, MarketplaceSubscriptionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update Marketplace Subscription (asynchronous). + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, MarketplaceSubscriptionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String name) { + beginDelete(resourceGroupName, workspaceName, name).getFinalResult(); } /** - * Create or update Marketplace Subscription (asynchronous). + * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MarketplaceSubscriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + beginDelete(resourceGroupName, workspaceName, name, context).getFinalResult(); } /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of MarketplaceSubscription entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, MarketplaceSubscriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), MarketplaceSubscriptionInner.class, MarketplaceSubscriptionInner.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, 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())); } /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MarketplaceSubscriptionInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, MarketplaceSubscriptionInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of MarketplaceSubscription entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, MarketplaceSubscriptionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of MarketplaceSubscription entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, MarketplaceSubscriptionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace 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 azure Resource Manager resource envelope. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update Marketplace Subscription (asynchronous). + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. - * @param body Marketplace Subscription entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - MarketplaceSubscriptionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -900,13 +740,6 @@ public MarketplaceSubscriptionInner createOrUpdate(String resourceGroupName, Str */ @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(), @@ -915,6 +748,28 @@ private Mono> listNextSinglePageAsyn } /** + * List containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of MarketplaceSubscription entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -922,23 +777,14 @@ private Mono> listNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of MarketplaceSubscription entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a paginated list of MarketplaceSubscription entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java index 6ff1a2cd38b0..bd13da31d930 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,16 +27,21 @@ public MarketplaceSubscriptionsImpl(MarketplaceSubscriptionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MarketplaceSubscriptionImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(inner1, this.manager())); + public MarketplaceSubscription get(String resourceGroupName, String workspaceName, String name) { + MarketplaceSubscriptionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new MarketplaceSubscriptionImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -47,25 +52,16 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MarketplaceSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(inner1, this.manager())); } - public MarketplaceSubscription get(String resourceGroupName, String workspaceName, String name) { - MarketplaceSubscriptionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new MarketplaceSubscriptionImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MarketplaceSubscriptionImpl(inner1, this.manager())); } public MarketplaceSubscription getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java index de2c051030fd..7ce9ba90d8db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java index 493e45b64264..3ee83e366211 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,8 +30,8 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.implementation.models.ModelContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; import reactor.core.publisher.Mono; /** @@ -46,66 +46,102 @@ public final class ModelContainersClientImpl implements ModelContainersClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ModelContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - ModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + ModelContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelContainers to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for MachineLearningManagementClientModelContainers to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientModelContainers") public interface ModelContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("count") Integer count, @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ModelContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ModelContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @QueryParam("count") Integer count, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelContainerInner body, @HeaderParam("Accept") String accept, + @QueryParam("$skip") String skip, @QueryParam("count") Integer count, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -113,229 +149,175 @@ Mono> createOrUpdate(@HostParam("$host") String en @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), skip, count, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, Integer count, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, count, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. + * @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 paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * List model containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ModelContainerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List model containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + ModelContainerInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List model containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, ModelContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ModelContainerInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** @@ -344,37 +326,17 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @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 workspaceName, String name, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - workspaceName, name, this.client.getApiVersion(), accept, context); + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -408,7 +370,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** @@ -427,309 +390,205 @@ public void delete(String resourceGroupName, String workspaceName, String name) } /** - * Get container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, Integer count, ListViewType listViewType) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, count, listViewType, 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 container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + Integer count, ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Get container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ModelContainerInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, Integer count, ListViewType listViewType) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, count, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ModelContainerInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, Integer count, ListViewType listViewType, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, count, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - ModelContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final Integer count = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, count, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, ModelContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Integer count, ListViewType listViewType, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, skip, count, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Create or update container. + * List model containers. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. + * 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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ModelContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List model containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink) { 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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List model containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -737,22 +596,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java index 20efa5792028..784ac67469fa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,16 +28,21 @@ public ModelContainersImpl(ModelContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ModelContainerImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Integer count, ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, count, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + public ModelContainer get(String resourceGroupName, String workspaceName, String name) { + ModelContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ModelContainerImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -49,25 +54,16 @@ public void delete(String resourceGroupName, String workspaceName, String name) this.serviceClient().delete(resourceGroupName, workspaceName, name); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); } - public ModelContainer get(String resourceGroupName, String workspaceName, String name) { - ModelContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ModelContainerImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Integer count, ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, count, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); } public ModelContainer getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java index f3f0d5289c5c..7edf28d311fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java index 97bef5abd7d3..53052304feb5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,15 +28,16 @@ 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.BinaryData; 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.machinelearning.fluent.ModelVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.implementation.models.ModelVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -53,469 +54,318 @@ public final class ModelVersionsClientImpl implements ModelVersionsClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ModelVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ModelVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelVersions to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientModelVersions to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientModelVersions") public interface ModelVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, - @QueryParam("version") String version, @QueryParam("description") String description, - @QueryParam("offset") Integer offset, @QueryParam("tags") String tags, - @QueryParam("properties") String properties, @QueryParam("feed") String feed, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ModelVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ModelVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$skip") String skip, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("version") String version, + @QueryParam("description") String description, @QueryParam("offset") Integer offset, + @QueryParam("tags") String tags, @QueryParam("properties") String properties, + @QueryParam("feed") String feed, @QueryParam("listViewType") ListViewType listViewType, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ModelVersionInner body, + @PathParam("name") String name, @QueryParam("$skip") String skip, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("version") String version, + @QueryParam("description") String description, @QueryParam("offset") Integer offset, + @QueryParam("tags") String tags, @QueryParam("properties") String properties, + @QueryParam("feed") String feed, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/publish") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> publish(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> publish(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DestinationAsset body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/publish") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response publishSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @BodyParam("application/json") DestinationAsset body, + 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String skip, String orderBy, Integer top, String version, String description, Integer offset, - String tags, String properties, String feed, ListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), skip, orderBy, top, version, - description, offset, tags, properties, feed, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, String skip, String orderBy, Integer top, String version, String description, Integer offset, - String tags, String properties, String feed, ListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, name, - this.client.getApiVersion(), skip, orderBy, top, version, description, offset, tags, properties, feed, - listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, - String properties, String feed, ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, - version, description, offset, tags, properties, feed, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final Integer offset = null; - final String tags = null; - final String properties = null; - final String feed = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, - version, description, offset, tags, properties, feed, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, - String properties, String feed, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, - offset, tags, properties, feed, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final Integer offset = null; - final String tags = null; - final String properties = null; - final String feed = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, - description, offset, tags, properties, feed, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, version, accept, context); } /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, - String properties, String feed, ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, version, - description, offset, tags, properties, feed, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { + return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, String version, ModelVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, - String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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, - workspaceName, name, version, this.client.getApiVersion(), accept, context); + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + String version, ModelVersionInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String name, String version, ModelVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + public ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, + ModelVersionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) + .getValue(); } /** @@ -528,14 +378,19 @@ public Response deleteWithResponse(String resourceGroupName, String worksp * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name, + String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -544,41 +399,16 @@ public void delete(String resourceGroupName, String workspaceName, String 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 version along with {@link Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) + .flatMap(ignored -> Mono.empty()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -588,40 +418,17 @@ private Mono> getWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, workspaceName, - name, version, this.client.getApiVersion(), accept, context); + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. @@ -630,209 +437,231 @@ private Mono> getWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, String version) { + deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); } /** - * Get version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Model version. + * @param description Model description. + * @param offset Number of initial results to skip. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param feed Name of the feed. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, String skip, String orderBy, Integer top, String version, String description, Integer offset, + String tags, String properties, String feed, ListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, orderBy, top, version, + description, offset, tags, properties, feed, listViewType, 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 version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Model version. + * @param description Model description. + * @param offset Number of initial results to skip. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param feed Name of the feed. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, + String properties, String feed, ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, + version, description, offset, tags, properties, feed, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ModelVersionInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final Integer offset = null; + final String tags = null; + final String properties = null; + final String feed = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, skip, orderBy, top, + version, description, offset, tags, properties, feed, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Model version. + * @param description Model description. + * @param offset Number of initial results to skip. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param feed Name of the feed. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, String version, ModelVersionInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String name, + String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, + String properties, String feed, ListViewType listViewType) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, + orderBy, top, version, description, offset, tags, properties, feed, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Model version. + * @param description Model description. + * @param offset Number of initial results to skip. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param feed Name of the feed. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - String version, ModelVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String name, + String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, + String properties, String feed, ListViewType listViewType, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, skip, + orderBy, top, version, description, offset, tags, properties, feed, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response}. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, - String name, String version, ModelVersionInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final Integer offset = null; + final String tags = null; + final String properties = null; + final String feed = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, name, skip, orderBy, top, + version, description, offset, tags, properties, feed, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Model version. + * @param description Model description. + * @param offset Number of initial results to skip. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param feed Name of the feed. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate(String resourceGroupName, String workspaceName, String name, String version, - ModelVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + String skip, String orderBy, Integer top, String version, String description, Integer offset, String tags, + String properties, String feed, ListViewType listViewType, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, + offset, tags, properties, feed, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -840,8 +669,8 @@ public ModelVersionInner createOrUpdate(String resourceGroupName, String workspa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -851,36 +680,11 @@ public ModelVersionInner createOrUpdate(String resourceGroupName, String workspa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, version, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.publish(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -889,48 +693,21 @@ private Mono>> publishWithResponseAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> publishWithResponseAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.publish(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, version, this.client.getApiVersion(), body, accept, context); + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + Context.NONE); } /** @@ -938,21 +715,22 @@ private Mono>> publishWithResponseAsync(String resourc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body) { - Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response publishWithResponse(String resourceGroupName, String workspaceName, String name, + String version, DestinationAsset body, Context context) { + final String contentType = "application/json"; + return service.publishSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, version, contentType, body, + context); } /** @@ -960,10 +738,9 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. - * @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. @@ -971,12 +748,11 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPublishAsync(String resourceGroupName, String workspaceName, - String name, String version, DestinationAsset body, Context context) { - context = this.client.mergeContext(context); + String name, String version, DestinationAsset body) { Mono>> mono - = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context); + = publishWithResponseAsync(resourceGroupName, workspaceName, name, version, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -984,8 +760,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -995,7 +771,8 @@ private PollerFlux, Void> beginPublishAsync(String resourceGrou @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body).getSyncPoller(); + Response response = publishWithResponse(resourceGroupName, workspaceName, name, version, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1003,8 +780,8 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1015,7 +792,9 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPublish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - return this.beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).getSyncPoller(); + Response response + = publishWithResponse(resourceGroupName, workspaceName, name, version, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1023,8 +802,8 @@ public SyncPoller, Void> beginPublish(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1043,29 +822,8 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Destination registry info. - * @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 publishAsync(String resourceGroupName, String workspaceName, String name, String version, - DestinationAsset body, Context context) { - return beginPublishAsync(resourceGroupName, workspaceName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Publish version asset into registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1074,7 +832,7 @@ private Mono publishAsync(String resourceGroupName, String workspaceName, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body) { - publishAsync(resourceGroupName, workspaceName, name, version, body).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body).getFinalResult(); } /** @@ -1082,8 +840,8 @@ public void publish(String resourceGroupName, String workspaceName, String name, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1093,10 +851,12 @@ public void publish(String resourceGroupName, String workspaceName, String name, @ServiceMethod(returns = ReturnType.SINGLE) public void publish(String resourceGroupName, String workspaceName, String name, String version, DestinationAsset body, Context context) { - publishAsync(resourceGroupName, workspaceName, name, version, body, context).block(); + beginPublish(resourceGroupName, workspaceName, name, version, body, context).getFinalResult(); } /** + * List model versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1108,13 +868,6 @@ public void publish(String resourceGroupName, String workspaceName, String name, */ @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(), @@ -1123,6 +876,28 @@ private Mono> listNextSinglePageAsync(String ne } /** + * List model versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List model versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1130,22 +905,14 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java index f1fe269b5996..b35918054a99 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,18 +29,21 @@ public ModelVersionsImpl(ModelVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ModelVersionImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, - String feed, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, - properties, feed, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + public ModelVersion get(String resourceGroupName, String workspaceName, String name, String version) { + ModelVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); + if (inner != null) { + return new ModelVersionImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, @@ -52,25 +55,18 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, version); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); } - public ModelVersion get(String resourceGroupName, String workspaceName, String name, String version) { - ModelVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ModelVersionImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, + String feed, ListViewType listViewType, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, skip, orderBy, top, version, description, offset, tags, + properties, feed, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); } public void publish(String resourceGroupName, String workspaceName, String name, String version, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java index d606c9997543..f9da2132cbb9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -18,28 +18,24 @@ public final class NotebookAccessTokenResultImpl implements NotebookAccessTokenR this.serviceManager = serviceManager; } - public String notebookResourceId() { - return this.innerModel().notebookResourceId(); - } - - public String hostname() { - return this.innerModel().hostname(); + public String accessToken() { + return this.innerModel().accessToken(); } - public String publicDns() { - return this.innerModel().publicDns(); + public Integer expiresIn() { + return this.innerModel().expiresIn(); } - public String accessToken() { - return this.innerModel().accessToken(); + public String hostname() { + return this.innerModel().hostname(); } - public String tokenType() { - return this.innerModel().tokenType(); + public String notebookResourceId() { + return this.innerModel().notebookResourceId(); } - public Integer expiresIn() { - return this.innerModel().expiresIn(); + public String publicDns() { + return this.innerModel().publicDns(); } public String refreshToken() { @@ -50,6 +46,10 @@ public String scope() { return this.innerModel().scope(); } + public String tokenType() { + return this.innerModel().tokenType(); + } + public NotebookAccessTokenResultInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java index a4f232ff10d3..4af86505b175 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -23,14 +23,18 @@ public String fqdn() { return this.innerModel().fqdn(); } - public String resourceId() { - return this.innerModel().resourceId(); + public Boolean isPrivateLinkEnabled() { + return this.innerModel().isPrivateLinkEnabled(); } public NotebookPreparationError notebookPreparationError() { return this.innerModel().notebookPreparationError(); } + public String resourceId() { + return this.innerModel().resourceId(); + } + public NotebookResourceInfoInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java index 1219e37c4d82..70bc06986692 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -55,14 +55,14 @@ public OnlineDeploymentProperties properties() { return this.innerModel().properties(); } - public String kind() { - return this.innerModel().kind(); - } - public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public String kind() { + return this.innerModel().kind(); + } + public Sku sku() { return this.innerModel().sku(); } @@ -210,13 +210,13 @@ public OnlineDeploymentImpl withTags(Map tags) { } } - public OnlineDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); + public OnlineDeploymentImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public OnlineDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public OnlineDeploymentImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } @@ -231,6 +231,6 @@ public OnlineDeploymentImpl withSku(PartialSku sku) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java index 4e71103e1745..baf2e50b5917 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -37,10 +38,10 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.OnlineDeploymentTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.SkuResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -57,752 +58,518 @@ public final class OnlineDeploymentsClientImpl implements OnlineDeploymentsClien /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of OnlineDeploymentsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OnlineDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OnlineDeploymentsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(OnlineDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineDeployments to be used by the + * The interface defining all the services for MachineLearningManagementClientOnlineDeployments to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientOnlineDeployments") public interface OnlineDeploymentsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OnlineDeploymentInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OnlineDeploymentInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getLogs(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentLogsRequest body, Context context); - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getLogsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") OnlineDeploymentInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DeploymentLogsRequest body, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogs(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listSkus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DeploymentLogsRequest body, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSkusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("endpointName") String endpointName, @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + @QueryParam("count") Integer count, @QueryParam("$skip") String skip, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkusNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), orderBy, top, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String orderBy, Integer top, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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(), resourceGroupName, workspaceName, - endpointName, this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint 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 paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint 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 paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSkusNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @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 paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - String endpointName, String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSkusNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment 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}. + * @return inference Deployment Deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName 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, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return inference Deployment Deployment along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, deploymentName, accept, context); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return inference Deployment Deployment. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. + * @param body Inference Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, OnlineDeploymentInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, Context.NONE); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, OnlineDeploymentInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context); } /** - * Delete Inference Endpoint Deployment (asynchronous). + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. + * @param body Inference Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + OnlineDeploymentInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, + this.client.getContext()); } /** - * Get Inference Deployment Deployment. + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during 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 inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + OnlineDeploymentInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(response, + OnlineDeploymentInner.class, OnlineDeploymentInner.class, Context.NONE); } /** - * Get Inference Deployment Deployment. + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during 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 inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName 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(), resourceGroupName, workspaceName, - endpointName, deploymentName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + OnlineDeploymentInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return this.client.getLroResult(response, + OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); } /** - * Get Inference Deployment Deployment. + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during 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 inference Deployment Deployment on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, OnlineDeploymentInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get Inference Deployment Deployment. + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. + * @param body Inference Endpoint entity to apply during 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 inference Deployment Deployment along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); + public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body) + .getFinalResult(); } /** - * Get Inference Deployment Deployment. + * Create or update Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param body Inference Endpoint entity to apply during 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 inference Deployment Deployment. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner get(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); + public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, OnlineDeploymentInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .getFinalResult(); } /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -810,125 +577,104 @@ private Mono>> updateWithResponseAsync(String resource * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, Context.NONE); } /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context); } /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - PartialMinimalTrackedResourceWithSku body, Context context) { - context = this.client.mergeContext(context); + PartialMinimalTrackedResourceWithSku body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); + this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, + this.client.getContext()); } /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body); + return this.client.getLroResult(response, + OnlineDeploymentInner.class, OnlineDeploymentInner.class, Context.NONE); } /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during operation. @@ -936,28 +682,32 @@ public SyncPoller, OnlineDeploymentInner> begi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OnlineDeploymentInner> beginUpdate(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + return this.client.getLroResult(response, + OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); } /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, @@ -970,395 +720,393 @@ private Mono updateAsync(String resourceGroupName, String * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, PartialMinimalTrackedResourceWithSku body) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body).getFinalResult(); } /** * Update Online Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param body Online Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); + String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) + .getFinalResult(); } /** - * Update Online Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner update(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, PartialMinimalTrackedResourceWithSku body, Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + Context.NONE); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, OnlineDeploymentInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, context); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment 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 resourceGroupName, String workspaceName, String endpointName, + String deploymentName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + beginDelete(resourceGroupName, workspaceName, endpointName, deploymentName).getFinalResult(); + } + + /** + * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during 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, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, - endpointName, deploymentName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + beginDelete(resourceGroupName, workspaceName, endpointName, deploymentName, context).getFinalResult(); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, orderBy, top, skip, + 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())); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - OnlineDeploymentInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint 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 response body on successful completion of {@link Mono}. + * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, OnlineDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, OnlineDeploymentInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, orderBy, top, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. + * @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. + * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, orderBy, top, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Inference Endpoint Deployment (asynchronous). + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint 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 response. + * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, OnlineDeploymentInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Polls an Endpoint operation. + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. + * @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}. + * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLogsWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, DeploymentLogsRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, String orderBy, Integer top, String skip, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. - * @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. @@ -1366,46 +1114,23 @@ private Mono> getLogsWithResponseAsync(String reso */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getLogsWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, DeploymentLogsRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + String endpointName, String deploymentName, DeploymentLogsRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getLogs(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, deploymentName, this.client.getApiVersion(), body, accept, context); + return FluxUtil + .withContext(context -> service.getLogs(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1423,9 +1148,9 @@ private Mono getLogsAsync(String resourceGroupName, String * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1436,17 +1161,20 @@ private Mono getLogsAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public Response getLogsWithResponse(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, DeploymentLogsRequest body, Context context) { - return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getLogsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, + contentType, accept, body, context); } /** * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1464,8 +1192,8 @@ public DeploymentLogsInner getLogs(String resourceGroupName, String workspaceNam * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param count Number of Skus to be retrieved in a page of results. * @param skip Continuation token for pagination. @@ -1478,31 +1206,10 @@ public DeploymentLogsInner getLogs(String resourceGroupName, String workspaceNam @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusSinglePageAsync(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Integer count, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, deploymentName, this.client.getApiVersion(), count, + .withContext(context -> service.listSkus(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -1513,60 +1220,31 @@ private Mono> listSkusSinglePageAsync(String res * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param count Number of Skus to be retrieved in a page of results. * @param skip Continuation token for pagination. - * @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 paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync(String resourceGroupName, - String workspaceName, String endpointName, String deploymentName, Integer count, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSkus(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, - endpointName, deploymentName, this.client.getApiVersion(), count, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Integer count, String skip) { + return new PagedFlux<>( + () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), + nextLink -> listSkusNextSinglePageAsync(nextLink)); } /** * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1574,7 +1252,9 @@ private Mono> listSkusSinglePageAsync(String res */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName, Integer count, String skip) { + String endpointName, String deploymentName) { + final Integer count = null; + final String skip = null; return new PagedFlux<>( () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), nextLink -> listSkusNextSinglePageAsync(nextLink)); @@ -1584,30 +1264,33 @@ private PagedFlux listSkusAsync(String resourceGroupName, Stri * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of SkuResource entities as paginated response with {@link PagedFlux}. + * @return a paginated list of SkuResource entities along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, - String endpointName, String deploymentName) { - final Integer count = null; - final String skip = null; - return new PagedFlux<>( - () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), - nextLink -> listSkusNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSkusSinglePage(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName, Integer count, String skip) { + final String accept = "application/json"; + Response res = service.listSkusSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, deploymentName, count, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param count Number of Skus to be retrieved in a page of results. * @param skip Continuation token for pagination. @@ -1615,21 +1298,25 @@ private PagedFlux listSkusAsync(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of SkuResource entities as paginated response with {@link PagedFlux}. + * @return a paginated list of SkuResource entities along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync(String resourceGroupName, String workspaceName, + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSkusSinglePage(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Integer count, String skip, Context context) { - return new PagedFlux<>(() -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, - deploymentName, count, skip, context), nextLink -> listSkusNextSinglePageAsync(nextLink, context)); + final String accept = "application/json"; + Response res = service.listSkusSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + endpointName, deploymentName, count, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1642,15 +1329,16 @@ public PagedIterable listSkus(String resourceGroupName, String final Integer count = null; final String skip = null; return new PagedIterable<>( - listSkusAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip)); + () -> listSkusSinglePage(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), + nextLink -> listSkusNextSinglePage(nextLink)); } /** * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param count Number of Skus to be retrieved in a page of results. * @param skip Continuation token for pagination. @@ -1663,11 +1351,13 @@ public PagedIterable listSkus(String resourceGroupName, String @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSkus(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Integer count, String skip, Context context) { - return new PagedIterable<>( - listSkusAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context)); + return new PagedIterable<>(() -> listSkusSinglePage(resourceGroupName, workspaceName, endpointName, + deploymentName, count, skip, context), nextLink -> listSkusNextSinglePage(nextLink, context)); } /** + * List Inference Endpoint Deployments. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1679,13 +1369,6 @@ public PagedIterable listSkus(String resourceGroupName, String */ @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(), @@ -1694,6 +1377,28 @@ private Mono> listNextSinglePageAsync(Strin } /** + * List Inference Endpoint Deployments. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Endpoint Deployments. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1701,26 +1406,20 @@ private Mono> listNextSinglePageAsync(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 a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List Inference Endpoint Deployment Skus. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1732,13 +1431,6 @@ private Mono> listNextSinglePageAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusNextSinglePageAsync(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.listSkusNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1748,6 +1440,28 @@ private Mono> listSkusNextSinglePageAsync(String } /** + * List Inference Endpoint Deployment Skus. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSkusNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listSkusNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Inference Endpoint Deployment Skus. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1755,22 +1469,14 @@ private Mono> listSkusNextSinglePageAsync(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 a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of SkuResource entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusNextSinglePageAsync(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.")); - } + private PagedResponse listSkusNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSkusNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listSkusNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java index 9232468ea4ce..d104b080a0e6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -32,38 +32,12 @@ public OnlineDeploymentsImpl(OnlineDeploymentsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, - Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OnlineDeploymentImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OnlineDeploymentImpl(inner.getValue(), this.manager())); } public OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, @@ -77,16 +51,34 @@ public OnlineDeployment get(String resourceGroupName, String workspaceName, Stri } } + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); + } + public Response getLogsWithResponse(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, DeploymentLogsRequest body, Context context) { Response inner = this.serviceClient() .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DeploymentLogsImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeploymentLogsImpl(inner.getValue(), this.manager())); } public DeploymentLogs getLogs(String resourceGroupName, String workspaceName, String endpointName, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java index 26821fa97776..367a9b9bd8a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -55,14 +55,14 @@ public OnlineEndpointProperties properties() { return this.innerModel().properties(); } - public String kind() { - return this.innerModel().kind(); - } - public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public String kind() { + return this.innerModel().kind(); + } + public Sku sku() { return this.innerModel().sku(); } @@ -220,13 +220,13 @@ public OnlineEndpointImpl withTags(Map tags) { } } - public OnlineEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); + public OnlineEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public OnlineEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public OnlineEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } @@ -241,6 +241,6 @@ public OnlineEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java index bba062523c75..94f94fb3dd55 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -37,8 +38,8 @@ import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; +import com.azure.resourcemanager.machinelearning.implementation.models.OnlineEndpointTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.OrderString; import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; @@ -58,740 +59,492 @@ public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of OnlineEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OnlineEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OnlineEndpointsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(OnlineEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineEndpoints to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for MachineLearningManagementClientOnlineEndpoints to be used by the + * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientOnlineEndpoints") public interface OnlineEndpointsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("name") String name, - @QueryParam("count") Integer count, @QueryParam("computeType") EndpointComputeType computeType, - @QueryParam("$skip") String skip, @QueryParam("tags") String tags, - @QueryParam("properties") String properties, @QueryParam("orderBy") OrderString orderBy, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") OnlineEndpointInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") OnlineEndpointInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("name") String name, @QueryParam("count") Integer count, + @QueryParam("computeType") EndpointComputeType computeType, @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, @QueryParam("properties") String properties, + @QueryParam("orderBy") OrderString orderBy, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("name") String name, @QueryParam("count") Integer count, + @QueryParam("computeType") EndpointComputeType computeType, @QueryParam("$skip") String skip, + @QueryParam("tags") String tags, @QueryParam("properties") String properties, + @QueryParam("orderBy") OrderString orderBy, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineEndpointInner body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> regenerateKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegenerateEndpointKeysRequest body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RegenerateEndpointKeysRequest body, Context context); + + @Headers({ "Accept: application/json;q=0.9" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response regenerateKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Content-Type") String contentType, + @BodyParam("application/json") RegenerateEndpointKeysRequest body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getToken(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getToken(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getTokenSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), name, count, computeType, skip, tags, - properties, orderBy, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), name, count, computeType, skip, tags, properties, orderBy, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, - skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String name = null; - final Integer count = null; - final EndpointComputeType computeType = null; - final String skip = null; - final String tags = null; - final String properties = null; - final OrderString orderBy = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, - skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, - skip, tags, properties, orderBy, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String name = null; - final Integer count = null; - final EndpointComputeType computeType = null; - final String skip = null; - final String tags = null; - final String properties = null; - final OrderString orderBy = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @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 paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, count, computeType, skip, tags, - properties, orderBy, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Delete Online Endpoint (asynchronous). + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return online Endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint 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 resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete Online Endpoint (asynchronous). + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return online Endpoint on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - String endpointName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete Online Endpoint (asynchronous). + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return online Endpoint along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, accept, context); } /** - * Delete Online Endpoint (asynchronous). + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return online Endpoint. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() - .flatMap(this.client::getLroFinalResultOrError); + public OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); } /** - * Delete Online Endpoint (asynchronous). + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. + * @param body Online Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, OnlineEndpointInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Online Endpoint (asynchronous). + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - deleteAsync(resourceGroupName, workspaceName, endpointName).block(); + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, OnlineEndpointInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + Context.NONE); } /** - * Delete Online Endpoint (asynchronous). + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, context).block(); + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String endpointName, OnlineEndpointInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + context); } /** - * Get Online Endpoint. + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 online Endpoint along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); } /** - * Get Online Endpoint. + * Create or update Online Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this + * type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(response, OnlineEndpointInner.class, + OnlineEndpointInner.class, Context.NONE); + } + + /** + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 online Endpoint along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName 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(), resourceGroupName, workspaceName, - endpointName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(response, OnlineEndpointInner.class, + OnlineEndpointInner.class, context); } /** - * Get Online Endpoint. + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 online Endpoint on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String endpointName, OnlineEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Get Online Endpoint. + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. + * @param body Online Endpoint entity to apply during 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 online Endpoint along with {@link Response}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, body).getFinalResult(); } /** - * Get Online Endpoint. + * Create or update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. + * @param body Online Endpoint entity to apply during 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 online Endpoint. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); + public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, + OnlineEndpointInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, endpointName, body, context).getFinalResult(); } /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -799,139 +552,127 @@ private Mono>> updateWithResponseAsync(String resource * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String endpointName, PartialMinimalTrackedResourceWithIdentity body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + Context.NONE); } /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, accept, body, + context); } /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OnlineEndpointInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - context = this.client.mergeContext(context); + String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + = updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, context); + OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); } /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(response, OnlineEndpointInner.class, + OnlineEndpointInner.class, Context.NONE); } /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OnlineEndpointInner> beginUpdate(String resourceGroupName, String workspaceName, String endpointName, PartialMinimalTrackedResourceWithIdentity body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(response, OnlineEndpointInner.class, + OnlineEndpointInner.class, context); } /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, @@ -944,355 +685,404 @@ private Mono updateAsync(String resourceGroupName, String w * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, + PartialMinimalTrackedResourceWithIdentity body) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, body).getFinalResult(); } /** * Update Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body Online Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); + PartialMinimalTrackedResourceWithIdentity body, Context context) { + return beginUpdate(resourceGroupName, workspaceName, endpointName, body, context).getFinalResult(); } /** - * Update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner update(String resourceGroupName, String workspaceName, String endpointName, - PartialMinimalTrackedResourceWithIdentity body, Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String endpointName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, Context.NONE); } /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, OnlineEndpointInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, context); } /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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, OnlineEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, endpointName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, endpointName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint 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 resourceGroupName, String workspaceName, String endpointName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Online Endpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName) { + beginDelete(resourceGroupName, workspaceName, endpointName).getFinalResult(); } /** - * Create or update Online Endpoint (asynchronous). + * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during 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, OnlineEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - OnlineEndpointInner.class, OnlineEndpointInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { + beginDelete(resourceGroupName, workspaceName, endpointName, context).getFinalResult(); } /** - * Create or update Online Endpoint (asynchronous). + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Name of the endpoint. + * @param count Number of endpoints to be retrieved in a page of results. + * @param computeType EndpointComputeType to be filtered by. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, count, computeType, skip, tags, + properties, orderBy, 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())); } /** - * Create or update Online Endpoint (asynchronous). + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Name of the endpoint. + * @param count Number of endpoints to be retrieved in a page of results. + * @param computeType EndpointComputeType to be filtered by. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name, + Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, + skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Online Endpoint (asynchronous). + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. + * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, OnlineEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String name = null; + final Integer count = null; + final EndpointComputeType computeType = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, name, count, computeType, + skip, tags, properties, orderBy), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Online Endpoint (asynchronous). + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Name of the endpoint. + * @param count Number of endpoints to be retrieved in a page of results. + * @param computeType EndpointComputeType to be filtered by. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String endpointName, OnlineEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, count, + computeType, skip, tags, properties, orderBy, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Online Endpoint (asynchronous). + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Name of the endpoint. + * @param count Number of endpoints to be retrieved in a page of results. + * @param computeType EndpointComputeType to be filtered by. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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. + * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String name, Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, count, + computeType, skip, tags, properties, orderBy, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Online Endpoint (asynchronous). + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 response. + * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String endpointName, - OnlineEndpointInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String name = null; + final Integer count = null; + final EndpointComputeType computeType = null; + final String skip = null; + final String tags = null; + final String properties = null; + final OrderString orderBy = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, name, count, computeType, + skip, tags, properties, orderBy), nextLink -> listNextSinglePage(nextLink)); } /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Name of the endpoint. + * @param count Number of endpoints to be retrieved in a page of results. + * @param computeType EndpointComputeType to be filtered by. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, name, count, computeType, + skip, tags, properties, orderBy, context), nextLink -> listNextSinglePage(nextLink, context)); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint 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. @@ -1300,36 +1090,19 @@ private Mono> listKeysWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } + String workspaceName, String endpointName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1347,7 +1120,7 @@ private Mono listKeysAsync(String resourceGroupName, Stri * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1358,14 +1131,16 @@ private Mono listKeysAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + final String accept = "application/json"; + return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1381,7 +1156,7 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1392,33 +1167,11 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; + final String contentType = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1426,76 +1179,52 @@ private Mono>> regenerateKeysWithResponseAsync(String * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, RegenerateEndpointKeysRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), body, accept, context); + private Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body) { + final String contentType = "application/json"; + return service.regenerateKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, body, + Context.NONE); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRegenerateKeysAsync(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body) { - Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateEndpointKeysRequest body, Context context) { + final String contentType = "application/json"; + return service.regenerateKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, contentType, body, + context); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . - * @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. @@ -1503,19 +1232,18 @@ private PollerFlux, Void> beginRegenerateKeysAsync(String resou */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginRegenerateKeysAsync(String resourceGroupName, String workspaceName, - String endpointName, RegenerateEndpointKeysRequest body, Context context) { - context = this.client.mergeContext(context); + String endpointName, RegenerateEndpointKeysRequest body) { Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); + = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1526,14 +1254,16 @@ private PollerFlux, Void> beginRegenerateKeysAsync(String resou @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); + Response response + = regenerateKeysWithResponse(resourceGroupName, workspaceName, endpointName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -1545,15 +1275,16 @@ public SyncPoller, Void> beginRegenerateKeys(String resourceGro @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRegenerateKeys(String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body, Context context) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); + Response response + = regenerateKeysWithResponse(resourceGroupName, workspaceName, endpointName, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1572,27 +1303,7 @@ private Mono regenerateKeysAsync(String resourceGroupName, String workspac * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @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 regenerateKeysAsync(String resourceGroupName, String workspaceName, String endpointName, - RegenerateEndpointKeysRequest body, Context context) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1602,14 +1313,14 @@ private Mono regenerateKeysAsync(String resourceGroupName, String workspac @ServiceMethod(returns = ReturnType.SINGLE) public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).block(); + beginRegenerateKeys(resourceGroupName, workspaceName, endpointName, body).getFinalResult(); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -1620,14 +1331,14 @@ public void regenerateKeys(String resourceGroupName, String workspaceName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public void regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body, Context context) { - regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); + beginRegenerateKeys(resourceGroupName, workspaceName, endpointName, body, context).getFinalResult(); } /** * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1637,28 +1348,10 @@ public void regenerateKeys(String resourceGroupName, String workspaceName, Strin @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getTokenWithResponseAsync(String resourceGroupName, String workspaceName, String endpointName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getToken(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, endpointName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.getToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1666,46 +1359,7 @@ private Mono> getTokenWithResponseAsync(String * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint 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 service Token along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getTokenWithResponseAsync(String resourceGroupName, - String workspaceName, String endpointName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, endpointName, this.client.getApiVersion(), accept, context); - } - - /** - * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1723,7 +1377,7 @@ private Mono getTokenAsync(String resourceGroupName, Str * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1734,14 +1388,16 @@ private Mono getTokenAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response getTokenWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context) { - return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); + final String accept = "application/json"; + return service.getTokenSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context); } /** * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1754,6 +1410,8 @@ public EndpointAuthTokenInner getToken(String resourceGroupName, String workspac } /** + * List Online Endpoints. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1765,13 +1423,6 @@ public EndpointAuthTokenInner getToken(String resourceGroupName, String workspac */ @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(), @@ -1780,6 +1431,28 @@ private Mono> listNextSinglePageAsync(String } /** + * List Online Endpoints. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Online Endpoints. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1787,22 +1460,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java index 06c971807170..62e47747ff0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -34,17 +34,21 @@ public OnlineEndpointsImpl(OnlineEndpointsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OnlineEndpointImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String name, - Integer count, EndpointComputeType computeType, String skip, String tags, String properties, - OrderString orderBy, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); + public OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { + OnlineEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); + if (inner != null) { + return new OnlineEndpointImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String endpointName) { @@ -55,37 +59,25 @@ public void delete(String resourceGroupName, String workspaceName, String endpoi this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new OnlineEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); } - public OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { - OnlineEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new OnlineEndpointImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String name, + Integer count, EndpointComputeType computeType, String skip, String tags, String properties, + OrderString orderBy, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); } public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, Context context) { Response inner = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointAuthKeysImpl(inner.getValue(), this.manager())); } public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { @@ -111,12 +103,8 @@ public Response getTokenWithResponse(String resourceGroupName String endpointName, Context context) { Response inner = this.serviceClient().getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointAuthTokenImpl(inner.getValue(), this.manager())); } public EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java index 99e81f54aa8e..7d2baff9114f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java index eb1dd2ff4dac..92fd03798bc2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -10,6 +10,7 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -26,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearning.models.OperationListResult; +import com.azure.resourcemanager.machinelearning.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -41,36 +42,59 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + OperationsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesOperations to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.MachineLearningServices/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.MachineLearningServices/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -79,72 +103,72 @@ Mono> list(@HostParam("$host") String endpoint, */ @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.")); - } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), null, null)) + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ - @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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with - * {@link PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -153,11 +177,13 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -168,6 +194,67 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); + } + + /** + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java index dda6d3e32581..e1903b64ea71 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java index 535ca75832ee..f0f399694863 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesClientImpl.java new file mode 100644 index 000000000000..cecf09282c2e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesClientImpl.java @@ -0,0 +1,845 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.BinaryData; +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.machinelearning.fluent.OutboundRulesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.OutboundRuleListResult; +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 OutboundRulesClient. + */ +public final class OutboundRulesClientImpl implements OutboundRulesClient { + /** + * The proxy service used to perform REST calls. + */ + private final OutboundRulesService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of OutboundRulesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OutboundRulesClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(OutboundRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientOutboundRules to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientOutboundRules") + public interface OutboundRulesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @PathParam("ruleName") String ruleName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @PathParam("ruleName") String ruleName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @PathParam("ruleName") String ruleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OutboundRuleBasicResourceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules/{ruleName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @PathParam("ruleName") String ruleName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") OutboundRuleBasicResourceInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules/{ruleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @PathParam("ruleName") String ruleName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules/{ruleName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @PathParam("ruleName") String ruleName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/outboundRules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String managedNetworkName, String ruleName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, ruleName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName) { + return getWithResponseAsync(resourceGroupName, workspaceName, managedNetworkName, ruleName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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 concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, ruleName, accept, context); + } + + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundRuleBasicResourceInner get(String resourceGroupName, String workspaceName, String managedNetworkName, + String ruleName) { + return getWithResponse(resourceGroupName, workspaceName, managedNetworkName, ruleName, Context.NONE).getValue(); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, ruleName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, ruleName, + contentType, accept, body, Context.NONE); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, ruleName, + contentType, accept, body, context); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 {@link PollerFlux} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OutboundRuleBasicResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String workspaceName, String managedNetworkName, + String ruleName, OutboundRuleBasicResourceInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, managedNetworkName, ruleName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, + this.client.getContext()); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + OutboundRuleBasicResourceInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, managedNetworkName, ruleName, body); + return this.client.getLroResult(response, + OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, Context.NONE); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 {@link SyncPoller} for polling of concrete proxy resource types can be created by aliasing this type + * using a specific property type. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + OutboundRuleBasicResourceInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, managedNetworkName, ruleName, body, context); + return this.client.getLroResult(response, + OutboundRuleBasicResourceInner.class, OutboundRuleBasicResourceInner.class, context); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, managedNetworkName, ruleName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, managedNetworkName, ruleName, body) + .getFinalResult(); + } + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, managedNetworkName, ruleName, body, context) + .getFinalResult(); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String managedNetworkName, String ruleName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, ruleName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, ruleName, + Context.NONE); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, ruleName, context); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, managedNetworkName, ruleName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, managedNetworkName, ruleName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, managedNetworkName, ruleName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String managedNetworkName, + String ruleName) { + return beginDeleteAsync(resourceGroupName, workspaceName, managedNetworkName, ruleName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String managedNetworkName, String ruleName) { + beginDelete(resourceGroupName, workspaceName, managedNetworkName, ruleName).getFinalResult(); + } + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + Context context) { + beginDelete(resourceGroupName, workspaceName, managedNetworkName, ruleName, context).getFinalResult(); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String managedNetworkName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, 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())); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String managedNetworkName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, managedNetworkName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String managedNetworkName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String managedNetworkName, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, managedNetworkName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, managedNetworkName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, managedNetworkName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * 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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * 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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * 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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesImpl.java new file mode 100644 index 000000000000..29ea1ee996d6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesImpl.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.OutboundRulesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; +import com.azure.resourcemanager.machinelearning.models.OutboundRules; + +public final class OutboundRulesImpl implements OutboundRules { + private static final ClientLogger LOGGER = new ClientLogger(OutboundRulesImpl.class); + + private final OutboundRulesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public OutboundRulesImpl(OutboundRulesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, managedNetworkName, ruleName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new OutboundRuleBasicResourceImpl(inner.getValue(), this.manager())); + } + + public OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String managedNetworkName, + String ruleName) { + OutboundRuleBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, managedNetworkName, ruleName); + if (inner != null) { + return new OutboundRuleBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public OutboundRuleBasicResource createOrUpdate(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body) { + OutboundRuleBasicResourceInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, managedNetworkName, ruleName, body); + if (inner != null) { + return new OutboundRuleBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public OutboundRuleBasicResource createOrUpdate(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, OutboundRuleBasicResourceInner body, Context context) { + OutboundRuleBasicResourceInner inner = this.serviceClient() + .createOrUpdate(resourceGroupName, workspaceName, managedNetworkName, ruleName, body, context); + if (inner != null) { + return new OutboundRuleBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName) { + this.serviceClient().delete(resourceGroupName, workspaceName, managedNetworkName, ruleName); + } + + public void delete(String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, managedNetworkName, ruleName, context); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, managedNetworkName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, managedNetworkName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + } + + private OutboundRulesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsClientImpl.java new file mode 100644 index 000000000000..1c44c7b094f1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsClientImpl.java @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.OutboundRuleListResult; +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 OutboundRulesOperationsClient. + */ +public final class OutboundRulesOperationsClientImpl implements OutboundRulesOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OutboundRulesOperationsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of OutboundRulesOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OutboundRulesOperationsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(OutboundRulesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientOutboundRulesOperations to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientOutboundRulesOperations") + public interface OutboundRulesOperationsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/batchOutboundRules") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> post(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedNetworkSettingsBasicResourceInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/managedNetworks/{managedNetworkName}/batchOutboundRules") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response postSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("managedNetworkName") String managedNetworkName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ManagedNetworkSettingsBasicResourceInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> postNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response postNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> postSinglePageAsync(String resourceGroupName, + String workspaceName, String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> { + Mono>> mono + = service + .post(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, accept, body, context) + .cache(); + return Mono.zip(mono, + this.client + .getLroResult(mono, this.client.getHttpPipeline(), + OutboundRuleListResult.class, OutboundRuleListResult.class, this.client.getContext()) + .last() + .flatMap(this.client::getLroFinalResultOrError)); + }) + .>map( + res -> new PagedResponseBase<>(res.getT1().getRequest(), res.getT1().getStatusCode(), + res.getT1().getHeaders(), res.getT2().value(), res.getT2().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux postAsync(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body) { + return new PagedFlux<>(() -> postSinglePageAsync(resourceGroupName, workspaceName, managedNetworkName, body), + nextLink -> postNextSinglePageAsync(nextLink)); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse postSinglePage(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body) { + final String accept = "application/json"; + Response res + = service.postSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, accept, body, Context.NONE); + OutboundRuleListResult lroPageableResult = this.client + .getLroResult(res, OutboundRuleListResult.class, + OutboundRuleListResult.class, Context.NONE) + .getFinalResult(); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + lroPageableResult.value(), lroPageableResult.nextLink(), null); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse postSinglePage(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body, Context context) { + final String accept = "application/json"; + Response res + = service.postSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, managedNetworkName, accept, body, context); + OutboundRuleListResult lroPageableResult = this.client + .getLroResult(res, OutboundRuleListResult.class, + OutboundRuleListResult.class, context) + .getFinalResult(); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + lroPageableResult.value(), lroPageableResult.nextLink(), null); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body) { + return new PagedIterable<>(() -> postSinglePage(resourceGroupName, workspaceName, managedNetworkName, body), + nextLink -> postNextSinglePage(nextLink)); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body, Context context) { + return new PagedIterable<>( + () -> postSinglePage(resourceGroupName, workspaceName, managedNetworkName, body, context), + nextLink -> postNextSinglePage(nextLink, context)); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * 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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> postNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.postNext(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())); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * 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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse postNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.postNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * 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 paged collection of OutboundRuleBasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse postNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.postNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsImpl.java new file mode 100644 index 000000000000..922876f8789f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; +import com.azure.resourcemanager.machinelearning.models.OutboundRulesOperations; + +public final class OutboundRulesOperationsImpl implements OutboundRulesOperations { + private static final ClientLogger LOGGER = new ClientLogger(OutboundRulesOperationsImpl.class); + + private final OutboundRulesOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public OutboundRulesOperationsImpl(OutboundRulesOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body) { + PagedIterable inner + = this.serviceClient().post(resourceGroupName, workspaceName, managedNetworkName, body); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body, Context context) { + PagedIterable inner + = this.serviceClient().post(resourceGroupName, workspaceName, managedNetworkName, body, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OutboundRuleBasicResourceImpl(inner1, this.manager())); + } + + private OutboundRulesOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasClientImpl.java new file mode 100644 index 000000000000..4ecaf30ce30c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasClientImpl.java @@ -0,0 +1,590 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import com.azure.resourcemanager.machinelearning.implementation.models.AvailableQuotaArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.UsageAndQuotaDetailsArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PTUQuotasClient. + */ +public final class PTUQuotasClientImpl implements PTUQuotasClient { + /** + * The proxy service used to perform REST calls. + */ + private final PTUQuotasService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of PTUQuotasClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PTUQuotasClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(PTUQuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientPTUQuotas to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientPTUQuotas") + public interface PTUQuotasService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailable(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAvailableSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAvailable(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getAvailableSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotaAndUsage") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotaAndUsage") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailableNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listAvailableNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of AvailableQuota entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableSinglePageAsync(String location, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAvailable(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, skip, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of AvailableQuota entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAvailableAsync(String location, String skip) { + return new PagedFlux<>(() -> listAvailableSinglePageAsync(location, skip), + nextLink -> listAvailableNextSinglePageAsync(nextLink)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The location 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 paginated list of AvailableQuota entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAvailableAsync(String location) { + final String skip = null; + return new PagedFlux<>(() -> listAvailableSinglePageAsync(location, skip), + nextLink -> listAvailableNextSinglePageAsync(nextLink)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of AvailableQuota entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAvailableSinglePage(String location, String skip) { + final String accept = "application/json"; + Response res = service.listAvailableSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of AvailableQuota entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAvailableSinglePage(String location, String skip, Context context) { + final String accept = "application/json"; + Response res = service.listAvailableSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List available MaaS PTU quota. + * + * @param location The location 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 paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAvailable(String location) { + final String skip = null; + return new PagedIterable<>(() -> listAvailableSinglePage(location, skip), + nextLink -> listAvailableNextSinglePage(nextLink)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAvailable(String location, String skip, Context context) { + return new PagedIterable<>(() -> listAvailableSinglePage(location, skip, context), + nextLink -> listAvailableNextSinglePage(nextLink, context)); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The location 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 available MaaS PTU quota along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableWithResponseAsync(String location) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getAvailable(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The location 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 available MaaS PTU quota on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAvailableAsync(String location) { + return getAvailableWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The location 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 available MaaS PTU quota along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAvailableWithResponse(String location, Context context) { + final String accept = "application/json"; + return service.getAvailableSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The location 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 available MaaS PTU quota. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AvailableQuotaInner getAvailable(String location) { + return getAvailableWithResponse(location, Context.NONE).getValue(); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of UsageAndQuotaDetails entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, skip, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(location, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The location 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 paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(location, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of UsageAndQuotaDetails entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, String skip) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of UsageAndQuotaDetails entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, String skip, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), location, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The location 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 paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(location, skip), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, String skip, Context context) { + return new PagedIterable<>(() -> listSinglePage(location, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List available MaaS PTU quota. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listAvailableNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List available MaaS PTU quota. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAvailableNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listAvailableNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List available MaaS PTU quota. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listAvailableNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listAvailableNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List MaaS PTU usage and quota. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List MaaS PTU usage and quota. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List MaaS PTU usage and quota. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasImpl.java new file mode 100644 index 000000000000..991e47fb5ab4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.PTUQuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import com.azure.resourcemanager.machinelearning.models.AvailableQuota; +import com.azure.resourcemanager.machinelearning.models.PTUQuotas; +import com.azure.resourcemanager.machinelearning.models.UsageAndQuotaDetails; + +public final class PTUQuotasImpl implements PTUQuotas { + private static final ClientLogger LOGGER = new ClientLogger(PTUQuotasImpl.class); + + private final PTUQuotasClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public PTUQuotasImpl(PTUQuotasClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listAvailable(String location) { + PagedIterable inner = this.serviceClient().listAvailable(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listAvailable(String location, String skip, Context context) { + PagedIterable inner = this.serviceClient().listAvailable(location, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableQuotaImpl(inner1, this.manager())); + } + + public Response getAvailableWithResponse(String location, Context context) { + Response inner = this.serviceClient().getAvailableWithResponse(location, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AvailableQuotaImpl(inner.getValue(), this.manager())); + } + + public AvailableQuota getAvailable(String location) { + AvailableQuotaInner inner = this.serviceClient().getAvailable(location); + if (inner != null) { + return new AvailableQuotaImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageAndQuotaDetailsImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, String skip, Context context) { + PagedIterable inner = this.serviceClient().list(location, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageAndQuotaDetailsImpl(inner1, this.manager())); + } + + private PTUQuotasClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java index dd3dc73314e8..7caeb1e22f25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java index c8219e514cfc..9d783fc9d855 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -9,11 +9,11 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import java.util.Collections; import java.util.Map; @@ -39,6 +39,10 @@ public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public Sku sku() { + return this.innerModel().sku(); + } + public String location() { return this.innerModel().location(); } @@ -52,15 +56,11 @@ public Map tags() { } } - public Sku sku() { - return this.innerModel().sku(); - } - public SystemData systemData() { return this.innerModel().systemData(); } - public PrivateEndpoint privateEndpoint() { + public WorkspacePrivateEndpointResource privateEndpoint() { return this.innerModel().privateEndpoint(); } @@ -202,7 +202,7 @@ public PrivateEndpointConnectionImpl withSku(Sku sku) { return this; } - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + public PrivateEndpointConnectionImpl withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint) { this.innerModel().withPrivateEndpoint(privateEndpoint); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java index d98f87dac6c3..bdae9ef43835 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,7 +30,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.machinelearning.implementation.models.PrivateEndpointConnectionListResult; import reactor.core.publisher.Mono; /** @@ -45,636 +45,554 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + PrivateEndpointConnectionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateEndpointConnections to be used + * The interface defining all the services for MachineLearningManagementClientPrivateEndpointConnections to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner properties, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner body, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 list of private endpoint connection associated with the specified workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, workspaceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 list of private endpoint connection associated with the specified workspace along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), null, null)); + private Mono getAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, privateEndpointConnectionName, accept, context); } /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. + * @return the Private Endpoint Connection resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) + .getValue(); } /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } + public Response createOrUpdateWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner body, + Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + contentType, accept, body, context); } /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. + * + * Called by end-users to approve or reject a PE connection. + * This method must validate and forward the call to NRP. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param body PrivateEndpointConnection object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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(), resourceGroupName, workspaceName, - privateEndpointConnectionName, this.client.getApiVersion(), accept, context); + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner body) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, body, + Context.NONE).getValue(); } /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + private Mono deleteAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) + .flatMap(ignored -> Mono.empty()); } /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); + public Response deleteWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, context); } /** - * Update the state of specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 Private Endpoint Connection resource along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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(), - resourceGroupName, workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), - properties, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); } /** - * Update the state of specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 Private Endpoint Connection resource along with {@link Response} on successful completion of - * {@link Mono}. + * @return list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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(); - } + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), properties, accept, context); + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, 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())); } /** - * Update the state of specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace 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 Private Endpoint Connection resource on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified workspace as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, - properties).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Update the state of specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 Private Endpoint Connection resource along with {@link Response}. + * @return list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, - properties, context).block(); + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Update the state of specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. + * @param workspaceName Azure Machine Learning Workspace 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 Private Endpoint Connection resource. + * @return list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, properties, - Context.NONE).getValue(); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified workspace as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace 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}. + * @return list of private endpoint connection associated with the specified workspace as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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, - workspaceName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(ignored -> Mono.empty()); + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); } /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. + * 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 {@link Response}. + * @return list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * 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 list of private endpoint connection associated with the specified workspace along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java index 03774c6fedf2..af587158141c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,29 +27,12 @@ public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClie this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String workspaceName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } public PrivateEndpointConnection get(String resourceGroupName, String workspaceName, @@ -73,6 +56,19 @@ public void delete(String resourceGroupName, String workspaceName, String privat this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + public PrivateEndpointConnection getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 000000000000..d6c8cc99d96d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager 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 ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String location() { + return this.innerModel().location(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List requiredZoneNames() { + List inner = this.innerModel().requiredZoneNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.java deleted file mode 100644 index b245faebb0a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.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.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -import java.util.Collections; -import java.util.List; - -public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { - private PrivateLinkResourceListResultInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public PrivateLinkResourceListResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java index 50a78d55c315..a10c97bbb6bf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -16,13 +16,18 @@ 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.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; /** @@ -37,153 +42,307 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateLinkResourcesClientImpl(AzureMachineLearningWorkspacesImpl client) { + PrivateLinkResourcesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateLinkResources to be used by the + * The interface defining all the services for MachineLearningManagementClientPrivateLinkResources to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, 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 private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. + * @return a list of private link resources as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, - workspaceName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace on successful completion of - * {@link Mono}. + * @return a list of private link resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace along with {@link Response}. + * @return a list of private link resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, String workspaceName, + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + 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())); + } + + /** + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName) { - return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java index f221aad8c31a..8e6c2735025f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; public final class PrivateLinkResourcesImpl implements PrivateLinkResources { @@ -26,25 +25,15 @@ public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, this.serviceManager = serviceManager; } - public Response listWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName) { - PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } private PrivateLinkResourcesClient serviceClient() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java index 132066459cfb..64d2fa7825c5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,7 +30,7 @@ import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas; +import com.azure.resourcemanager.machinelearning.implementation.models.ListWorkspaceQuotas; import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; import reactor.core.publisher.Mono; @@ -46,40 +46,56 @@ public final class QuotasClientImpl implements QuotasClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of QuotasClientImpl. * * @param client the instance of the service client containing this operation class. */ - QuotasClientImpl(AzureMachineLearningWorkspacesImpl client) { + QuotasClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesQuotas to be used by the proxy service + * The interface defining all the services for MachineLearningManagementClientQuotas to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientQuotas") public interface QuotasService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") QuotaUpdateParameters parameters, @HeaderParam("Accept") String accept, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") QuotaUpdateParameters parameters, Context context); + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") QuotaUpdateParameters parameters, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @@ -88,14 +104,21 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -105,71 +128,19 @@ Mono> listNext(@PathParam(value = "nextLink", enco @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String location, QuotaUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @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 result of update workspace quota along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String location, - QuotaUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -183,8 +154,8 @@ private Mono updateAsync(String location, Quot /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @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. @@ -194,14 +165,17 @@ private Mono updateAsync(String location, Quot @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String location, QuotaUpdateParameters parameters, Context context) { - return updateWithResponseAsync(location, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, contentType, accept, parameters, context); } /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -215,7 +189,7 @@ public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParam /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -224,17 +198,6 @@ public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -247,70 +210,58 @@ private Mono> listSinglePageAsync(String locat /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. + * @param location The location 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 currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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 currently assigned Workspace Quotas based on VMFamily as paginated response with {@link PagedFlux}. + * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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 currently assigned Workspace Quotas based on VMFamily as paginated response with {@link PagedFlux}. + * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -319,13 +270,13 @@ private PagedFlux listAsync(String location, Context context */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); + return new PagedIterable<>(() -> listSinglePage(location), nextLink -> listNextSinglePage(nextLink)); } /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -335,7 +286,8 @@ public PagedIterable list(String location) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); + return new PagedIterable<>(() -> listSinglePage(location, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -345,18 +297,11 @@ public PagedIterable list(String location, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List WorkspaceQuotasByVMFamily operation response along with {@link PagedResponse} on successful + * @return the currently assigned Workspace Quotas based on VMFamily 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(), @@ -364,6 +309,24 @@ private Mono> listNextSinglePageAsync(String n .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -372,22 +335,13 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 WorkspaceQuotasByVMFamily operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java index e3278e22e6ec..9b22d4cf82bd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -12,8 +12,8 @@ import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.Quotas; import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; +import com.azure.resourcemanager.machinelearning.models.Quotas; import com.azure.resourcemanager.machinelearning.models.ResourceQuota; import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotasResult; @@ -34,12 +34,8 @@ public Response updateWithResponse(String location, Context context) { Response inner = this.serviceClient().updateWithResponse(location, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new UpdateWorkspaceQuotasResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new UpdateWorkspaceQuotasResultImpl(inner.getValue(), this.manager())); } public UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java new file mode 100644 index 000000000000..b67942b15ce2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; + +public final class RaiBlocklistItemPropertiesBasicResourceImpl + implements RaiBlocklistItemPropertiesBasicResource, RaiBlocklistItemPropertiesBasicResource.Definition { + private RaiBlocklistItemPropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + RaiBlocklistItemPropertiesBasicResourceImpl(RaiBlocklistItemPropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager 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 RaiBlocklistItemProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RaiBlocklistItemPropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String connectionName; + + private String raiBlocklistName; + + private String raiBlocklistItemName; + + public RaiBlocklistItemPropertiesBasicResourceImpl withExistingRaiBlocklist(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.connectionName = connectionName; + this.raiBlocklistName = raiBlocklistName; + return this; + } + + public RaiBlocklistItemPropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + this.innerModel(), Context.NONE); + return this; + } + + public RaiBlocklistItemPropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + this.innerModel(), context); + return this; + } + + RaiBlocklistItemPropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RaiBlocklistItemPropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.raiBlocklistItemName = name; + } + + public RaiBlocklistItemPropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + Context.NONE) + .getValue(); + return this; + } + + public RaiBlocklistItemPropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + context) + .getValue(); + return this; + } + + public RaiBlocklistItemPropertiesBasicResourceImpl withProperties(RaiBlocklistItemProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java new file mode 100644 index 000000000000..c752f3fc171e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; + +public final class RaiBlocklistPropertiesBasicResourceImpl + implements RaiBlocklistPropertiesBasicResource, RaiBlocklistPropertiesBasicResource.Definition { + private RaiBlocklistPropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + RaiBlocklistPropertiesBasicResourceImpl(RaiBlocklistPropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager 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 RaiBlocklistProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RaiBlocklistPropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String connectionName; + + private String raiBlocklistName; + + public RaiBlocklistPropertiesBasicResourceImpl withExistingConnection(String resourceGroupName, + String workspaceName, String connectionName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.connectionName = connectionName; + return this; + } + + public RaiBlocklistPropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklists() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, this.innerModel(), + Context.NONE); + return this; + } + + public RaiBlocklistPropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklists() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, this.innerModel(), context); + return this; + } + + RaiBlocklistPropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RaiBlocklistPropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.raiBlocklistName = name; + } + + public RaiBlocklistPropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklists() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, Context.NONE) + .getValue(); + return this; + } + + public RaiBlocklistPropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklists() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context) + .getValue(); + return this; + } + + public RaiBlocklistPropertiesBasicResourceImpl withProperties(RaiBlocklistProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java new file mode 100644 index 000000000000..dfa83a68bbf0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java @@ -0,0 +1,593 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.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.BinaryData; +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.machinelearning.fluent.RaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +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 RaiPoliciesClient. + */ +public final class RaiPoliciesClientImpl implements RaiPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final RaiPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of RaiPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RaiPoliciesClientImpl(MachineLearningManagementClientImpl client) { + this.service + = RestProxy.create(RaiPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientRaiPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRaiPolicies") + public interface RaiPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiPolicyPropertiesBasicResourceInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("raiPolicyName") String raiPolicyName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RaiPolicyPropertiesBasicResourceInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("raiPolicyName") String raiPolicyName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("raiPolicyName") String raiPolicyName, + Context context); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String raiPolicyName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, raiPolicyName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String raiPolicyName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, raiPolicyName, accept, context); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, Context.NONE).getValue(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, raiPolicyName, + contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, raiPolicyName, contentType, + accept, body, Context.NONE); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, raiPolicyName, contentType, + accept, body, context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link PollerFlux} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + Response response + = createWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, body); + return this.client.getLroResult( + response, RaiPolicyPropertiesBasicResourceInner.class, RaiPolicyPropertiesBasicResourceInner.class, + Context.NONE); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, Context context) { + Response response + = createWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, context); + return this.client.getLroResult( + response, RaiPolicyPropertiesBasicResourceInner.class, RaiPolicyPropertiesBasicResourceInner.class, + context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + return beginCreateAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + return beginCreate(resourceGroupName, workspaceName, endpointName, raiPolicyName, body).getFinalResult(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context) { + return beginCreate(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, context) + .getFinalResult(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 workspaceName, + String endpointName, String raiPolicyName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, raiPolicyName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, raiPolicyName, + Context.NONE); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @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) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, raiPolicyName, context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, Context context) { + Response response + = deleteWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 workspaceName, String endpointName, + String raiPolicyName) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 workspaceName, String endpointName, String raiPolicyName) { + beginDelete(resourceGroupName, workspaceName, endpointName, raiPolicyName).getFinalResult(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + Context context) { + beginDelete(resourceGroupName, workspaceName, endpointName, raiPolicyName, context).getFinalResult(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java new file mode 100644 index 000000000000..02c6abee2251 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.RaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPolicies; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class RaiPoliciesImpl implements RaiPolicies { + private static final ClientLogger LOGGER = new ClientLogger(RaiPoliciesImpl.class); + + private final RaiPoliciesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RaiPoliciesImpl(RaiPoliciesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiPolicyPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } + + public RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName) { + RaiPolicyPropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, raiPolicyName); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, raiPolicyName); + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + Context context) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, raiPolicyName, context); + } + + public RaiPolicyPropertiesBasicResource 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + this.delete(resourceGroupName, workspaceName, endpointName, raiPolicyName, Context.NONE); + } + + public void 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 workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); + if (workspaceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + } + String endpointName = ResourceManagerUtils.getValueFromIdByName(id, "endpoints"); + if (endpointName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'endpoints'.", id))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + this.delete(resourceGroupName, workspaceName, endpointName, raiPolicyName, context); + } + + private RaiPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RaiPolicyPropertiesBasicResourceImpl define(String name) { + return new RaiPolicyPropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsClientImpl.java new file mode 100644 index 000000000000..d80b0e20141a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsClientImpl.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in RaiPoliciesOperationsClient. + */ +public final class RaiPoliciesOperationsClientImpl implements RaiPoliciesOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final RaiPoliciesOperationsService service; + + /** + * The service client containing this operation class. + */ + private final MachineLearningManagementClientImpl client; + + /** + * Initializes an instance of RaiPoliciesOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RaiPoliciesOperationsClientImpl(MachineLearningManagementClientImpl client) { + this.service = RestProxy.create(RaiPoliciesOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for MachineLearningManagementClientRaiPoliciesOperations to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRaiPoliciesOperations") + public interface RaiPoliciesOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @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("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, endpointName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String endpointName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String endpointName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, endpointName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, endpointName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * 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 azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * 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 azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * 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 azure OpenAI Content Filters resource list along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsImpl.java new file mode 100644 index 000000000000..5d5d5a94c70d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPoliciesOperations; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class RaiPoliciesOperationsImpl implements RaiPoliciesOperations { + private static final ClientLogger LOGGER = new ClientLogger(RaiPoliciesOperationsImpl.class); + + private final RaiPoliciesOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RaiPoliciesOperationsImpl(RaiPoliciesOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private RaiPoliciesOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java new file mode 100644 index 000000000000..2b891f12061c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class RaiPolicyPropertiesBasicResourceImpl + implements RaiPolicyPropertiesBasicResource, RaiPolicyPropertiesBasicResource.Definition { + private RaiPolicyPropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + RaiPolicyPropertiesBasicResourceImpl(RaiPolicyPropertiesBasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager 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 RaiPolicyProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RaiPolicyPropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String endpointName; + + private String raiPolicyName; + + public RaiPolicyPropertiesBasicResourceImpl withExistingEndpoint(String resourceGroupName, String workspaceName, + String endpointName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.endpointName = endpointName; + return this; + } + + public RaiPolicyPropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getRaiPolicies() + .create(resourceGroupName, workspaceName, endpointName, raiPolicyName, this.innerModel(), Context.NONE); + return this; + } + + public RaiPolicyPropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getRaiPolicies() + .create(resourceGroupName, workspaceName, endpointName, raiPolicyName, this.innerModel(), context); + return this; + } + + RaiPolicyPropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RaiPolicyPropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.raiPolicyName = name; + } + + public RaiPolicyPropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getRaiPolicies() + .getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, Context.NONE) + .getValue(); + return this; + } + + public RaiPolicyPropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getRaiPolicies() + .getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, context) + .getValue(); + return this; + } + + public RaiPolicyPropertiesBasicResourceImpl withProperties(RaiPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java index 23ed453ef80c..f01a72f5df0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,14 +29,15 @@ 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.BinaryData; 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.machinelearning.fluent.RegistriesClient; import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; +import com.azure.resourcemanager.machinelearning.implementation.models.RegistryTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -53,90 +54,166 @@ public final class RegistriesClientImpl implements RegistriesClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistriesClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistriesClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistriesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistriesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistries to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientRegistries to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistries") public interface RegistriesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialRegistryPartialTrackedResource body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialRegistryPartialTrackedResource body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> listByResourceGroup( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Response listByResourceGroupSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialRegistryPartialTrackedResource body, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RegistryInner body, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> removeRegions(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> removeRegions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") RegistryInner body, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryInner body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response removeRegionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") RegistryInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -144,438 +221,346 @@ Mono>> removeRegions(@HostParam("$host") String endpoi @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @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, + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List registries by subscription. + * Get registry. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return registry along with {@link Response} 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.")); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String registryName) { 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)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List registries by subscription. + * Get registry. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return registry 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)); - } - - /** - * List registries by 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 a paginated list of Registry entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + private Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List registries by subscription. + * Get registry. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List registries by 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return registry along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, accept, context); } /** - * List registries by subscription. + * Get registry. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return registry. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { + return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); } /** - * List registries. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} 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.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, RegistryInner body) { + final String contentType = "application/json"; 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)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List registries. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @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.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + RegistryInner body) { + final String contentType = "application/json"; 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)); - } - - /** - * List registries. - * - * @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 a paginated list of Registry entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listNextSinglePageAsync(nextLink)); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, Context.NONE); } /** - * List registries. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @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 paginated list of Registry entities as paginated response with {@link PagedFlux}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + RegistryInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, context); } /** - * List registries. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RegistryInner> beginCreateOrUpdateAsync(String resourceGroupName, + String registryName, RegistryInner body) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + RegistryInner.class, RegistryInner.class, this.client.getContext()); } /** - * List registries. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, RegistryInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, registryName, body); + return this.client.getLroResult(response, RegistryInner.class, + RegistryInner.class, Context.NONE); } /** - * Delete registry. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, RegistryInner body, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, registryName, body, context); + return this.client.getLroResult(response, RegistryInner.class, + RegistryInner.class, context); } /** - * Delete registry. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param context The context to associate with this operation. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, - registryName, this.client.getApiVersion(), accept, context); + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete registry. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, body).getFinalResult(); } /** - * Delete registry. + * Create or update registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + @ServiceMethod(returns = ReturnType.SINGLE) + public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName) { - return this.beginDeleteAsync(resourceGroupName, registryName).getSyncPoller(); + return beginCreateOrUpdate(resourceGroupName, registryName, body, context).getFinalResult(); } /** - * Delete registry. + * Update tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param context The context to associate with this operation. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String registryName, + PartialRegistryPartialTrackedResource body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete registry. + * Update tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName) { - return beginDeleteAsync(resourceGroupName, registryName).last().flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String registryName, + PartialRegistryPartialTrackedResource body) { + return updateWithResponseAsync(resourceGroupName, registryName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Delete registry. + * Update tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response updateWithResponse(String resourceGroupName, String registryName, + PartialRegistryPartialTrackedResource body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, context); } /** - * Delete registry. + * Update tags. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName) { - deleteAsync(resourceGroupName, registryName).block(); + public RegistryInner update(String resourceGroupName, String registryName, + PartialRegistryPartialTrackedResource body) { + return updateWithResponse(resourceGroupName, registryName, body, Context.NONE).getValue(); } /** @@ -583,54 +568,37 @@ public void delete(String resourceGroupName, String registryName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This 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 {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, Context context) { - deleteAsync(resourceGroupName, registryName, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get registry. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, Context.NONE); } /** - * Get registry. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -638,441 +606,306 @@ private Mono> getByResourceGroupWithResponseAsync(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 registry along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String registryName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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, - registryName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, context); } /** - * Get registry. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This 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 registry on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get registry. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, registryName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName) { + Response response = deleteWithResponse(resourceGroupName, registryName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get registry. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This 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 registry. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner getByResourceGroup(String resourceGroupName, String registryName) { - return getByResourceGroupWithResponse(resourceGroupName, registryName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + Context context) { + Response response = deleteWithResponse(resourceGroupName, registryName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Update tags. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName) { + return beginDeleteAsync(resourceGroupName, registryName).last().flatMap(this.client::getLroFinalResultOrError); } /** - * Update tags. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 registryName, - PartialRegistryPartialTrackedResource body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName) { + beginDelete(resourceGroupName, registryName).getFinalResult(); } /** - * Update tags. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. + * @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 updateAsync(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body) { - return updateWithResponseAsync(resourceGroupName, registryName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public void delete(String resourceGroupName, String registryName, Context context) { + beginDelete(resourceGroupName, registryName, context).getFinalResult(); } /** - * Update tags. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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}. + * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body, Context context) { - return updateWithResponseAsync(resourceGroupName, registryName, body, context).block(); + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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())); } /** - * Update tags. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner update(String resourceGroupName, String registryName, - PartialRegistryPartialTrackedResource body) { - return updateWithResponse(resourceGroupName, registryName, body, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a paginated list of Registry entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, RegistryInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @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}. + * @return a paginated list of Registry entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, RegistryInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, this.client.getApiVersion(), body, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginCreateOrUpdateAsync(String resourceGroupName, - String registryName, RegistryInner body) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, registryName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginCreateOrUpdateAsync(String resourceGroupName, - String registryName, RegistryInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of Registry entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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())); } /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return a paginated list of Registry entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, RegistryInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, RegistryInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return a paginated list of Registry entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @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}. + * @return a paginated list of Registry entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, RegistryInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); } /** - * Create or update registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. * @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. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RegistryInner createOrUpdate(String resourceGroupName, String registryName, RegistryInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1084,35 +917,17 @@ public RegistryInner createOrUpdate(String resourceGroupName, String registryNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> removeRegionsWithResponseAsync(String resourceGroupName, String registryName, RegistryInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.removeRegions(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.removeRegions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1122,39 +937,19 @@ private Mono>> removeRegionsWithResponseAsync(String r * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param body Details required to create the registry. - * @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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> removeRegionsWithResponseAsync(String resourceGroupName, - String registryName, RegistryInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response removeRegionsWithResponse(String resourceGroupName, String registryName, + RegistryInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.removeRegions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, this.client.getApiVersion(), body, accept, context); + return service.removeRegionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, Context.NONE); } /** @@ -1163,17 +958,20 @@ private Mono>> removeRegionsWithResponseAsync(String r * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param body Details required to create the registry. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, RegistryInner> beginRemoveRegionsAsync(String resourceGroupName, - String registryName, RegistryInner body) { - Mono>> mono = removeRegionsWithResponseAsync(resourceGroupName, registryName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response removeRegionsWithResponse(String resourceGroupName, String registryName, + RegistryInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.removeRegionsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, contentType, accept, body, context); } /** @@ -1182,20 +980,18 @@ private PollerFlux, RegistryInner> beginRemoveRegionsA * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param body Details required to create the registry. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, RegistryInner> beginRemoveRegionsAsync(String resourceGroupName, - String registryName, RegistryInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = removeRegionsWithResponseAsync(resourceGroupName, registryName, body, context); + String registryName, RegistryInner body) { + Mono>> mono = removeRegionsWithResponseAsync(resourceGroupName, registryName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - RegistryInner.class, RegistryInner.class, context); + RegistryInner.class, RegistryInner.class, this.client.getContext()); } /** @@ -1207,12 +1003,15 @@ private PollerFlux, RegistryInner> beginRemoveRegionsA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, String registryName, RegistryInner body) { - return this.beginRemoveRegionsAsync(resourceGroupName, registryName, body).getSyncPoller(); + Response response = removeRegionsWithResponse(resourceGroupName, registryName, body); + return this.client.getLroResult(response, RegistryInner.class, + RegistryInner.class, Context.NONE); } /** @@ -1225,12 +1024,15 @@ public SyncPoller, RegistryInner> beginRemoveRegions(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 the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, RegistryInner> beginRemoveRegions(String resourceGroupName, String registryName, RegistryInner body, Context context) { - return this.beginRemoveRegionsAsync(resourceGroupName, registryName, body, context).getSyncPoller(); + Response response = removeRegionsWithResponse(resourceGroupName, registryName, body, context); + return this.client.getLroResult(response, RegistryInner.class, + RegistryInner.class, context); } /** @@ -1242,7 +1044,8 @@ public SyncPoller, RegistryInner> beginRemoveRegions(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 the response body on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono removeRegionsAsync(String resourceGroupName, String registryName, RegistryInner body) { @@ -1250,25 +1053,6 @@ private Mono removeRegionsAsync(String resourceGroupName, String .flatMap(this.client::getLroFinalResultOrError); } - /** - * Remove regions from registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param body Details required to create the registry. - * @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 removeRegionsAsync(String resourceGroupName, String registryName, RegistryInner body, - Context context) { - return beginRemoveRegionsAsync(resourceGroupName, registryName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - /** * Remove regions from registry. * @@ -1278,11 +1062,11 @@ private Mono removeRegionsAsync(String resourceGroupName, 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 response. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body) { - return removeRegionsAsync(resourceGroupName, registryName, body).block(); + return beginRemoveRegions(resourceGroupName, registryName, body).getFinalResult(); } /** @@ -1295,15 +1079,17 @@ public RegistryInner removeRegions(String resourceGroupName, String registryName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public RegistryInner removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context) { - return removeRegionsAsync(resourceGroupName, registryName, body, context).block(); + return beginRemoveRegions(resourceGroupName, registryName, body, context).getFinalResult(); } /** + * List registries + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1314,24 +1100,37 @@ public RegistryInner removeRegions(String resourceGroupName, String registryName * {@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.")); - } + private Mono> listNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * List registries + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List registries + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1339,26 +1138,20 @@ private Mono> listBySubscriptionNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of Registry entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * List registries by subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1369,22 +1162,39 @@ private Mono> listBySubscriptionNextSinglePageAsync * {@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.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); } /** + * List registries by subscription + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Registry entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List registries by subscription + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1392,22 +1202,14 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Registry entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of Registry entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java index f2ade7c85529..d1a0a575524f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,14 +27,29 @@ public RegistriesImpl(RegistriesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RegistryImpl(inner.getValue(), this.manager())); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); + public Registry getByResourceGroup(String resourceGroupName, String registryName) { + RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); + if (inner != null) { + return new RegistryImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String registryName) { + this.serviceClient().delete(resourceGroupName, registryName); + } + + public void delete(String resourceGroupName, String registryName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -47,33 +62,14 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Con return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); } - public void deleteByResourceGroup(String resourceGroupName, String registryName) { - this.serviceClient().delete(resourceGroupName, registryName); - } - - public void delete(String resourceGroupName, String registryName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, context); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, registryName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RegistryImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); } - public Registry getByResourceGroup(String resourceGroupName, String registryName) { - RegistryInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, registryName); - if (inner != null) { - return new RegistryImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RegistryImpl(inner1, this.manager())); } public Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java index 62193d2db1b9..63bba065b080 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.RegistryCodeContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.CodeContainerResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,444 +51,378 @@ public final class RegistryCodeContainersClientImpl implements RegistryCodeConta /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryCodeContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryCodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryCodeContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryCodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryCodeContainers to be used by + * The interface defining all the services for MachineLearningManagementClientRegistryCodeContainers to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryCodeContainers") public interface RegistryCodeContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); + @PathParam("codeName") String codeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CodeContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") CodeContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("codeName") String codeName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. + * @param codeName Container 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 paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return code container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String codeName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param codeName Container 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 paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return code container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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(), resourceGroupName, registryName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, String codeName) { + return getWithResponseAsync(resourceGroupName, registryName, codeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. + * @param codeName Container name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. + * @return code container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String codeName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, codeName, accept, context); } /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param codeName Container 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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return code container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeContainerInner get(String resourceGroupName, String registryName, String codeName) { + return getWithResponse(resourceGroupName, registryName, codeName, Context.NONE).getValue(); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String codeName, CodeContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String codeName, CodeContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, contentType, accept, body, + Context.NONE); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, codeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String codeName, CodeContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, contentType, accept, body, + context); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, codeName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CodeContainerInner.class, CodeContainerInner.class, this.client.getContext()); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName).getSyncPoller(); + public SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, CodeContainerInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, registryName, codeName, body); + return this.client.getLroResult(response, CodeContainerInner.class, + CodeContainerInner.class, Context.NONE); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName, context).getSyncPoller(); + public SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, CodeContainerInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, codeName, body, context); + return this.client.getLroResult(response, CodeContainerInner.class, + CodeContainerInner.class, context); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String codeName) { - return beginDeleteAsync(resourceGroupName, registryName, codeName).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, + CodeContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, codeName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, + CodeContainerInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, codeName, body).getFinalResult(); } /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String codeName) { - deleteAsync(resourceGroupName, registryName, codeName).block(); + public CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, + CodeContainerInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, codeName, body, context).getFinalResult(); } /** @@ -496,18 +431,22 @@ public void delete(String resourceGroupName, String registryName, String codeNam * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container 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) - public void delete(String resourceGroupName, String registryName, String codeName, Context context) { - deleteAsync(resourceGroupName, registryName, codeName, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String codeName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -515,38 +454,16 @@ public void delete(String resourceGroupName, String registryName, String codeNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return code container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String codeName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName, String codeName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, Context.NONE); } /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -555,37 +472,17 @@ private Mono> getWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return code container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String codeName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName 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(), resourceGroupName, registryName, - codeName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, String codeName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, context); } /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -593,298 +490,243 @@ private Mono> getWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return code container on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String codeName) { - return getWithResponseAsync(resourceGroupName, registryName, codeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String codeName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, codeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container 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 code container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, codeName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String codeName) { + Response response = deleteWithResponse(resourceGroupName, registryName, codeName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container 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 code container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner get(String resourceGroupName, String registryName, String codeName) { - return getWithResponse(resourceGroupName, registryName, codeName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String codeName, Context context) { + Response response = deleteWithResponse(resourceGroupName, registryName, codeName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName, String codeName) { + return beginDeleteAsync(resourceGroupName, registryName, codeName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName, String codeName) { + beginDelete(resourceGroupName, registryName, codeName).getFinalResult(); } /** - * Create or update Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, CodeContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeContainerInner.class, CodeContainerInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String codeName, Context context) { + beginDelete(resourceGroupName, registryName, codeName, context).getFinalResult(); } /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, CodeContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeContainerInner.class, CodeContainerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, skip, 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())); } /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, CodeContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, String skip, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String skip, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -896,13 +738,6 @@ public CodeContainerInner createOrUpdate(String resourceGroupName, String regist */ @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(), @@ -911,6 +746,28 @@ private Mono> listNextSinglePageAsync(String n } /** + * List containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -918,22 +775,14 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java index 5565748a4d27..0c2fc38ecb20 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,36 +27,12 @@ public RegistryCodeContainersImpl(RegistryCodeContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String codeName) { - this.serviceClient().delete(resourceGroupName, registryName, codeName); - } - - public void delete(String resourceGroupName, String registryName, String codeName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, codeName, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CodeContainerImpl(inner.getValue(), this.manager())); } public CodeContainer get(String resourceGroupName, String registryName, String codeName) { @@ -89,6 +65,26 @@ public CodeContainer createOrUpdate(String resourceGroupName, String registryNam } } + public void delete(String resourceGroupName, String registryName, String codeName) { + this.serviceClient().delete(resourceGroupName, registryName, codeName); + } + + public void delete(String resourceGroupName, String registryName, String codeName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); + } + private RegistryCodeContainersClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java index 3ba587a442f6..356363d5858c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,6 +28,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -35,7 +36,7 @@ import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.CodeVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -53,525 +54,425 @@ public final class RegistryCodeVersionsClientImpl implements RegistryCodeVersion /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryCodeVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryCodeVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryCodeVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryCodeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryCodeVersions to be used by the + * The interface defining all the services for MachineLearningManagementClientRegistryCodeVersions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryCodeVersions") public interface RegistryCodeVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @PathParam("codeName") String codeName, @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CodeVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CodeVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("codeName") String codeName, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("codeName") String codeName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("codeName") String codeName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrGetStartPendingUpload( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CodeVersionInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, + Response createOrGetStartPendingUploadSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("codeName") String codeName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String codeName, String orderBy, Integer top, String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String codeName, String version) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, this.client.getApiVersion(), orderBy, top, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String codeName, String orderBy, Integer top, String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName 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(), resourceGroupName, registryName, codeName, - this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container 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 paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, String codeName, + String version) { + return getWithResponseAsync(resourceGroupName, registryName, codeName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. + * @param version Version identifier. * @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 paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container 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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String codeName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String codeName, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, codeName, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, codeName, orderBy, top, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version) { + return getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE).getValue(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String codeName, String version, CodeVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, contentType, + accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String codeName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String codeName, String version, CodeVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, version, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, contentType, accept, + body, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, codeName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String codeName, String version, CodeVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, contentType, accept, + body, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String codeName, String version, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, codeName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CodeVersionInner.class, CodeVersionInner.class, this.client.getContext()); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName, version).getSyncPoller(); + public SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, String version, CodeVersionInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, codeName, version, body); + return this.client.getLroResult(response, CodeVersionInner.class, + CodeVersionInner.class, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String codeName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, codeName, version, context).getSyncPoller(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 registryName, String codeName, String version) { - return beginDeleteAsync(resourceGroupName, registryName, codeName, version).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String codeName, String version, CodeVersionInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, codeName, version, body, context); + return this.client.getLroResult(response, CodeVersionInner.class, + CodeVersionInner.class, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, codeName, version, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, + String version, CodeVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String codeName, String version) { - deleteAsync(resourceGroupName, registryName, codeName, version).block(); + public CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, + String version, CodeVersionInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, codeName, version, body).getFinalResult(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String codeName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, codeName, version, context).block(); + public CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, + String version, CodeVersionInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, codeName, version, body, context).getFinalResult(); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -580,122 +481,79 @@ public void delete(String resourceGroupName, String registryName, String codeNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, String codeName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String codeName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, registryName, - codeName, version, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, String codeName, + String version) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @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 version on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String codeName, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, codeName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response deleteWithResponse(String resourceGroupName, String registryName, String codeName, + String version, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @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 version along with {@link Response}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, codeName, version, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String codeName, String version) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, codeName, version); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -704,328 +562,248 @@ public Response getWithResponse(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner get(String resourceGroupName, String registryName, String codeName, String version) { - return getWithResponse(resourceGroupName, registryName, codeName, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String codeName, String version) { + Response response = deleteWithResponse(resourceGroupName, registryName, codeName, version); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String codeName, String version, Context context) { + Response response = deleteWithResponse(resourceGroupName, registryName, codeName, version, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, codeName, version, this.client.getApiVersion(), body, accept, context); + private Mono deleteAsync(String resourceGroupName, String registryName, String codeName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, codeName, version).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeVersionInner.class, CodeVersionInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String codeName, String version) { + beginDelete(resourceGroupName, registryName, codeName, version).getFinalResult(); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, CodeVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String codeName, String version, CodeVersionInner body, + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String codeName, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, codeName, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - CodeVersionInner.class, CodeVersionInner.class, context); + beginDelete(resourceGroupName, registryName, codeName, version, context).getFinalResult(); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + String codeName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, orderBy, top, skip, 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())); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, CodeVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String codeName, String version, CodeVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName, + String orderBy, Integer top, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String codeName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, codeName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String codeName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, codeName, orderBy, top, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body).block(); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String codeName, String orderBy, Integer top, String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, codeName, orderBy, top, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate(String resourceGroupName, String registryName, String codeName, - String version, CodeVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, codeName, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String codeName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, codeName, orderBy, top, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Generate a storage location and credential for the client to upload a code asset to. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. + * @param codeName Container name. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @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}. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, - this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String codeName, + String orderBy, Integer top, String skip, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, registryName, codeName, orderBy, top, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -1033,10 +811,9 @@ private Mono> createOrGetStartPendingUpl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1044,38 +821,14 @@ private Mono> createOrGetStartPendingUpl */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (codeName == null) { - return Mono.error(new IllegalArgumentException("Parameter codeName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, codeName, version, this.client.getApiVersion(), body, accept, context); + return FluxUtil + .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, + version, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1083,8 +836,8 @@ private Mono> createOrGetStartPendingUpl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1103,8 +856,8 @@ private Mono createOrGetStartPendingUploadAsync(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1115,8 +868,11 @@ private Mono createOrGetStartPendingUploadAsync(S @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, codeName, version, body, - context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrGetStartPendingUploadSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, codeName, version, contentType, accept, + body, context); } /** @@ -1124,8 +880,8 @@ public Response createOrGetStartPendingUploadWith * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1140,6 +896,8 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1151,13 +909,6 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour */ @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(), @@ -1166,6 +917,28 @@ private Mono> listNextSinglePageAsync(String nex } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1173,22 +946,14 @@ private Mono> listNextSinglePageAsync(String nex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of CodeVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java index 6925af5a4d76..9b98bbac41c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,37 +30,12 @@ public RegistryCodeVersionsImpl(RegistryCodeVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName, String codeName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, codeName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String codeName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, codeName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String codeName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, codeName, version); - } - - public void delete(String resourceGroupName, String registryName, String codeName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, codeName, version, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String codeName, String version, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, codeName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CodeVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CodeVersionImpl(inner.getValue(), this.manager())); } public CodeVersion get(String resourceGroupName, String registryName, String codeName, String version) { @@ -94,17 +69,34 @@ public CodeVersion createOrUpdate(String resourceGroupName, String registryName, } } + public void delete(String resourceGroupName, String registryName, String codeName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, version); + } + + public void delete(String resourceGroupName, String registryName, String codeName, String version, + Context context) { + this.serviceClient().delete(resourceGroupName, registryName, codeName, version, context); + } + + public PagedIterable list(String resourceGroupName, String registryName, String codeName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, codeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String codeName, + String orderBy, Integer top, String skip, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, codeName, orderBy, top, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeVersionImpl(inner1, this.manager())); + } + public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, String registryName, String codeName, String version, PendingUploadRequestDto body, Context context) { Response inner = this.serviceClient() .createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, codeName, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); } public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java index 43747c8f69f1..810e698cacc4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.RegistryComponentContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ComponentContainerResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,445 +51,382 @@ public final class RegistryComponentContainersClientImpl implements RegistryComp /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryComponentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryComponentContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryComponentContainers to be used + * The interface defining all the services for MachineLearningManagementClientRegistryComponentContainers to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryComponentContainers") public interface RegistryComponentContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); + @PathParam("componentName") String componentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComponentContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ComponentContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("componentName") String componentName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. + * @param componentName Container 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 paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String componentName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param componentName Container 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 paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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(), resourceGroupName, registryName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, + String componentName) { + return getWithResponseAsync(resourceGroupName, registryName, componentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. + * @param componentName Container name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String componentName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, componentName, accept, context); } /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param componentName Container 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 paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentContainerInner get(String resourceGroupName, String registryName, String componentName) { + return getWithResponse(resourceGroupName, registryName, componentName, Context.NONE).getValue(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String componentName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String componentName, ComponentContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String componentName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String componentName, ComponentContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, contentType, accept, body, + Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, componentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String componentName, ComponentContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, contentType, accept, body, + context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, componentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ComponentContainerInner.class, ComponentContainerInner.class, + this.client.getContext()); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName).getSyncPoller(); + public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, componentName, body); + return this.client.getLroResult(response, + ComponentContainerInner.class, ComponentContainerInner.class, Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName, context).getSyncPoller(); + public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, componentName, body, context); + return this.client.getLroResult(response, + ComponentContainerInner.class, ComponentContainerInner.class, context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName) { - return beginDeleteAsync(resourceGroupName, registryName, componentName).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, + String componentName, ComponentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, componentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + ComponentContainerInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, componentName, body).getFinalResult(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String componentName) { - deleteAsync(resourceGroupName, registryName, componentName).block(); + public ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + ComponentContainerInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, componentName, body, context).getFinalResult(); } /** @@ -497,18 +435,22 @@ public void delete(String resourceGroupName, String registryName, String compone * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container 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) - public void delete(String resourceGroupName, String registryName, String componentName, Context context) { - deleteAsync(resourceGroupName, registryName, componentName, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String componentName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -516,38 +458,17 @@ public void delete(String resourceGroupName, String registryName, String compone * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + private Response deleteWithResponse(String resourceGroupName, String registryName, String componentName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -556,37 +477,17 @@ private Mono> getWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String componentName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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(), resourceGroupName, registryName, - componentName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, String componentName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, context); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -594,303 +495,243 @@ private Mono> getWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, String componentName) { - return getWithResponseAsync(resourceGroupName, registryName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, componentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container 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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String componentName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, componentName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String componentName) { + Response response = deleteWithResponse(resourceGroupName, registryName, componentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container 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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner get(String resourceGroupName, String registryName, String componentName) { - return getWithResponse(resourceGroupName, registryName, componentName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String componentName, Context context) { + Response response = deleteWithResponse(resourceGroupName, registryName, componentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, ComponentContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName, String componentName) { + return beginDeleteAsync(resourceGroupName, registryName, componentName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, ComponentContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName, String componentName) { + beginDelete(resourceGroupName, registryName, componentName).getFinalResult(); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentContainerInner.class, ComponentContainerInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String componentName, Context context) { + beginDelete(resourceGroupName, registryName, componentName, context).getFinalResult(); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentContainerInner.class, ComponentContainerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, skip, 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())); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, ComponentContainerInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, ComponentContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, ComponentContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String skip, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -902,13 +743,6 @@ public ComponentContainerInner createOrUpdate(String resourceGroupName, String r */ @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(), @@ -917,6 +751,28 @@ private Mono> listNextSinglePageAsync(Str } /** + * List containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -924,22 +780,14 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of ComponentContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java index 97d906d0d38f..32ec9af6700d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,36 +27,12 @@ public RegistryComponentContainersImpl(RegistryComponentContainersClient innerCl this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String componentName) { - this.serviceClient().delete(resourceGroupName, registryName, componentName); - } - - public void delete(String resourceGroupName, String registryName, String componentName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, componentName, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String componentName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentContainerImpl(inner.getValue(), this.manager())); } public ComponentContainer get(String resourceGroupName, String registryName, String componentName) { @@ -90,6 +66,26 @@ public ComponentContainer createOrUpdate(String resourceGroupName, String regist } } + public void delete(String resourceGroupName, String registryName, String componentName) { + this.serviceClient().delete(resourceGroupName, registryName, componentName); + } + + public void delete(String resourceGroupName, String registryName, String componentName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); + } + private RegistryComponentContainersClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java index b219aac9ce00..a9533e6d8776 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.RegistryComponentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ComponentVersionResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -50,482 +51,404 @@ public final class RegistryComponentVersionsClientImpl implements RegistryCompon /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryComponentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryComponentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryComponentVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryComponentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryComponentVersions to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for MachineLearningManagementClientRegistryComponentVersions to be used + * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryComponentVersions") public interface RegistryComponentVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @PathParam("componentName") String componentName, @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") - @ExpectedResponses({ 200, 202, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("componentName") String componentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("componentName") String componentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ComponentVersionInner body, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("componentName") String componentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ComponentVersionInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ComponentVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, @PathParam("version") String version, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("componentName") String componentName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String componentName, String orderBy, Integer top, String skip) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String componentName, String version) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, this.client.getApiVersion(), orderBy, top, skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String componentName, String orderBy, Integer top, String skip, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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(), resourceGroupName, registryName, - componentName, this.client.getApiVersion(), orderBy, top, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String componentName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container 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 paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String componentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, String componentName, + String version) { + return getWithResponseAsync(resourceGroupName, registryName, componentName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. + * @param version Version identifier. * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String componentName, String orderBy, Integer top, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String componentName, String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, componentName, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String componentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, + String version) { + return getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE).getValue(); } /** - * List versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String componentName, String orderBy, Integer top, String skip, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, componentName, orderBy, top, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String componentName, String version, ComponentVersionInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, version, contentType, + accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String componentName, String version, ComponentVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, version, contentType, + accept, body, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String componentName, String version, ComponentVersionInner body, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, version, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, version, contentType, + accept, body, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName, String version) { + private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String componentName, String version, + ComponentVersionInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, componentName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ComponentVersionInner.class, ComponentVersionInner.class, this.client.getContext()); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String componentName, String version, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, componentName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, String version, + ComponentVersionInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, componentName, version, body); + return this.client.getLroResult(response, + ComponentVersionInner.class, ComponentVersionInner.class, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName, version).getSyncPoller(); + public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String componentName, String version, ComponentVersionInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, componentName, version, body, context); + return this.client.getLroResult(response, + ComponentVersionInner.class, ComponentVersionInner.class, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String componentName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, componentName, version, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, + String componentName, String version, ComponentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName, - String version) { - return beginDeleteAsync(resourceGroupName, registryName, componentName, version).last() - .flatMap(this.client::getLroFinalResultOrError); + public ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + String version, ComponentVersionInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, componentName, version, body).getFinalResult(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String componentName, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, componentName, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, + String version, ComponentVersionInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, componentName, version, body, context) + .getFinalResult(); } /** @@ -538,10 +461,15 @@ private Mono deleteAsync(String resourceGroupName, String registryName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String registryName, String componentName, String version) { - deleteAsync(resourceGroupName, registryName, componentName, version).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String componentName, String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -551,105 +479,61 @@ public void delete(String resourceGroupName, String registryName, String compone * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @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 void delete(String resourceGroupName, String registryName, String componentName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, componentName, version, context).block(); + private Response deleteWithResponse(String resourceGroupName, String registryName, String componentName, + String version) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, version, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @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 version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName, String componentName, + String version, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @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 version along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String componentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, registryName, - componentName, version, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String componentName, String version) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, componentName, version); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -658,17 +542,17 @@ private Mono> getWithResponseAsync(String resour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String componentName, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, componentName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String componentName, String version) { + Response response = deleteWithResponse(resourceGroupName, registryName, componentName, version); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -678,16 +562,18 @@ private Mono getAsync(String resourceGroupName, String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String componentName, String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, componentName, version, context).block(); + Response response + = deleteWithResponse(resourceGroupName, registryName, componentName, version, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -696,288 +582,220 @@ public Response getWithResponse(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner get(String resourceGroupName, String registryName, String componentName, + private Mono deleteAsync(String resourceGroupName, String registryName, String componentName, String version) { - return getWithResponse(resourceGroupName, registryName, componentName, version, Context.NONE).getValue(); + return beginDeleteAsync(resourceGroupName, registryName, componentName, version).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, componentName, version, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public void delete(String resourceGroupName, String registryName, String componentName, String version) { + beginDelete(resourceGroupName, registryName, componentName, version).getFinalResult(); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String componentName, String version, ComponentVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, componentName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentVersionInner.class, ComponentVersionInner.class, - this.client.getContext()); + public void delete(String resourceGroupName, String registryName, String componentName, String version, + Context context) { + beginDelete(resourceGroupName, registryName, componentName, version, context).getFinalResult(); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComponentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String componentName, String version, ComponentVersionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, componentName, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ComponentVersionInner.class, ComponentVersionInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String componentName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, componentName, orderBy, top, skip, + 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())); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, + String componentName, String orderBy, Integer top, String skip) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComponentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String componentName, String version, ComponentVersionInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, + String componentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, componentName, orderBy, top, skip), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, String version, ComponentVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String componentName, String orderBy, Integer top, String skip) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, componentName, orderBy, top, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String componentName, String version, ComponentVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String componentName, String orderBy, Integer top, String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, componentName, orderBy, top, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, + String componentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, registryName, componentName, orderBy, top, skip), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate(String resourceGroupName, String registryName, String componentName, - String version, ComponentVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, componentName, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, + String componentName, String orderBy, Integer top, String skip, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, registryName, componentName, orderBy, top, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -989,13 +807,6 @@ public ComponentVersionInner createOrUpdate(String resourceGroupName, String reg */ @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(), @@ -1004,6 +815,28 @@ private Mono> listNextSinglePageAsync(Strin } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1011,22 +844,14 @@ private Mono> listNextSinglePageAsync(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 a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of ComponentVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java index 92c93b6a0c3c..aad05a6eed72 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,38 +27,12 @@ public RegistryComponentVersionsImpl(RegistryComponentVersionsClient innerClient this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName, String componentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, componentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String componentName, - String orderBy, Integer top, String skip, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, componentName, orderBy, top, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String componentName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, componentName, version); - } - - public void delete(String resourceGroupName, String registryName, String componentName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, componentName, version, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String componentName, String version, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, componentName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ComponentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ComponentVersionImpl(inner.getValue(), this.manager())); } public ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version) { @@ -92,6 +66,28 @@ public ComponentVersion createOrUpdate(String resourceGroupName, String registry } } + public void delete(String resourceGroupName, String registryName, String componentName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, version); + } + + public void delete(String resourceGroupName, String registryName, String componentName, String version, + Context context) { + this.serviceClient().delete(resourceGroupName, registryName, componentName, version, context); + } + + public PagedIterable list(String resourceGroupName, String registryName, String componentName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, componentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String componentName, + String orderBy, Integer top, String skip, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, componentName, orderBy, top, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); + } + private RegistryComponentVersionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java index ef927d7a9cfc..fd1642470130 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.RegistryDataContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.DataContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -51,451 +52,379 @@ public final class RegistryDataContainersClientImpl implements RegistryDataConta /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryDataContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryDataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryDataContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryDataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryDataContainers to be used by + * The interface defining all the services for MachineLearningManagementClientRegistryDataContainers to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryDataContainers") public interface RegistryDataContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DataContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DataContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container 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 paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container 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 paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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(), resourceGroupName, registryName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, String name) { + return getWithResponseAsync(resourceGroupName, registryName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param name Container name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String name, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, name, accept, context); } /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container 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 paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DataContainerInner get(String resourceGroupName, String registryName, String name) { + return getWithResponse(resourceGroupName, registryName, name, Context.NONE).getValue(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String name, DataContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, String name, + DataContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, name, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, contentType, accept, body, + Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, String name, + DataContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, contentType, accept, body, context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + private PollerFlux, DataContainerInner> + beginCreateOrUpdateAsync(String resourceGroupName, String registryName, String name, DataContainerInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataContainerInner.class, DataContainerInner.class, this.client.getContext()); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name) { - return this.beginDeleteAsync(resourceGroupName, registryName, name).getSyncPoller(); + public SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String name, DataContainerInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, registryName, name, body); + return this.client.getLroResult(response, DataContainerInner.class, + DataContainerInner.class, Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, name, context).getSyncPoller(); + public SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String name, DataContainerInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, name, body, context); + return this.client.getLroResult(response, DataContainerInner.class, + DataContainerInner.class, context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name) { - return beginDeleteAsync(resourceGroupName, registryName, name).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, + DataContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param context The context to associate with this operation. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, + DataContainerInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, name, body).getFinalResult(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String name) { - deleteAsync(resourceGroupName, registryName, name).block(); + public DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, + DataContainerInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, name, body, context).getFinalResult(); } /** @@ -504,18 +433,22 @@ public void delete(String resourceGroupName, String registryName, String name) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container 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) - public void delete(String resourceGroupName, String registryName, String name, Context context) { - deleteAsync(resourceGroupName, registryName, name, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -523,38 +456,16 @@ public void delete(String resourceGroupName, String registryName, String name, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName, String name) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -563,37 +474,17 @@ private Mono> getWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, registryName, - name, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, String name, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, context); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -601,298 +492,250 @@ private Mono> getWithResponseAsync(String resourceG * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String name) { - return getWithResponseAsync(resourceGroupName, registryName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container 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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, registryName, name, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name) { + Response response = deleteWithResponse(resourceGroupName, registryName, name); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container 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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner get(String resourceGroupName, String registryName, String name) { - return getWithResponse(resourceGroupName, registryName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, + Context context) { + Response response = deleteWithResponse(resourceGroupName, registryName, name, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, DataContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName, String name) { + return beginDeleteAsync(resourceGroupName, registryName, name).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, DataContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, name, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName, String name) { + beginDelete(resourceGroupName, registryName, name).getFinalResult(); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataContainerInner> - beginCreateOrUpdateAsync(String resourceGroupName, String registryName, String name, DataContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataContainerInner.class, DataContainerInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String name, Context context) { + beginDelete(resourceGroupName, registryName, name, context).getFinalResult(); } /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String name, DataContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataContainerInner.class, DataContainerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + String skip, ListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, skip, listViewType, 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())); } /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataContainerInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String name, DataContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - DataContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, String skip, + ListViewType listViewType) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - DataContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, name, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate(String resourceGroupName, String registryName, String name, - DataContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List Data containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -904,13 +747,6 @@ public DataContainerInner createOrUpdate(String resourceGroupName, String regist */ @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(), @@ -919,6 +755,28 @@ private Mono> listNextSinglePageAsync(String n } /** + * List Data containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Data containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -926,22 +784,14 @@ private Mono> listNextSinglePageAsync(String n * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of DataContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java index 303494a1fc97..0ebd7cc665ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,36 +28,12 @@ public RegistryDataContainersImpl(RegistryDataContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String name) { - this.serviceClient().delete(resourceGroupName, registryName, name); - } - - public void delete(String resourceGroupName, String registryName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, name, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String name, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataContainerImpl(inner.getValue(), this.manager())); } public DataContainer get(String resourceGroupName, String registryName, String name) { @@ -90,6 +66,26 @@ public DataContainer createOrUpdate(String resourceGroupName, String registryNam } } + public void delete(String resourceGroupName, String registryName, String name) { + this.serviceClient().delete(resourceGroupName, registryName, name); + } + + public void delete(String resourceGroupName, String registryName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, name, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); + } + private RegistryDataContainersClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java index c07530dc1738..e6464d5506fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -39,37 +38,45 @@ public final class RegistryDataReferencesClientImpl implements RegistryDataRefer /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryDataReferencesClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryDataReferencesClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryDataReferencesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryDataReferencesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryDataReferences to be used by + * The interface defining all the services for MachineLearningManagementClientRegistryDataReferences to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryDataReferences") public interface RegistryDataReferencesService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/datareferences/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getBlobReferenceSas(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> getBlobReferenceSas(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") GetBlobReferenceSasRequestDto body, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") GetBlobReferenceSasRequestDto body, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/datareferences/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getBlobReferenceSasSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") GetBlobReferenceSasRequestDto body, Context context); } /** @@ -89,90 +96,15 @@ Mono> getBlobReferenceSas(@HostPar private Mono> getBlobReferenceSasWithResponseAsync( String resourceGroupName, String registryName, String name, String version, GetBlobReferenceSasRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.getBlobReferenceSas(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.getBlobReferenceSas(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get blob reference SAS Uri. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data reference name. - * @param version Version identifier. - * @param body Asset id and blob uri. - * @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 blob reference SAS Uri along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getBlobReferenceSasWithResponseAsync( - String resourceGroupName, String registryName, String name, String version, GetBlobReferenceSasRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getBlobReferenceSas(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context); - } - /** * Get blob reference SAS Uri. * @@ -210,8 +142,11 @@ private Mono getBlobReferenceSasAsync(Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response getBlobReferenceSasWithResponse(String resourceGroupName, String registryName, String name, String version, GetBlobReferenceSasRequestDto body, Context context) { - return getBlobReferenceSasWithResponseAsync(resourceGroupName, registryName, name, version, body, context) - .block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getBlobReferenceSasSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, contentType, accept, body, + context); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java index 15795769c719..22f035b4a406 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -31,12 +31,8 @@ public Response getBlobReferenceSasWithResponse( String registryName, String name, String version, GetBlobReferenceSasRequestDto body, Context context) { Response inner = this.serviceClient() .getBlobReferenceSasWithResponse(resourceGroupName, registryName, name, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new GetBlobReferenceSasResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GetBlobReferenceSasResponseDtoImpl(inner.getValue(), this.manager())); } public GetBlobReferenceSasResponseDto getBlobReferenceSas(String resourceGroupName, String registryName, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java index 63b8b6219f67..096d5b638fe2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,6 +28,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -35,7 +36,7 @@ import com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.DataVersionBaseResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; import java.nio.ByteBuffer; @@ -54,531 +55,424 @@ public final class RegistryDataVersionsClientImpl implements RegistryDataVersion /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryDataVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryDataVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryDataVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryDataVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryDataVersions to be used by the + * The interface defining all the services for MachineLearningManagementClientRegistryDataVersions to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryDataVersions") public interface RegistryDataVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("$tags") String tags, @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @PathParam("version") String version, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DataVersionBaseInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") DataVersionBaseInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("$tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("name") String name, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("$skip") String skip, @QueryParam("$tags") String tags, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono> createOrGetStartPendingUpload( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DataVersionBaseInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, + Response createOrGetStartPendingUploadSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("name") String name, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String name, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, this.client.getApiVersion(), orderBy, top, skip, tags, - listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, registryName, name, - this.client.getApiVersion(), orderBy, top, skip, tags, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's 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 paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, String name, + String version) { + return getWithResponseAsync(resourceGroupName, registryName, name, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. + * @param name Container name. + * @param version Version identifier. * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, - tags, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's 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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String name, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, name, version, accept, context); } /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version) { + return getWithResponse(resourceGroupName, registryName, name, version, Context.NONE).getValue(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String name, String version, DataVersionBaseInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, contentType, accept, + body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String name, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, String name, + String version, DataVersionBaseInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, name, version, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, contentType, accept, body, + Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name, String version) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, String name, + String version, DataVersionBaseInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, contentType, accept, body, + context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String name, String version, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, DataVersionBaseInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, name, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, version, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DataVersionBaseInner.class, DataVersionBaseInner.class, this.client.getContext()); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, name, version).getSyncPoller(); + public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, name, version, body); + return this.client.getLroResult(response, + DataVersionBaseInner.class, DataVersionBaseInner.class, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, - String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, name, version, context).getSyncPoller(); + public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, name, version, body, context); + return this.client.getLroResult(response, + DataVersionBaseInner.class, DataVersionBaseInner.class, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name, String version) { - return beginDeleteAsync(resourceGroupName, registryName, name, version).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, + String version, DataVersionBaseInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param context The context to associate with this operation. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String name, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, name, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, + String version, DataVersionBaseInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, name, version, body).getFinalResult(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String name, String version) { - deleteAsync(resourceGroupName, registryName, name, version).block(); + public DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, + String version, DataVersionBaseInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, name, version, body, context).getFinalResult(); } /** @@ -588,18 +482,22 @@ public void delete(String resourceGroupName, String registryName, String name, S * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @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) - public void delete(String resourceGroupName, String registryName, String name, String version, Context context) { - deleteAsync(resourceGroupName, registryName, name, version, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String name, String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -608,41 +506,17 @@ public void delete(String resourceGroupName, String registryName, String name, 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 version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName, String name, + String version) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -652,40 +526,17 @@ private Mono> getWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String name, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, registryName, - name, version, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, String name, + String version, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -694,317 +545,294 @@ private Mono> getWithResponseAsync(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String name, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String name, String version) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, name, version); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String name, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, name, version, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, + String version) { + Response response = deleteWithResponse(resourceGroupName, registryName, name, version); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner get(String resourceGroupName, String registryName, String name, String version) { - return getWithResponse(resourceGroupName, registryName, name, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String name, + String version, Context context) { + Response response = deleteWithResponse(resourceGroupName, registryName, name, version, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName, String name, String version) { + return beginDeleteAsync(resourceGroupName, registryName, name, version).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String name, String version, DataVersionBaseInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, name, version, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName, String name, String version) { + beginDelete(resourceGroupName, registryName, name, version).getFinalResult(); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataVersionBaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataVersionBaseInner.class, DataVersionBaseInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String name, String version, Context context) { + beginDelete(resourceGroupName, registryName, name, version, context).getFinalResult(); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DataVersionBaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, name, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DataVersionBaseInner.class, DataVersionBaseInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, orderBy, top, skip, tags, + listViewType, 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())); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DataVersionBaseInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String name, String version, DataVersionBaseInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, name, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String name, String orderBy, Integer top, String skip, String tags, ListViewType listViewType, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, name, version, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String name) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final String tags = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate(String resourceGroupName, String registryName, String name, - String version, DataVersionBaseInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, name, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, name, orderBy, top, skip, tags, + listViewType, context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -1012,8 +840,8 @@ public DataVersionBaseInner createOrUpdate(String resourceGroupName, String regi * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1023,37 +851,12 @@ public DataVersionBaseInner createOrUpdate(String resourceGroupName, String regi @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrGetStartPendingUploadWithResponseAsync( String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, - this.client.getApiVersion(), body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, name, + version, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1062,58 +865,8 @@ private Mono> createOrGetStartPendingUpl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, name, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Generate a storage location and credential for the client to upload a data asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1132,8 +885,8 @@ private Mono createOrGetStartPendingUploadAsync(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1144,8 +897,11 @@ private Mono createOrGetStartPendingUploadAsync(S @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, name, version, body, - context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrGetStartPendingUploadSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, name, version, contentType, accept, body, + context); } /** @@ -1153,8 +909,8 @@ public Response createOrGetStartPendingUploadWith * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1169,6 +925,8 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour } /** + * List data versions in the data container + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1180,13 +938,6 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour */ @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(), @@ -1195,6 +946,28 @@ private Mono> listNextSinglePageAsync(String } /** + * List data versions in the data container + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List data versions in the data container + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1202,22 +975,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of DataVersionBase entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java index 905b5b9904ab..7076d250ff67 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -31,36 +31,12 @@ public RegistryDataVersionsImpl(RegistryDataVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, name); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String name, - String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String name, String version) { - this.serviceClient().delete(resourceGroupName, registryName, name, version); - } - - public void delete(String resourceGroupName, String registryName, String name, String version, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, name, version, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String name, String version, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, name, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DataVersionBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DataVersionBaseImpl(inner.getValue(), this.manager())); } public DataVersionBase get(String resourceGroupName, String registryName, String name, String version) { @@ -94,16 +70,32 @@ public DataVersionBase createOrUpdate(String resourceGroupName, String registryN } } + public void delete(String resourceGroupName, String registryName, String name, String version) { + this.serviceClient().delete(resourceGroupName, registryName, name, version); + } + + public void delete(String resourceGroupName, String registryName, String name, String version, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, name, version, context); + } + + public PagedIterable list(String resourceGroupName, String registryName, String name) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, name); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String name, + String orderBy, Integer top, String skip, String tags, ListViewType listViewType, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, registryName, name, orderBy, top, skip, tags, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); + } + public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, String registryName, String name, String version, PendingUploadRequestDto body, Context context) { Response inner = this.serviceClient() .createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, name, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); } public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java index c6e8089e8815..88687a932a30 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.RegistryEnvironmentContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -51,442 +52,386 @@ public final class RegistryEnvironmentContainersClientImpl implements RegistryEn /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryEnvironmentContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryEnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryEnvironmentContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryEnvironmentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryEnvironmentContainers to be + * The interface defining all the services for MachineLearningManagementClientRegistryEnvironmentContainers to be * used by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryEnvironmentContainers") public interface RegistryEnvironmentContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + @PathParam("environmentName") String environmentName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, @HeaderParam("Accept") String accept, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EnvironmentContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") EnvironmentContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("environmentName") String environmentName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, + String registryName, String environmentName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String skip, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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(), resourceGroupName, registryName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, + String environmentName) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param environmentName Container name. This is case-sensitive. * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String environmentName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, environmentName, accept, context); } /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName) { + return getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE).getValue(); } /** - * List environment containers. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String environmentName, EnvironmentContainerInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, contentType, accept, + body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String environmentName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String environmentName, EnvironmentContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, contentType, accept, + body, Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String environmentName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String environmentName, EnvironmentContainerInner body, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, contentType, accept, + body, context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName) { + private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EnvironmentContainerInner.class, EnvironmentContainerInner.class, this.client.getContext()); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, environmentName, body); + return this.client.getLroResult(response, + EnvironmentContainerInner.class, EnvironmentContainerInner.class, Context.NONE); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName).getSyncPoller(); + public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, + Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, environmentName, body, context); + return this.client.getLroResult(response, + EnvironmentContainerInner.class, EnvironmentContainerInner.class, context); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, + String environmentName, EnvironmentContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName).last() - .flatMap(this.client::getLroFinalResultOrError); + public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, + String environmentName, EnvironmentContainerInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, environmentName, body).getFinalResult(); } /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, + String environmentName, EnvironmentContainerInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, environmentName, body, context).getFinalResult(); } /** @@ -494,14 +439,19 @@ private Mono deleteAsync(String resourceGroupName, String registryName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String registryName, String environmentName) { - deleteAsync(resourceGroupName, registryName, environmentName).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String environmentName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -509,99 +459,60 @@ public void delete(String resourceGroupName, String registryName, String environ * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 void delete(String resourceGroupName, String registryName, String environmentName, Context context) { - deleteAsync(resourceGroupName, registryName, environmentName, context).block(); + private Response deleteWithResponse(String resourceGroupName, String registryName, + String environmentName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. + * @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 container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String registryName, String environmentName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName, + String environmentName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, context); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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(), resourceGroupName, registryName, - environmentName, this.client.getApiVersion(), accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String environmentName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, environmentName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -609,17 +520,17 @@ private Mono> getWithResponseAsync(String re * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String environmentName) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + Response response = deleteWithResponse(resourceGroupName, registryName, environmentName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -628,16 +539,17 @@ private Mono getAsync(String resourceGroupName, 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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, String environmentName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName, context).block(); + Response response = deleteWithResponse(resourceGroupName, registryName, environmentName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -645,269 +557,195 @@ public Response getWithResponse(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner get(String resourceGroupName, String registryName, String environmentName) { - return getWithResponse(resourceGroupName, registryName, environmentName, Context.NONE).getValue(); + private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, EnvironmentContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public void delete(String resourceGroupName, String registryName, String environmentName) { + beginDelete(resourceGroupName, registryName, environmentName).getFinalResult(); } /** - * Create or update container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param environmentName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, EnvironmentContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, this.client.getApiVersion(), body, accept, context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentContainerInner.class, EnvironmentContainerInner.class, - this.client.getContext()); + public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { + beginDelete(resourceGroupName, registryName, environmentName, context).getFinalResult(); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentContainerInner.class, EnvironmentContainerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String skip, ListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, skip, listViewType, 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())); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, EnvironmentContainerInner body, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String skip, ListViewType listViewType) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String skip, ListViewType listViewType, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String registryName, - String environmentName, EnvironmentContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List environment containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -919,13 +757,6 @@ public EnvironmentContainerInner createOrUpdate(String resourceGroupName, String */ @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(), @@ -934,6 +765,28 @@ private Mono> listNextSinglePageAsync(S } /** + * List environment containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List environment containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -941,22 +794,14 @@ private Mono> listNextSinglePageAsync(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 a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java index 9541ffdac34e..123476866e6d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,36 +28,12 @@ public RegistryEnvironmentContainersImpl(RegistryEnvironmentContainersClient inn this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String environmentName) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName); - } - - public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String environmentName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EnvironmentContainerImpl(inner.getValue(), this.manager())); } public EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName) { @@ -91,6 +67,26 @@ public EnvironmentContainer createOrUpdate(String resourceGroupName, String regi } } + public void delete(String resourceGroupName, String registryName, String environmentName) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName); + } + + public void delete(String resourceGroupName, String registryName, String environmentName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); + } + private RegistryEnvironmentContainersClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java index cd56235fb341..92b099d40dc0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,13 +27,14 @@ 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.BinaryData; 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.machinelearning.fluent.RegistryEnvironmentVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -51,512 +52,410 @@ public final class RegistryEnvironmentVersionsClientImpl implements RegistryEnvi /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryEnvironmentVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryEnvironmentVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryEnvironmentVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryEnvironmentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryEnvironmentVersions to be used + * The interface defining all the services for MachineLearningManagementClientRegistryEnvironmentVersions to be used * by the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryEnvironmentVersions") public interface RegistryEnvironmentVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EnvironmentVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") EnvironmentVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("environmentName") String environmentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("environmentName") String environmentName, @PathParam("version") String version, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("environmentName") String environmentName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("environmentName") String environmentName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") EnvironmentVersionInner body, - @HeaderParam("Accept") String accept, Context context); + @PathParam("environmentName") String environmentName, @QueryParam("$orderBy") String orderBy, + @QueryParam("$top") Integer top, @QueryParam("$skip") String skip, + @QueryParam("listViewType") ListViewType listViewType, @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String environmentName, String orderBy, Integer top, String skip, - ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String environmentName, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, this.client.getApiVersion(), orderBy, top, skip, - listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, version, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String registryName, String environmentName, String orderBy, Integer top, String skip, - ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName 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(), resourceGroupName, registryName, - environmentName, this.client.getApiVersion(), orderBy, top, skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, - skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String environmentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, - skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, + String environmentName, String version) { + return getWithResponseAsync(resourceGroupName, registryName, environmentName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, - String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, - skip, listViewType, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String environmentName, String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, environmentName, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String environmentName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, + String version) { + return getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE).getValue(); } /** - * List versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, - String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String environmentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String environmentName, String version, EnvironmentVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, version, contentType, + accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String environmentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String environmentName, String version, EnvironmentVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, version, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, version, contentType, + accept, body, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String environmentName, String version, EnvironmentVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, version, contentType, + accept, body, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String environmentName, String version, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String environmentName, String version, + EnvironmentVersionInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), EnvironmentVersionInner.class, EnvironmentVersionInner.class, + this.client.getContext()); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, version).getSyncPoller(); + public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, String version, + EnvironmentVersionInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, environmentName, version, body); + return this.client.getLroResult(response, + EnvironmentVersionInner.class, EnvironmentVersionInner.class, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String environmentName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context) - .getSyncPoller(); + public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String environmentName, String version, + EnvironmentVersionInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, environmentName, version, body, context); + return this.client.getLroResult(response, + EnvironmentVersionInner.class, EnvironmentVersionInner.class, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName, - String version) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName, version).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, + String environmentName, String version, EnvironmentVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName, - String version, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, environmentName, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, + String version, EnvironmentVersionInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, environmentName, version, body).getFinalResult(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String environmentName, String version) { - deleteAsync(resourceGroupName, registryName, environmentName, version).block(); + public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, + String version, EnvironmentVersionInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, environmentName, version, body, context) + .getFinalResult(); } /** @@ -564,21 +463,24 @@ public void delete(String resourceGroupName, String registryName, String environ * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String registryName, String environmentName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, environmentName, version, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String environmentName, String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -587,43 +489,17 @@ public void delete(String resourceGroupName, String registryName, String environ * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + private Response deleteWithResponse(String resourceGroupName, String registryName, String environmentName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, version, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -633,41 +509,17 @@ private Mono> getWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + private Response deleteWithResponse(String resourceGroupName, String registryName, String environmentName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, registryName, - environmentName, version, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -676,328 +528,286 @@ private Mono> getWithResponseAsync(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, String environmentName, String version) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, environmentName, version); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, environmentName, version, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String environmentName, String version) { + Response response = deleteWithResponse(resourceGroupName, registryName, environmentName, version); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner get(String resourceGroupName, String registryName, String environmentName, - String version) { - return getWithResponse(resourceGroupName, registryName, environmentName, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String environmentName, String version, Context context) { + Response response + = deleteWithResponse(resourceGroupName, registryName, environmentName, version, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, String version, EnvironmentVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, environmentName, version, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName, String environmentName, + String version) { + return beginDeleteAsync(resourceGroupName, registryName, environmentName, version).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String environmentName, String version, EnvironmentVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, environmentName, version, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName, String environmentName, String version) { + beginDelete(resourceGroupName, registryName, environmentName, version).getFinalResult(); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentVersionInner.class, EnvironmentVersionInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String environmentName, String version, + Context context) { + beginDelete(resourceGroupName, registryName, environmentName, version, context).getFinalResult(); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EnvironmentVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, environmentName, version, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EnvironmentVersionInner.class, EnvironmentVersionInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String registryName, String environmentName, String orderBy, Integer top, String skip, + ListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, environmentName, orderBy, top, skip, + listViewType, 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())); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, + String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, + skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, EnvironmentVersionInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String environmentName, String version, - EnvironmentVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, + String environmentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, environmentName, orderBy, top, + skip, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, String version, EnvironmentVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, + environmentName, orderBy, top, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String environmentName, String version, EnvironmentVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, + String environmentName) { + final String orderBy = null; + final Integer top = null; + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, environmentName, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, + String environmentName, String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, environmentName, orderBy, top, + skip, listViewType, context), nextLink -> listNextSinglePage(nextLink, context)); } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1009,13 +819,6 @@ public EnvironmentVersionInner createOrUpdate(String resourceGroupName, String r */ @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(), @@ -1024,6 +827,28 @@ private Mono> listNextSinglePageAsync(Str } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1031,22 +856,14 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java index 24dafb6a874e..a52505553505 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,39 +28,12 @@ public RegistryEnvironmentVersionsImpl(RegistryEnvironmentVersionsClient innerCl this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName, - String environmentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String environmentName, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String environmentName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName, version); - } - - public void delete(String resourceGroupName, String registryName, String environmentName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, environmentName, version, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String environmentName, String version, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, environmentName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EnvironmentVersionImpl(inner.getValue(), this.manager())); } public EnvironmentVersion get(String resourceGroupName, String registryName, String environmentName, @@ -96,6 +69,29 @@ public EnvironmentVersion createOrUpdate(String resourceGroupName, String regist } } + public void delete(String resourceGroupName, String registryName, String environmentName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, version); + } + + public void delete(String resourceGroupName, String registryName, String environmentName, String version, + Context context) { + this.serviceClient().delete(resourceGroupName, registryName, environmentName, version, context); + } + + public PagedIterable list(String resourceGroupName, String registryName, + String environmentName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, environmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String environmentName, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, registryName, environmentName, orderBy, top, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); + } + private RegistryEnvironmentVersionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java index 37863e5db458..a4861ee653f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -9,6 +9,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; import com.azure.resourcemanager.machinelearning.models.PartialSku; @@ -79,6 +80,10 @@ public ArmResourceId managedResourceGroup() { return this.innerModel().managedResourceGroup(); } + public ManagedResourceGroupSettings managedResourceGroupSettings() { + return this.innerModel().managedResourceGroupSettings(); + } + public String mlFlowRegistryUri() { return this.innerModel().mlFlowRegistryUri(); } @@ -259,6 +264,11 @@ public RegistryImpl withManagedResourceGroup(ArmResourceId managedResourceGroup) return this; } + public RegistryImpl withManagedResourceGroupSettings(ManagedResourceGroupSettings managedResourceGroupSettings) { + this.innerModel().withManagedResourceGroupSettings(managedResourceGroupSettings); + return this; + } + public RegistryImpl withMlFlowRegistryUri(String mlFlowRegistryUri) { this.innerModel().withMlFlowRegistryUri(mlFlowRegistryUri); return this; @@ -291,6 +301,6 @@ public RegistryImpl withSku(PartialSku sku) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java index 6c8da0dd65a3..1cb9fd641c09 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,14 +27,15 @@ 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.BinaryData; 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.machinelearning.fluent.RegistryModelContainersClient; import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; +import com.azure.resourcemanager.machinelearning.implementation.models.ModelContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -51,453 +52,380 @@ public final class RegistryModelContainersClientImpl implements RegistryModelCon /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryModelContainersClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryModelContainersClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryModelContainers to be used by + * The interface defining all the services for MachineLearningManagementClientRegistryModelContainers to be used by * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryModelContainers") public interface RegistryModelContainersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("modelName") String modelName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ModelContainerInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ModelContainerInner body, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("modelName") String modelName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelContainerInner body, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("$skip") String skip, @QueryParam("listViewType") ListViewType listViewType, + @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String modelName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return container on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String skip, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName 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(), resourceGroupName, registryName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, String modelName) { + return getWithResponseAsync(resourceGroupName, registryName, modelName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param modelName Container name. This is case-sensitive. * @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 paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, + String modelName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, modelName, accept, context); } /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelContainerInner get(String resourceGroupName, String registryName, String modelName) { + return getWithResponse(resourceGroupName, registryName, modelName, Context.NONE).getValue(); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String modelName, ModelContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String modelName, ModelContainerInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, modelName, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, contentType, accept, body, + Context.NONE); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, modelName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String modelName, ModelContainerInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, contentType, accept, body, + context); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, modelName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ModelContainerInner.class, ModelContainerInner.class, this.client.getContext()); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName).getSyncPoller(); + public SyncPoller, ModelContainerInner> + beginCreateOrUpdate(String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, registryName, modelName, body); + return this.client.getLroResult(response, ModelContainerInner.class, + ModelContainerInner.class, Context.NONE); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName, context).getSyncPoller(); + public SyncPoller, ModelContainerInner> beginCreateOrUpdate( + String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, modelName, body, context); + return this.client.getLroResult(response, ModelContainerInner.class, + ModelContainerInner.class, context); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName) { - return beginDeleteAsync(resourceGroupName, registryName, modelName).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, + String modelName, ModelContainerInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, Context context) { - return beginDeleteAsync(resourceGroupName, registryName, modelName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, + ModelContainerInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, modelName, body).getFinalResult(); } /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String modelName) { - deleteAsync(resourceGroupName, registryName, modelName).block(); + public ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, + ModelContainerInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, modelName, body, context).getFinalResult(); } /** @@ -505,19 +433,23 @@ public void delete(String resourceGroupName, String registryName, String modelNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String registryName, String modelName, Context context) { - deleteAsync(resourceGroupName, registryName, modelName, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String modelName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -525,38 +457,16 @@ public void delete(String resourceGroupName, String registryName, String modelNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName, String modelName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -565,37 +475,17 @@ private Mono> getWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName 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(), resourceGroupName, registryName, - modelName, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, String modelName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, context); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -603,298 +493,251 @@ private Mono> getWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String modelName) { - return getWithResponseAsync(resourceGroupName, registryName, modelName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String modelName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, registryName, modelName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, - String modelName, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, modelName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String modelName) { + Response response = deleteWithResponse(resourceGroupName, registryName, modelName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. + * @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 container. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner get(String resourceGroupName, String registryName, String modelName) { - return getWithResponse(resourceGroupName, registryName, modelName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String modelName, Context context) { + Response response = deleteWithResponse(resourceGroupName, registryName, modelName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update model container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName, String modelName) { + return beginDeleteAsync(resourceGroupName, registryName, modelName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update model container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, ModelContainerInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, modelName, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName, String modelName) { + beginDelete(resourceGroupName, registryName, modelName).getFinalResult(); } /** - * Create or update model container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param modelName Container name. This is case-sensitive. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelContainerInner.class, ModelContainerInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String modelName, Context context) { + beginDelete(resourceGroupName, registryName, modelName, context).getFinalResult(); } /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelContainerInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelContainerInner.class, ModelContainerInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + String skip, ListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, skip, listViewType, 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())); } /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelContainerInner> - beginCreateOrUpdate(String resourceGroupName, String registryName, String modelName, ModelContainerInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String skip, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. - * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelContainerInner> beginCreateOrUpdate( - String resourceGroupName, String registryName, String modelName, ModelContainerInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String modelName, ModelContainerInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String skip, ListViewType listViewType) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, - String modelName, ModelContainerInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String skip, ListViewType listViewType, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName) { + final String skip = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List model containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -906,13 +749,6 @@ public ModelContainerInner createOrUpdate(String resourceGroupName, String regis */ @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(), @@ -921,6 +757,28 @@ private Mono> listNextSinglePageAsync(String } /** + * List model containers. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List model containers. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -928,22 +786,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelContainer entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java index 51e42539e42d..82328465b8bf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,36 +28,12 @@ public RegistryModelContainersImpl(RegistryModelContainersClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String modelName) { - this.serviceClient().delete(resourceGroupName, registryName, modelName); - } - - public void delete(String resourceGroupName, String registryName, String modelName, Context context) { - this.serviceClient().delete(resourceGroupName, registryName, modelName, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String modelName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ModelContainerImpl(inner.getValue(), this.manager())); } public ModelContainer get(String resourceGroupName, String registryName, String modelName) { @@ -91,6 +67,26 @@ public ModelContainer createOrUpdate(String resourceGroupName, String registryNa } } + public void delete(String resourceGroupName, String registryName, String modelName) { + this.serviceClient().delete(resourceGroupName, registryName, modelName); + } + + public void delete(String resourceGroupName, String registryName, String modelName, Context context) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, context); + } + + public PagedIterable list(String resourceGroupName, String registryName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, registryName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); + } + private RegistryModelContainersClient serviceClient() { return this.innerClient; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java index 67fb67a1dcb0..e52e4b9f9e33 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,6 +28,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -35,8 +36,8 @@ import com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; import com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner; +import com.azure.resourcemanager.machinelearning.implementation.models.ModelVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -54,550 +55,427 @@ public final class RegistryModelVersionsClientImpl implements RegistryModelVersi /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of RegistryModelVersionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - RegistryModelVersionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + RegistryModelVersionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(RegistryModelVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesRegistryModelVersions to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for MachineLearningManagementClientRegistryModelVersions to be used by + * the proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientRegistryModelVersions") public interface RegistryModelVersionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, - @QueryParam("version") String version, @QueryParam("description") String description, - @QueryParam("tags") String tags, @QueryParam("properties") String properties, - @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("modelName") String modelName, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ModelVersionInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @PathParam("version") String version, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ModelVersionInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("modelName") String modelName, @PathParam("version") String version, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @PathParam("version") String version, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, - @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("modelName") String modelName, @QueryParam("$skip") String skip, + @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("version") String version, @QueryParam("description") String description, + @QueryParam("tags") String tags, @QueryParam("properties") String properties, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, + @PathParam("modelName") String modelName, @QueryParam("$skip") String skip, + @QueryParam("$orderBy") String orderBy, @QueryParam("$top") Integer top, + @QueryParam("version") String version, @QueryParam("description") String description, + @QueryParam("tags") String tags, @QueryParam("properties") String properties, + @QueryParam("listViewType") ListViewType listViewType, @HeaderParam("Accept") String accept, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrGetStartPendingUpload( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ModelVersionInner body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrGetStartPendingUpload(@HostParam("$host") String endpoint, + Response createOrGetStartPendingUploadSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("registryName") String registryName, @PathParam("modelName") String modelName, @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") PendingUploadRequestDto body, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PendingUploadRequestDto body, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String modelName, String skip, String orderBy, Integer top, String version, String description, String tags, - String properties, ListViewType listViewType) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String registryName, + String modelName, String version) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, this.client.getApiVersion(), skip, orderBy, top, version, - description, tags, properties, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return version on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String registryName, - String modelName, String skip, String orderBy, Integer top, String version, String description, String tags, - String properties, ListViewType listViewType, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName 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(), resourceGroupName, registryName, - modelName, this.client.getApiVersion(), skip, orderBy, top, version, description, tags, properties, - listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, - version, description, tags, properties, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final String tags = null; - final String properties = null; - final ListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, - version, description, tags, properties, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String registryName, String modelName, + String version) { + return getWithResponseAsync(resourceGroupName, registryName, modelName, version) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. + * @return version along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, version, - description, tags, properties, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String registryName, String modelName, + String version, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, registryName, modelName, version, accept, context); } /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String modelName) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final String tags = null; - final String properties = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, version, - description, tags, properties, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version) { + return getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE).getValue(); } /** - * List versions. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, version, - description, tags, properties, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String registryName, String modelName, String version, ModelVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, contentType, + accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String modelName, String version, ModelVersionInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, modelName, version, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, contentType, accept, + body, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName, String version) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, modelName, version); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String registryName, + String modelName, String version, ModelVersionInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, contentType, accept, + body, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, - String modelName, String version, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( + String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, registryName, modelName, version, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ModelVersionInner.class, ModelVersionInner.class, this.client.getContext()); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName, String version) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName, version).getSyncPoller(); + public SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String modelName, String version, ModelVersionInner body) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, modelName, version, body); + return this.client.getLroResult(response, ModelVersionInner.class, + ModelVersionInner.class, Context.NONE); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, - String modelName, String version, Context context) { - return this.beginDeleteAsync(resourceGroupName, registryName, modelName, version, context).getSyncPoller(); + public SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, + String registryName, String modelName, String version, ModelVersionInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, registryName, modelName, version, body, context); + return this.client.getLroResult(response, ModelVersionInner.class, + ModelVersionInner.class, context); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, String version) { - return beginDeleteAsync(resourceGroupName, registryName, modelName, version).last() + private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String modelName, + String version, ModelVersionInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, String version, - Context context) { - return beginDeleteAsync(resourceGroupName, registryName, modelName, version, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, + String version, ModelVersionInner body) { + return beginCreateOrUpdate(resourceGroupName, registryName, modelName, version, body).getFinalResult(); } /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String registryName, String modelName, String version) { - deleteAsync(resourceGroupName, registryName, modelName, version).block(); + public ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, + String version, ModelVersionInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, registryName, modelName, version, body, context).getFinalResult(); } /** @@ -605,21 +483,24 @@ public void delete(String resourceGroupName, String registryName, String modelNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public void delete(String resourceGroupName, String registryName, String modelName, String version, - Context context) { - deleteAsync(resourceGroupName, registryName, modelName, version, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String registryName, + String modelName, String version) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -628,41 +509,17 @@ public void delete(String resourceGroupName, String registryName, String modelNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String registryName, String modelName, + String version) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -672,40 +529,17 @@ private Mono> getWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String registryName, - String modelName, String version, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version 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(), resourceGroupName, registryName, - modelName, version, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String registryName, String modelName, + String version, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, context); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. @@ -714,317 +548,310 @@ private Mono> getWithResponseAsync(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String registryName, String modelName, - String version) { - return getWithResponseAsync(resourceGroupName, registryName, modelName, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String registryName, + String modelName, String version) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, registryName, modelName, version); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String registryName, String modelName, - String version, Context context) { - return getWithResponseAsync(resourceGroupName, registryName, modelName, version, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String modelName, String version) { + Response response = deleteWithResponse(resourceGroupName, registryName, modelName, version); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner get(String resourceGroupName, String registryName, String modelName, String version) { - return getWithResponse(resourceGroupName, registryName, modelName, version, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String registryName, + String modelName, String version, Context context) { + Response response + = deleteWithResponse(resourceGroupName, registryName, modelName, version, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), body, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String registryName, String modelName, String version) { + return beginDeleteAsync(resourceGroupName, registryName, modelName, version).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body, 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - registryName, modelName, version, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String registryName, String modelName, String version) { + beginDelete(resourceGroupName, registryName, modelName, version).getFinalResult(); } /** - * Create or update version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelVersionInner.class, ModelVersionInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String registryName, String modelName, String version, + Context context) { + beginDelete(resourceGroupName, registryName, modelName, version, context).getFinalResult(); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ModelVersionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String registryName, String modelName, String version, ModelVersionInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, registryName, modelName, version, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ModelVersionInner.class, ModelVersionInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String registryName, + String modelName, String skip, String orderBy, Integer top, String version, String description, String tags, + String properties, ListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, skip, orderBy, top, + version, description, tags, properties, listViewType, 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())); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. * @param version Version identifier. - * @param body Version entity to create or update. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName, + String skip, String orderBy, Integer top, String version, String description, String tags, String properties, + ListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, + version, description, tags, properties, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ModelVersionInner> beginCreateOrUpdate(String resourceGroupName, - String registryName, String modelName, String version, ModelVersionInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context) - .getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String registryName, String modelName) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final String tags = null; + final String properties = null; + final ListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, registryName, modelName, skip, orderBy, top, + version, description, tags, properties, listViewType), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. * @param version Version identifier. - * @param body Version entity to create or update. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String modelName, String skip, String orderBy, Integer top, String version, String description, String tags, + String properties, ListViewType listViewType) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, + skip, orderBy, top, version, description, tags, properties, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. * @param version Version identifier. - * @param body Version entity to create or update. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String registryName, + String modelName, String skip, String orderBy, Integer top, String version, String description, String tags, + String properties, ListViewType listViewType, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, + skip, orderBy, top, version, description, tags, properties, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param modelName Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String modelName) { + final String skip = null; + final String orderBy = null; + final Integer top = null; + final String version = null; + final String description = null; + final String tags = null; + final String properties = null; + final ListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, modelName, skip, orderBy, top, + version, description, tags, properties, listViewType), nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. * @param version Version identifier. - * @param body Version entity to create or update. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate(String resourceGroupName, String registryName, String modelName, - String version, ModelVersionInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, registryName, modelName, version, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String registryName, String modelName, + String skip, String orderBy, Integer top, String version, String description, String tags, String properties, + ListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, registryName, modelName, skip, orderBy, top, + version, description, tags, properties, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -1032,7 +859,7 @@ public ModelVersionInner createOrUpdate(String resourceGroupName, String registr * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1043,37 +870,12 @@ public ModelVersionInner createOrUpdate(String resourceGroupName, String registr @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrGetStartPendingUploadWithResponseAsync( String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body) { - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrGetStartPendingUpload(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, - this.client.getApiVersion(), body, accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, registryName, + modelName, version, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1082,57 +884,7 @@ private Mono> createOrGetStartPendingUpl * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Pending upload request object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrGetStartPendingUploadWithResponseAsync( - String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body, - 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 (registryName == null) { - return Mono.error(new IllegalArgumentException("Parameter registryName is required and cannot be null.")); - } - if (modelName == null) { - return Mono.error(new IllegalArgumentException("Parameter modelName is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrGetStartPendingUpload(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, registryName, modelName, version, this.client.getApiVersion(), body, accept, context); - } - - /** - * Generate a storage location and credential for the client to upload a model asset to. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1152,7 +904,7 @@ private Mono createOrGetStartPendingUploadAsync(S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @param context The context to associate with this operation. @@ -1164,8 +916,11 @@ private Mono createOrGetStartPendingUploadAsync(S @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body, Context context) { - return createOrGetStartPendingUploadWithResponseAsync(resourceGroupName, registryName, modelName, version, body, - context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrGetStartPendingUploadSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, registryName, modelName, version, contentType, accept, + body, context); } /** @@ -1173,7 +928,7 @@ public Response createOrGetStartPendingUploadWith * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1189,6 +944,8 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour } /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1200,13 +957,6 @@ public PendingUploadResponseDtoInner createOrGetStartPendingUpload(String resour */ @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(), @@ -1215,6 +965,28 @@ private Mono> listNextSinglePageAsync(String ne } /** + * List versions. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List versions. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1222,22 +994,14 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of ModelVersion entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java index e27d95552ea4..c812fdfb7564 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -31,39 +31,12 @@ public RegistryModelVersionsImpl(RegistryModelVersionsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String registryName, String modelName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, modelName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String registryName, String modelName, - String skip, String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context) { - PagedIterable inner = this.serviceClient() - .list(resourceGroupName, registryName, modelName, skip, orderBy, top, version, description, tags, - properties, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String registryName, String modelName, String version) { - this.serviceClient().delete(resourceGroupName, registryName, modelName, version); - } - - public void delete(String resourceGroupName, String registryName, String modelName, String version, - Context context) { - this.serviceClient().delete(resourceGroupName, registryName, modelName, version, context); - } - public Response getWithResponse(String resourceGroupName, String registryName, String modelName, String version, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, registryName, modelName, version, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ModelVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ModelVersionImpl(inner.getValue(), this.manager())); } public ModelVersion get(String resourceGroupName, String registryName, String modelName, String version) { @@ -97,17 +70,36 @@ public ModelVersion createOrUpdate(String resourceGroupName, String registryName } } + public void delete(String resourceGroupName, String registryName, String modelName, String version) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, version); + } + + public void delete(String resourceGroupName, String registryName, String modelName, String version, + Context context) { + this.serviceClient().delete(resourceGroupName, registryName, modelName, version, context); + } + + public PagedIterable list(String resourceGroupName, String registryName, String modelName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, registryName, modelName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String registryName, String modelName, + String skip, String orderBy, Integer top, String version, String description, String tags, String properties, + ListViewType listViewType, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, registryName, modelName, skip, orderBy, top, version, description, tags, + properties, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); + } + public Response createOrGetStartPendingUploadWithResponse(String resourceGroupName, String registryName, String modelName, String version, PendingUploadRequestDto body, Context context) { Response inner = this.serviceClient() .createOrGetStartPendingUploadWithResponse(resourceGroupName, registryName, modelName, version, body, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PendingUploadResponseDtoImpl(inner.getValue(), this.manager())); } public PendingUploadResponseDto createOrGetStartPendingUpload(String resourceGroupName, String registryName, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java index cd2a6cecc972..85da21504248 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java index 587759ff4f32..d91602380ceb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java index 99af457f6cbd..11bd5b88b02a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java index 245dfad807f6..5ae60e573a0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,14 +27,15 @@ 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.BinaryData; 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.machinelearning.fluent.SchedulesClient; import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; +import com.azure.resourcemanager.machinelearning.implementation.models.ScheduleResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -51,848 +52,689 @@ public final class SchedulesClientImpl implements SchedulesClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of SchedulesClientImpl. * * @param client the instance of the service client containing this operation class. */ - SchedulesClientImpl(AzureMachineLearningWorkspacesImpl client) { + SchedulesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(SchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesSchedules to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientSchedules to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientSchedules") public interface SchedulesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @QueryParam("listViewType") ScheduleListViewType listViewType, @HeaderParam("Accept") String accept, - Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ScheduleInner body, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ScheduleInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @QueryParam("$skip") String skip, @QueryParam("listViewType") ScheduleListViewType listViewType, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ScheduleInner body, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @QueryParam("listViewType") ScheduleListViewType listViewType, + @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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule 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 paginated list of Schedule entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return schedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ScheduleListViewType listViewType) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, listViewType, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule 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 paginated list of Schedule entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return schedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - String skip, ScheduleListViewType listViewType, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, listViewType, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ScheduleListViewType listViewType = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of Schedule entities as paginated response with {@link PagedIterable}. + * @return schedule along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ScheduleListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule 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 paginated list of Schedule entities as paginated response with {@link PagedIterable}. + * @return schedule. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ScheduleInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ScheduleInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param context The context to associate with this operation. + * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Resource Manager resource envelope along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + ScheduleInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Resource Manager resource envelope along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + ScheduleInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param context The context to associate with this operation. + * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync(String resourceGroupName, + String workspaceName, String name, ScheduleInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ScheduleInner.class, ScheduleInner.class, this.client.getContext()); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, ScheduleInner.class, + ScheduleInner.class, Context.NONE); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); + public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, ScheduleInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, ScheduleInner.class, + ScheduleInner.class, context); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, + ScheduleInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param context The context to associate with this operation. + * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ScheduleInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body).getFinalResult(); } /** - * Delete schedule. + * Create or update schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. + * @param body Schedule definition. + * @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 azure Resource Manager resource envelope. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, + Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body, context).getFinalResult(); } /** * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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 schedule along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, Context.NONE); } /** - * Get schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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 schedule along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** - * Get schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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 schedule on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Get schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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 schedule along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Get schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule 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 schedule. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param body Schedule definition. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param body Schedule definition. - * @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 azure Resource Manager resource envelope along with {@link Response} on successful completion of - * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + public void delete(String resourceGroupName, String workspaceName, String name) { + beginDelete(resourceGroupName, workspaceName, name).getFinalResult(); } /** - * Create or update schedule. + * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. - * @param body Schedule definition. + * @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 azure Resource Manager resource envelope. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScheduleInner.class, ScheduleInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + beginDelete(resourceGroupName, workspaceName, name, context).getFinalResult(); } /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ScheduleInner.class, ScheduleInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, + String skip, ScheduleListViewType listViewType) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, listViewType, 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())); } /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 azure Resource Manager resource envelope. + * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. + * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, String name, ScheduleInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + final ScheduleListViewType listViewType = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of Schedule entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - ScheduleInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. * @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 azure Resource Manager resource envelope on successful completion of {@link Mono}. + * @return a paginated list of Schedule entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, String name, - ScheduleInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, listViewType, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. + * @param workspaceName Azure Machine Learning Workspace 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 azure Resource Manager resource envelope. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ScheduleInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + final ScheduleListViewType listViewType = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType), + nextLink -> listNextSinglePage(nextLink)); } /** - * Create or update schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. * @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 azure Resource Manager resource envelope. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, listViewType, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** + * List schedules in specified workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -904,13 +746,6 @@ public ScheduleInner createOrUpdate(String resourceGroupName, String workspaceNa */ @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(), @@ -919,6 +754,28 @@ private Mono> listNextSinglePageAsync(String nextLi } /** + * List schedules in specified workspace. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of Schedule entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List schedules in specified workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -926,22 +783,14 @@ private Mono> listNextSinglePageAsync(String nextLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of Schedule entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a paginated list of Schedule entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java index ac5df25345fd..bd39460b367c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,16 +28,21 @@ public SchedulesImpl(SchedulesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ScheduleImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); + public Schedule get(String resourceGroupName, String workspaceName, String name) { + ScheduleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ScheduleImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -48,25 +53,16 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ScheduleImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); } - public Schedule get(String resourceGroupName, String workspaceName, String name) { - ScheduleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ScheduleImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); } public Schedule getById(String id) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java index 0bd10a98774f..6e7584a67c9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -56,14 +56,14 @@ public ServerlessEndpointProperties properties() { return this.innerModel().properties(); } - public String kind() { - return this.innerModel().kind(); - } - public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public String kind() { + return this.innerModel().kind(); + } + public Sku sku() { return this.innerModel().sku(); } @@ -214,13 +214,13 @@ public ServerlessEndpointImpl withTags(Map tags) { } } - public ServerlessEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); + public ServerlessEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public ServerlessEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public ServerlessEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } @@ -229,17 +229,17 @@ public ServerlessEndpointImpl withSku(Sku sku) { return this; } - public ServerlessEndpointImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); + public ServerlessEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); return this; } - public ServerlessEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); + public ServerlessEndpointImpl withSku(PartialSku sku) { + this.updateBody.withSku(sku); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java index a246871073bc..18f5a14c9f76 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -36,9 +37,9 @@ import com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient; import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; +import com.azure.resourcemanager.machinelearning.implementation.models.ServerlessEndpointTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointTrackedResourceArmPaginatedResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -55,97 +56,156 @@ public final class ServerlessEndpointsClientImpl implements ServerlessEndpointsC /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of ServerlessEndpointsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ServerlessEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + ServerlessEndpointsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(ServerlessEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesServerlessEndpoints to be used by the + * The interface defining all the services for MachineLearningManagementClientServerlessEndpoints to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientServerlessEndpoints") public interface ServerlessEndpointsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ServerlessEndpointInner body, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ServerlessEndpointInner body, + Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithSkuAndIdentity body, - @HeaderParam("Accept") String accept, Context context); + @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}") - @ExpectedResponses({ 200, 201 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/listKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> listKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ServerlessEndpointInner body, @HeaderParam("Accept") String accept, - Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response listKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/regenerateKeys") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> regenerateKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RegenerateEndpointKeysRequest body, + Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/serverlessEndpoints/{name}/regenerateKeys") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKeys(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response regenerateKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegenerateEndpointKeysRequest body, @HeaderParam("Accept") String accept, + @PathParam("name") String name, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") RegenerateEndpointKeysRequest body, Context context); @Headers({ "Content-Type: application/json" }) @@ -153,625 +213,372 @@ Mono>> regenerateKeys(@HostParam("$host") String endpo @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * List Serverless Endpoints. + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Serverless Endpoint 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 paginated list of ServerlessEndpoint entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return serverless Endpoint along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List Serverless Endpoints. + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Serverless Endpoint 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 paginated list of ServerlessEndpoint entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return serverless Endpoint on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String workspaceName, String skip, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, - this.client.getApiVersion(), skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); + private Mono getAsync(String resourceGroupName, String workspaceName, String name) { + return getWithResponseAsync(resourceGroupName, workspaceName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * List Serverless Endpoints. + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Serverless Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Serverless Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + * @return serverless Endpoint along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String workspaceName, + String name, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, name, accept, context); } /** - * List Serverless Endpoints. + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Serverless Endpoint 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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + * @return serverless Endpoint. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, String name, ServerlessEndpointInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. + * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. + * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - String name, Context context) { - context = this.client.mergeContext(context); + private PollerFlux, ServerlessEndpointInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, + this.client.getContext()); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); + public SyncPoller, ServerlessEndpointInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, + ServerlessEndpointInner.class, ServerlessEndpointInner.class, Context.NONE); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during 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. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); - } - - /** - * Delete Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint 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 resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name).last() - .flatMap(this.client::getLroFinalResultOrError); + public SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context) { + Response response + = createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, + ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. + * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context).last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + String name, ServerlessEndpointInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); + public ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body).getFinalResult(); } /** - * Delete Serverless Endpoint (asynchronous). + * Create or update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during 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 concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); + public ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + ServerlessEndpointInner body, Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, name, body, context).getFinalResult(); } /** - * Get Serverless Endpoint. + * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. + * @param body Serverless Endpoint entity to apply during 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 serverless Endpoint along with {@link Response} on successful completion of {@link Mono}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + String name, PartialMinimalTrackedResourceWithSkuAndIdentity body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint 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 serverless Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String workspaceName, - String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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(), resourceGroupName, workspaceName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint 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 serverless Endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint 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 serverless Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get Serverless Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint 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 serverless Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServerlessEndpointInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - /** * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String name, PartialMinimalTrackedResourceWithSkuAndIdentity body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); } /** * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - String name, PartialMinimalTrackedResourceWithSkuAndIdentity body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, String name, + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ServerlessEndpointInner> beginUpdateAsync( @@ -787,101 +594,64 @@ private PollerFlux, ServerlessEndpointInner> * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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, ServerlessEndpointInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerlessEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, + ServerlessEndpointInner.class, ServerlessEndpointInner.class, Context.NONE); } /** * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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. + * @return the {@link SyncPoller} for polling of concrete tracked resource types can be created by aliasing this + * type using a specific property type. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ServerlessEndpointInner> beginUpdate( String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Update Serverless Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 updateAsync(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, name, body).last() - .flatMap(this.client::getLroFinalResultOrError); + PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { + Response response = updateWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, + ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); } /** * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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}. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String workspaceName, String name, - PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() + PartialMinimalTrackedResourceWithSkuAndIdentity body) { + return beginUpdateAsync(resourceGroupName, workspaceName, name, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -889,199 +659,137 @@ private Mono updateAsync(String resourceGroupName, Stri * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body) { - return updateAsync(resourceGroupName, workspaceName, name, body).block(); + return beginUpdate(resourceGroupName, workspaceName, name, body).getFinalResult(); } /** * Update Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body Serverless Endpoint entity to apply during 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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) public ServerlessEndpointInner update(String resourceGroupName, String workspaceName, String name, PartialMinimalTrackedResourceWithSkuAndIdentity body, Context context) { - return updateAsync(resourceGroupName, workspaceName, name, body, context).block(); + return beginUpdate(resourceGroupName, workspaceName, name, body, context).getFinalResult(); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ServerlessEndpointInner body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + String name) { return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, String name, ServerlessEndpointInner body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, Context.NONE); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ServerlessEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, context); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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, ServerlessEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ServerlessEndpointInner.class, ServerlessEndpointInner.class, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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, ServerlessEndpointInner> - beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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. @@ -1089,133 +797,205 @@ private PollerFlux, ServerlessEndpointInner> * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ServerlessEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ServerlessEndpointInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name, + Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, name, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - String name, ServerlessEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() + private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { + return beginDeleteAsync(resourceGroupName, workspaceName, name).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 resourceGroupName, String workspaceName, - String name, ServerlessEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String workspaceName, String name) { + beginDelete(resourceGroupName, workspaceName, name).getFinalResult(); } /** - * Create or update Serverless Endpoint (asynchronous). + * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during 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 ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + public void delete(String resourceGroupName, String workspaceName, String name, Context context) { + beginDelete(resourceGroupName, workspaceName, name, context).getFinalResult(); } /** - * Create or update Serverless Endpoint (asynchronous). + * List Serverless Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body Serverless Endpoint entity to apply during operation. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return a paginated list of ServerlessEndpoint entities along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ServerlessEndpointInner createOrUpdate(String resourceGroupName, String workspaceName, String name, - ServerlessEndpointInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String skip) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, skip, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. + * List Serverless Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Serverless Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Serverless Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 paginated list of ServerlessEndpoint entities along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Serverless Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 paginated list of ServerlessEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + String skip, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, skip, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Serverless Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName) { + final String skip = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List Serverless Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, skip, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint 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. @@ -1223,36 +1003,19 @@ private Mono> listKeysWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String name, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } + String workspaceName, String name) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), accept, context); + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1269,7 +1032,7 @@ private Mono listKeysAsync(String resourceGroupName, Stri * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1280,14 +1043,16 @@ private Mono listKeysAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + final String accept = "application/json"; + return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, accept, context); } /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1303,7 +1068,7 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1314,33 +1079,12 @@ public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspace @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1348,77 +1092,54 @@ private Mono>> regenerateKeysWithResponseAsync(String * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . - * @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 keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. + * @return keys for endpoint authentication along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync(String resourceGroupName, - String workspaceName, String name, RegenerateEndpointKeysRequest body, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } + private Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, name, this.client.getApiVersion(), body, accept, context); + return service.regenerateKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + Context.NONE); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . + * @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 keys for endpoint authentication. + * @return keys for endpoint authentication along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, EndpointAuthKeysInner> beginRegenerateKeysAsync( - String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { - Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, String name, + RegenerateEndpointKeysRequest body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.regenerateKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, name, contentType, accept, body, + context); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . - * @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. @@ -1426,20 +1147,19 @@ private PollerFlux, EndpointAuthKeysInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, EndpointAuthKeysInner> beginRegenerateKeysAsync( - String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body, - Context context) { - context = this.client.mergeContext(context); + String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { Mono>> mono - = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + = regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, name, body); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, context); + this.client.getHttpPipeline(), EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, + this.client.getContext()); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1450,14 +1170,16 @@ private PollerFlux, EndpointAuthKeysInner> beg @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys( String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + Response response = regenerateKeysWithResponse(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(response, + EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, Context.NONE); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -1470,14 +1192,17 @@ public SyncPoller, EndpointAuthKeysInner> begi public SyncPoller, EndpointAuthKeysInner> beginRegenerateKeys( String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body, Context context) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + Response response + = regenerateKeysWithResponse(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(response, + EndpointAuthKeysInner.class, EndpointAuthKeysInner.class, context); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1496,27 +1221,7 @@ private Mono regenerateKeysAsync(String resourceGroupName * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param body RegenerateKeys request . - * @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 keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, String name, - RegenerateEndpointKeysRequest body, Context context) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1527,14 +1232,14 @@ private Mono regenerateKeysAsync(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body) { - return regenerateKeysAsync(resourceGroupName, workspaceName, name, body).block(); + return beginRegenerateKeys(resourceGroupName, workspaceName, name, body).getFinalResult(); } /** * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -1546,10 +1251,12 @@ public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String wor @ServiceMethod(returns = ReturnType.SINGLE) public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String workspaceName, String name, RegenerateEndpointKeysRequest body, Context context) { - return regenerateKeysAsync(resourceGroupName, workspaceName, name, body, context).block(); + return beginRegenerateKeys(resourceGroupName, workspaceName, name, body, context).getFinalResult(); } /** + * List Serverless Endpoints. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1561,13 +1268,6 @@ public EndpointAuthKeysInner regenerateKeys(String resourceGroupName, String wor */ @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(), @@ -1576,6 +1276,28 @@ private Mono> listNextSinglePageAsync(Str } /** + * List Serverless Endpoints. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of ServerlessEndpoint entities along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Serverless Endpoints. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1583,22 +1305,14 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 paginated list of ServerlessEndpoint entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return a paginated list of ServerlessEndpoint entities along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java index b063241990c0..4a933457ef19 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -30,16 +30,21 @@ public ServerlessEndpointsImpl(ServerlessEndpointsClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(inner1, this.manager())); + public Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ServerlessEndpointImpl(inner.getValue(), this.manager())); } - public PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(inner1, this.manager())); + public ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name) { + ServerlessEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new ServerlessEndpointImpl(inner, this.manager()); + } else { + return null; + } } public void delete(String resourceGroupName, String workspaceName, String name) { @@ -50,37 +55,24 @@ public void delete(String resourceGroupName, String workspaceName, String name, this.serviceClient().delete(resourceGroupName, workspaceName, name, context); } - public Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServerlessEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(inner1, this.manager())); } - public ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name) { - ServerlessEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ServerlessEndpointImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServerlessEndpointImpl(inner1, this.manager())); } public Response listKeysWithResponse(String resourceGroupName, String workspaceName, String name, Context context) { Response inner = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointAuthKeysImpl(inner.getValue(), this.manager())); } public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String name) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java index 7d3e193ce5f7..1a908a96275a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -20,6 +20,10 @@ public final class SkuResourceImpl implements SkuResource { this.serviceManager = serviceManager; } + public SkuCapacity capacity() { + return this.innerModel().capacity(); + } + public String resourceType() { return this.innerModel().resourceType(); } @@ -28,10 +32,6 @@ public SkuSetting sku() { return this.innerModel().sku(); } - public SkuCapacity capacity() { - return this.innerModel().capacity(); - } - public SkuResourceInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java index 84cfd25ec4b6..f11398583800 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageAndQuotaDetailsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageAndQuotaDetailsImpl.java new file mode 100644 index 000000000000..6df4918d1d0c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageAndQuotaDetailsImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import com.azure.resourcemanager.machinelearning.models.PTUDeploymentUsage; +import com.azure.resourcemanager.machinelearning.models.UsageAndQuotaDetails; +import java.util.Collections; +import java.util.List; + +public final class UsageAndQuotaDetailsImpl implements UsageAndQuotaDetails { + private UsageAndQuotaDetailsInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + UsageAndQuotaDetailsImpl(UsageAndQuotaDetailsInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String modelCollection() { + return this.innerModel().modelCollection(); + } + + public Long quota() { + return this.innerModel().quota(); + } + + public List usageDetails() { + List inner = this.innerModel().usageDetails(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public UsageAndQuotaDetailsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java index 393fe54fa983..e9a71b4294c0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java index 1d97ae953ac6..6146636e3b06 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ListUsagesResult; import reactor.core.publisher.Mono; /** @@ -42,30 +42,38 @@ public final class UsagesClientImpl implements UsagesClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of UsagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - UsagesClientImpl(AzureMachineLearningWorkspacesImpl client) { + UsagesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesUsages to be used by the proxy service + * The interface defining all the services for MachineLearningManagementClientUsages to be used by the proxy service * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientUsages") public interface UsagesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @@ -74,13 +82,20 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -89,17 +104,6 @@ Mono> listNext(@PathParam(value = "nextLink", encoded */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -112,72 +116,61 @@ private Mono> listSinglePageAsync(String location) { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. + * @param location The location 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 current usage information as well as limits for AML resources for given subscription and location - * along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return the current usage information as well as limits for AML resources for given subscription and location as + * paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. + * @return the current usage information as well as limits for AML resources for given subscription and location + * along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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 current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. + * @return the current usage information as well as limits for AML resources for given subscription and location + * along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String location, Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -186,13 +179,13 @@ private PagedFlux listAsync(String location, Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); + return new PagedIterable<>(() -> listSinglePage(location), nextLink -> listNextSinglePage(nextLink)); } /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -202,7 +195,8 @@ public PagedIterable list(String location) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); + return new PagedIterable<>(() -> listSinglePage(location, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -212,18 +206,11 @@ public PagedIterable list(String location, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Usages operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the current usage information as well as limits for AML resources for given subscription and location + * 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(), @@ -231,6 +218,25 @@ private Mono> listNextSinglePageAsync(String nextLink) .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as limits for AML resources for given subscription and location + * along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -239,22 +245,14 @@ private Mono> listNextSinglePageAsync(String nextLink) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Usages operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the current usage information as well as limits for AML resources for given subscription and location + * along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java index fb42a3849996..e8c928d698d3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java index 21844b218b84..6aaf43baa05c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java index ae6bb5ebcc99..bb2899e6a006 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -37,39 +37,47 @@ public final class VirtualMachineSizesClientImpl implements VirtualMachineSizesC /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of VirtualMachineSizesClientImpl. * * @param client the instance of the service client containing this operation class. */ - VirtualMachineSizesClientImpl(AzureMachineLearningWorkspacesImpl client) { + VirtualMachineSizesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(VirtualMachineSizesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesVirtualMachineSizes to be used by the + * The interface defining all the services for MachineLearningManagementClientVirtualMachineSizes to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientVirtualMachineSizes") public interface VirtualMachineSizesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("location") String location, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); } /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. @@ -78,58 +86,17 @@ Mono> list(@HostParam("$host") Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. - * @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 Virtual Machine size operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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(), location, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. @@ -143,7 +110,7 @@ private Mono listAsync(String location) { /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. @@ -152,13 +119,15 @@ private Mono listAsync(String location) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(String location, Context context) { - return listWithResponseAsync(location, context).block(); + final String accept = "application/json"; + return service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, accept, context); } /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java index 78ee3bbf2913..5cb372bc2927 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -28,12 +28,8 @@ public VirtualMachineSizesImpl(VirtualMachineSizesClient innerClient, public Response listWithResponse(String location, Context context) { Response inner = this.serviceClient().listWithResponse(location, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); } public VirtualMachineSizeListResult list(String location) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java index 8dbbeb5c5452..5b29402bfbd0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -10,19 +10,15 @@ import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter; public final class WorkspaceConnectionPropertiesV2BasicResourceImpl - implements WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionPropertiesV2BasicResource.Definition { + implements WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionPropertiesV2BasicResource.Definition, + WorkspaceConnectionPropertiesV2BasicResource.Update { private WorkspaceConnectionPropertiesV2BasicResourceInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - WorkspaceConnectionPropertiesV2BasicResourceImpl(WorkspaceConnectionPropertiesV2BasicResourceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - public String id() { return this.innerModel().id(); } @@ -43,6 +39,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public String resourceGroupName() { + return resourceGroupName; + } + public WorkspaceConnectionPropertiesV2BasicResourceInner innerModel() { return this.innerObject; } @@ -57,6 +57,8 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String connectionName; + private WorkspaceConnectionUpdateParameter updateBody; + public WorkspaceConnectionPropertiesV2BasicResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; @@ -87,6 +89,36 @@ public WorkspaceConnectionPropertiesV2BasicResource create(Context context) { this.connectionName = name; } + public WorkspaceConnectionPropertiesV2BasicResourceImpl update() { + this.updateBody = new WorkspaceConnectionUpdateParameter(); + return this; + } + + public WorkspaceConnectionPropertiesV2BasicResource apply() { + this.innerObject = serviceManager.serviceClient() + .getWorkspaceConnections() + .updateWithResponse(resourceGroupName, workspaceName, connectionName, updateBody, Context.NONE) + .getValue(); + return this; + } + + public WorkspaceConnectionPropertiesV2BasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getWorkspaceConnections() + .updateWithResponse(resourceGroupName, workspaceName, connectionName, updateBody, context) + .getValue(); + return this; + } + + WorkspaceConnectionPropertiesV2BasicResourceImpl(WorkspaceConnectionPropertiesV2BasicResourceInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.connectionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connections"); + } + public WorkspaceConnectionPropertiesV2BasicResource refresh() { this.innerObject = serviceManager.serviceClient() .getWorkspaceConnections() @@ -112,8 +144,26 @@ public WorkspaceConnectionPropertiesV2BasicResource listSecrets() { return serviceManager.workspaceConnections().listSecrets(resourceGroupName, workspaceName, connectionName); } + public void testConnection() { + serviceManager.workspaceConnections().testConnection(resourceGroupName, workspaceName, connectionName); + } + + public void testConnection(WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + serviceManager.workspaceConnections() + .testConnection(resourceGroupName, workspaceName, connectionName, body, context); + } + public WorkspaceConnectionPropertiesV2BasicResourceImpl withProperties(WorkspaceConnectionPropertiesV2 properties) { - this.innerModel().withProperties(properties); - return this; + if (isInCreateMode()) { + this.innerModel().withProperties(properties); + return this; + } else { + this.updateBody.withProperties(properties); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java index 62ef51558d03..67da8c24f316 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -12,6 +12,7 @@ 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.Post; import com.azure.core.annotation.Put; @@ -27,11 +28,18 @@ 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.BinaryData; 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.machinelearning.fluent.WorkspaceConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** @@ -46,414 +54,433 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of WorkspaceConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspaceConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspaceConnectionsClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(WorkspaceConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceConnections to be used by the + * The interface defining all the services for MachineLearningManagementClientWorkspaceConnections to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientWorkspaceConnections") public interface WorkspaceConnectionsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceConnectionUpdateParameter body, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceConnectionUpdateParameter body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionName") String connectionName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("target") String target, @QueryParam("category") String category, + @QueryParam("includeAll") Boolean includeAll, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @QueryParam("target") String target, @QueryParam("category") String category, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @QueryParam("includeAll") Boolean includeAll, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSecrets( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSecretsSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/testconnection") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> testConnection(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, + @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/testconnection") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response testConnectionSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, + @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner body, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * The create operation. + * Lists machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Mono> + getWithResponseAsync(String resourceGroupName, String workspaceName, String connectionName) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The create operation. + * Lists machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, + String workspaceName, String connectionName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists machine learning workspaces connections by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), parameters, accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, accept, context); } /** - * The create operation. + * Lists machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); } /** - * The create operation. + * Create or update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @param context The context to associate with this operation. + * @param body The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceGroupName, - String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); + private Mono> createWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The create operation. + * Create or update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, - String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponse(resourceGroupName, workspaceName, connectionName, parameters, Context.NONE) - .getValue(); + private Mono createAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The get operation. + * Create or update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body The object for creating or updating a new workspace connection. + * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(String resourceGroupName, String workspaceName, String connectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } + public Response createWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, + Context context) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, body, context); } /** - * The get operation. + * Create or update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getWithResponseAsync(String resourceGroupName, String workspaceName, String connectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName 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(), resourceGroupName, workspaceName, - connectionName, this.client.getApiVersion(), accept, context); + public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return createWithResponse(resourceGroupName, workspaceName, connectionName, body, Context.NONE).getValue(); } /** - * The get operation. + * Update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Parameters for workspace connection update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, - String workspaceName, String connectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono> updateWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionUpdateParameter body) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The get operation. + * Update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + private Mono updateAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final WorkspaceConnectionUpdateParameter body = null; + return updateWithResponseAsync(resourceGroupName, workspaceName, connectionName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The get operation. + * Update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Parameters for workspace connection update. + * @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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, - String connectionName) { - return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); + public Response updateWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionUpdateParameter body, Context context) { + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, body, context); } /** - * The delete operation. + * Update machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + public WorkspaceConnectionPropertiesV2BasicResourceInner update(String resourceGroupName, String workspaceName, String connectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + final WorkspaceConnectionUpdateParameter body = null; + return updateWithResponse(resourceGroupName, workspaceName, connectionName, body, Context.NONE).getValue(); } /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @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. @@ -461,36 +488,18 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - String connectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName 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, - workspaceName, connectionName, this.client.getApiVersion(), accept, context); + String connectionName) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -504,10 +513,10 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S } /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -518,14 +527,15 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String workspaceName, String connectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, context); } /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -537,39 +547,30 @@ public void delete(String resourceGroupName, String workspaceName, String connec } /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param target Target of the workspace connection. * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listSinglePageAsync(String resourceGroupName, String workspaceName, String target, String category) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String target, String category, Boolean includeAll) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, target, category, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, target, category, includeAll, accept, + context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -577,176 +578,177 @@ public void delete(String resourceGroupName, String workspaceName, String connec } /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param target Target of the workspace connection. * @param category Category of the workspace connection. - * @param context The context to associate with this operation. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName 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(), resourceGroupName, workspaceName, target, - category, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, includeAll), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedFlux}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, - String workspaceName, String target, String category) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), + String workspaceName) { + final String target = null; + final String category = null; + final Boolean includeAll = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, includeAll), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param target Target of the workspace connection. + * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String workspaceName) { - final String target = null; - final String category = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, target, category, includeAll, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param target Target of the workspace connection. * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @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 paginated response with {@link PagedFlux}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, - String workspaceName, String target, String category, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String workspaceName, String target, String category, Boolean includeAll, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, target, category, includeAll, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 paginated response with {@link PagedIterable}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { final String target = null; final String category = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category)); + final Boolean includeAll = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, target, category, includeAll), + nextLink -> listNextSinglePage(nextLink)); } /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param target Target of the workspace connection. * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @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 paginated response with {@link PagedIterable}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, - String workspaceName, String target, String category, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category, context)); + String workspaceName, String target, String category, Boolean includeAll, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, workspaceName, target, category, includeAll, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** * List all the secrets of a machine learning workspaces connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSecretsWithResponseAsync(String resourceGroupName, String workspaceName, String connectionName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -754,113 +756,308 @@ public PagedIterable list(Str * List all the secrets of a machine learning workspaces connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSecretsAsync(String resourceGroupName, + String workspaceName, String connectionName) { + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List all the secrets of a machine learning workspaces connections. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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> listSecretsWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSecretsWithResponse(String resourceGroupName, + String workspaceName, String connectionName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, connectionName, this.client.getApiVersion(), accept, context); + return service.listSecretsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, accept, context); } /** * List all the secrets of a machine learning workspaces connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, - String workspaceName, String connectionName) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, + String connectionName) { + return listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); } /** - * List all the secrets of a machine learning workspaces connections. + * Test machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. + * @param body Workspace Connection object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> testConnectionWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body) { + return FluxUtil + .withContext(context -> service.testConnection(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + private Response testConnectionWithResponse(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body) { + return service.testConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, body, Context.NONE); } /** - * List all the secrets of a machine learning workspaces connections. + * Test machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, + private Response testConnectionWithResponse(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + return service.testConnectionSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, body, context); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginTestConnectionAsync(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body) { + Mono>> mono + = testConnectionWithResponseAsync(resourceGroupName, workspaceName, connectionName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginTestConnectionAsync(String resourceGroupName, String workspaceName, String connectionName) { - return listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + Mono>> mono + = testConnectionWithResponseAsync(resourceGroupName, workspaceName, connectionName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body) { + Response response + = testConnectionWithResponse(resourceGroupName, workspaceName, connectionName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + Response response + = testConnectionWithResponse(resourceGroupName, workspaceName, connectionName, body); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginTestConnection(String resourceGroupName, String workspaceName, + String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + Response response + = testConnectionWithResponse(resourceGroupName, workspaceName, connectionName, body, context); + return this.client.getLroResult(response, Void.class, Void.class, context); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono testConnectionAsync(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body) { + return beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 testConnectionAsync(String resourceGroupName, String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 testConnection(String resourceGroupName, String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + beginTestConnection(resourceGroupName, workspaceName, connectionName, body).getFinalResult(); + } + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + beginTestConnection(resourceGroupName, workspaceName, connectionName, body, context).getFinalResult(); + } + + /** + * List all the available machine learning workspaces connections under the specified workspace. + * * 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}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items 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( @@ -870,6 +1067,28 @@ public WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String reso } /** + * List all the available machine learning workspaces connections under the specified workspace. + * + * 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 paged collection of WorkspaceConnectionPropertiesV2BasicResource items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the available machine learning workspaces connections under the specified workspace. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -877,22 +1096,15 @@ public WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, + Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java index 58050994047b..2bc98ac9390d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -31,12 +31,8 @@ public Response getWithResponse(St String workspaceName, String connectionName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, workspaceName, connectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); } public WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, @@ -68,9 +64,9 @@ public PagedIterable list(String r } public PagedIterable list(String resourceGroupName, - String workspaceName, String target, String category, Context context) { + String workspaceName, String target, String category, Boolean includeAll, Context context) { PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); + = this.serviceClient().list(resourceGroupName, workspaceName, target, category, includeAll, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); } @@ -79,12 +75,8 @@ public Response listSecretsWithRes String workspaceName, String connectionName, Context context) { Response inner = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); } public WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupName, String workspaceName, @@ -98,6 +90,15 @@ public WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceG } } + public void testConnection(String resourceGroupName, String workspaceName, String connectionName) { + this.serviceClient().testConnection(resourceGroupName, workspaceName, connectionName); + } + + public void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + this.serviceClient().testConnection(resourceGroupName, workspaceName, connectionName, body, context); + } + public WorkspaceConnectionPropertiesV2BasicResource getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java index 43a443320750..a7e35ba38d62 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient; import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ListAmlUserFeatureResult; import reactor.core.publisher.Mono; /** @@ -42,31 +42,40 @@ public final class WorkspaceFeaturesClientImpl implements WorkspaceFeaturesClien /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of WorkspaceFeaturesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspaceFeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspaceFeaturesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(WorkspaceFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceFeatures to be used by the + * The interface defining all the services for MachineLearningManagementClientWorkspaceFeatures to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientWorkspaceFeatures") public interface WorkspaceFeaturesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @@ -76,15 +85,22 @@ Mono> list(@HostParam("$host") String endpoin @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -94,21 +110,6 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -122,79 +123,65 @@ private Mono> listSinglePageAsync(String reso * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the List Aml user feature operation response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 List Aml user feature operation response as paginated response with {@link PagedFlux}. + * @return the List Aml user feature operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName), - nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 List Aml user feature operation response as paginated response with {@link PagedFlux}. + * @return the List Aml user feature operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String workspaceName, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -202,14 +189,15 @@ private PagedFlux listAsync(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName), + nextLink -> listNextSinglePage(nextLink)); } /** * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -218,7 +206,8 @@ public PagedIterable list(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, workspaceName, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -233,13 +222,6 @@ public PagedIterable list(String resourceGroupName, String */ @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(), @@ -247,6 +229,24 @@ private Mono> listNextSinglePageAsync(String .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Aml user feature operation response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -255,22 +255,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the List Aml user feature operation response along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java index fb9af118f3f3..59c5b1fc2322 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java index dea0ef544dde..d4390b1368d3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -12,6 +12,7 @@ import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResult; import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; @@ -22,6 +23,7 @@ import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; import com.azure.resourcemanager.machinelearning.models.NotebookAccessTokenResult; import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; @@ -31,9 +33,9 @@ import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.Workspace; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; import java.util.Collections; import java.util.List; import java.util.Map; @@ -68,6 +70,10 @@ public String location() { return this.innerModel().location(); } + public Sku sku() { + return this.innerModel().sku(); + } + public Map tags() { Map inner = this.innerModel().tags(); if (inner != null) { @@ -77,95 +83,120 @@ public Map tags() { } } - public Sku sku() { - return this.innerModel().sku(); - } - public SystemData systemData() { return this.innerModel().systemData(); } - public String workspaceId() { - return this.innerModel().workspaceId(); + public String agentsEndpointUri() { + return this.innerModel().agentsEndpointUri(); } - public String description() { - return this.innerModel().description(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerModel().allowPublicAccessWhenBehindVnet(); } - public String friendlyName() { - return this.innerModel().friendlyName(); - } - - public String keyVault() { - return this.innerModel().keyVault(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerModel().allowRoleAssignmentOnRG(); } public String applicationInsights() { return this.innerModel().applicationInsights(); } + public List associatedWorkspaces() { + List inner = this.innerModel().associatedWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List containerRegistries() { + List inner = this.innerModel().containerRegistries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String containerRegistry() { return this.innerModel().containerRegistry(); } - public String storageAccount() { - return this.innerModel().storageAccount(); + public String description() { + return this.innerModel().description(); } public String discoveryUrl() { return this.innerModel().discoveryUrl(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); + } + + public Boolean enableServiceSideCmkEncryption() { + return this.innerModel().enableServiceSideCmkEncryption(); + } + + public Boolean enableSimplifiedCmk() { + return this.innerModel().enableSimplifiedCmk(); + } + + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); } public EncryptionProperty encryption() { return this.innerModel().encryption(); } - public Boolean hbiWorkspace() { - return this.innerModel().hbiWorkspace(); + public List existingWorkspaces() { + List inner = this.innerModel().existingWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String serviceProvisionedResourceGroup() { - return this.innerModel().serviceProvisionedResourceGroup(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); } - public Integer privateLinkCount() { - return this.innerModel().privateLinkCount(); + public String friendlyName() { + return this.innerModel().friendlyName(); } - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); + public Boolean hbiWorkspace() { + return this.innerModel().hbiWorkspace(); } - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerModel().allowPublicAccessWhenBehindVnet(); + public String hubResourceId() { + return this.innerModel().hubResourceId(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); } - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner); } else { return Collections.emptyList(); } } - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); + public String keyVault() { + return this.innerModel().keyVault(); } - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); + public List keyVaults() { + List inner = this.innerModel().keyVaults(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -173,6 +204,23 @@ public List sharedPrivateLinkResources() { } } + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public String mlFlowTrackingUri() { + return this.innerModel().mlFlowTrackingUri(); + } + + public NetworkAcls networkAcls() { + return this.innerModel().networkAcls(); + } + public NotebookResourceInfo notebookInfo() { NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); if (inner != null) { @@ -182,45 +230,68 @@ public NotebookResourceInfo notebookInfo() { } } - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - public String primaryUserAssignedIdentity() { return this.innerModel().primaryUserAssignedIdentity(); } - public String tenantId() { - return this.innerModel().tenantId(); + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } } - public Boolean storageHnsEnabled() { - return this.innerModel().storageHnsEnabled(); + public Integer privateLinkCount() { + return this.innerModel().privateLinkCount(); } - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); + public Boolean provisionNetworkNow() { + return this.innerModel().provisionNetworkNow(); } - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } - public ManagedNetworkSettings managedNetwork() { - ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public String serviceProvisionedResourceGroup() { + return this.innerModel().serviceProvisionedResourceGroup(); + } + + public List sharedPrivateLinkResources() { + List inner = this.innerModel().sharedPrivateLinkResources(); if (inner != null) { - return new ManagedNetworkSettingsImpl(inner, this.manager()); + return Collections.unmodifiableList(inner); } else { - return null; + return Collections.emptyList(); } } - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); } - public List associatedWorkspaces() { - List inner = this.innerModel().associatedWorkspaces(); + public String storageAccount() { + return this.innerModel().storageAccount(); + } + + public List storageAccounts() { + List inner = this.innerModel().storageAccounts(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -228,18 +299,30 @@ public List associatedWorkspaces() { } } - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); + public Boolean storageHnsEnabled() { + return this.innerModel().storageHnsEnabled(); } - public String hubResourceId() { - return this.innerModel().hubResourceId(); + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerModel().systemDatastoresAuthMode(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); } public WorkspaceHubConfig workspaceHubConfig() { return this.innerModel().workspaceHubConfig(); } + public String workspaceId() { + return this.innerModel().workspaceId(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -264,7 +347,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String workspaceName; - private WorkspaceUpdateParameters updateParameters; + private WorkspaceUpdateParametersInner updateBody; public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -292,21 +375,21 @@ public Workspace create(Context context) { } public WorkspaceImpl update() { - this.updateParameters = new WorkspaceUpdateParameters(); + this.updateBody = new WorkspaceUpdateParametersInner(); return this; } public Workspace apply() { this.innerObject = serviceManager.serviceClient() .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, Context.NONE); + .update(resourceGroupName, workspaceName, updateBody, Context.NONE); return this; } public Workspace apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, context); + .update(resourceGroupName, workspaceName, updateBody, context); return this; } @@ -338,8 +421,8 @@ public DiagnoseResponseResult diagnose() { return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName); } - public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context) { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, parameters, context); + public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters body, Context context) { + return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, body, context); } public Response listKeysWithResponse(Context context) { @@ -350,14 +433,6 @@ public ListWorkspaceKeysResult listKeys() { return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); } - public void resyncKeys() { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(Context context) { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); - } - public Response listNotebookAccessTokenWithResponse(Context context) { return serviceManager.workspaces() .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); @@ -367,12 +442,12 @@ public NotebookAccessTokenResult listNotebookAccessToken() { return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); } - public NotebookResourceInfo prepareNotebook() { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); + public Response listNotebookKeysWithResponse(Context context) { + return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); } - public NotebookResourceInfo prepareNotebook(Context context) { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); + public ListNotebookKeysResult listNotebookKeys() { + return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); } public Response listStorageAccountKeysWithResponse(Context context) { @@ -384,12 +459,20 @@ public ListStorageAccountKeysResult listStorageAccountKeys() { return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); } - public Response listNotebookKeysWithResponse(Context context) { - return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); + public NotebookResourceInfo prepareNotebook() { + return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); } - public ListNotebookKeysResult listNotebookKeys() { - return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); + public NotebookResourceInfo prepareNotebook(Context context) { + return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); + } + + public void resyncKeys() { + serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); + } + + public void resyncKeys(Context context) { + serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); } public WorkspaceImpl withRegion(Region location) { @@ -407,7 +490,7 @@ public WorkspaceImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateParameters.withTags(tags); + this.updateBody.withTags(tags); return this; } } @@ -417,7 +500,7 @@ public WorkspaceImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; } else { - this.updateParameters.withIdentity(identity); + this.updateBody.withIdentity(identity); return this; } } @@ -432,123 +515,187 @@ public WorkspaceImpl withSku(Sku sku) { this.innerModel().withSku(sku); return this; } else { - this.updateParameters.withSku(sku); + this.updateBody.withSku(sku); return this; } } - public WorkspaceImpl withDescription(String description) { + public WorkspaceImpl withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { + this.innerModel().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + return this; + } + + public WorkspaceImpl withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { if (isInCreateMode()) { - this.innerModel().withDescription(description); + this.innerModel().withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); return this; } else { - this.updateParameters.withDescription(description); + this.updateBody.withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); return this; } } - public WorkspaceImpl withFriendlyName(String friendlyName) { + public WorkspaceImpl withApplicationInsights(String applicationInsights) { if (isInCreateMode()) { - this.innerModel().withFriendlyName(friendlyName); + this.innerModel().withApplicationInsights(applicationInsights); return this; } else { - this.updateParameters.withFriendlyName(friendlyName); + this.updateBody.withApplicationInsights(applicationInsights); return this; } } - public WorkspaceImpl withKeyVault(String keyVault) { - this.innerModel().withKeyVault(keyVault); + public WorkspaceImpl withAssociatedWorkspaces(List associatedWorkspaces) { + this.innerModel().withAssociatedWorkspaces(associatedWorkspaces); return this; } - public WorkspaceImpl withApplicationInsights(String applicationInsights) { + public WorkspaceImpl withContainerRegistries(List containerRegistries) { + this.innerModel().withContainerRegistries(containerRegistries); + return this; + } + + public WorkspaceImpl withContainerRegistry(String containerRegistry) { if (isInCreateMode()) { - this.innerModel().withApplicationInsights(applicationInsights); + this.innerModel().withContainerRegistry(containerRegistry); return this; } else { - this.updateParameters.withApplicationInsights(applicationInsights); + this.updateBody.withContainerRegistry(containerRegistry); return this; } } - public WorkspaceImpl withContainerRegistry(String containerRegistry) { + public WorkspaceImpl withDescription(String description) { if (isInCreateMode()) { - this.innerModel().withContainerRegistry(containerRegistry); + this.innerModel().withDescription(description); return this; } else { - this.updateParameters.withContainerRegistry(containerRegistry); + this.updateBody.withDescription(description); return this; } } - public WorkspaceImpl withStorageAccount(String storageAccount) { - this.innerModel().withStorageAccount(storageAccount); + public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { + this.innerModel().withDiscoveryUrl(discoveryUrl); return this; } - public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { - this.innerModel().withDiscoveryUrl(discoveryUrl); + public WorkspaceImpl withEnableDataIsolation(Boolean enableDataIsolation) { + if (isInCreateMode()) { + this.innerModel().withEnableDataIsolation(enableDataIsolation); + return this; + } else { + this.updateBody.withEnableDataIsolation(enableDataIsolation); + return this; + } + } + + public WorkspaceImpl withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption) { + this.innerModel().withEnableServiceSideCmkEncryption(enableServiceSideCmkEncryption); return this; } + public WorkspaceImpl withEnableSimplifiedCmk(Boolean enableSimplifiedCmk) { + this.innerModel().withEnableSimplifiedCmk(enableSimplifiedCmk); + return this; + } + + public WorkspaceImpl withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + if (isInCreateMode()) { + this.innerModel().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); + return this; + } else { + this.updateBody.withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); + return this; + } + } + public WorkspaceImpl withEncryption(EncryptionProperty encryption) { this.innerModel().withEncryption(encryption); return this; } - public WorkspaceImpl withHbiWorkspace(Boolean hbiWorkspace) { - this.innerModel().withHbiWorkspace(hbiWorkspace); + public WorkspaceImpl withExistingWorkspaces(List existingWorkspaces) { + this.innerModel().withExistingWorkspaces(existingWorkspaces); return this; } - public WorkspaceImpl withImageBuildCompute(String imageBuildCompute) { + public WorkspaceImpl withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { if (isInCreateMode()) { - this.innerModel().withImageBuildCompute(imageBuildCompute); + this.innerModel().withFeatureStoreSettings(featureStoreSettings); return this; } else { - this.updateParameters.withImageBuildCompute(imageBuildCompute); + this.updateBody.withFeatureStoreSettings(featureStoreSettings); return this; } } - public WorkspaceImpl withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.innerModel().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + public WorkspaceImpl withFriendlyName(String friendlyName) { + if (isInCreateMode()) { + this.innerModel().withFriendlyName(friendlyName); + return this; + } else { + this.updateBody.withFriendlyName(friendlyName); + return this; + } + } + + public WorkspaceImpl withHbiWorkspace(Boolean hbiWorkspace) { + this.innerModel().withHbiWorkspace(hbiWorkspace); return this; } - public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public WorkspaceImpl withHubResourceId(String hubResourceId) { + this.innerModel().withHubResourceId(hubResourceId); + return this; + } + + public WorkspaceImpl withImageBuildCompute(String imageBuildCompute) { if (isInCreateMode()) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + this.innerModel().withImageBuildCompute(imageBuildCompute); return this; } else { - this.updateParameters.withPublicNetworkAccess(publicNetworkAccess); + this.updateBody.withImageBuildCompute(imageBuildCompute); return this; } } - public WorkspaceImpl withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + public WorkspaceImpl withIpAllowlist(List ipAllowlist) { if (isInCreateMode()) { - this.innerModel().withServerlessComputeSettings(serverlessComputeSettings); + this.innerModel().withIpAllowlist(ipAllowlist); return this; } else { - this.updateParameters.withServerlessComputeSettings(serverlessComputeSettings); + this.updateBody.withIpAllowlist(ipAllowlist); return this; } } - public WorkspaceImpl withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.innerModel().withSharedPrivateLinkResources(sharedPrivateLinkResources); + public WorkspaceImpl withKeyVault(String keyVault) { + this.innerModel().withKeyVault(keyVault); return this; } - public WorkspaceImpl - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + public WorkspaceImpl withKeyVaults(List keyVaults) { + this.innerModel().withKeyVaults(keyVaults); + return this; + } + + public WorkspaceImpl withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { if (isInCreateMode()) { - this.innerModel().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + this.innerModel().withManagedNetwork(managedNetwork); return this; } else { - this.updateParameters.withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + this.updateBody.withManagedNetwork(managedNetwork); + return this; + } + } + + public WorkspaceImpl withNetworkAcls(NetworkAcls networkAcls) { + if (isInCreateMode()) { + this.innerModel().withNetworkAcls(networkAcls); + return this; + } else { + this.updateBody.withNetworkAcls(networkAcls); return this; } } @@ -558,72 +705,103 @@ public WorkspaceImpl withPrimaryUserAssignedIdentity(String primaryUserAssignedI this.innerModel().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); return this; } else { - this.updateParameters.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + this.updateBody.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); return this; } } - public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { + public WorkspaceImpl withProvisionNetworkNow(Boolean provisionNetworkNow) { + this.innerModel().withProvisionNetworkNow(provisionNetworkNow); + return this; + } + + public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { if (isInCreateMode()) { - this.innerModel().withV1LegacyMode(v1LegacyMode); + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); return this; } else { - this.updateParameters.withV1LegacyMode(v1LegacyMode); + this.updateBody.withPublicNetworkAccess(publicNetworkAccess); return this; } } - public WorkspaceImpl withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + public WorkspaceImpl withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { if (isInCreateMode()) { - this.innerModel().withManagedNetwork(managedNetwork); + this.innerModel().withServerlessComputeSettings(serverlessComputeSettings); return this; } else { - this.updateParameters.withManagedNetwork(managedNetwork); + this.updateBody.withServerlessComputeSettings(serverlessComputeSettings); return this; } } - public WorkspaceImpl withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + public WorkspaceImpl + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { if (isInCreateMode()) { - this.innerModel().withFeatureStoreSettings(featureStoreSettings); + this.innerModel().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } else { - this.updateParameters.withFeatureStoreSettings(featureStoreSettings); + this.updateBody.withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } } - public WorkspaceImpl withAssociatedWorkspaces(List associatedWorkspaces) { - this.innerModel().withAssociatedWorkspaces(associatedWorkspaces); + public WorkspaceImpl withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + this.innerModel().withSharedPrivateLinkResources(sharedPrivateLinkResources); return this; } - public WorkspaceImpl withEnableDataIsolation(Boolean enableDataIsolation) { + public WorkspaceImpl withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { if (isInCreateMode()) { - this.innerModel().withEnableDataIsolation(enableDataIsolation); + this.innerModel().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } else { - this.updateParameters.withEnableDataIsolation(enableDataIsolation); + this.updateBody.withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } } - public WorkspaceImpl withHubResourceId(String hubResourceId) { - this.innerModel().withHubResourceId(hubResourceId); + public WorkspaceImpl withStorageAccount(String storageAccount) { + this.innerModel().withStorageAccount(storageAccount); + return this; + } + + public WorkspaceImpl withStorageAccounts(List storageAccounts) { + this.innerModel().withStorageAccounts(storageAccounts); return this; } + public WorkspaceImpl withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { + if (isInCreateMode()) { + this.innerModel().withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } else { + this.updateBody.withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } + } + + public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { + if (isInCreateMode()) { + this.innerModel().withV1LegacyMode(v1LegacyMode); + return this; + } else { + this.updateBody.withV1LegacyMode(v1LegacyMode); + return this; + } + } + public WorkspaceImpl withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { this.innerModel().withWorkspaceHubConfig(workspaceHubConfig); return this; } public WorkspaceImpl withEncryption(EncryptionUpdateProperties encryption) { - this.updateParameters.withEncryption(encryption); + this.updateBody.withEncryption(encryption); return this; } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java index 7b8461716398..e450228859cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -11,6 +11,7 @@ import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.ProvisioningState; @@ -18,6 +19,7 @@ import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import com.azure.resourcemanager.machinelearning.models.WorkspaceProperties; import java.util.Collections; @@ -35,87 +37,116 @@ public final class WorkspacePropertiesImpl implements WorkspaceProperties { this.serviceManager = serviceManager; } - public String workspaceId() { - return this.innerModel().workspaceId(); - } - - public String description() { - return this.innerModel().description(); + public String agentsEndpointUri() { + return this.innerModel().agentsEndpointUri(); } - public String friendlyName() { - return this.innerModel().friendlyName(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerModel().allowPublicAccessWhenBehindVnet(); } - public String keyVault() { - return this.innerModel().keyVault(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerModel().allowRoleAssignmentOnRG(); } public String applicationInsights() { return this.innerModel().applicationInsights(); } + public List associatedWorkspaces() { + List inner = this.innerModel().associatedWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List containerRegistries() { + List inner = this.innerModel().containerRegistries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String containerRegistry() { return this.innerModel().containerRegistry(); } - public String storageAccount() { - return this.innerModel().storageAccount(); + public String description() { + return this.innerModel().description(); } public String discoveryUrl() { return this.innerModel().discoveryUrl(); } - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); + } + + public Boolean enableServiceSideCmkEncryption() { + return this.innerModel().enableServiceSideCmkEncryption(); + } + + public Boolean enableSimplifiedCmk() { + return this.innerModel().enableSimplifiedCmk(); + } + + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); } public EncryptionProperty encryption() { return this.innerModel().encryption(); } - public Boolean hbiWorkspace() { - return this.innerModel().hbiWorkspace(); + public List existingWorkspaces() { + List inner = this.innerModel().existingWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } - public String serviceProvisionedResourceGroup() { - return this.innerModel().serviceProvisionedResourceGroup(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); } - public Integer privateLinkCount() { - return this.innerModel().privateLinkCount(); + public String friendlyName() { + return this.innerModel().friendlyName(); } - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); + public Boolean hbiWorkspace() { + return this.innerModel().hbiWorkspace(); } - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerModel().allowPublicAccessWhenBehindVnet(); + public String hubResourceId() { + return this.innerModel().hubResourceId(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); } - public List privateEndpointConnections() { - List inner = this.innerModel().privateEndpointConnections(); + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner); } else { return Collections.emptyList(); } } - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); + public String keyVault() { + return this.innerModel().keyVault(); } - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); + public List keyVaults() { + List inner = this.innerModel().keyVaults(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -123,6 +154,23 @@ public List sharedPrivateLinkResources() { } } + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public String mlFlowTrackingUri() { + return this.innerModel().mlFlowTrackingUri(); + } + + public NetworkAcls networkAcls() { + return this.innerModel().networkAcls(); + } + public NotebookResourceInfo notebookInfo() { NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); if (inner != null) { @@ -132,45 +180,68 @@ public NotebookResourceInfo notebookInfo() { } } - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - public String primaryUserAssignedIdentity() { return this.innerModel().primaryUserAssignedIdentity(); } - public String tenantId() { - return this.innerModel().tenantId(); + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } } - public Boolean storageHnsEnabled() { - return this.innerModel().storageHnsEnabled(); + public Integer privateLinkCount() { + return this.innerModel().privateLinkCount(); } - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); + public Boolean provisionNetworkNow() { + return this.innerModel().provisionNetworkNow(); } - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } - public ManagedNetworkSettings managedNetwork() { - ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public String serviceProvisionedResourceGroup() { + return this.innerModel().serviceProvisionedResourceGroup(); + } + + public List sharedPrivateLinkResources() { + List inner = this.innerModel().sharedPrivateLinkResources(); if (inner != null) { - return new ManagedNetworkSettingsImpl(inner, this.manager()); + return Collections.unmodifiableList(inner); } else { - return null; + return Collections.emptyList(); } } - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); } - public List associatedWorkspaces() { - List inner = this.innerModel().associatedWorkspaces(); + public String storageAccount() { + return this.innerModel().storageAccount(); + } + + public List storageAccounts() { + List inner = this.innerModel().storageAccounts(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -178,18 +249,30 @@ public List associatedWorkspaces() { } } - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); + public Boolean storageHnsEnabled() { + return this.innerModel().storageHnsEnabled(); } - public String hubResourceId() { - return this.innerModel().hubResourceId(); + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerModel().systemDatastoresAuthMode(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); } public WorkspaceHubConfig workspaceHubConfig() { return this.innerModel().workspaceHubConfig(); } + public String workspaceId() { + return this.innerModel().workspaceId(); + } + public WorkspacePropertiesInner innerModel() { return this.innerObject; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java index 33bff913658c..ca7df91cead2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -9,10 +9,14 @@ import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspacePropertiesUpdateParameters; +import java.util.Collections; +import java.util.List; public final class WorkspacePropertiesUpdateParametersImpl implements WorkspacePropertiesUpdateParameters { private WorkspacePropertiesUpdateParametersInner innerObject; @@ -25,44 +29,53 @@ public final class WorkspacePropertiesUpdateParametersImpl implements WorkspaceP this.serviceManager = serviceManager; } - public String description() { - return this.innerModel().description(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerModel().allowRoleAssignmentOnRG(); } - public String friendlyName() { - return this.innerModel().friendlyName(); + public String applicationInsights() { + return this.innerModel().applicationInsights(); } - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); + public String containerRegistry() { + return this.innerModel().containerRegistry(); } - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); + public String description() { + return this.innerModel().description(); } - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); } - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public EncryptionUpdateProperties encryption() { + return this.innerModel().encryption(); } - public String applicationInsights() { - return this.innerModel().applicationInsights(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); } - public String containerRegistry() { - return this.innerModel().containerRegistry(); + public String friendlyName() { + return this.innerModel().friendlyName(); } - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); + } + + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } } public ManagedNetworkSettings managedNetwork() { @@ -74,16 +87,36 @@ public ManagedNetworkSettings managedNetwork() { } } - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); + public NetworkAcls networkAcls() { + return this.innerModel().networkAcls(); } - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); + public String primaryUserAssignedIdentity() { + return this.innerModel().primaryUserAssignedIdentity(); } - public EncryptionUpdateProperties encryption() { - return this.innerModel().encryption(); + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); + } + + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerModel().systemDatastoresAuthMode(); + } + + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); } public WorkspacePropertiesUpdateParametersInner innerModel() { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java new file mode 100644 index 000000000000..c4696a754787 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; +import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; +import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettings; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; +import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings; +import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode; +import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class WorkspaceUpdateParametersImpl implements WorkspaceUpdateParameters { + private WorkspaceUpdateParametersInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + WorkspaceUpdateParametersImpl(WorkspaceUpdateParametersInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public Sku sku() { + return this.innerModel().sku(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Boolean allowRoleAssignmentOnRG() { + return this.innerModel().allowRoleAssignmentOnRG(); + } + + public String applicationInsights() { + return this.innerModel().applicationInsights(); + } + + public String containerRegistry() { + return this.innerModel().containerRegistry(); + } + + public String description() { + return this.innerModel().description(); + } + + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); + } + + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); + } + + public EncryptionUpdateProperties encryption() { + return this.innerModel().encryption(); + } + + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); + } + + public String friendlyName() { + return this.innerModel().friendlyName(); + } + + public String imageBuildCompute() { + return this.innerModel().imageBuildCompute(); + } + + public List ipAllowlist() { + List inner = this.innerModel().ipAllowlist(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagedNetworkSettings managedNetwork() { + ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + if (inner != null) { + return new ManagedNetworkSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkAcls networkAcls() { + return this.innerModel().networkAcls(); + } + + public String primaryUserAssignedIdentity() { + return this.innerModel().primaryUserAssignedIdentity(); + } + + public PublicNetworkAccess publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); + } + + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerModel().systemDatastoresAuthMode(); + } + + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); + } + + public WorkspaceUpdateParametersInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java index a6b636792212..96e1117476ae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -29,6 +29,7 @@ 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.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -42,9 +43,9 @@ import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; +import com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceListResult; import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.WorkspaceListResult; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -61,124 +62,206 @@ public final class WorkspacesClientImpl implements WorkspacesClient { /** * The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; + private final MachineLearningManagementClientImpl client; /** * Initializes an instance of WorkspacesClientImpl. * * @param client the instance of the service client containing this operation class. */ - WorkspacesClientImpl(AzureMachineLearningWorkspacesImpl client) { + WorkspacesClientImpl(MachineLearningManagementClientImpl client) { this.service = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaces to be used by the proxy + * The interface defining all the services for MachineLearningManagementClientWorkspaces to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") + @Host("{endpoint}") + @ServiceInterface(name = "MachineLearningManagementClientWorkspaces") public interface WorkspacesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceInner body, Context context); - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202, 204 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("forceToPurge") Boolean forceToPurge, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceInner body, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, + Mono>> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceUpdateParametersInner body, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") WorkspaceUpdateParametersInner body, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("forceToPurge") Boolean forceToPurge, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("forceToPurge") Boolean forceToPurge, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("kind") String kind, + @QueryParam("$skip") String skip, @QueryParam("aiCapabilities") String aiCapabilities, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skip") String skip, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("kind") String kind, + @QueryParam("$skip") String skip, @QueryParam("aiCapabilities") String aiCapabilities, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("kind") String kind, @QueryParam("$skip") String skip, + @QueryParam("aiCapabilities") String aiCapabilities, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("kind") String kind, @QueryParam("$skip") String skip, + @QueryParam("aiCapabilities") String aiCapabilities, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> diagnose(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> diagnose(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DiagnoseWorkspaceParameters body, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response diagnoseSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiagnoseWorkspaceParameters parameters, @HeaderParam("Accept") String accept, + @HeaderParam("Accept") String accept, @BodyParam("application/json") DiagnoseWorkspaceParameters body, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, + Mono> listKeys(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") - @ExpectedResponses({ 200, 202 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resyncKeys(@HostParam("$host") String endpoint, + Response listKeysSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> listNotebookAccessToken(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookAccessToken(@HostParam("$host") String endpoint, + Response listNotebookAccessTokenSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") - @ExpectedResponses({ 200, 202 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNotebookKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> prepareNotebook(@HostParam("$host") String endpoint, + Response listNotebookKeysSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @@ -187,16 +270,16 @@ Mono>> prepareNotebook(@HostParam("$host") String endp @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listStorageAccountKeys(@HostParam("$host") String endpoint, + Mono> listStorageAccountKeys(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookKeys(@HostParam("$host") String endpoint, + Response listStorageAccountKeysSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @HeaderParam("Accept") String accept, Context context); @@ -206,16 +289,71 @@ Mono> listNotebookKeys(@HostParam("$host") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listOutboundNetworkDependenciesEndpoints( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listOutboundNetworkDependenciesEndpointsSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> prepareNotebook(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response prepareNotebookSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resyncKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response resyncKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -223,7 +361,15 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -231,7 +377,7 @@ Mono> listBySubscriptionNext( * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -241,21 +387,6 @@ Mono> listBySubscriptionNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -267,43 +398,7 @@ private Mono> getByResourceGroupWithResponseAsync(Strin * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -319,7 +414,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -329,14 +424,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -351,8 +448,8 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -361,31 +458,12 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + String workspaceName, WorkspaceInner body) { + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -393,71 +471,49 @@ private Mono>> createOrUpdateWithResponseAsync(String * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return an object that represents a machine learning workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, body, Context.NONE); } /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. + * @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 an object that represents a machine learning workspace. + * @return an object that represents a machine learning workspace along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner body, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, body, context); } /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -465,20 +521,18 @@ private PollerFlux, WorkspaceInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); + String workspaceName, WorkspaceInner body) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); + WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); } /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -486,16 +540,18 @@ private PollerFlux, WorkspaceInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + String workspaceName, WorkspaceInner body) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, body); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, Context.NONE); } /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @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. @@ -504,16 +560,18 @@ public SyncPoller, WorkspaceInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkspaceInner> beginCreateOrUpdate(String resourceGroupName, - String workspaceName, WorkspaceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + String workspaceName, WorkspaceInner body, Context context) { + Response response = createOrUpdateWithResponse(resourceGroupName, workspaceName, body, context); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, context); } /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -521,8 +579,8 @@ public SyncPoller, WorkspaceInner> beginCreateOrUpdat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).last() + WorkspaceInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -530,620 +588,530 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. + * @return an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, - WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, body).getFinalResult(); } /** * Creates or updates a workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for creating or updating a machine learning workspace. + * @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 an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters).block(); + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body, + Context context) { + return beginCreateOrUpdate(resourceGroupName, workspaceName, body, context).getFinalResult(); } /** - * Creates or updates a workspace with the specified parameters. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. + * @return an object that represents a machine learning workspace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).block(); + private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, body, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return an object that represents a machine learning workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body) { + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceToPurge, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, body, Context.NONE); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return an object that represents a machine learning workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body, Context context) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, forceToPurge, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, contentType, accept, body, context); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, + String workspaceName, WorkspaceUpdateParametersInner body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdateParametersInner body) { + Response response = updateWithResponse(resourceGroupName, workspaceName, body); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, Context.NONE); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, - Boolean forceToPurge, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, + String workspaceName, WorkspaceUpdateParametersInner body, Context context) { + Response response = updateWithResponse(resourceGroupName, workspaceName, body, context); + return this.client.getLroResult(response, WorkspaceInner.class, + WorkspaceInner.class, context); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - return this.beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String workspaceName, + WorkspaceUpdateParametersInner body) { + return beginUpdateAsync(resourceGroupName, workspaceName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return an object that represents a machine learning workspace. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, - Boolean forceToPurge, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body) { + return beginUpdate(resourceGroupName, workspaceName, body).getFinalResult(); } /** - * Deletes a machine learning workspace. + * Updates a machine learning workspace with the specified parameters. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param forceToPurge Flag to indicate delete is a purge request. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameters for updating a machine learning workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return an object that represents a machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge) { - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).last() - .flatMap(this.client::getLroFinalResultOrError); + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParametersInner body, + Context context) { + return beginUpdate(resourceGroupName, workspaceName, body, context).getFinalResult(); } /** * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + Boolean forceToPurge) { + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceToPurge, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param forceToPurge Flag to indicate delete is a purge request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + Boolean forceToPurge) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceToPurge, Context.NONE); } /** * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. + * @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 void delete(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - deleteAsync(resourceGroupName, workspaceName, forceToPurge).block(); + private Response deleteWithResponse(String resourceGroupName, String workspaceName, + Boolean forceToPurge, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, forceToPurge, context); } /** * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param forceToPurge Flag to indicate delete is a purge request. - * @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.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { - deleteAsync(resourceGroupName, workspaceName, forceToPurge, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + Boolean forceToPurge) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { + final Boolean forceToPurge = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, forceToPurge); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, parameters, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + Boolean forceToPurge) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, forceToPurge); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { + final Boolean forceToPurge = null; + Response response = deleteWithResponse(resourceGroupName, workspaceName, forceToPurge); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. * @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 an object that represents a machine learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - WorkspaceInner.class, WorkspaceInner.class, context); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + Boolean forceToPurge, Context context) { + Response response = deleteWithResponse(resourceGroupName, workspaceName, forceToPurge, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 an object that represents a machine learning workspace. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge) { + return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. + * @return A {@link Mono} that completes when a successful response is received. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName) { + final Boolean forceToPurge = null; + return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 an object that represents a machine learning workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String workspaceName) { + final Boolean forceToPurge = null; + beginDelete(resourceGroupName, workspaceName, forceToPurge).getFinalResult(); } /** - * Updates a machine learning workspace with the specified parameters. + * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param forceToPurge Flag to indicate delete is a purge request. * @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 an object that represents a machine learning workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { + beginDelete(resourceGroupName, workspaceName, forceToPurge, context).getFinalResult(); } /** - * Updates a machine learning workspace with the specified parameters. + * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 an object that represents a machine learning workspace. + * @return the response of a Workspace list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String kind, String skip, String aiCapabilities) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kind, skip, aiCapabilities, 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())); } /** - * Updates a machine learning workspace with the specified parameters. + * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 an object that represents a machine learning workspace. + * @return the response of a Workspace list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, - Context context) { - return updateAsync(resourceGroupName, workspaceName, parameters, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String kind, String skip, + String aiCapabilities) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, kind, skip, aiCapabilities), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a Workspace list operation as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skip) { - 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.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, skip, 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())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String kind = null; + final String skip = null; + final String aiCapabilities = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, kind, skip, aiCapabilities), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param aiCapabilities The aiCapabilities 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a Workspace list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String skip, 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.")); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String kind, + String skip, String aiCapabilities) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, skip, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kind, skip, aiCapabilities, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return the response of a Workspace list operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String kind, + String skip, String aiCapabilities, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, kind, skip, aiCapabilities, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1153,71 +1121,176 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String kind = null; final String skip = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + final String aiCapabilities = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, kind, skip, aiCapabilities), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + public PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context) { + return new PagedIterable<>( + () -> listByResourceGroupSinglePage(resourceGroupName, kind, skip, aiCapabilities, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Lists all the available machine learning workspaces under the specified resource group. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response of a Workspace list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String kind, String skip, String aiCapabilities) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), kind, skip, aiCapabilities, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 of a Workspace list operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { + private PagedFlux listAsync(String kind, String skip, String aiCapabilities) { + return new PagedFlux<>(() -> listSinglePageAsync(kind, skip, aiCapabilities), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the available machine learning workspaces under the specified 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 response of a Workspace list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String kind = null; final String skip = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); + final String aiCapabilities = null; + return new PagedFlux<>(() -> listSinglePageAsync(kind, skip, aiCapabilities), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** - * Lists all the available machine learning workspaces under the specified resource group. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 of a Workspace list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String kind, String skip, String aiCapabilities) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), kind, skip, aiCapabilities, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response of a Workspace list operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String kind, String skip, String aiCapabilities, + Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), kind, skip, aiCapabilities, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the available machine learning workspaces under the specified 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 response of a Workspace list operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, context)); + public PagedIterable list() { + final String kind = null; + final String skip = null; + final String aiCapabilities = null; + return new PagedIterable<>(() -> listSinglePage(kind, skip, aiCapabilities), + nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 of a Workspace list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String kind, String skip, String aiCapabilities, Context context) { + return new PagedIterable<>(() -> listSinglePage(kind, skip, aiCapabilities, context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1225,29 +1298,11 @@ public PagedIterable listByResourceGroup(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } + DiagnoseWorkspaceParameters body) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.diagnose(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.diagnose(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, body, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1255,66 +1310,47 @@ private Mono>> diagnoseWithResponseAsync(String resour * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } + private Response diagnoseWithResponse(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.diagnose(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - workspaceName, this.client.getApiVersion(), parameters, accept, context); + return service.diagnoseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, body, Context.NONE); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> - beginDiagnoseAsync(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response diagnoseWithResponse(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body, Context context) { + final String accept = "application/json"; + return service.diagnoseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, body, context); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1322,9 +1358,8 @@ private Mono>> diagnoseWithResponseAsync(String resour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiagnoseResponseResultInner> - beginDiagnoseAsync(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); + beginDiagnoseAsync(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body) { + Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, this.client.getContext()); @@ -1334,30 +1369,28 @@ private Mono>> diagnoseWithResponseAsync(String resour * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters, context); + private PollerFlux, DiagnoseResponseResultInner> + beginDiagnoseAsync(String resourceGroupName, String workspaceName) { + final DiagnoseWorkspaceParameters body = null; + Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, - context); + this.client.getContext()); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1365,61 +1398,66 @@ private PollerFlux, DiagnoseResponseResu */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DiagnoseResponseResultInner> - beginDiagnose(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + beginDiagnose(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body) { + Response response = diagnoseWithResponse(resourceGroupName, workspaceName, body); + return this.client.getLroResult(response, + DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, Context.NONE); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + public SyncPoller, DiagnoseResponseResultInner> + beginDiagnose(String resourceGroupName, String workspaceName) { + final DiagnoseWorkspaceParameters body = null; + Response response = diagnoseWithResponse(resourceGroupName, workspaceName, body); + return this.client.getLroResult(response, + DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, Context.NONE); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. + * @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}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( + String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body, Context context) { + Response response = diagnoseWithResponse(resourceGroupName, workspaceName, body, context); + return this.client.getLroResult(response, + DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, context); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 diagnoseAsync(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).last() + private Mono diagnoseAsync(String resourceGroupName, String workspaceName, + DiagnoseWorkspaceParameters body) { + return beginDiagnoseAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1427,18 +1465,16 @@ private Mono diagnoseAsync(String resourceGroupName * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context).last() + private Mono diagnoseAsync(String resourceGroupName, String workspaceName) { + final DiagnoseWorkspaceParameters body = null; + return beginDiagnoseAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1446,7 +1482,7 @@ private Mono diagnoseAsync(String resourceGroupName * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1454,16 +1490,16 @@ private Mono diagnoseAsync(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return diagnoseAsync(resourceGroupName, workspaceName, parameters).block(); + final DiagnoseWorkspaceParameters body = null; + return beginDiagnose(resourceGroupName, workspaceName, body).getFinalResult(); } /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @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. @@ -1472,8 +1508,8 @@ public DiagnoseResponseResultInner diagnose(String resourceGroupName, String wor */ @ServiceMethod(returns = ReturnType.SINGLE) public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { - return diagnoseAsync(resourceGroupName, workspaceName, parameters, context).block(); + DiagnoseWorkspaceParameters body, Context context) { + return beginDiagnose(resourceGroupName, workspaceName, body, context).getFinalResult(); } /** @@ -1481,7 +1517,7 @@ public DiagnoseResponseResultInner diagnose(String resourceGroupName, String wor * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1490,21 +1526,6 @@ public DiagnoseResponseResultInner diagnose(String resourceGroupName, String wor @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1517,43 +1538,7 @@ private Mono> listKeysWithResponseAsync(S * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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> listKeysWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, accept, context); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1570,7 +1555,7 @@ private Mono listKeysAsync(String resourceGroupNam * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1580,7 +1565,9 @@ private Mono listKeysAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse(String resourceGroupName, String workspaceName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + final String accept = "application/json"; + return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** @@ -1588,7 +1575,7 @@ public Response listKeysWithResponse(String resour * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -1600,443 +1587,263 @@ public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String wo } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Machine Learning Workspace notebook access token along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> + listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .withContext( + context -> service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return azure Machine Learning Workspace notebook access token on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, String workspaceName, - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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> beginResyncKeysAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + private Mono listNotebookAccessTokenAsync(String resourceGroupName, + String workspaceName) { + return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return azure Machine Learning Workspace notebook access token along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listNotebookAccessTokenWithResponse(String resourceGroupName, + String workspaceName, Context context) { + final String accept = "application/json"; + return service.listNotebookAccessTokenSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return azure Machine Learning Workspace notebook access token. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { + return listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, - Context context) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNotebookKeysWithResponseAsync(String resourceGroupName, + String workspaceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNotebookKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName) { - return beginResyncKeysAsync(resourceGroupName, workspaceName).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono listNotebookKeysAsync(String resourceGroupName, String workspaceName) { + return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName, Context context) { - return beginResyncKeysAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public Response listNotebookKeysWithResponse(String resourceGroupName, + String workspaceName, Context context) { + final String accept = "application/json"; + return service.listNotebookKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName) { - resyncKeysAsync(resourceGroupName, workspaceName).block(); + public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { + return listNotebookKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Lists keys of Azure Machine Learning Workspace's storage account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 resyncKeys(String resourceGroupName, String workspaceName, Context context) { - resyncKeysAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces along with {@link PagedResponse} 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> listSinglePageAsync(String skip) { - 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.")); - } + private Mono> + listStorageAccountKeysWithResponseAsync(String resourceGroupName, String workspaceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext( + context -> service.listStorageAccountKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the available machine learning workspaces under the specified subscription. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip, 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.getApiVersion(), this.client.getSubscriptionId(), skip, accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip) { - return new PagedFlux<>(() -> listSinglePageAsync(skip), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified 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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skip = null; - return new PagedFlux<>(() -> listSinglePageAsync(skip), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @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 result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(skip, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skip = null; - return new PagedIterable<>(listAsync(skip)); + private Mono listStorageAccountKeysAsync(String resourceGroupName, + String workspaceName) { + return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all the available machine learning workspaces under the specified subscription. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skip, Context context) { - return new PagedIterable<>(listAsync(skip, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStorageAccountKeysWithResponse(String resourceGroupName, + String workspaceName, Context context) { + final String accept = "application/json"; + return service.listStorageAccountKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** - * return notebook access token and refresh token. + * Lists keys of Azure Machine Learning Workspace's storage account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { + return listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** - * return notebook access token and refresh token. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listNotebookAccessTokenWithResponseAsync(String resourceGroupName, String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> + listOutboundNetworkDependenciesEndpointsWithResponseAsync(String resourceGroupName, String workspaceName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNotebookAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return FluxUtil + .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * return notebook access token and refresh token. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookAccessTokenAsync(String resourceGroupName, + private Mono listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName) + return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * return notebook access token and refresh token. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2044,31 +1851,36 @@ private Mono listNotebookAccessTokenAsync(String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public Response listOutboundNetworkDependenciesEndpointsWithResponse( + String resourceGroupName, String workspaceName, Context context) { + final String accept = "application/json"; + return service.listOutboundNetworkDependenciesEndpointsSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, + context); } /** - * return notebook access token and refresh token. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String workspaceName) { + return listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, Context.NONE) + .getValue(); } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2077,21 +1889,6 @@ public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGro @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> prepareNotebookWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.prepareNotebook(this.client.getEndpoint(), this.client.getApiVersion(), @@ -2100,65 +1897,46 @@ private Mono>> prepareNotebookWithResponseAsync(String } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareNotebookWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Response prepareNotebookWithResponse(String resourceGroupName, String workspaceName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.prepareNotebook(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return service.prepareNotebookSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, Context.NONE); } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NotebookResourceInfoInner> - beginPrepareNotebookAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response prepareNotebookWithResponse(String resourceGroupName, String workspaceName, + Context context) { + final String accept = "application/json"; + return service.prepareNotebookSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2166,19 +1944,18 @@ private Mono>> prepareNotebookWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, NotebookResourceInfoInner> - beginPrepareNotebookAsync(String resourceGroupName, String workspaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName, context); + beginPrepareNotebookAsync(String resourceGroupName, String workspaceName) { + Mono>> mono = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName); return this.client.getLroResult(mono, - this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, context); + this.client.getHttpPipeline(), NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, + this.client.getContext()); } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2187,14 +1964,16 @@ private Mono>> prepareNotebookWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook(String resourceGroupName, String workspaceName) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName).getSyncPoller(); + Response response = prepareNotebookWithResponse(resourceGroupName, workspaceName); + return this.client.getLroResult(response, + NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, Context.NONE); } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2204,14 +1983,16 @@ private Mono>> prepareNotebookWithResponseAsync(String @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook(String resourceGroupName, String workspaceName, Context context) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).getSyncPoller(); + Response response = prepareNotebookWithResponse(resourceGroupName, workspaceName, context); + return this.client.getLroResult(response, + NotebookResourceInfoInner.class, NotebookResourceInfoInner.class, context); } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2224,28 +2005,10 @@ private Mono prepareNotebookAsync(String resourceGrou } /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 prepareNotebookAsync(String resourceGroupName, String workspaceName, - Context context) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2253,14 +2016,14 @@ private Mono prepareNotebookAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.SINGLE) public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName) { - return prepareNotebookAsync(resourceGroupName, workspaceName).block(); + return beginPrepareNotebook(resourceGroupName, workspaceName).getFinalResult(); } /** - * Prepare a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2269,102 +2032,52 @@ public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - return prepareNotebookAsync(resourceGroupName, workspaceName, context).block(); + return beginPrepareNotebook(resourceGroupName, workspaceName, context).getFinalResult(); } /** - * List storage account keys of a workspace. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listStorageAccountKeysWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; + private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, + String workspaceName) { return FluxUtil - .withContext( - context -> service.listStorageAccountKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .withContext(context -> service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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> - listStorageAccountKeysWithResponseAsync(String resourceGroupName, String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listStorageAccountKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); - } - - /** - * List storage account keys of a workspace. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listStorageAccountKeysAsync(String resourceGroupName, - String workspaceName) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response resyncKeysWithResponse(String resourceGroupName, String workspaceName) { + return service.resyncKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, Context.NONE); } /** - * List storage account keys of a workspace. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -2372,353 +2085,224 @@ private Mono listStorageAccountKeysAsync(Stri * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listStorageAccountKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + private Response resyncKeysWithResponse(String resourceGroupName, String workspaceName, + Context context) { + return service.resyncKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, context); } /** - * List storage account keys of a workspace. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { - return listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName) { + Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync(String resourceGroupName, - String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNotebookKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName) { + Response response = resyncKeysWithResponse(resourceGroupName, workspaceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync(String resourceGroupName, - String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNotebookKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, + Context context) { + Response response = resyncKeysWithResponse(resourceGroupName, workspaceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookKeysAsync(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono resyncKeysAsync(String resourceGroupName, String workspaceName) { + return beginResyncKeysAsync(resourceGroupName, workspaceName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public void resyncKeys(String resourceGroupName, String workspaceName) { + beginResyncKeys(resourceGroupName, workspaceName).getFinalResult(); } /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { + beginResyncKeys(resourceGroupName, workspaceName, context).getFinalResult(); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * 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 Response} on successful completion of {@link Mono}. + * @return the response of a Workspace list operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsWithResponseAsync(String resourceGroupName, String workspaceName) { - 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, this.client.getApiVersion(), accept, - context)) + .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())); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * 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 Response} on successful completion of {@link Mono}. + * @return the response of a Workspace list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutboundNetworkDependenciesEndpointsWithResponseAsync( - String resourceGroupName, String workspaceName, 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 (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, this.client.getApiVersion(), accept, - context); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Lists all the available machine learning workspaces under the specified resource group. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, - String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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 Response}. + * @return the response of a Workspace list operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) - .block(); + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); - } - - /** * 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a Workspace list operation 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.")); - } + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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. + * Lists all the available machine learning workspaces under the specified subscription. * - * @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 result of a request to list machine learning workspaces 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 result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a Workspace list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { 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())); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * Lists all the available machine learning workspaces under the specified subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -2726,23 +2310,14 @@ private Mono> listBySubscriptionNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response of a Workspace list operation along with {@link PagedResponse}. */ @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.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { 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)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java index 380278379945..dde9d34dd1a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.implementation; @@ -46,12 +46,8 @@ public Response getByResourceGroupWithResponse(String resourceGroupNa Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkspaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new WorkspaceImpl(inner.getValue(), this.manager())); } public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { @@ -76,9 +72,20 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context) { PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skip, context); + = this.serviceClient().listByResourceGroup(resourceGroupName, kind, skip, aiCapabilities, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + } + + public PagedIterable list(String kind, String skip, String aiCapabilities, Context context) { + PagedIterable inner = this.serviceClient().list(kind, skip, aiCapabilities, context); return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } @@ -92,9 +99,9 @@ public DiagnoseResponseResult diagnose(String resourceGroupName, String workspac } public DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { + DiagnoseWorkspaceParameters body, Context context) { DiagnoseResponseResultInner inner - = this.serviceClient().diagnose(resourceGroupName, workspaceName, parameters, context); + = this.serviceClient().diagnose(resourceGroupName, workspaceName, body, context); if (inner != null) { return new DiagnoseResponseResultImpl(inner, this.manager()); } else { @@ -106,12 +113,8 @@ public Response listKeysWithResponse(String resourceGro Context context) { Response inner = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListWorkspaceKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListWorkspaceKeysResultImpl(inner.getValue(), this.manager())); } public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName) { @@ -123,34 +126,12 @@ public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspa } } - public void resyncKeys(String resourceGroupName, String workspaceName) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skip, Context context) { - PagedIterable inner = this.serviceClient().list(skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, String workspaceName, Context context) { Response inner = this.serviceClient().listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NotebookAccessTokenResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NotebookAccessTokenResultImpl(inner.getValue(), this.manager())); } public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName) { @@ -163,20 +144,18 @@ public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupNam } } - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { - NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } + public Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); } - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - NotebookResourceInfoInner inner - = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); + public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { + ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); + return new ListNotebookKeysResultImpl(inner, this.manager()); } else { return null; } @@ -186,12 +165,8 @@ public Response listStorageAccountKeysWithResponse String workspaceName, Context context) { Response inner = this.serviceClient().listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListStorageAccountKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListStorageAccountKeysResultImpl(inner.getValue(), this.manager())); } public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName) { @@ -204,50 +179,52 @@ public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupN } } - public Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, - Context context) { - Response inner - = this.serviceClient().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, + String workspaceName, Context context) { + Response inner = this.serviceClient() + .listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, context); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExternalFqdnResponseImpl(inner.getValue(), this.manager())); } - public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { - ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); + public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String workspaceName) { + ExternalFqdnResponseInner inner + = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); + return new ExternalFqdnResponseImpl(inner, this.manager()); } else { return null; } } - public Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, - String workspaceName, Context context) { - Response inner = this.serviceClient() - .listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, context); + public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { + NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExternalFqdnResponseImpl(inner.getValue(), this.manager())); + return new NotebookResourceInfoImpl(inner, this.manager()); } else { return null; } } - public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String workspaceName) { - ExternalFqdnResponseInner inner - = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); + public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { + NotebookResourceInfoInner inner + = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); if (inner != null) { - return new ExternalFqdnResponseImpl(inner, this.manager()); + return new NotebookResourceInfoImpl(inner, this.manager()); } else { return null; } } + public void resyncKeys(String resourceGroupName, String workspaceName) { + this.serviceClient().resyncKeys(resourceGroupName, workspaceName); + } + + public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { + this.serviceClient().resyncKeys(resourceGroupName, workspaceName, context); + } + public Workspace getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AmlComputeNodesInformation.java similarity index 87% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AmlComputeNodesInformation.java index d3062e6f3b56..38d1140947d9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AmlComputeNodesInformation.java @@ -1,14 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; import java.io.IOException; import java.util.List; @@ -30,7 +31,7 @@ public final class AmlComputeNodesInformation implements JsonSerializable e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AvailableQuotaArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AvailableQuotaArmPaginatedResult.java new file mode 100644 index 000000000000..a490b4271566 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AvailableQuotaArmPaginatedResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of AvailableQuota entities. + */ +@Immutable +public final class AvailableQuotaArmPaginatedResult implements JsonSerializable { + /* + * The AvailableQuota items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of AvailableQuotaArmPaginatedResult class. + */ + private AvailableQuotaArmPaginatedResult() { + } + + /** + * Get the value property: The AvailableQuota items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 AvailableQuotaArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableQuotaArmPaginatedResult 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 AvailableQuotaArmPaginatedResult. + */ + public static AvailableQuotaArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailableQuotaArmPaginatedResult deserializedAvailableQuotaArmPaginatedResult + = new AvailableQuotaArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AvailableQuotaInner.fromJson(reader1)); + deserializedAvailableQuotaArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedAvailableQuotaArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableQuotaArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchDeploymentTrackedResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchDeploymentTrackedResourceArmPaginatedResult.java index e51a5f0a5748..37a297cba337 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchDeploymentTrackedResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of BatchDeployment entities. */ -@Fluent +@Immutable public final class BatchDeploymentTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type BatchDeployment. + * The BatchDeployment items on this page */ private List value; /* - * The link to the next page of BatchDeployment objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of BatchDeploymentTrackedResourceArmPaginatedResult class. */ - public BatchDeploymentTrackedResourceArmPaginatedResult() { + private BatchDeploymentTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type BatchDeployment. + * Get the value property: The BatchDeployment items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type BatchDeployment. - * - * @param value the value value to set. - * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public BatchDeploymentTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public BatchDeploymentTrackedResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BatchDeploymentTrackedResourceArmPaginatedResult 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 BatchDeploymentTrackedResourceArmPaginatedResult. */ public static BatchDeploymentTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchEndpointTrackedResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchEndpointTrackedResourceArmPaginatedResult.java index 14d9c1bc8b60..4697acccf63b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchEndpointTrackedResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of BatchEndpoint entities. */ -@Fluent +@Immutable public final class BatchEndpointTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type BatchEndpoint. + * The BatchEndpoint items on this page */ private List value; /* - * The link to the next page of BatchEndpoint objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of BatchEndpointTrackedResourceArmPaginatedResult class. */ - public BatchEndpointTrackedResourceArmPaginatedResult() { + private BatchEndpointTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type BatchEndpoint. + * Get the value property: The BatchEndpoint items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type BatchEndpoint. - * - * @param value the value value to set. - * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. - */ - public BatchEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. - */ - public BatchEndpointTrackedResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BatchEndpointTrackedResourceArmPaginatedResult 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 BatchEndpointTrackedResourceArmPaginatedResult. */ public static BatchEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeContainerResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeContainerResourceArmPaginatedResult.java index fa6d0216426d..9f96e594fc8f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeContainerResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of CodeContainer entities. */ -@Fluent +@Immutable public final class CodeContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type CodeContainer. + * The CodeContainer items on this page */ private List value; /* - * The link to the next page of CodeContainer objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of CodeContainerResourceArmPaginatedResult class. */ - public CodeContainerResourceArmPaginatedResult() { + private CodeContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type CodeContainer. + * Get the value property: The CodeContainer items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type CodeContainer. - * - * @param value the value value to set. - * @return the CodeContainerResourceArmPaginatedResult object itself. - */ - public CodeContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the CodeContainerResourceArmPaginatedResult object itself. - */ - public CodeContainerResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CodeContainerResourceArmPaginatedResult 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 CodeContainerResourceArmPaginatedResult. */ public static CodeContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeVersionResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeVersionResourceArmPaginatedResult.java index a45cfdbbf5dd..7f7a516babbf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeVersionResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of CodeVersion entities. */ -@Fluent +@Immutable public final class CodeVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type CodeVersion. + * The CodeVersion items on this page */ private List value; /* - * The link to the next page of CodeVersion objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of CodeVersionResourceArmPaginatedResult class. */ - public CodeVersionResourceArmPaginatedResult() { + private CodeVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type CodeVersion. + * Get the value property: The CodeVersion items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type CodeVersion. - * - * @param value the value value to set. - * @return the CodeVersionResourceArmPaginatedResult object itself. - */ - public CodeVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the CodeVersionResourceArmPaginatedResult object itself. - */ - public CodeVersionResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of CodeVersionResourceArmPaginatedResult 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 CodeVersionResourceArmPaginatedResult. */ public static CodeVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentContainerResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentContainerResourceArmPaginatedResult.java index 528c4ac02a9b..0464536221e1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentContainerResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of ComponentContainer entities. */ -@Fluent +@Immutable public final class ComponentContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ComponentContainer. + * The ComponentContainer items on this page */ private List value; /* - * The link to the next page of ComponentContainer objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ComponentContainerResourceArmPaginatedResult class. */ - public ComponentContainerResourceArmPaginatedResult() { + private ComponentContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ComponentContainer. + * Get the value property: The ComponentContainer items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type ComponentContainer. - * - * @param value the value value to set. - * @return the ComponentContainerResourceArmPaginatedResult object itself. - */ - public ComponentContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ComponentContainerResourceArmPaginatedResult object itself. - */ - public ComponentContainerResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ComponentContainerResourceArmPaginatedResult 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 ComponentContainerResourceArmPaginatedResult. */ public static ComponentContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentVersionResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentVersionResourceArmPaginatedResult.java index f555f5ced0b0..59c580e4808a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentVersionResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of ComponentVersion entities. */ -@Fluent +@Immutable public final class ComponentVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ComponentVersion. + * The ComponentVersion items on this page */ private List value; /* - * The link to the next page of ComponentVersion objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ComponentVersionResourceArmPaginatedResult class. */ - public ComponentVersionResourceArmPaginatedResult() { + private ComponentVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ComponentVersion. + * Get the value property: The ComponentVersion items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type ComponentVersion. - * - * @param value the value value to set. - * @return the ComponentVersionResourceArmPaginatedResult object itself. - */ - public ComponentVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ComponentVersionResourceArmPaginatedResult object itself. - */ - public ComponentVersionResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ComponentVersionResourceArmPaginatedResult 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 ComponentVersionResourceArmPaginatedResult. */ public static ComponentVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataContainerResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataContainerResourceArmPaginatedResult.java index 29b91f378cba..e2ff2b01b14b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataContainerResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of DataContainer entities. */ -@Fluent +@Immutable public final class DataContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type DataContainer. + * The DataContainer items on this page */ private List value; /* - * The link to the next page of DataContainer objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DataContainerResourceArmPaginatedResult class. */ - public DataContainerResourceArmPaginatedResult() { + private DataContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type DataContainer. + * Get the value property: The DataContainer items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type DataContainer. - * - * @param value the value value to set. - * @return the DataContainerResourceArmPaginatedResult object itself. - */ - public DataContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the DataContainerResourceArmPaginatedResult object itself. - */ - public DataContainerResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DataContainerResourceArmPaginatedResult 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 DataContainerResourceArmPaginatedResult. */ public static DataContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataVersionBaseResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataVersionBaseResourceArmPaginatedResult.java index ae9a6f08344c..4d877563297c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataVersionBaseResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of DataVersionBase entities. */ -@Fluent +@Immutable public final class DataVersionBaseResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type DataVersionBase. + * The DataVersionBase items on this page */ private List value; /* - * The link to the next page of DataVersionBase objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DataVersionBaseResourceArmPaginatedResult class. */ - public DataVersionBaseResourceArmPaginatedResult() { + private DataVersionBaseResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type DataVersionBase. + * Get the value property: The DataVersionBase items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type DataVersionBase. - * - * @param value the value value to set. - * @return the DataVersionBaseResourceArmPaginatedResult object itself. - */ - public DataVersionBaseResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the DataVersionBaseResourceArmPaginatedResult object itself. - */ - public DataVersionBaseResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DataVersionBaseResourceArmPaginatedResult 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 DataVersionBaseResourceArmPaginatedResult. */ public static DataVersionBaseResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DatastoreResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DatastoreResourceArmPaginatedResult.java index aa45491067d0..c1cff7d0ce67 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DatastoreResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of Datastore entities. */ -@Fluent +@Immutable public final class DatastoreResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type Datastore. + * The Datastore items on this page */ private List value; /* - * The link to the next page of Datastore objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DatastoreResourceArmPaginatedResult class. */ - public DatastoreResourceArmPaginatedResult() { + private DatastoreResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type Datastore. + * Get the value property: The Datastore items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type Datastore. - * - * @param value the value value to set. - * @return the DatastoreResourceArmPaginatedResult object itself. - */ - public DatastoreResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of Datastore objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of Datastore objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the DatastoreResourceArmPaginatedResult object itself. - */ - public DatastoreResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DatastoreResourceArmPaginatedResult 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 DatastoreResourceArmPaginatedResult. */ public static DatastoreResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 000000000000..052cdf3a5eba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Paged collection of EndpointDeploymentResourcePropertiesBasicResource items. + */ +@Immutable +public final class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The EndpointDeploymentResourcePropertiesBasicResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult class. + */ + private EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult() { + } + + /** + * Get the value property: The EndpointDeploymentResourcePropertiesBasicResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult 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 + * EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult. + */ + public static EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult + = new EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.nextLink + = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 000000000000..fd84478eb014 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Paged collection of EndpointResourcePropertiesBasicResource items. + */ +@Immutable +public final class EndpointResourcePropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The EndpointResourcePropertiesBasicResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of EndpointResourcePropertiesBasicResourceArmPaginatedResult class. + */ + private EndpointResourcePropertiesBasicResourceArmPaginatedResult() { + } + + /** + * Get the value property: The EndpointResourcePropertiesBasicResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 EndpointResourcePropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointResourcePropertiesBasicResourceArmPaginatedResult 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 + * EndpointResourcePropertiesBasicResourceArmPaginatedResult. + */ + public static EndpointResourcePropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + EndpointResourcePropertiesBasicResourceArmPaginatedResult deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult + = new EndpointResourcePropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EndpointResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentContainerResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentContainerResourceArmPaginatedResult.java index f3edb6b3f7cf..cfed5150bc71 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentContainerResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of EnvironmentContainer entities. */ -@Fluent +@Immutable public final class EnvironmentContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type EnvironmentContainer. + * The EnvironmentContainer items on this page */ private List value; /* - * The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of EnvironmentContainerResourceArmPaginatedResult class. */ - public EnvironmentContainerResourceArmPaginatedResult() { + private EnvironmentContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type EnvironmentContainer. + * Get the value property: The EnvironmentContainer items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type EnvironmentContainer. - * - * @param value the value value to set. - * @return the EnvironmentContainerResourceArmPaginatedResult object itself. - */ - public EnvironmentContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the EnvironmentContainerResourceArmPaginatedResult object itself. - */ - public EnvironmentContainerResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EnvironmentContainerResourceArmPaginatedResult 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 EnvironmentContainerResourceArmPaginatedResult. */ public static EnvironmentContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentVersionResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentVersionResourceArmPaginatedResult.java index 560a95e0df20..bf7311456836 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentVersionResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of EnvironmentVersion entities. */ -@Fluent +@Immutable public final class EnvironmentVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type EnvironmentVersion. + * The EnvironmentVersion items on this page */ private List value; /* - * The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of EnvironmentVersionResourceArmPaginatedResult class. */ - public EnvironmentVersionResourceArmPaginatedResult() { + private EnvironmentVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type EnvironmentVersion. + * Get the value property: The EnvironmentVersion items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type EnvironmentVersion. - * - * @param value the value value to set. - * @return the EnvironmentVersionResourceArmPaginatedResult object itself. - */ - public EnvironmentVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the EnvironmentVersionResourceArmPaginatedResult object itself. - */ - public EnvironmentVersionResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of EnvironmentVersionResourceArmPaginatedResult 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 EnvironmentVersionResourceArmPaginatedResult. */ public static EnvironmentVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeatureResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeatureResourceArmPaginatedResult.java index bc14838a569b..cb11404ef84c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeatureResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * A paginated list of Feature entities. */ -@Fluent +@Immutable public final class FeatureResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type Feature. + * The Feature items on this page */ private List value; /* - * The link to the next page of Feature objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FeatureResourceArmPaginatedResult class. */ - public FeatureResourceArmPaginatedResult() { + private FeatureResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type Feature. + * Get the value property: The Feature items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: An array of objects of type Feature. - * - * @param value the value value to set. - * @return the FeatureResourceArmPaginatedResult object itself. - */ - public FeatureResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeatureResourceArmPaginatedResult object itself. - */ - public FeatureResourceArmPaginatedResult 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} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FeatureResourceArmPaginatedResult 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 FeatureResourceArmPaginatedResult. */ public static FeatureResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetContainerResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetContainerResourceArmPaginatedResult.java index 22d59a12caa1..3e67d9fa9310 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetContainerResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of FeaturesetContainer entities. */ -@Fluent +@Immutable public final class FeaturesetContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturesetContainer. + * The FeaturesetContainer items on this page */ private List value; /* - * The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FeaturesetContainerResourceArmPaginatedResult class. */ - public FeaturesetContainerResourceArmPaginatedResult() { + private FeaturesetContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturesetContainer. + * Get the value property: The FeaturesetContainer items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type FeaturesetContainer. - * - * @param value the value value to set. - * @return the FeaturesetContainerResourceArmPaginatedResult object itself. - */ - public FeaturesetContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturesetContainerResourceArmPaginatedResult object itself. - */ - public FeaturesetContainerResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FeaturesetContainerResourceArmPaginatedResult 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 FeaturesetContainerResourceArmPaginatedResult. */ public static FeaturesetContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetVersionResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetVersionResourceArmPaginatedResult.java index bdbaf9605332..65e41c95ab0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetVersionResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of FeaturesetVersion entities. */ -@Fluent +@Immutable public final class FeaturesetVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturesetVersion. + * The FeaturesetVersion items on this page */ private List value; /* - * The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FeaturesetVersionResourceArmPaginatedResult class. */ - public FeaturesetVersionResourceArmPaginatedResult() { + private FeaturesetVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturesetVersion. + * Get the value property: The FeaturesetVersion items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type FeaturesetVersion. - * - * @param value the value value to set. - * @return the FeaturesetVersionResourceArmPaginatedResult object itself. - */ - public FeaturesetVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturesetVersionResourceArmPaginatedResult object itself. - */ - public FeaturesetVersionResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FeaturesetVersionResourceArmPaginatedResult 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 FeaturesetVersionResourceArmPaginatedResult. */ public static FeaturesetVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java index 8f121b32e6b6..506cc363531e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of FeaturestoreEntityContainer entities. */ -@Fluent +@Immutable public final class FeaturestoreEntityContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturestoreEntityContainer. + * The FeaturestoreEntityContainer items on this page */ private List value; /* - * The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FeaturestoreEntityContainerResourceArmPaginatedResult class. */ - public FeaturestoreEntityContainerResourceArmPaginatedResult() { + private FeaturestoreEntityContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturestoreEntityContainer. + * Get the value property: The FeaturestoreEntityContainer items on this page. * * @return the value value. */ @@ -45,20 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type FeaturestoreEntityContainer. - * - * @param value the value value to set. - * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityContainerResourceArmPaginatedResult - withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are - * no additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -66,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are - * no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityContainerResourceArmPaginatedResult 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} */ @@ -106,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FeaturestoreEntityContainerResourceArmPaginatedResult 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 FeaturestoreEntityContainerResourceArmPaginatedResult. */ public static FeaturestoreEntityContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java index 4508e8c424b2..5995269831f1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of FeaturestoreEntityVersion entities. */ -@Fluent +@Immutable public final class FeaturestoreEntityVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturestoreEntityVersion. + * The FeaturestoreEntityVersion items on this page */ private List value; /* - * The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of FeaturestoreEntityVersionResourceArmPaginatedResult class. */ - public FeaturestoreEntityVersionResourceArmPaginatedResult() { + private FeaturestoreEntityVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturestoreEntityVersion. + * Get the value property: The FeaturestoreEntityVersion items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type FeaturestoreEntityVersion. - * - * @param value the value value to set. - * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. - */ - public FeaturestoreEntityVersionResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of FeaturestoreEntityVersionResourceArmPaginatedResult 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 FeaturestoreEntityVersionResourceArmPaginatedResult. */ public static FeaturestoreEntityVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceEndpointTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..1dfd3546a1b7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceEndpointTrackedResourceArmPaginatedResult.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of InferenceEndpoint entities. + */ +@Immutable +public final class InferenceEndpointTrackedResourceArmPaginatedResult + implements JsonSerializable { + /* + * The InferenceEndpoint items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of InferenceEndpointTrackedResourceArmPaginatedResult class. + */ + private InferenceEndpointTrackedResourceArmPaginatedResult() { + } + + /** + * Get the value property: The InferenceEndpoint items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 InferenceEndpointTrackedResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceEndpointTrackedResourceArmPaginatedResult 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 InferenceEndpointTrackedResourceArmPaginatedResult. + */ + public static InferenceEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InferenceEndpointTrackedResourceArmPaginatedResult deserializedInferenceEndpointTrackedResourceArmPaginatedResult + = new InferenceEndpointTrackedResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InferenceEndpointInner.fromJson(reader1)); + deserializedInferenceEndpointTrackedResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInferenceEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceEndpointTrackedResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceGroupTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceGroupTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..1e903590378a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceGroupTrackedResourceArmPaginatedResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of InferenceGroup entities. + */ +@Immutable +public final class InferenceGroupTrackedResourceArmPaginatedResult + implements JsonSerializable { + /* + * The InferenceGroup items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of InferenceGroupTrackedResourceArmPaginatedResult class. + */ + private InferenceGroupTrackedResourceArmPaginatedResult() { + } + + /** + * Get the value property: The InferenceGroup items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 InferenceGroupTrackedResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceGroupTrackedResourceArmPaginatedResult 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 InferenceGroupTrackedResourceArmPaginatedResult. + */ + public static InferenceGroupTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceGroupTrackedResourceArmPaginatedResult deserializedInferenceGroupTrackedResourceArmPaginatedResult + = new InferenceGroupTrackedResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InferenceGroupInner.fromJson(reader1)); + deserializedInferenceGroupTrackedResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInferenceGroupTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceGroupTrackedResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferencePoolTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferencePoolTrackedResourceArmPaginatedResult.java new file mode 100644 index 000000000000..03527c775efb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferencePoolTrackedResourceArmPaginatedResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of InferencePool entities. + */ +@Immutable +public final class InferencePoolTrackedResourceArmPaginatedResult + implements JsonSerializable { + /* + * The InferencePool items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of InferencePoolTrackedResourceArmPaginatedResult class. + */ + private InferencePoolTrackedResourceArmPaginatedResult() { + } + + /** + * Get the value property: The InferencePool items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 InferencePoolTrackedResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferencePoolTrackedResourceArmPaginatedResult 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 InferencePoolTrackedResourceArmPaginatedResult. + */ + public static InferencePoolTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferencePoolTrackedResourceArmPaginatedResult deserializedInferencePoolTrackedResourceArmPaginatedResult + = new InferencePoolTrackedResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> InferencePoolInner.fromJson(reader1)); + deserializedInferencePoolTrackedResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedInferencePoolTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedInferencePoolTrackedResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/JobBaseResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/JobBaseResourceArmPaginatedResult.java index 17f54a03c103..53fbde695a35 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/JobBaseResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * A paginated list of JobBase entities. */ -@Fluent +@Immutable public final class JobBaseResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type JobBase. + * The JobBase items on this page */ private List value; /* - * The link to the next page of JobBase objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of JobBaseResourceArmPaginatedResult class. */ - public JobBaseResourceArmPaginatedResult() { + private JobBaseResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type JobBase. + * Get the value property: The JobBase items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: An array of objects of type JobBase. - * - * @param value the value value to set. - * @return the JobBaseResourceArmPaginatedResult object itself. - */ - public JobBaseResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the JobBaseResourceArmPaginatedResult object itself. - */ - public JobBaseResourceArmPaginatedResult 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} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of JobBaseResourceArmPaginatedResult 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 JobBaseResourceArmPaginatedResult. */ public static JobBaseResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListAmlUserFeatureResult.java similarity index 75% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListAmlUserFeatureResult.java index 5be8fc567662..1d442fba7586 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListAmlUserFeatureResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,24 +19,23 @@ @Immutable public final class ListAmlUserFeatureResult implements JsonSerializable { /* - * The list of AML user facing features. + * The AmlUserFeature items on this page */ private List value; /* - * The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page - * of AML user features information. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListAmlUserFeatureResult class. */ - public ListAmlUserFeatureResult() { + private ListAmlUserFeatureResult() { } /** - * Get the value property: The list of AML user facing features. + * Get the value property: The AmlUserFeature items on this page. * * @return the value value. */ @@ -45,8 +44,7 @@ public List value() { } /** - * Get the nextLink property: The URI to fetch the next page of AML user features information. Call ListNext() with - * this to fetch the next page of AML user features information. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -54,23 +52,13 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -80,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListAmlUserFeatureResult 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 ListAmlUserFeatureResult. */ public static ListAmlUserFeatureResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListUsagesResult.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListUsagesResult.java index b6bc66cf0c61..956103aba317 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListUsagesResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,24 +19,23 @@ @Immutable public final class ListUsagesResult implements JsonSerializable { /* - * The list of AML resource usages. + * The Usage items on this page */ private List value; /* - * The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next - * page of AML resource usage information. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListUsagesResult class. */ - public ListUsagesResult() { + private ListUsagesResult() { } /** - * Get the value property: The list of AML resource usages. + * Get the value property: The Usage items on this page. * * @return the value value. */ @@ -45,8 +44,7 @@ public List value() { } /** - * Get the nextLink property: The URI to fetch the next page of AML resource usage information. Call ListNext() with - * this to fetch the next page of AML resource usage information. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -54,23 +52,13 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -80,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListUsagesResult 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 ListUsagesResult. */ public static ListUsagesResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListWorkspaceQuotas.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListWorkspaceQuotas.java index fd651f77c407..cd789b30fa6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListWorkspaceQuotas.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -19,24 +19,23 @@ @Immutable public final class ListWorkspaceQuotas implements JsonSerializable { /* - * The list of Workspace Quotas by VM Family + * The ResourceQuota items on this page */ private List value; /* - * The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch - * the next page of Workspace Quota information. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListWorkspaceQuotas class. */ - public ListWorkspaceQuotas() { + private ListWorkspaceQuotas() { } /** - * Get the value property: The list of Workspace Quotas by VM Family. + * Get the value property: The ResourceQuota items on this page. * * @return the value value. */ @@ -45,8 +44,7 @@ public List value() { } /** - * Get the nextLink property: The URI to fetch the next page of workspace quota information by VM Family. Call - * ListNext() with this to fetch the next page of Workspace Quota information. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -54,23 +52,13 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -80,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListWorkspaceQuotas 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 ListWorkspaceQuotas. */ public static ListWorkspaceQuotas fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ManagedNetworkListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ManagedNetworkListResult.java new file mode 100644 index 000000000000..415737a8711a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ManagedNetworkListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Paged collection of ManagedNetworkSettingsPropertiesBasicResource items. + */ +@Immutable +public final class ManagedNetworkListResult implements JsonSerializable { + /* + * The ManagedNetworkSettingsPropertiesBasicResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of ManagedNetworkListResult class. + */ + private ManagedNetworkListResult() { + } + + /** + * Get the value property: The ManagedNetworkSettingsPropertiesBasicResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 ManagedNetworkListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNetworkListResult 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 ManagedNetworkListResult. + */ + public static ManagedNetworkListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedNetworkListResult deserializedManagedNetworkListResult = new ManagedNetworkListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader + .readArray(reader1 -> ManagedNetworkSettingsPropertiesBasicResourceInner.fromJson(reader1)); + deserializedManagedNetworkListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedManagedNetworkListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNetworkListResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/MarketplaceSubscriptionResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/MarketplaceSubscriptionResourceArmPaginatedResult.java index 2c9a7bb73b66..b078a1296890 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/MarketplaceSubscriptionResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of MarketplaceSubscription entities. */ -@Fluent +@Immutable public final class MarketplaceSubscriptionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type MarketplaceSubscription. + * The MarketplaceSubscription items on this page */ private List value; /* - * The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of MarketplaceSubscriptionResourceArmPaginatedResult class. */ - public MarketplaceSubscriptionResourceArmPaginatedResult() { + private MarketplaceSubscriptionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type MarketplaceSubscription. + * Get the value property: The MarketplaceSubscription items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type MarketplaceSubscription. - * - * @param value the value value to set. - * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. - */ - public MarketplaceSubscriptionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. - */ - public MarketplaceSubscriptionResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MarketplaceSubscriptionResourceArmPaginatedResult 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 MarketplaceSubscriptionResourceArmPaginatedResult. */ public static MarketplaceSubscriptionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelContainerResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelContainerResourceArmPaginatedResult.java index bb34f6608d07..d5594b8cc91b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelContainerResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of ModelContainer entities. */ -@Fluent +@Immutable public final class ModelContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ModelContainer. + * The ModelContainer items on this page */ private List value; /* - * The link to the next page of ModelContainer objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ModelContainerResourceArmPaginatedResult class. */ - public ModelContainerResourceArmPaginatedResult() { + private ModelContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ModelContainer. + * Get the value property: The ModelContainer items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type ModelContainer. - * - * @param value the value value to set. - * @return the ModelContainerResourceArmPaginatedResult object itself. - */ - public ModelContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the ModelContainerResourceArmPaginatedResult object itself. - */ - public ModelContainerResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ModelContainerResourceArmPaginatedResult 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 ModelContainerResourceArmPaginatedResult. */ public static ModelContainerResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelVersionResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelVersionResourceArmPaginatedResult.java index e25ce546e223..bf6f06dff2db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelVersionResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of ModelVersion entities. */ -@Fluent +@Immutable public final class ModelVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ModelVersion. + * The ModelVersion items on this page */ private List value; /* - * The link to the next page of ModelVersion objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ModelVersionResourceArmPaginatedResult class. */ - public ModelVersionResourceArmPaginatedResult() { + private ModelVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ModelVersion. + * Get the value property: The ModelVersion items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type ModelVersion. - * - * @param value the value value to set. - * @return the ModelVersionResourceArmPaginatedResult object itself. - */ - public ModelVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the ModelVersionResourceArmPaginatedResult object itself. - */ - public ModelVersionResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ModelVersionResourceArmPaginatedResult 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 ModelVersionResourceArmPaginatedResult. */ public static ModelVersionResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java index 448b6864545c..f849a382d173 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of OnlineDeployment entities. */ -@Fluent +@Immutable public final class OnlineDeploymentTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type OnlineDeployment. + * The OnlineDeployment items on this page */ private List value; /* - * The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OnlineDeploymentTrackedResourceArmPaginatedResult class. */ - public OnlineDeploymentTrackedResourceArmPaginatedResult() { + private OnlineDeploymentTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type OnlineDeployment. + * Get the value property: The OnlineDeployment items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type OnlineDeployment. - * - * @param value the value value to set. - * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public OnlineDeploymentTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. - */ - public OnlineDeploymentTrackedResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OnlineDeploymentTrackedResourceArmPaginatedResult 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 OnlineDeploymentTrackedResourceArmPaginatedResult. */ public static OnlineDeploymentTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineEndpointTrackedResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineEndpointTrackedResourceArmPaginatedResult.java index 115ff52045f9..84ffa1f8836c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineEndpointTrackedResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of OnlineEndpoint entities. */ -@Fluent +@Immutable public final class OnlineEndpointTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type OnlineEndpoint. + * The OnlineEndpoint items on this page */ private List value; /* - * The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OnlineEndpointTrackedResourceArmPaginatedResult class. */ - public OnlineEndpointTrackedResourceArmPaginatedResult() { + private OnlineEndpointTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type OnlineEndpoint. + * Get the value property: The OnlineEndpoint items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type OnlineEndpoint. - * - * @param value the value value to set. - * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. - */ - public OnlineEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. - */ - public OnlineEndpointTrackedResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OnlineEndpointTrackedResourceArmPaginatedResult 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 OnlineEndpointTrackedResourceArmPaginatedResult. */ public static OnlineEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OperationListResult.java similarity index 78% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OperationListResult.java index 8e69909cfe76..43ebe5426c14 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OperationListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -20,23 +20,23 @@ @Immutable public final class OperationListResult implements JsonSerializable { /* - * List of operations supported by the resource provider + * The Operation items on this page */ private List value; /* - * URL to get the next set of operation list results (if there are any). + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - public OperationListResult() { + private OperationListResult() { } /** - * Get the value property: List of operations supported by the resource provider. + * Get the value property: The Operation items on this page. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -53,23 +53,14 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@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(); } @@ -79,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OutboundRuleListResult.java similarity index 54% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OutboundRuleListResult.java index abc453a3a3ff..274f74cdec13 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OutboundRuleListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,52 +14,28 @@ import java.util.List; /** - * List of outbound rules for the managed network of a machine learning workspace. + * Paged collection of OutboundRuleBasicResource items. */ -@Fluent +@Immutable public final class OutboundRuleListResult implements JsonSerializable { /* - * The link to the next page constructed using the continuationToken. If null, there are no additional pages. + * The OutboundRuleBasicResource items on this page */ - private String nextLink; + private List value; /* - * The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to - * request the next list of machine learning workspaces. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of OutboundRuleListResult class. */ - public OutboundRuleListResult() { + private OutboundRuleListResult() { } /** - * Get the nextLink property: The link to the next page constructed using the continuationToken. If null, there are - * no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page constructed using the continuationToken. If null, there are - * no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the OutboundRuleListResult object itself. - */ - public OutboundRuleListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. + * Get the value property: The OutboundRuleBasicResource items on this page. * * @return the value value. */ @@ -68,26 +44,12 @@ public List value() { } /** - * Set the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @param value the value value to set. - * @return the OutboundRuleListResult object itself. - */ - public OutboundRuleListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -96,8 +58,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -107,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OutboundRuleListResult 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 OutboundRuleListResult. */ public static OutboundRuleListResult fromJson(JsonReader jsonReader) throws IOException { @@ -116,12 +79,12 @@ public static OutboundRuleListResult fromJson(JsonReader jsonReader) throws IOEx String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedOutboundRuleListResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> OutboundRuleBasicResourceInner.fromJson(reader1)); deserializedOutboundRuleListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOutboundRuleListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PaginatedComputeResourcesList.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PaginatedComputeResourcesList.java index 55620a1a6546..abd0085a28ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PaginatedComputeResourcesList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. */ -@Fluent +@Immutable public final class PaginatedComputeResourcesList implements JsonSerializable { /* - * An array of Machine Learning compute objects wrapped in ARM resource envelope. + * The ComputeResource items on this page */ private List value; /* - * A continuation link (absolute URI) to the next page of results in the list. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of PaginatedComputeResourcesList class. */ - public PaginatedComputeResourcesList() { + private PaginatedComputeResourcesList() { } /** - * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. + * Get the value property: The ComputeResource items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @param value the value value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @param nextLink the nextLink value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList 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} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PaginatedComputeResourcesList 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 PaginatedComputeResourcesList. */ public static PaginatedComputeResourcesList fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateEndpointConnectionListResult.java similarity index 77% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateEndpointConnectionListResult.java index fa1adc25e986..84d10d3bbd56 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateEndpointConnectionListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * List of private endpoint connection associated with the specified workspace. */ -@Fluent +@Immutable public final class PrivateEndpointConnectionListResult implements JsonSerializable { /* @@ -24,10 +24,15 @@ public final class PrivateEndpointConnectionListResult */ private List value; + /* + * The nextLink property. + */ + private String nextLink; + /** * Creates an instance of PrivateEndpointConnectionListResult class. */ - public PrivateEndpointConnectionListResult() { + private PrivateEndpointConnectionListResult() { } /** @@ -40,25 +45,12 @@ public List value() { } /** - * Set the value property: Array of private endpoint connections. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The nextLink property. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -68,6 +60,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -91,6 +84,8 @@ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader List value = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); deserializedPrivateEndpointConnectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateLinkResourceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..98fe0255d72e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateLinkResourceListResult.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * A list of private link resources. + */ +@Immutable +public final class PrivateLinkResourceListResult implements JsonSerializable { + /* + * A list of private link resources + */ + private List value; + + /* + * The nextLink property. + */ + private String nextLink; + + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ + private PrivateLinkResourceListResult() { + } + + /** + * Get the value property: A list of private link resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The nextLink property. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 PrivateLinkResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResult 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 PrivateLinkResourceListResult. + */ + public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult + = new PrivateLinkResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedPrivateLinkResourceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 000000000000..51ce9d8c4287 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Paged collection of RaiBlocklistItemPropertiesBasicResource items. + */ +@Immutable +public final class RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The RaiBlocklistItemPropertiesBasicResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult class. + */ + private RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult() { + } + + /** + * Get the value property: The RaiBlocklistItemPropertiesBasicResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult 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 + * RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult. + */ + public static RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult + = new RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RaiBlocklistItemPropertiesBasicResourceInner.fromJson(reader1)); + deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 000000000000..93d7c12c29e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Paged collection of RaiBlocklistPropertiesBasicResource items. + */ +@Immutable +public final class RaiBlocklistPropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The RaiBlocklistPropertiesBasicResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of RaiBlocklistPropertiesBasicResourceArmPaginatedResult class. + */ + private RaiBlocklistPropertiesBasicResourceArmPaginatedResult() { + } + + /** + * Get the value property: The RaiBlocklistPropertiesBasicResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 RaiBlocklistPropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistPropertiesBasicResourceArmPaginatedResult 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 RaiBlocklistPropertiesBasicResourceArmPaginatedResult. + */ + public static RaiBlocklistPropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistPropertiesBasicResourceArmPaginatedResult deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult + = new RaiBlocklistPropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RaiBlocklistPropertiesBasicResourceInner.fromJson(reader1)); + deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 000000000000..9ee5b4889d9e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Azure OpenAI Content Filters resource list. + */ +@Immutable +public final class RaiPolicyPropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The RaiPolicyPropertiesBasicResource items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of RaiPolicyPropertiesBasicResourceArmPaginatedResult class. + */ + private RaiPolicyPropertiesBasicResourceArmPaginatedResult() { + } + + /** + * Get the value property: The RaiPolicyPropertiesBasicResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 RaiPolicyPropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyPropertiesBasicResourceArmPaginatedResult 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 RaiPolicyPropertiesBasicResourceArmPaginatedResult. + */ + public static RaiPolicyPropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyPropertiesBasicResourceArmPaginatedResult deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult + = new RaiPolicyPropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RaiPolicyPropertiesBasicResourceInner.fromJson(reader1)); + deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RegistryTrackedResourceArmPaginatedResult.java similarity index 62% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RegistryTrackedResourceArmPaginatedResult.java index f4ac0bd7dc69..5e31e75ed257 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RegistryTrackedResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,47 +16,27 @@ /** * A paginated list of Registry entities. */ -@Fluent +@Immutable public final class RegistryTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * The link to the next page of Registry objects. If null, there are no additional pages. + * The Registry items on this page */ - private String nextLink; + private List value; /* - * An array of objects of type Registry. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of RegistryTrackedResourceArmPaginatedResult class. */ - public RegistryTrackedResourceArmPaginatedResult() { + private RegistryTrackedResourceArmPaginatedResult() { } /** - * Get the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of Registry objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the RegistryTrackedResourceArmPaginatedResult object itself. - */ - public RegistryTrackedResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: An array of objects of type Registry. + * Get the value property: The Registry items on this page. * * @return the value value. */ @@ -65,25 +45,12 @@ public List value() { } /** - * Set the value property: An array of objects of type Registry. - * - * @param value the value value to set. - * @return the RegistryTrackedResourceArmPaginatedResult object itself. - */ - public RegistryTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -92,8 +59,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -103,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of RegistryTrackedResourceArmPaginatedResult 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 RegistryTrackedResourceArmPaginatedResult. */ public static RegistryTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { @@ -113,11 +81,11 @@ public static RegistryTrackedResourceArmPaginatedResult fromJson(JsonReader json String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedRegistryTrackedResourceArmPaginatedResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> RegistryInner.fromJson(reader1)); deserializedRegistryTrackedResourceArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedRegistryTrackedResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ScheduleResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ScheduleResourceArmPaginatedResult.java index 89e82abf154e..b2a2a863a75b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ScheduleResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * A paginated list of Schedule entities. */ -@Fluent +@Immutable public final class ScheduleResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type Schedule. + * The Schedule items on this page */ private List value; /* - * The link to the next page of Schedule objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ScheduleResourceArmPaginatedResult class. */ - public ScheduleResourceArmPaginatedResult() { + private ScheduleResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type Schedule. + * Get the value property: The Schedule items on this page. * * @return the value value. */ @@ -44,18 +44,7 @@ public List value() { } /** - * Set the value property: An array of objects of type Schedule. - * - * @param value the value value to set. - * @return the ScheduleResourceArmPaginatedResult object itself. - */ - public ScheduleResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ScheduleResourceArmPaginatedResult object itself. - */ - public ScheduleResourceArmPaginatedResult 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} */ @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ScheduleResourceArmPaginatedResult 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 ScheduleResourceArmPaginatedResult. */ public static ScheduleResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java index a67ca4585e12..0be50b6962a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +16,27 @@ /** * A paginated list of ServerlessEndpoint entities. */ -@Fluent +@Immutable public final class ServerlessEndpointTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ServerlessEndpoint. + * The ServerlessEndpoint items on this page */ private List value; /* - * The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ServerlessEndpointTrackedResourceArmPaginatedResult class. */ - public ServerlessEndpointTrackedResourceArmPaginatedResult() { + private ServerlessEndpointTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ServerlessEndpoint. + * Get the value property: The ServerlessEndpoint items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: An array of objects of type ServerlessEndpoint. - * - * @param value the value value to set. - * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. - */ - public ServerlessEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no - * additional pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,29 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no - * additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. - */ - public ServerlessEndpointTrackedResourceArmPaginatedResult 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} */ @@ -105,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ServerlessEndpointTrackedResourceArmPaginatedResult 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 ServerlessEndpointTrackedResourceArmPaginatedResult. */ public static ServerlessEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/SkuResourceArmPaginatedResult.java similarity index 64% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/SkuResourceArmPaginatedResult.java index 499c476bfaa5..143c9ccbb42c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/SkuResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * A paginated list of SkuResource entities. */ -@Fluent +@Immutable public final class SkuResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type SkuResource. + * The SkuResource items on this page */ private List value; /* - * The link to the next page of SkuResource objects. If null, there are no additional pages. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SkuResourceArmPaginatedResult class. */ - public SkuResourceArmPaginatedResult() { + private SkuResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type SkuResource. + * Get the value property: The SkuResource items on this page. * * @return the value value. */ @@ -44,19 +44,7 @@ public List value() { } /** - * Set the value property: An array of objects of type SkuResource. - * - * @param value the value value to set. - * @return the SkuResourceArmPaginatedResult object itself. - */ - public SkuResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional - * pages. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -64,29 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional - * pages. - * - * @param nextLink the nextLink value to set. - * @return the SkuResourceArmPaginatedResult object itself. - */ - public SkuResourceArmPaginatedResult 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} */ @@ -104,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of SkuResourceArmPaginatedResult 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 SkuResourceArmPaginatedResult. */ public static SkuResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/StringArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/StringArmPaginatedResult.java new file mode 100644 index 000000000000..52dc35d26123 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/StringArmPaginatedResult.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.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; + +/** + * A paginated list of String entities. + */ +@Immutable +public final class StringArmPaginatedResult implements JsonSerializable { + /* + * The Stringforlist items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of StringArmPaginatedResult class. + */ + private StringArmPaginatedResult() { + } + + /** + * Get the value property: The Stringforlist items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringArmPaginatedResult 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 StringArmPaginatedResult. + */ + public static StringArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringArmPaginatedResult deserializedStringArmPaginatedResult = new StringArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> reader1.getString()); + deserializedStringArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedStringArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStringArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/UsageAndQuotaDetailsArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/UsageAndQuotaDetailsArmPaginatedResult.java new file mode 100644 index 000000000000..f631a99ae524 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/UsageAndQuotaDetailsArmPaginatedResult.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of UsageAndQuotaDetails entities. + */ +@Immutable +public final class UsageAndQuotaDetailsArmPaginatedResult + implements JsonSerializable { + /* + * The UsageAndQuotaDetails items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of UsageAndQuotaDetailsArmPaginatedResult class. + */ + private UsageAndQuotaDetailsArmPaginatedResult() { + } + + /** + * Get the value property: The UsageAndQuotaDetails items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@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 UsageAndQuotaDetailsArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UsageAndQuotaDetailsArmPaginatedResult 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 UsageAndQuotaDetailsArmPaginatedResult. + */ + public static UsageAndQuotaDetailsArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UsageAndQuotaDetailsArmPaginatedResult deserializedUsageAndQuotaDetailsArmPaginatedResult + = new UsageAndQuotaDetailsArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> UsageAndQuotaDetailsInner.fromJson(reader1)); + deserializedUsageAndQuotaDetailsArmPaginatedResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedUsageAndQuotaDetailsArmPaginatedResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedUsageAndQuotaDetailsArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java index 6b396ac6ae20..be08a33de59d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,29 +14,29 @@ import java.util.List; /** - * The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model. + * Paged collection of WorkspaceConnectionPropertiesV2BasicResource items. */ -@Fluent +@Immutable public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult implements JsonSerializable { /* - * The value property. + * The WorkspaceConnectionPropertiesV2BasicResource items on this page */ private List value; /* - * The nextLink property. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult class. */ - public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() { + private WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() { } /** - * Get the value property: The value property. + * Get the value property: The WorkspaceConnectionPropertiesV2BasicResource items on this page. * * @return the value value. */ @@ -45,19 +45,7 @@ public List value() { } /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult object itself. - */ - public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult - withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The nextLink property. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -65,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -83,6 +60,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -92,6 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult 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 * WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceListResult.java similarity index 57% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceListResult.java index 1969d8e6e869..026d3a2e9695 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.machinelearning.models; +package com.azure.resourcemanager.machinelearning.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,30 +14,28 @@ import java.util.List; /** - * The result of a request to list machine learning workspaces. + * The response of a Workspace list operation. */ -@Fluent +@Immutable public final class WorkspaceListResult implements JsonSerializable { /* - * The list of machine learning workspaces. Since this list may be incomplete, the nextLink field should be used to - * request the next list of machine learning workspaces. + * The Workspace items on this page */ private List value; /* - * The URI that can be used to request the next list of machine learning workspaces. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of WorkspaceListResult class. */ - public WorkspaceListResult() { + private WorkspaceListResult() { } /** - * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. + * Get the value property: The Workspace items on this page. * * @return the value value. */ @@ -46,19 +44,7 @@ public List value() { } /** - * Set the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @param value the value value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of machine learning workspaces. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -66,28 +52,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @param nextLink the nextLink value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult 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} */ @@ -105,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of WorkspaceListResult 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 WorkspaceListResult. */ public static WorkspaceListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java index 8e9ef253090c..1cd517ad0fc3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AzureMachineLearningWorkspaces. + * Package containing the implementations for MachineLearning. * These APIs allow end users to operate on Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java new file mode 100644 index 000000000000..588bdb8df700 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A Machine Learning compute based on AKS. + */ +@Fluent +public final class AKS extends Compute { + /* + * The type of compute + */ + private ComputeType computeType = ComputeType.AKS; + + /* + * AKS properties + */ + private AKSSchemaProperties properties; + + /** + * Creates an instance of AKS class. + */ + public AKS() { + } + + /** + * Get the computeType property: The type of compute. + * + * @return the computeType value. + */ + @Override + public ComputeType computeType() { + return this.computeType; + } + + /** + * Get the properties property: AKS properties. + * + * @return the properties value. + */ + public AKSSchemaProperties properties() { + return this.properties; + } + + /** + * Set the properties property: AKS properties. + * + * @param properties the properties value to set. + * @return the AKS object itself. + */ + public AKS withProperties(AKSSchemaProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AKS withComputeLocation(String computeLocation) { + super.withComputeLocation(computeLocation); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AKS withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AKS withResourceId(String resourceId) { + super.withResourceId(resourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AKS withDisableLocalAuth(Boolean disableLocalAuth) { + super.withDisableLocalAuth(disableLocalAuth); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("computeLocation", computeLocation()); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeStringField("resourceId", resourceId()); + jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); + jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AKS from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AKS 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 AKS. + */ + public static AKS fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AKS deserializedAKS = new AKS(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("computeLocation".equals(fieldName)) { + deserializedAKS.withComputeLocation(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedAKS.withProvisioningState(ProvisioningState.fromString(reader.getString())); + } else if ("description".equals(fieldName)) { + deserializedAKS.withDescription(reader.getString()); + } else if ("createdOn".equals(fieldName)) { + deserializedAKS.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("modifiedOn".equals(fieldName)) { + deserializedAKS.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("resourceId".equals(fieldName)) { + deserializedAKS.withResourceId(reader.getString()); + } else if ("provisioningErrors".equals(fieldName)) { + List provisioningErrors + = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); + deserializedAKS.withProvisioningErrors(provisioningErrors); + } else if ("isAttachedCompute".equals(fieldName)) { + deserializedAKS.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); + } else if ("disableLocalAuth".equals(fieldName)) { + deserializedAKS.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); + } else if ("computeType".equals(fieldName)) { + deserializedAKS.computeType = ComputeType.fromString(reader.getString()); + } else if ("properties".equals(fieldName)) { + deserializedAKS.properties = AKSSchemaProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAKS; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java similarity index 60% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java index 8a4bda318ec9..a642974640b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,8 +14,8 @@ /** * Secrets related to a Machine Learning compute based on AKS. */ -@Fluent -public final class AksComputeSecrets extends ComputeSecretsInner { +@Immutable +public final class AKSComputeSecrets extends ComputeSecretsInner { /* * The type of compute */ @@ -37,9 +37,9 @@ public final class AksComputeSecrets extends ComputeSecretsInner { private String imagePullSecretName; /** - * Creates an instance of AksComputeSecrets class. + * Creates an instance of AKSComputeSecrets class. */ - public AksComputeSecrets() { + private AKSComputeSecrets() { } /** @@ -62,18 +62,6 @@ public String userKubeConfig() { return this.userKubeConfig; } - /** - * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param userKubeConfig the userKubeConfig value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withUserKubeConfig(String userKubeConfig) { - this.userKubeConfig = userKubeConfig; - return this; - } - /** * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes * cluster. @@ -84,18 +72,6 @@ public String adminKubeConfig() { return this.adminKubeConfig; } - /** - * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param adminKubeConfig the adminKubeConfig value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withAdminKubeConfig(String adminKubeConfig) { - this.adminKubeConfig = adminKubeConfig; - return this; - } - /** * Get the imagePullSecretName property: Image registry pull secret. * @@ -105,27 +81,6 @@ public String imagePullSecretName() { return this.imagePullSecretName; } - /** - * Set the imagePullSecretName property: Image registry pull secret. - * - * @param imagePullSecretName the imagePullSecretName value to set. - * @return the AksComputeSecrets object itself. - */ - public AksComputeSecrets withImagePullSecretName(String imagePullSecretName) { - this.imagePullSecretName = imagePullSecretName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -140,34 +95,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AksComputeSecrets from the JsonReader. + * Reads an instance of AKSComputeSecrets from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AksComputeSecrets if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of AKSComputeSecrets 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 AksComputeSecrets. + * @throws IOException If an error occurs while reading the AKSComputeSecrets. */ - public static AksComputeSecrets fromJson(JsonReader jsonReader) throws IOException { + public static AKSComputeSecrets fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AksComputeSecrets deserializedAksComputeSecrets = new AksComputeSecrets(); + AKSComputeSecrets deserializedAKSComputeSecrets = new AKSComputeSecrets(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("computeType".equals(fieldName)) { - deserializedAksComputeSecrets.computeType = ComputeType.fromString(reader.getString()); + deserializedAKSComputeSecrets.computeType = ComputeType.fromString(reader.getString()); } else if ("userKubeConfig".equals(fieldName)) { - deserializedAksComputeSecrets.userKubeConfig = reader.getString(); + deserializedAKSComputeSecrets.userKubeConfig = reader.getString(); } else if ("adminKubeConfig".equals(fieldName)) { - deserializedAksComputeSecrets.adminKubeConfig = reader.getString(); + deserializedAKSComputeSecrets.adminKubeConfig = reader.getString(); } else if ("imagePullSecretName".equals(fieldName)) { - deserializedAksComputeSecrets.imagePullSecretName = reader.getString(); + deserializedAKSComputeSecrets.imagePullSecretName = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAksComputeSecrets; + return deserializedAKSComputeSecrets; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java similarity index 70% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java index 77a0e89f149f..5e458d854984 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -15,7 +15,7 @@ * Advance configuration for AKS networking. */ @Fluent -public final class AksNetworkingConfiguration implements JsonSerializable { +public final class AKSNetworkingConfiguration implements JsonSerializable { /* * Virtual network subnet resource ID the compute nodes belong to */ @@ -30,7 +30,7 @@ public final class AksNetworkingConfiguration implements JsonSerializable { - AksNetworkingConfiguration deserializedAksNetworkingConfiguration = new AksNetworkingConfiguration(); + AKSNetworkingConfiguration deserializedAKSNetworkingConfiguration = new AKSNetworkingConfiguration(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("subnetId".equals(fieldName)) { - deserializedAksNetworkingConfiguration.subnetId = reader.getString(); + deserializedAKSNetworkingConfiguration.subnetId = reader.getString(); } else if ("serviceCidr".equals(fieldName)) { - deserializedAksNetworkingConfiguration.serviceCidr = reader.getString(); + deserializedAKSNetworkingConfiguration.serviceCidr = reader.getString(); } else if ("dnsServiceIP".equals(fieldName)) { - deserializedAksNetworkingConfiguration.dnsServiceIp = reader.getString(); + deserializedAKSNetworkingConfiguration.dnsServiceIP = reader.getString(); } else if ("dockerBridgeCidr".equals(fieldName)) { - deserializedAksNetworkingConfiguration.dockerBridgeCidr = reader.getString(); + deserializedAKSNetworkingConfiguration.dockerBridgeCidr = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAksNetworkingConfiguration; + return deserializedAKSNetworkingConfiguration; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java index 27256d2d9fc8..1bd3d847b832 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -16,7 +16,7 @@ * AKS properties. */ @Fluent -public final class AksSchemaProperties implements JsonSerializable { +public final class AKSSchemaProperties implements JsonSerializable { /* * Cluster full qualified domain name */ @@ -50,7 +50,7 @@ public final class AksSchemaProperties implements JsonSerializable e.validate()); - } - if (sslConfiguration() != null) { - sslConfiguration().validate(); - } - if (aksNetworkingConfiguration() != null) { - aksNetworkingConfiguration().validate(); - } - } - /** * {@inheritDoc} */ @@ -274,46 +257,46 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AksSchemaProperties from the JsonReader. + * Reads an instance of AKSSchemaProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AksSchemaProperties if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of AKSSchemaProperties 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 AksSchemaProperties. + * @throws IOException If an error occurs while reading the AKSSchemaProperties. */ - public static AksSchemaProperties fromJson(JsonReader jsonReader) throws IOException { + public static AKSSchemaProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AksSchemaProperties deserializedAksSchemaProperties = new AksSchemaProperties(); + AKSSchemaProperties deserializedAKSSchemaProperties = new AKSSchemaProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("clusterFqdn".equals(fieldName)) { - deserializedAksSchemaProperties.clusterFqdn = reader.getString(); + deserializedAKSSchemaProperties.clusterFqdn = reader.getString(); } else if ("systemServices".equals(fieldName)) { List systemServices = reader.readArray(reader1 -> SystemService.fromJson(reader1)); - deserializedAksSchemaProperties.systemServices = systemServices; + deserializedAKSSchemaProperties.systemServices = systemServices; } else if ("agentCount".equals(fieldName)) { - deserializedAksSchemaProperties.agentCount = reader.getNullable(JsonReader::getInt); + deserializedAKSSchemaProperties.agentCount = reader.getNullable(JsonReader::getInt); } else if ("agentVmSize".equals(fieldName)) { - deserializedAksSchemaProperties.agentVmSize = reader.getString(); + deserializedAKSSchemaProperties.agentVmSize = reader.getString(); } else if ("clusterPurpose".equals(fieldName)) { - deserializedAksSchemaProperties.clusterPurpose = ClusterPurpose.fromString(reader.getString()); + deserializedAKSSchemaProperties.clusterPurpose = ClusterPurpose.fromString(reader.getString()); } else if ("sslConfiguration".equals(fieldName)) { - deserializedAksSchemaProperties.sslConfiguration = SslConfiguration.fromJson(reader); + deserializedAKSSchemaProperties.sslConfiguration = SslConfiguration.fromJson(reader); } else if ("aksNetworkingConfiguration".equals(fieldName)) { - deserializedAksSchemaProperties.aksNetworkingConfiguration - = AksNetworkingConfiguration.fromJson(reader); + deserializedAKSSchemaProperties.aksNetworkingConfiguration + = AKSNetworkingConfiguration.fromJson(reader); } else if ("loadBalancerType".equals(fieldName)) { - deserializedAksSchemaProperties.loadBalancerType = LoadBalancerType.fromString(reader.getString()); + deserializedAKSSchemaProperties.loadBalancerType = LoadBalancerType.fromString(reader.getString()); } else if ("loadBalancerSubnet".equals(fieldName)) { - deserializedAksSchemaProperties.loadBalancerSubnet = reader.getString(); + deserializedAKSSchemaProperties.loadBalancerSubnet = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAksSchemaProperties; + return deserializedAKSSchemaProperties; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java index b9a569dc66e5..4307b2d1af30 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -25,16 +25,6 @@ public final class AadAuthTypeWorkspaceConnectionProperties extends WorkspaceCon */ private ConnectionAuthType authType = ConnectionAuthType.AAD; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of AadAuthTypeWorkspaceConnectionProperties class. */ @@ -52,31 +42,20 @@ public ConnectionAuthType authType() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public AadAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public AadAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -102,8 +81,8 @@ public AadAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isShar * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public AadAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -111,8 +90,8 @@ public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public AadAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -120,8 +99,8 @@ public AadAuthTypeWorkspaceConnectionProperties withMetadata(Map * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); + public AadAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -129,8 +108,8 @@ public AadAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public AadAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -138,19 +117,19 @@ public AadAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public AadAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -160,15 +139,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); return jsonWriter.writeEndObject(); } @@ -193,29 +174,36 @@ public static AadAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonR deserializedAadAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedAadAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedAadAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAadAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedAadAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java index 7e2fcbcf6ffb..7c4f43465557 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,16 +30,6 @@ public final class AccessKeyAuthTypeWorkspaceConnectionProperties extends Worksp */ private WorkspaceConnectionAccessKey credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of AccessKeyAuthTypeWorkspaceConnectionProperties class. */ @@ -77,31 +67,20 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceC } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public AccessKeyAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -127,8 +106,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public AccessKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -136,8 +115,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public AccessKeyAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -145,8 +124,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map sharedUserList) { - super.withSharedUserList(sharedUserList); + public AccessKeyAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -154,8 +133,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -163,22 +142,19 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public AccessKeyAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -188,15 +164,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -222,30 +200,36 @@ public static AccessKeyAuthTypeWorkspaceConnectionProperties fromJson(JsonReader deserializedAccessKeyAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java new file mode 100644 index 000000000000..ee8489b46121 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; + +/** + * An immutable client-side representation of AccountApiKeys. + */ +public interface AccountApiKeys { + /** + * Gets the key1 property: The key1 property. + * + * @return the key1 value. + */ + String key1(); + + /** + * Gets the key2 property: The key2 property. + * + * @return the key2 value. + */ + String key2(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner object. + * + * @return the inner object. + */ + AccountApiKeysInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java index 47bc7db396dd..8da60aeb3757 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -26,20 +26,10 @@ public final class AccountKeyAuthTypeWorkspaceConnectionProperties extends Works private ConnectionAuthType authType = ConnectionAuthType.ACCOUNT_KEY; /* - * The credentials property. + * Account key object for workspace connection credential. */ private WorkspaceConnectionAccountKey credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of AccountKeyAuthTypeWorkspaceConnectionProperties class. */ @@ -57,7 +47,7 @@ public ConnectionAuthType authType() { } /** - * Get the credentials property: The credentials property. + * Get the credentials property: Account key object for workspace connection credential. * * @return the credentials value. */ @@ -66,7 +56,7 @@ public WorkspaceConnectionAccountKey credentials() { } /** - * Set the credentials property: The credentials property. + * Set the credentials property: Account key object for workspace connection credential. * * @param credentials the credentials value to set. * @return the AccountKeyAuthTypeWorkspaceConnectionProperties object itself. @@ -77,31 +67,20 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withCredentials(Workspace } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public AccountKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public AccountKeyAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -127,8 +106,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public AccountKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -136,8 +115,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public AccountKeyAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -145,8 +124,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map sharedUserList) { - super.withSharedUserList(sharedUserList); + public AccountKeyAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -154,8 +133,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -163,22 +142,19 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public AccountKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public AccountKeyAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -188,15 +164,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -222,30 +200,36 @@ public static AccountKeyAuthTypeWorkspaceConnectionProperties fromJson(JsonReade deserializedAccountKeyAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java index 765b496c3b61..ae7da8d9222a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,25 +61,6 @@ public AccountKeyDatastoreCredentials withSecrets(AccountKeyDatastoreSecrets sec return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (secrets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secrets in model AccountKeyDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AccountKeyDatastoreCredentials.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java index f1920d696664..cd7172d48da0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -62,16 +62,6 @@ public AccountKeyDatastoreSecrets withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java index 548ec82202f6..bd8d5be15189 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,11 +21,6 @@ public final class AcrDetails implements JsonSerializable { */ private SystemCreatedAcrAccount systemCreatedAcrAccount; - /* - * Details of user created ACR account to be used for the Registry - */ - private UserCreatedAcrAccount userCreatedAcrAccount; - /** * Creates an instance of AcrDetails class. */ @@ -52,40 +47,6 @@ public AcrDetails withSystemCreatedAcrAccount(SystemCreatedAcrAccount systemCrea return this; } - /** - * Get the userCreatedAcrAccount property: Details of user created ACR account to be used for the Registry. - * - * @return the userCreatedAcrAccount value. - */ - public UserCreatedAcrAccount userCreatedAcrAccount() { - return this.userCreatedAcrAccount; - } - - /** - * Set the userCreatedAcrAccount property: Details of user created ACR account to be used for the Registry. - * - * @param userCreatedAcrAccount the userCreatedAcrAccount value to set. - * @return the AcrDetails object itself. - */ - public AcrDetails withUserCreatedAcrAccount(UserCreatedAcrAccount userCreatedAcrAccount) { - this.userCreatedAcrAccount = userCreatedAcrAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (systemCreatedAcrAccount() != null) { - systemCreatedAcrAccount().validate(); - } - if (userCreatedAcrAccount() != null) { - userCreatedAcrAccount().validate(); - } - } - /** * {@inheritDoc} */ @@ -93,7 +54,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("systemCreatedAcrAccount", this.systemCreatedAcrAccount); - jsonWriter.writeJsonField("userCreatedAcrAccount", this.userCreatedAcrAccount); return jsonWriter.writeEndObject(); } @@ -114,8 +74,6 @@ public static AcrDetails fromJson(JsonReader jsonReader) throws IOException { if ("systemCreatedAcrAccount".equals(fieldName)) { deserializedAcrDetails.systemCreatedAcrAccount = SystemCreatedAcrAccount.fromJson(reader); - } else if ("userCreatedAcrAccount".equals(fieldName)) { - deserializedAcrDetails.userCreatedAcrAccount = UserCreatedAcrAccount.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java index 6b932b0f71ef..24052dc85dc3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,11 +8,11 @@ import java.util.Collection; /** - * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java new file mode 100644 index 000000000000..63aa65e5a1ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ActualCapacityInfo model. + */ +@Immutable +public final class ActualCapacityInfo implements JsonSerializable { + /* + * Gets or sets the total number of instances (scale units) regardless of provisioning state or whether current + * group payload version matches the target group payload. + */ + private Integer total; + + /* + * Gets or sets the number of instances (scale units) which have Succeeded provisioning state and target group + * payload. + */ + private Integer succeeded; + + /* + * Gets or sets the number of instances (scale units) which have Failed provisioning state and have target group + * payload. + */ + private Integer failed; + + /* + * Gets or sets the number of instances (scale units) which have Succeeded provisioning state but do not have target + * group payload. + */ + private Integer outdatedSucceeded; + + /* + * Gets or sets the number of instances (scale units) which have Failed provisioning state but do not have target + * group payload. + */ + private Integer outdatedFailed; + + /** + * Creates an instance of ActualCapacityInfo class. + */ + private ActualCapacityInfo() { + } + + /** + * Get the total property: Gets or sets the total number of instances (scale units) regardless of provisioning state + * or whether current group payload version matches the target group payload. + * + * @return the total value. + */ + public Integer total() { + return this.total; + } + + /** + * Get the succeeded property: Gets or sets the number of instances (scale units) which have Succeeded provisioning + * state and target group payload. + * + * @return the succeeded value. + */ + public Integer succeeded() { + return this.succeeded; + } + + /** + * Get the failed property: Gets or sets the number of instances (scale units) which have Failed provisioning state + * and have target group payload. + * + * @return the failed value. + */ + public Integer failed() { + return this.failed; + } + + /** + * Get the outdatedSucceeded property: Gets or sets the number of instances (scale units) which have Succeeded + * provisioning state but do not have target group payload. + * + * @return the outdatedSucceeded value. + */ + public Integer outdatedSucceeded() { + return this.outdatedSucceeded; + } + + /** + * Get the outdatedFailed property: Gets or sets the number of instances (scale units) which have Failed + * provisioning state but do not have target group payload. + * + * @return the outdatedFailed value. + */ + public Integer outdatedFailed() { + return this.outdatedFailed; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("total", this.total); + jsonWriter.writeNumberField("succeeded", this.succeeded); + jsonWriter.writeNumberField("failed", this.failed); + jsonWriter.writeNumberField("outdatedSucceeded", this.outdatedSucceeded); + jsonWriter.writeNumberField("outdatedFailed", this.outdatedFailed); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActualCapacityInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActualCapacityInfo 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 ActualCapacityInfo. + */ + public static ActualCapacityInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActualCapacityInfo deserializedActualCapacityInfo = new ActualCapacityInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("total".equals(fieldName)) { + deserializedActualCapacityInfo.total = reader.getNullable(JsonReader::getInt); + } else if ("succeeded".equals(fieldName)) { + deserializedActualCapacityInfo.succeeded = reader.getNullable(JsonReader::getInt); + } else if ("failed".equals(fieldName)) { + deserializedActualCapacityInfo.failed = reader.getNullable(JsonReader::getInt); + } else if ("outdatedSucceeded".equals(fieldName)) { + deserializedActualCapacityInfo.outdatedSucceeded = reader.getNullable(JsonReader::getInt); + } else if ("outdatedFailed".equals(fieldName)) { + deserializedActualCapacityInfo.outdatedFailed = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedActualCapacityInfo; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java deleted file mode 100644 index 76d48c600bfe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * A Machine Learning compute based on AKS. - */ -@Fluent -public final class Aks extends Compute { - /* - * The type of compute - */ - private ComputeType computeType = ComputeType.AKS; - - /* - * AKS properties - */ - private AksSchemaProperties properties; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - - /** - * Creates an instance of Aks class. - */ - public Aks() { - } - - /** - * Get the computeType property: The type of compute. - * - * @return the computeType value. - */ - @Override - public ComputeType computeType() { - return this.computeType; - } - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public AksSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the Aks object itself. - */ - public Aks withProperties(AksSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Aks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("computeLocation", computeLocation()); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeStringField("resourceId", resourceId()); - jsonWriter.writeBooleanField("disableLocalAuth", disableLocalAuth()); - jsonWriter.writeStringField("computeType", this.computeType == null ? null : this.computeType.toString()); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Aks from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Aks 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 Aks. - */ - public static Aks fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Aks deserializedAks = new Aks(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("computeLocation".equals(fieldName)) { - deserializedAks.withComputeLocation(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedAks.provisioningState = ProvisioningState.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedAks.withDescription(reader.getString()); - } else if ("createdOn".equals(fieldName)) { - deserializedAks.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("modifiedOn".equals(fieldName)) { - deserializedAks.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("resourceId".equals(fieldName)) { - deserializedAks.withResourceId(reader.getString()); - } else if ("provisioningErrors".equals(fieldName)) { - List provisioningErrors - = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAks.provisioningErrors = provisioningErrors; - } else if ("isAttachedCompute".equals(fieldName)) { - deserializedAks.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); - } else if ("disableLocalAuth".equals(fieldName)) { - deserializedAks.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); - } else if ("computeType".equals(fieldName)) { - deserializedAks.computeType = ComputeType.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedAks.properties = AksSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAks; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java deleted file mode 100644 index 457bf72bcf36..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of AksComputeSecrets. - */ -@Fluent -public class AksComputeSecretsProperties implements JsonSerializable { - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - */ - private String userKubeConfig; - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - */ - private String adminKubeConfig; - - /* - * Image registry pull secret. - */ - private String imagePullSecretName; - - /** - * Creates an instance of AksComputeSecretsProperties class. - */ - public AksComputeSecretsProperties() { - } - - /** - * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the userKubeConfig value. - */ - public String userKubeConfig() { - return this.userKubeConfig; - } - - /** - * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param userKubeConfig the userKubeConfig value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withUserKubeConfig(String userKubeConfig) { - this.userKubeConfig = userKubeConfig; - return this; - } - - /** - * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the adminKubeConfig value. - */ - public String adminKubeConfig() { - return this.adminKubeConfig; - } - - /** - * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param adminKubeConfig the adminKubeConfig value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withAdminKubeConfig(String adminKubeConfig) { - this.adminKubeConfig = adminKubeConfig; - return this; - } - - /** - * Get the imagePullSecretName property: Image registry pull secret. - * - * @return the imagePullSecretName value. - */ - public String imagePullSecretName() { - return this.imagePullSecretName; - } - - /** - * Set the imagePullSecretName property: Image registry pull secret. - * - * @param imagePullSecretName the imagePullSecretName value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withImagePullSecretName(String imagePullSecretName) { - this.imagePullSecretName = imagePullSecretName; - 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("userKubeConfig", this.userKubeConfig); - jsonWriter.writeStringField("adminKubeConfig", this.adminKubeConfig); - jsonWriter.writeStringField("imagePullSecretName", this.imagePullSecretName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AksComputeSecretsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AksComputeSecretsProperties 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 AksComputeSecretsProperties. - */ - public static AksComputeSecretsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AksComputeSecretsProperties deserializedAksComputeSecretsProperties = new AksComputeSecretsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userKubeConfig".equals(fieldName)) { - deserializedAksComputeSecretsProperties.userKubeConfig = reader.getString(); - } else if ("adminKubeConfig".equals(fieldName)) { - deserializedAksComputeSecretsProperties.adminKubeConfig = reader.getString(); - } else if ("imagePullSecretName".equals(fieldName)) { - deserializedAksComputeSecretsProperties.imagePullSecretName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAksComputeSecretsProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java deleted file mode 100644 index 35ccb3e32574..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 AksSchema model. - */ -@Fluent -public class AksSchema implements JsonSerializable { - /* - * AKS properties - */ - private AksSchemaProperties properties; - - /** - * Creates an instance of AksSchema class. - */ - public AksSchema() { - } - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public AksSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the AksSchema object itself. - */ - public AksSchema withProperties(AksSchemaProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AksSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AksSchema 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 AksSchema. - */ - public static AksSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AksSchema deserializedAksSchema = new AksSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAksSchema.properties = AksSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAksSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java index 89e05a4ea432..8198f215813f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -37,16 +37,6 @@ public MonitoringFeatureFilterType filterType() { return this.filterType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java index 2b729b4a09b0..660fa649455c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public NodesValueType nodesValueType() { return this.nodesValueType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java index 0639b5203e75..ccec555be41b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Allocation state. - * * Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are * no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created * and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java new file mode 100644 index 000000000000..d9e32783f3ef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Level at which content is filtered. + */ +public final class AllowedContentLevel extends ExpandableStringEnum { + /** + * Static value Low for AllowedContentLevel. + */ + public static final AllowedContentLevel LOW = fromString("Low"); + + /** + * Static value Medium for AllowedContentLevel. + */ + public static final AllowedContentLevel MEDIUM = fromString("Medium"); + + /** + * Static value High for AllowedContentLevel. + */ + public static final AllowedContentLevel HIGH = fromString("High"); + + /** + * Creates a new instance of AllowedContentLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AllowedContentLevel() { + } + + /** + * Creates or finds a AllowedContentLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding AllowedContentLevel. + */ + public static AllowedContentLevel fromString(String name) { + return fromString(name, AllowedContentLevel.class); + } + + /** + * Gets known AllowedContentLevel values. + * + * @return known AllowedContentLevel values. + */ + public static Collection values() { + return values(AllowedContentLevel.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java index 25b3ad2c53f7..c737cac1a58c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class AmlCompute extends Compute { */ private AmlComputeProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of AmlCompute class. */ @@ -91,58 +64,6 @@ public AmlCompute withProperties(AmlComputeProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,23 @@ public static AmlCompute fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedAmlCompute.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedAmlCompute.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedAmlCompute.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedAmlCompute.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedAmlCompute.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAmlCompute.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedAmlCompute.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAmlCompute.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedAmlCompute.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAmlCompute.provisioningErrors = provisioningErrors; + deserializedAmlCompute.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedAmlCompute.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedAmlCompute.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedAmlCompute.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java index 6923604357b9..a1ad3b35c836 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,21 +17,29 @@ @Immutable public final class AmlComputeNodeInformation implements JsonSerializable { /* + * Node ID. + * * ID of the compute node. */ private String nodeId; /* + * Private IP address. + * * Private IP address of the compute node. */ private String privateIpAddress; /* + * Public IP address. + * * Public IP address of the compute node. */ private String publicIpAddress; /* + * Port. + * * SSH port number of the node. */ private Integer port; @@ -42,6 +50,8 @@ public final class AmlComputeNodeInformation implements JsonSerializable errors; /* + * Current node count. + * * The number of compute nodes currently assigned to the compute. */ private Integer currentNodeCount; /* + * Target node count. + * * The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the * target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the * target node count for the previous resize operation. @@ -100,11 +116,15 @@ public final class AmlComputeProperties implements JsonSerializable errors() { } /** - * Get the currentNodeCount property: The number of compute nodes currently assigned to the compute. + * Get the currentNodeCount property: Current node count. + * + * The number of compute nodes currently assigned to the compute. * * @return the currentNodeCount value. */ @@ -355,9 +391,11 @@ public Integer currentNodeCount() { } /** - * Get the targetNodeCount property: The target number of compute nodes for the compute. If the allocationState is - * resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is - * steady, this property denotes the target node count for the previous resize operation. + * Get the targetNodeCount property: Target node count. + * + * The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the + * target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the + * target node count for the previous resize operation. * * @return the targetNodeCount value. */ @@ -366,7 +404,9 @@ public Integer targetNodeCount() { } /** - * Get the nodeStateCounts property: Counts of various node states on the compute. + * Get the nodeStateCounts property: Node state counts. + * + * Counts of various node states on the compute. * * @return the nodeStateCounts value. */ @@ -375,9 +415,11 @@ public NodeStateCounts nodeStateCounts() { } /** - * Get the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. + * Get the enableNodePublicIp property: Enable node public IP. + * + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates + * that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a + * private endpoint and no public IPs. * * @return the enableNodePublicIp value. */ @@ -386,9 +428,11 @@ public Boolean enableNodePublicIp() { } /** - * Set the enableNodePublicIp property: Enable or disable node public IP address provisioning. Possible values are: - * Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates - * that the compute nodes will have a private endpoint and no public IPs. + * Set the enableNodePublicIp property: Enable node public IP. + * + * Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates + * that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a + * private endpoint and no public IPs. * * @param enableNodePublicIp the enableNodePublicIp value to set. * @return the AmlComputeProperties object itself. @@ -418,29 +462,6 @@ public AmlComputeProperties withPropertyBag(Object propertyBag) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (virtualMachineImage() != null) { - virtualMachineImage().validate(); - } - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (userAccountCredentials() != null) { - userAccountCredentials().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - if (nodeStateCounts() != null) { - nodeStateCounts().validate(); - } - } - /** * {@inheritDoc} */ @@ -458,7 +479,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("remoteLoginPortPublicAccess", this.remoteLoginPortPublicAccess == null ? null : this.remoteLoginPortPublicAccess.toString()); jsonWriter.writeBooleanField("enableNodePublicIp", this.enableNodePublicIp); - jsonWriter.writeUntypedField("propertyBag", this.propertyBag); + if (this.propertyBag != null) { + jsonWriter.writeUntypedField("propertyBag", this.propertyBag); + } return jsonWriter.writeEndObject(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java deleted file mode 100644 index a9716c1fae72..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties(top level) of AmlCompute. - */ -@Fluent -public class AmlComputeSchema implements JsonSerializable { - /* - * Properties of AmlCompute - */ - private AmlComputeProperties properties; - - /** - * Creates an instance of AmlComputeSchema class. - */ - public AmlComputeSchema() { - } - - /** - * Get the properties property: Properties of AmlCompute. - * - * @return the properties value. - */ - public AmlComputeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of AmlCompute. - * - * @param properties the properties value to set. - * @return the AmlComputeSchema object itself. - */ - public AmlComputeSchema withProperties(AmlComputeProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AmlComputeSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AmlComputeSchema 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 AmlComputeSchema. - */ - public static AmlComputeSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AmlComputeSchema deserializedAmlComputeSchema = new AmlComputeSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedAmlComputeSchema.properties = AmlComputeProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAmlComputeSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java index daa2130aeb64..203c752234f3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public IdentityConfigurationType identityType() { return this.identityType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java index 4e321bb69e32..6028565d2694 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -37,16 +37,6 @@ public MonitorComputeIdentityType computeIdentityType() { return this.computeIdentityType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java index e1d9a199d698..46d609c09b77 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java index 062a8ec3b179..d416e759c0f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -23,7 +23,7 @@ public final class AnonymousAccessCredential extends DataReferenceCredential { /** * Creates an instance of AnonymousAccessCredential class. */ - public AnonymousAccessCredential() { + private AnonymousAccessCredential() { } /** @@ -36,16 +36,6 @@ public DataReferenceCredentialType credentialType() { return this.credentialType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java index cab43ca41a15..9af9c3b5d355 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -45,20 +45,10 @@ public final class ApiKeyAuthWorkspaceConnectionProperties extends WorkspaceConn private ConnectionAuthType authType = ConnectionAuthType.API_KEY; /* - * Api key object for workspace connection credential. + * The credentials property. */ private WorkspaceConnectionApiKey credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of ApiKeyAuthWorkspaceConnectionProperties class. */ @@ -76,7 +66,7 @@ public ConnectionAuthType authType() { } /** - * Get the credentials property: Api key object for workspace connection credential. + * Get the credentials property: The credentials property. * * @return the credentials value. */ @@ -85,7 +75,7 @@ public WorkspaceConnectionApiKey credentials() { } /** - * Set the credentials property: Api key object for workspace connection credential. + * Set the credentials property: The credentials property. * * @param credentials the credentials value to set. * @return the ApiKeyAuthWorkspaceConnectionProperties object itself. @@ -96,31 +86,20 @@ public ApiKeyAuthWorkspaceConnectionProperties withCredentials(WorkspaceConnecti } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public ApiKeyAuthWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public ApiKeyAuthWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -146,8 +125,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withIsSharedToAll(Boolean isShare * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public ApiKeyAuthWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -155,8 +134,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public ApiKeyAuthWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -164,8 +143,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withMetadata(Map * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); + public ApiKeyAuthWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -173,8 +152,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withSharedUserList(List s * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public ApiKeyAuthWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -182,22 +161,19 @@ public ApiKeyAuthWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public ApiKeyAuthWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -207,15 +183,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -241,29 +219,35 @@ public static ApiKeyAuthWorkspaceConnectionProperties fromJson(JsonReader jsonRe deserializedApiKeyAuthWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedApiKeyAuthWorkspaceConnectionProperties.withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedApiKeyAuthWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedApiKeyAuthWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedApiKeyAuthWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java index daa001324d7e..4460c4159db5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Sharing policy for applications on this compute instance - * * Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the * creator can access applications on this compute instance. When Shared, any workspace user can access applications on * this instance depending on his/her assigned role. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java index 406b7f948206..75599ef74239 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -56,14 +56,6 @@ public ArmResourceId withResourceId(String resourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java index 40f0a0158c4f..37d3429a8986 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,14 +17,14 @@ @Fluent public class AssetBase extends ResourceBase { /* - * Is the asset archived? + * If the name version are system generated (anonymous registration). */ - private Boolean isArchived; + private Boolean isAnonymous; /* - * If the name version are system generated (anonymous registration). + * Is the asset archived? */ - private Boolean isAnonymous; + private Boolean isArchived; /** * Creates an instance of AssetBase class. @@ -33,42 +33,42 @@ public AssetBase() { } /** - * Get the isArchived property: Is the asset archived?. + * Get the isAnonymous property: If the name version are system generated (anonymous registration). * - * @return the isArchived value. + * @return the isAnonymous value. */ - public Boolean isArchived() { - return this.isArchived; + public Boolean isAnonymous() { + return this.isAnonymous; } /** - * Set the isArchived property: Is the asset archived?. + * Set the isAnonymous property: If the name version are system generated (anonymous registration). * - * @param isArchived the isArchived value to set. + * @param isAnonymous the isAnonymous value to set. * @return the AssetBase object itself. */ - public AssetBase withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; + public AssetBase withIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; return this; } /** - * Get the isAnonymous property: If the name version are system generated (anonymous registration). + * Get the isArchived property: Is the asset archived?. * - * @return the isAnonymous value. + * @return the isArchived value. */ - public Boolean isAnonymous() { - return this.isAnonymous; + public Boolean isArchived() { + return this.isArchived; } /** - * Set the isAnonymous property: If the name version are system generated (anonymous registration). + * Set the isArchived property: Is the asset archived?. * - * @param isAnonymous the isAnonymous value to set. + * @param isArchived the isArchived value to set. * @return the AssetBase object itself. */ - public AssetBase withIsAnonymous(Boolean isAnonymous) { - this.isAnonymous = isAnonymous; + public AssetBase withIsArchived(Boolean isArchived) { + this.isArchived = isArchived; return this; } @@ -81,15 +81,6 @@ public AssetBase withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public AssetBase withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -100,13 +91,12 @@ public AssetBase withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public AssetBase withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -116,10 +106,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", this.isArchived); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", this.isAnonymous); + jsonWriter.writeBooleanField("isArchived", this.isArchived); return jsonWriter.writeEndObject(); } @@ -140,16 +130,16 @@ public static AssetBase fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedAssetBase.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetBase.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAssetBase.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedAssetBase.isArchived = reader.getNullable(JsonReader::getBoolean); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAssetBase.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedAssetBase.isAnonymous = reader.getNullable(JsonReader::getBoolean); + } else if ("isArchived".equals(fieldName)) { + deserializedAssetBase.isArchived = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java index 3361874f3160..bdab05e1634c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -106,15 +106,6 @@ public AssetContainer withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public AssetContainer withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -125,13 +116,12 @@ public AssetContainer withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public AssetContainer withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -141,8 +131,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", this.isArchived); return jsonWriter.writeEndObject(); } @@ -164,12 +154,12 @@ public static AssetContainer fromJson(JsonReader jsonReader) throws IOException if ("description".equals(fieldName)) { deserializedAssetContainer.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetContainer.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAssetContainer.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAssetContainer.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedAssetContainer.isArchived = reader.getNullable(JsonReader::getBoolean); } else if ("latestVersion".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java deleted file mode 100644 index 3f22adaf3d73..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - -/** - * Asset input type. - */ -@Fluent -public class AssetJobInput implements JsonSerializable { - /* - * [Required] Input Asset URI. - */ - private String uri; - - /* - * Input Asset Delivery Mode. - */ - private InputDeliveryMode mode; - - /** - * Creates an instance of AssetJobInput class. - */ - public AssetJobInput() { - } - - /** - * Get the uri property: [Required] Input Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: [Required] Input Asset URI. - * - * @param uri the uri value to set. - * @return the AssetJobInput object itself. - */ - public AssetJobInput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Input Asset Delivery Mode. - * - * @return the mode value. - */ - public InputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Input Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the AssetJobInput object itself. - */ - public AssetJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model AssetJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AssetJobInput.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetJobInput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetJobInput 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 AssetJobInput. - */ - public static AssetJobInput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssetJobInput deserializedAssetJobInput = new AssetJobInput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedAssetJobInput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedAssetJobInput.mode = InputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAssetJobInput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java deleted file mode 100644 index 777d853f2ca6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - -/** - * Asset output type. - */ -@Fluent -public class AssetJobOutput implements JsonSerializable { - /* - * Output Asset URI. - */ - private String uri; - - /* - * Output Asset Delivery Mode. - */ - private OutputDeliveryMode mode; - - /** - * Creates an instance of AssetJobOutput class. - */ - public AssetJobOutput() { - } - - /** - * Get the uri property: Output Asset URI. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Output Asset URI. - * - * @param uri the uri value to set. - * @return the AssetJobOutput object itself. - */ - public AssetJobOutput withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the mode property: Output Asset Delivery Mode. - * - * @return the mode value. - */ - public OutputDeliveryMode mode() { - return this.mode; - } - - /** - * Set the mode property: Output Asset Delivery Mode. - * - * @param mode the mode value to set. - * @return the AssetJobOutput object itself. - */ - public AssetJobOutput withMode(OutputDeliveryMode mode) { - this.mode = mode; - 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("uri", this.uri); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AssetJobOutput from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AssetJobOutput 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 AssetJobOutput. - */ - public static AssetJobOutput fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AssetJobOutput deserializedAssetJobOutput = new AssetJobOutput(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("uri".equals(fieldName)) { - deserializedAssetJobOutput.uri = reader.getString(); - } else if ("mode".equals(fieldName)) { - deserializedAssetJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedAssetJobOutput; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java index 4dab2c6ed452..77bac6c36f55 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java index 7afbb2dd6401..89480434afbb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public ReferenceType referenceType() { return this.referenceType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -78,12 +70,12 @@ public static AssetReferenceBase fromJson(JsonReader jsonReader) throws IOExcept } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Id".equals(discriminatorValue)) { - return IdAssetReference.fromJson(readerToUse.reset()); - } else if ("DataPath".equals(discriminatorValue)) { + if ("DataPath".equals(discriminatorValue)) { return DataPathAssetReference.fromJson(readerToUse.reset()); } else if ("OutputPath".equals(discriminatorValue)) { return OutputPathAssetReference.fromJson(readerToUse.reset()); + } else if ("Id".equals(discriminatorValue)) { + return IdAssetReference.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java index 8a2c105c6ab7..c598dadf91b5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -73,24 +72,6 @@ public AssignedUser withTenantId(String tenantId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (objectId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property objectId in model AssignedUser")); - } - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property tenantId in model AssignedUser")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AssignedUser.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java new file mode 100644 index 000000000000..f0451041fbf8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum to determine endpoint authentication mode. + */ +public final class AuthMode extends ExpandableStringEnum { + /** + * Static value AAD for AuthMode. + */ + public static final AuthMode AAD = fromString("AAD"); + + /** + * Creates a new instance of AuthMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AuthMode() { + } + + /** + * Creates or finds a AuthMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AuthMode. + */ + public static AuthMode fromString(String name) { + return fromString(name, AuthMode.class); + } + + /** + * Gets known AuthMode values. + * + * @return known AuthMode values. + */ + public static Collection values() { + return values(AuthMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java index 3a85d223e13d..0d04f9ac2924 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public ForecastHorizonMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java index f616e2956874..32b1e10e7f90 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -24,11 +23,6 @@ public final class AutoMLJob extends JobBaseProperties { */ private JobType jobType = JobType.AUTO_ML; - /* - * Compute Resource configuration for the job. - */ - private JobResourceConfiguration resources; - /* * The ARM resource ID of the Environment specification for the job. * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated @@ -41,11 +35,6 @@ public final class AutoMLJob extends JobBaseProperties { */ private Map environmentVariables; - /* - * [Required] This represents scenario which can be one of Tables/NLP/Image - */ - private AutoMLVertical taskDetails; - /* * Mapping of output data bindings used in the job. */ @@ -57,9 +46,14 @@ public final class AutoMLJob extends JobBaseProperties { private QueueSettings queueSettings; /* - * Status of the job. + * Compute Resource configuration for the job. + */ + private JobResourceConfiguration resources; + + /* + * [Required] This represents scenario which can be one of Tables/NLP/Image */ - private JobStatus status; + private AutoMLVertical taskDetails; /** * Creates an instance of AutoMLJob class. @@ -77,26 +71,6 @@ public JobType jobType() { return this.jobType; } - /** - * Get the resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - /** * Get the environmentId property: The ARM resource ID of the Environment specification for the job. * This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated @@ -141,26 +115,6 @@ public AutoMLJob withEnvironmentVariables(Map environmentVariabl return this; } - /** - * Get the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. - * - * @return the taskDetails value. - */ - public AutoMLVertical taskDetails() { - return this.taskDetails; - } - - /** - * Set the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. - * - * @param taskDetails the taskDetails value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withTaskDetails(AutoMLVertical taskDetails) { - this.taskDetails = taskDetails; - return this; - } - /** * Get the outputs property: Mapping of output data bindings used in the job. * @@ -202,30 +156,42 @@ public AutoMLJob withQueueSettings(QueueSettings queueSettings) { } /** - * Get the status property: Status of the job. + * Get the resources property: Compute Resource configuration for the job. * - * @return the status value. + * @return the resources value. */ - @Override - public JobStatus status() { - return this.status; + public JobResourceConfiguration resources() { + return this.resources; } /** - * {@inheritDoc} + * Set the resources property: Compute Resource configuration for the job. + * + * @param resources the resources value to set. + * @return the AutoMLJob object itself. */ - @Override - public AutoMLJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public AutoMLJob withResources(JobResourceConfiguration resources) { + this.resources = resources; return this; } /** - * {@inheritDoc} + * Get the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. + * + * @return the taskDetails value. */ - @Override - public AutoMLJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public AutoMLVertical taskDetails() { + return this.taskDetails; + } + + /** + * Set the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. + * + * @param taskDetails the taskDetails value to set. + * @return the AutoMLJob object itself. + */ + public AutoMLJob withTaskDetails(AutoMLVertical taskDetails) { + this.taskDetails = taskDetails; return this; } @@ -233,8 +199,8 @@ public AutoMLJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public AutoMLJob withServices(Map services) { - super.withServices(services); + public AutoMLJob withComponentId(String componentId) { + super.withComponentId(componentId); return this; } @@ -251,8 +217,17 @@ public AutoMLJob withComputeId(String computeId) { * {@inheritDoc} */ @Override - public AutoMLJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public AutoMLJob withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutoMLJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -269,8 +244,8 @@ public AutoMLJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public AutoMLJob withComponentId(String componentId) { - super.withComponentId(componentId); + public AutoMLJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -287,8 +262,8 @@ public AutoMLJob withNotificationSetting(NotificationSetting notificationSetting * {@inheritDoc} */ @Override - public AutoMLJob withDescription(String description) { - super.withDescription(description); + public AutoMLJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -296,8 +271,17 @@ public AutoMLJob withDescription(String description) { * {@inheritDoc} */ @Override - public AutoMLJob withTags(Map tags) { - super.withTags(tags); + public AutoMLJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AutoMLJob withDescription(String description) { + super.withDescription(description); return this; } @@ -311,36 +295,14 @@ public AutoMLJob withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } - if (taskDetails() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property taskDetails in model AutoMLJob")); - } else { - taskDetails().validate(); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (queueSettings() != null) { - queueSettings().validate(); - } + public AutoMLJob withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(AutoMLJob.class); - /** * {@inheritDoc} */ @@ -348,24 +310,25 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("taskDetails", this.taskDetails); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); + jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -387,37 +350,37 @@ public static AutoMLJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedAutoMLJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAutoMLJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAutoMLJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAutoMLJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedAutoMLJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedAutoMLJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedAutoMLJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedAutoMLJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedAutoMLJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedAutoMLJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedAutoMLJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedAutoMLJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedAutoMLJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedAutoMLJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedAutoMLJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedAutoMLJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedAutoMLJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedAutoMLJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedAutoMLJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("taskDetails".equals(fieldName)) { deserializedAutoMLJob.taskDetails = AutoMLVertical.fromJson(reader); } else if ("jobType".equals(fieldName)) { deserializedAutoMLJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedAutoMLJob.resources = JobResourceConfiguration.fromJson(reader); } else if ("environmentId".equals(fieldName)) { deserializedAutoMLJob.environmentId = reader.getString(); } else if ("environmentVariables".equals(fieldName)) { @@ -428,6 +391,8 @@ public static AutoMLJob fromJson(JsonReader jsonReader) throws IOException { deserializedAutoMLJob.outputs = outputs; } else if ("queueSettings".equals(fieldName)) { deserializedAutoMLJob.queueSettings = QueueSettings.fromJson(reader); + } else if ("resources".equals(fieldName)) { + deserializedAutoMLJob.resources = JobResourceConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java index 322da20d956b..c83ee5e852e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -24,21 +23,21 @@ public class AutoMLVertical implements JsonSerializable { private TaskType taskType = TaskType.fromString("AutoMLVertical"); /* - * Log verbosity for the job. + * Enum for setting log verbosity. */ private LogVerbosity logVerbosity; - /* - * [Required] Training data input. - */ - private MLTableJobInput trainingData; - /* * Target column name: This is prediction values column. * Also known as label column name in context of classification tasks. */ private String targetColumnName; + /* + * [Required] Training data input. + */ + private MLTableJobInput trainingData; + /** * Creates an instance of AutoMLVertical class. */ @@ -55,7 +54,7 @@ public TaskType taskType() { } /** - * Get the logVerbosity property: Log verbosity for the job. + * Get the logVerbosity property: Enum for setting log verbosity. * * @return the logVerbosity value. */ @@ -64,7 +63,7 @@ public LogVerbosity logVerbosity() { } /** - * Set the logVerbosity property: Log verbosity for the job. + * Set the logVerbosity property: Enum for setting log verbosity. * * @param logVerbosity the logVerbosity value to set. * @return the AutoMLVertical object itself. @@ -74,26 +73,6 @@ public AutoMLVertical withLogVerbosity(LogVerbosity logVerbosity) { return this; } - /** - * Get the trainingData property: [Required] Training data input. - * - * @return the trainingData value. - */ - public MLTableJobInput trainingData() { - return this.trainingData; - } - - /** - * Set the trainingData property: [Required] Training data input. - * - * @param trainingData the trainingData value to set. - * @return the AutoMLVertical object itself. - */ - public AutoMLVertical withTrainingData(MLTableJobInput trainingData) { - this.trainingData = trainingData; - return this; - } - /** * Get the targetColumnName property: Target column name: This is prediction values column. * Also known as label column name in context of classification tasks. @@ -117,20 +96,24 @@ public AutoMLVertical withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. + * Get the trainingData property: [Required] Training data input. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the trainingData value. */ - public void validate() { - if (trainingData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property trainingData in model AutoMLVertical")); - } else { - trainingData().validate(); - } + public MLTableJobInput trainingData() { + return this.trainingData; } - private static final ClientLogger LOGGER = new ClientLogger(AutoMLVertical.class); + /** + * Set the trainingData property: [Required] Training data input. + * + * @param trainingData the trainingData value to set. + * @return the AutoMLVertical object itself. + */ + public AutoMLVertical withTrainingData(MLTableJobInput trainingData) { + this.trainingData = trainingData; + return this; + } /** * {@inheritDoc} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java index ee0332610783..74b7fa5e1aaf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public NCrossValidationsMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java index 69ca2322eb0a..7000b1713077 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,6 @@ public AutoPauseProperties withEnabled(Boolean enabled) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java index 90ca957d2bc8..fab4221d62f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java index d4367d067375..d07247b38dad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -97,14 +97,6 @@ public AutoScaleProperties withMaxNodeCount(Integer maxNodeCount) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java index 4964bfdf4740..a4112300aa31 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public SeasonalityMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java index db38b2851e9c..affbc31e86bd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public TargetLagsMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java index e323336c4253..7d24595cfb5b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public TargetRollingWindowSizeMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java index 2df4fb435612..40a67bc9c96c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java new file mode 100644 index 000000000000..04cda36185a0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; + +/** + * An immutable client-side representation of AvailableQuota. + */ +public interface AvailableQuota { + /** + * Gets the properties property: Available quota properties. + * + * @return the properties value. + */ + AvailableQuotaProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner object. + * + * @return the inner object. + */ + AvailableQuotaInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java new file mode 100644 index 000000000000..25d6bce3be65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 AvailableQuotaProperties model. + */ +@Immutable +public final class AvailableQuotaProperties implements JsonSerializable { + /* + * The number of available quota + */ + private Long total; + + /** + * Creates an instance of AvailableQuotaProperties class. + */ + private AvailableQuotaProperties() { + } + + /** + * Get the total property: The number of available quota. + * + * @return the total value. + */ + public Long total() { + return this.total; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("total", this.total); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableQuotaProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableQuotaProperties 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 AvailableQuotaProperties. + */ + public static AvailableQuotaProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailableQuotaProperties deserializedAvailableQuotaProperties = new AvailableQuotaProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("total".equals(fieldName)) { + deserializedAvailableQuotaProperties.total = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableQuotaProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java index 472b1f8d525d..c9b4e65235be 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,10 +17,20 @@ @Fluent public final class AzureBlobDatastore extends DatastoreProperties { /* - * [Required] Storage type backing the datastore. + * Enum to determine the datastore contents type. */ private DatastoreType datastoreType = DatastoreType.AZURE_BLOB; + /* + * Azure Resource Group name + */ + private String resourceGroup; + + /* + * Azure Subscription Id + */ + private String subscriptionId; + /* * Storage account name. */ @@ -46,21 +56,6 @@ public final class AzureBlobDatastore extends DatastoreProperties { */ private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - /** * Creates an instance of AzureBlobDatastore class. */ @@ -68,7 +63,7 @@ public AzureBlobDatastore() { } /** - * Get the datastoreType property: [Required] Storage type backing the datastore. + * Get the datastoreType property: Enum to determine the datastore contents type. * * @return the datastoreType value. */ @@ -77,6 +72,46 @@ public DatastoreType datastoreType() { return this.datastoreType; } + /** + * Get the resourceGroup property: Azure Resource Group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Azure Resource Group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the AzureBlobDatastore object itself. + */ + public AzureBlobDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureBlobDatastore object itself. + */ + public AzureBlobDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + /** * Get the accountName property: Storage account name. * @@ -180,56 +215,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { return this; } - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureBlobDatastore object itself. - */ - public AzureBlobDatastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - /** * {@inheritDoc} */ @@ -248,15 +233,6 @@ public AzureBlobDatastore withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public AzureBlobDatastore withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -267,13 +243,12 @@ public AzureBlobDatastore withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public AzureBlobDatastore withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -284,17 +259,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("accountName", this.accountName); jsonWriter.writeStringField("containerName", this.containerName); jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); return jsonWriter.writeEndObject(); } @@ -318,16 +293,20 @@ public static AzureBlobDatastore fromJson(JsonReader jsonReader) throws IOExcept deserializedAzureBlobDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureBlobDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureBlobDatastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureBlobDatastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureBlobDatastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureBlobDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedAzureBlobDatastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("datastoreType".equals(fieldName)) { deserializedAzureBlobDatastore.datastoreType = DatastoreType.fromString(reader.getString()); + } else if ("resourceGroup".equals(fieldName)) { + deserializedAzureBlobDatastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureBlobDatastore.subscriptionId = reader.getString(); } else if ("accountName".equals(fieldName)) { deserializedAzureBlobDatastore.accountName = reader.getString(); } else if ("containerName".equals(fieldName)) { @@ -339,10 +318,6 @@ public static AzureBlobDatastore fromJson(JsonReader jsonReader) throws IOExcept } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureBlobDatastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureBlobDatastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureBlobDatastore.resourceGroup = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java index 1c46952a1c49..35b8471337c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,19 +17,14 @@ @Fluent public final class AzureDataLakeGen1Datastore extends DatastoreProperties { /* - * [Required] Storage type backing the datastore. + * Enum to determine the datastore contents type. */ private DatastoreType datastoreType = DatastoreType.AZURE_DATA_LAKE_GEN1; /* - * [Required] Azure Data Lake store name. - */ - private String storeName; - - /* - * Indicates which identity to use to authenticate service data access to customer's storage. + * Azure Resource Group name */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + private String resourceGroup; /* * Azure Subscription Id @@ -38,14 +32,14 @@ public final class AzureDataLakeGen1Datastore extends DatastoreProperties { private String subscriptionId; /* - * Azure Resource Group name + * Indicates which identity to use to authenticate service data access to customer's storage. */ - private String resourceGroup; + private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; /* - * Readonly property to indicate if datastore is the workspace default datastore + * [Required] Azure Data Lake store name. */ - private Boolean isDefault; + private String storeName; /** * Creates an instance of AzureDataLakeGen1Datastore class. @@ -54,7 +48,7 @@ public AzureDataLakeGen1Datastore() { } /** - * Get the datastoreType property: [Required] Storage type backing the datastore. + * Get the datastoreType property: Enum to determine the datastore contents type. * * @return the datastoreType value. */ @@ -64,45 +58,22 @@ public DatastoreType datastoreType() { } /** - * Get the storeName property: [Required] Azure Data Lake store name. - * - * @return the storeName value. - */ - public String storeName() { - return this.storeName; - } - - /** - * Set the storeName property: [Required] Azure Data Lake store name. - * - * @param storeName the storeName value to set. - * @return the AzureDataLakeGen1Datastore object itself. - */ - public AzureDataLakeGen1Datastore withStoreName(String storeName) { - this.storeName = storeName; - return this; - } - - /** - * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. + * Get the resourceGroup property: Azure Resource Group name. * - * @return the serviceDataAccessAuthIdentity value. + * @return the resourceGroup value. */ - public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { - return this.serviceDataAccessAuthIdentity; + public String resourceGroup() { + return this.resourceGroup; } /** - * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data - * access to customer's storage. + * Set the resourceGroup property: Azure Resource Group name. * - * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. + * @param resourceGroup the resourceGroup value to set. * @return the AzureDataLakeGen1Datastore object itself. */ - public AzureDataLakeGen1Datastore - withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { - this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + public AzureDataLakeGen1Datastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; return this; } @@ -127,41 +98,45 @@ public AzureDataLakeGen1Datastore withSubscriptionId(String subscriptionId) { } /** - * Get the resourceGroup property: Azure Resource Group name. + * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data + * access to customer's storage. * - * @return the resourceGroup value. + * @return the serviceDataAccessAuthIdentity value. */ - public String resourceGroup() { - return this.resourceGroup; + public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { + return this.serviceDataAccessAuthIdentity; } /** - * Set the resourceGroup property: Azure Resource Group name. + * Set the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data + * access to customer's storage. * - * @param resourceGroup the resourceGroup value to set. + * @param serviceDataAccessAuthIdentity the serviceDataAccessAuthIdentity value to set. * @return the AzureDataLakeGen1Datastore object itself. */ - public AzureDataLakeGen1Datastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; + public AzureDataLakeGen1Datastore + withServiceDataAccessAuthIdentity(ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity) { + this.serviceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; return this; } /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Get the storeName property: [Required] Azure Data Lake store name. * - * @return the isDefault value. + * @return the storeName value. */ - @Override - public Boolean isDefault() { - return this.isDefault; + public String storeName() { + return this.storeName; } /** - * {@inheritDoc} + * Set the storeName property: [Required] Azure Data Lake store name. + * + * @param storeName the storeName value to set. + * @return the AzureDataLakeGen1Datastore object itself. */ - @Override - public AzureDataLakeGen1Datastore withCredentials(DatastoreCredentials credentials) { - super.withCredentials(credentials); + public AzureDataLakeGen1Datastore withStoreName(String storeName) { + this.storeName = storeName; return this; } @@ -169,8 +144,8 @@ public AzureDataLakeGen1Datastore withCredentials(DatastoreCredentials credentia * {@inheritDoc} */ @Override - public AzureDataLakeGen1Datastore withDescription(String description) { - super.withDescription(description); + public AzureDataLakeGen1Datastore withCredentials(DatastoreCredentials credentials) { + super.withCredentials(credentials); return this; } @@ -178,8 +153,8 @@ public AzureDataLakeGen1Datastore withDescription(String description) { * {@inheritDoc} */ @Override - public AzureDataLakeGen1Datastore withTags(Map tags) { - super.withTags(tags); + public AzureDataLakeGen1Datastore withDescription(String description) { + super.withDescription(description); return this; } @@ -193,22 +168,14 @@ public AzureDataLakeGen1Datastore withProperties(Map properties) } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (storeName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property storeName in model AzureDataLakeGen1Datastore")); - } + public AzureDataLakeGen1Datastore withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(AzureDataLakeGen1Datastore.class); - /** * {@inheritDoc} */ @@ -217,14 +184,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("storeName", this.storeName); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); return jsonWriter.writeEndObject(); } @@ -248,25 +215,25 @@ public static AzureDataLakeGen1Datastore fromJson(JsonReader jsonReader) throws deserializedAzureDataLakeGen1Datastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen1Datastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureDataLakeGen1Datastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureDataLakeGen1Datastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedAzureDataLakeGen1Datastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("storeName".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.storeName = reader.getString(); } else if ("datastoreType".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.datastoreType = DatastoreType.fromString(reader.getString()); + } else if ("resourceGroup".equals(fieldName)) { + deserializedAzureDataLakeGen1Datastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureDataLakeGen1Datastore.subscriptionId = reader.getString(); } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.resourceGroup = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java index cdf22c3f8a1c..3a0d08b6bb19 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,14 +17,19 @@ @Fluent public final class AzureDataLakeGen2Datastore extends DatastoreProperties { /* - * [Required] Storage type backing the datastore. + * Enum to determine the datastore contents type. */ private DatastoreType datastoreType = DatastoreType.AZURE_DATA_LAKE_GEN2; /* - * [Required] The name of the Data Lake Gen2 filesystem. + * Azure Resource Group name */ - private String filesystem; + private String resourceGroup; + + /* + * Azure Subscription Id + */ + private String subscriptionId; /* * [Required] Storage account name. @@ -37,6 +41,11 @@ public final class AzureDataLakeGen2Datastore extends DatastoreProperties { */ private String endpoint; + /* + * [Required] The name of the Data Lake Gen2 filesystem. + */ + private String filesystem; + /* * Protocol used to communicate with the storage account. */ @@ -47,21 +56,6 @@ public final class AzureDataLakeGen2Datastore extends DatastoreProperties { */ private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /* - * Readonly property to indicate if datastore is the workspace default datastore - */ - private Boolean isDefault; - /** * Creates an instance of AzureDataLakeGen2Datastore class. */ @@ -69,7 +63,7 @@ public AzureDataLakeGen2Datastore() { } /** - * Get the datastoreType property: [Required] Storage type backing the datastore. + * Get the datastoreType property: Enum to determine the datastore contents type. * * @return the datastoreType value. */ @@ -79,22 +73,42 @@ public DatastoreType datastoreType() { } /** - * Get the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. + * Get the resourceGroup property: Azure Resource Group name. * - * @return the filesystem value. + * @return the resourceGroup value. */ - public String filesystem() { - return this.filesystem; + public String resourceGroup() { + return this.resourceGroup; } /** - * Set the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. + * Set the resourceGroup property: Azure Resource Group name. * - * @param filesystem the filesystem value to set. + * @param resourceGroup the resourceGroup value to set. * @return the AzureDataLakeGen2Datastore object itself. */ - public AzureDataLakeGen2Datastore withFilesystem(String filesystem) { - this.filesystem = filesystem; + public AzureDataLakeGen2Datastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the subscriptionId property: Azure Subscription Id. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Set the subscriptionId property: Azure Subscription Id. + * + * @param subscriptionId the subscriptionId value to set. + * @return the AzureDataLakeGen2Datastore object itself. + */ + public AzureDataLakeGen2Datastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -138,6 +152,26 @@ public AzureDataLakeGen2Datastore withEndpoint(String endpoint) { return this; } + /** + * Get the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. + * + * @return the filesystem value. + */ + public String filesystem() { + return this.filesystem; + } + + /** + * Set the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. + * + * @param filesystem the filesystem value to set. + * @return the AzureDataLakeGen2Datastore object itself. + */ + public AzureDataLakeGen2Datastore withFilesystem(String filesystem) { + this.filesystem = filesystem; + return this; + } + /** * Get the protocol property: Protocol used to communicate with the storage account. * @@ -181,56 +215,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { return this; } - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureDataLakeGen2Datastore object itself. - */ - public AzureDataLakeGen2Datastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - /** * {@inheritDoc} */ @@ -249,15 +233,6 @@ public AzureDataLakeGen2Datastore withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public AzureDataLakeGen2Datastore withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -268,27 +243,14 @@ public AzureDataLakeGen2Datastore withProperties(Map properties) } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (filesystem() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property filesystem in model AzureDataLakeGen2Datastore")); - } - if (accountName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property accountName in model AzureDataLakeGen2Datastore")); - } + public AzureDataLakeGen2Datastore withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(AzureDataLakeGen2Datastore.class); - /** * {@inheritDoc} */ @@ -297,17 +259,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("filesystem", this.filesystem); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("accountName", this.accountName); + jsonWriter.writeStringField("filesystem", this.filesystem); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); return jsonWriter.writeEndObject(); } @@ -331,20 +293,24 @@ public static AzureDataLakeGen2Datastore fromJson(JsonReader jsonReader) throws deserializedAzureDataLakeGen2Datastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen2Datastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureDataLakeGen2Datastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureDataLakeGen2Datastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("filesystem".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.filesystem = reader.getString(); + deserializedAzureDataLakeGen2Datastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("accountName".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.accountName = reader.getString(); + } else if ("filesystem".equals(fieldName)) { + deserializedAzureDataLakeGen2Datastore.filesystem = reader.getString(); } else if ("datastoreType".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.datastoreType = DatastoreType.fromString(reader.getString()); + } else if ("resourceGroup".equals(fieldName)) { + deserializedAzureDataLakeGen2Datastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureDataLakeGen2Datastore.subscriptionId = reader.getString(); } else if ("endpoint".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.endpoint = reader.getString(); } else if ("protocol".equals(fieldName)) { @@ -352,10 +318,6 @@ public static AzureDataLakeGen2Datastore fromJson(JsonReader jsonReader) throws } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.resourceGroup = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java deleted file mode 100644 index f358e4ee4c35..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDatastore.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - -/** - * Base definition for Azure datastore contents configuration. - */ -@Fluent -public class AzureDatastore implements JsonSerializable { - /* - * Azure Subscription Id - */ - private String subscriptionId; - - /* - * Azure Resource Group name - */ - private String resourceGroup; - - /** - * Creates an instance of AzureDatastore class. - */ - public AzureDatastore() { - } - - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureDatastore object itself. - */ - public AzureDatastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureDatastore object itself. - */ - public AzureDatastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - 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("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureDatastore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureDatastore 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 AzureDatastore. - */ - public static AzureDatastore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureDatastore deserializedAzureDatastore = new AzureDatastore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("subscriptionId".equals(fieldName)) { - deserializedAzureDatastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureDatastore.resourceGroup = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureDatastore; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java index d9c92e528d79..95ad322705bc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -45,16 +45,6 @@ public AzureDevOpsWebhook withEventType(String eventType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java index 6896cf837ca5..2ffe36a491b5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,49 +17,44 @@ @Fluent public final class AzureFileDatastore extends DatastoreProperties { /* - * [Required] Storage type backing the datastore. + * Enum to determine the datastore contents type. */ private DatastoreType datastoreType = DatastoreType.AZURE_FILE; /* - * [Required] Storage account name. - */ - private String accountName; - - /* - * [Required] The name of the Azure file share that the datastore points to. + * Azure Resource Group name */ - private String fileShareName; + private String resourceGroup; /* - * Azure cloud endpoint for the storage account. + * Azure Subscription Id */ - private String endpoint; + private String subscriptionId; /* - * Protocol used to communicate with the storage account. + * [Required] Storage account name. */ - private String protocol; + private String accountName; /* - * Indicates which identity to use to authenticate service data access to customer's storage. + * Azure cloud endpoint for the storage account. */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + private String endpoint; /* - * Azure Subscription Id + * [Required] The name of the Azure file share that the datastore points to. */ - private String subscriptionId; + private String fileShareName; /* - * Azure Resource Group name + * Protocol used to communicate with the storage account. */ - private String resourceGroup; + private String protocol; /* - * Readonly property to indicate if datastore is the workspace default datastore + * Indicates which identity to use to authenticate service data access to customer's storage. */ - private Boolean isDefault; + private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; /** * Creates an instance of AzureFileDatastore class. @@ -69,7 +63,7 @@ public AzureFileDatastore() { } /** - * Get the datastoreType property: [Required] Storage type backing the datastore. + * Get the datastoreType property: Enum to determine the datastore contents type. * * @return the datastoreType value. */ @@ -79,42 +73,62 @@ public DatastoreType datastoreType() { } /** - * Get the accountName property: [Required] Storage account name. + * Get the resourceGroup property: Azure Resource Group name. * - * @return the accountName value. + * @return the resourceGroup value. */ - public String accountName() { - return this.accountName; + public String resourceGroup() { + return this.resourceGroup; } /** - * Set the accountName property: [Required] Storage account name. + * Set the resourceGroup property: Azure Resource Group name. * - * @param accountName the accountName value to set. + * @param resourceGroup the resourceGroup value to set. * @return the AzureFileDatastore object itself. */ - public AzureFileDatastore withAccountName(String accountName) { - this.accountName = accountName; + public AzureFileDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; return this; } /** - * Get the fileShareName property: [Required] The name of the Azure file share that the datastore points to. + * Get the subscriptionId property: Azure Subscription Id. * - * @return the fileShareName value. + * @return the subscriptionId value. */ - public String fileShareName() { - return this.fileShareName; + public String subscriptionId() { + return this.subscriptionId; } /** - * Set the fileShareName property: [Required] The name of the Azure file share that the datastore points to. + * Set the subscriptionId property: Azure Subscription Id. * - * @param fileShareName the fileShareName value to set. + * @param subscriptionId the subscriptionId value to set. * @return the AzureFileDatastore object itself. */ - public AzureFileDatastore withFileShareName(String fileShareName) { - this.fileShareName = fileShareName; + public AzureFileDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** + * Get the accountName property: [Required] Storage account name. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: [Required] Storage account name. + * + * @param accountName the accountName value to set. + * @return the AzureFileDatastore object itself. + */ + public AzureFileDatastore withAccountName(String accountName) { + this.accountName = accountName; return this; } @@ -138,6 +152,26 @@ public AzureFileDatastore withEndpoint(String endpoint) { return this; } + /** + * Get the fileShareName property: [Required] The name of the Azure file share that the datastore points to. + * + * @return the fileShareName value. + */ + public String fileShareName() { + return this.fileShareName; + } + + /** + * Set the fileShareName property: [Required] The name of the Azure file share that the datastore points to. + * + * @param fileShareName the fileShareName value to set. + * @return the AzureFileDatastore object itself. + */ + public AzureFileDatastore withFileShareName(String fileShareName) { + this.fileShareName = fileShareName; + return this; + } + /** * Get the protocol property: Protocol used to communicate with the storage account. * @@ -181,56 +215,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { return this; } - /** - * Get the subscriptionId property: Azure Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Azure Resource Group name. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Azure Resource Group name. - * - * @param resourceGroup the resourceGroup value to set. - * @return the AzureFileDatastore object itself. - */ - public AzureFileDatastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - /** * {@inheritDoc} */ @@ -249,15 +233,6 @@ public AzureFileDatastore withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public AzureFileDatastore withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -268,26 +243,14 @@ public AzureFileDatastore withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (accountName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property accountName in model AzureFileDatastore")); - } - if (fileShareName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property fileShareName in model AzureFileDatastore")); - } + public AzureFileDatastore withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(AzureFileDatastore.class); - /** * {@inheritDoc} */ @@ -296,17 +259,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("accountName", this.accountName); jsonWriter.writeStringField("fileShareName", this.fileShareName); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("resourceGroup", this.resourceGroup); return jsonWriter.writeEndObject(); } @@ -330,20 +293,24 @@ public static AzureFileDatastore fromJson(JsonReader jsonReader) throws IOExcept deserializedAzureFileDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureFileDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureFileDatastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureFileDatastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureFileDatastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureFileDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedAzureFileDatastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("accountName".equals(fieldName)) { deserializedAzureFileDatastore.accountName = reader.getString(); } else if ("fileShareName".equals(fieldName)) { deserializedAzureFileDatastore.fileShareName = reader.getString(); } else if ("datastoreType".equals(fieldName)) { deserializedAzureFileDatastore.datastoreType = DatastoreType.fromString(reader.getString()); + } else if ("resourceGroup".equals(fieldName)) { + deserializedAzureFileDatastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureFileDatastore.subscriptionId = reader.getString(); } else if ("endpoint".equals(fieldName)) { deserializedAzureFileDatastore.endpoint = reader.getString(); } else if ("protocol".equals(fieldName)) { @@ -351,10 +318,6 @@ public static AzureFileDatastore fromJson(JsonReader jsonReader) throws IOExcept } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureFileDatastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureFileDatastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { - deserializedAzureFileDatastore.resourceGroup = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java new file mode 100644 index 000000000000..24c05a2fc8be --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 AzureOpenAiFineTuning model. + */ +@Fluent +public final class AzureOpenAiFineTuning extends FineTuningVertical { + /* + * [Required] Enum to determine the type of fine tuning. + */ + private ModelProvider modelProvider = ModelProvider.AZURE_OPEN_AI; + + /* + * HyperParameters for fine tuning Azure Open AI model. + */ + private AzureOpenAiHyperParameters hyperParameters; + + /** + * Creates an instance of AzureOpenAiFineTuning class. + */ + public AzureOpenAiFineTuning() { + } + + /** + * Get the modelProvider property: [Required] Enum to determine the type of fine tuning. + * + * @return the modelProvider value. + */ + @Override + public ModelProvider modelProvider() { + return this.modelProvider; + } + + /** + * Get the hyperParameters property: HyperParameters for fine tuning Azure Open AI model. + * + * @return the hyperParameters value. + */ + public AzureOpenAiHyperParameters hyperParameters() { + return this.hyperParameters; + } + + /** + * Set the hyperParameters property: HyperParameters for fine tuning Azure Open AI model. + * + * @param hyperParameters the hyperParameters value to set. + * @return the AzureOpenAiFineTuning object itself. + */ + public AzureOpenAiFineTuning withHyperParameters(AzureOpenAiHyperParameters hyperParameters) { + this.hyperParameters = hyperParameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withModel(JobInput model) { + super.withModel(model); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withTaskType(FineTuningTaskType taskType) { + super.withTaskType(taskType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withTrainingData(JobInput trainingData) { + super.withTrainingData(trainingData); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AzureOpenAiFineTuning withValidationData(JobInput validationData) { + super.withValidationData(validationData); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("model", model()); + jsonWriter.writeStringField("taskType", taskType() == null ? null : taskType().toString()); + jsonWriter.writeJsonField("trainingData", trainingData()); + jsonWriter.writeJsonField("validationData", validationData()); + jsonWriter.writeStringField("modelProvider", this.modelProvider == null ? null : this.modelProvider.toString()); + jsonWriter.writeJsonField("hyperParameters", this.hyperParameters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureOpenAiFineTuning from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureOpenAiFineTuning 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 AzureOpenAiFineTuning. + */ + public static AzureOpenAiFineTuning fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureOpenAiFineTuning deserializedAzureOpenAiFineTuning = new AzureOpenAiFineTuning(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withModel(JobInput.fromJson(reader)); + } else if ("taskType".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withTaskType(FineTuningTaskType.fromString(reader.getString())); + } else if ("trainingData".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withTrainingData(JobInput.fromJson(reader)); + } else if ("validationData".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withValidationData(JobInput.fromJson(reader)); + } else if ("modelProvider".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.modelProvider = ModelProvider.fromString(reader.getString()); + } else if ("hyperParameters".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.hyperParameters = AzureOpenAiHyperParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureOpenAiFineTuning; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java new file mode 100644 index 000000000000..3a7690181a65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Azure Open AI hyperparameters for fine tuning. + */ +@Fluent +public final class AzureOpenAiHyperParameters implements JsonSerializable { + /* + * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, + * but with lower variance. + */ + private Integer batchSize; + + /* + * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid over fitting. + */ + private Double learningRateMultiplier; + + /* + * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. + */ + private Integer nEpochs; + + /** + * Creates an instance of AzureOpenAiHyperParameters class. + */ + public AzureOpenAiHyperParameters() { + } + + /** + * Get the batchSize property: Number of examples in each batch. A larger batch size means that model parameters are + * updated less frequently, but with lower variance. + * + * @return the batchSize value. + */ + public Integer batchSize() { + return this.batchSize; + } + + /** + * Set the batchSize property: Number of examples in each batch. A larger batch size means that model parameters are + * updated less frequently, but with lower variance. + * + * @param batchSize the batchSize value to set. + * @return the AzureOpenAiHyperParameters object itself. + */ + public AzureOpenAiHyperParameters withBatchSize(Integer batchSize) { + this.batchSize = batchSize; + return this; + } + + /** + * Get the learningRateMultiplier property: Scaling factor for the learning rate. A smaller learning rate may be + * useful to avoid over fitting. + * + * @return the learningRateMultiplier value. + */ + public Double learningRateMultiplier() { + return this.learningRateMultiplier; + } + + /** + * Set the learningRateMultiplier property: Scaling factor for the learning rate. A smaller learning rate may be + * useful to avoid over fitting. + * + * @param learningRateMultiplier the learningRateMultiplier value to set. + * @return the AzureOpenAiHyperParameters object itself. + */ + public AzureOpenAiHyperParameters withLearningRateMultiplier(Double learningRateMultiplier) { + this.learningRateMultiplier = learningRateMultiplier; + return this; + } + + /** + * Get the nEpochs property: The number of epochs to train the model for. An epoch refers to one full cycle through + * the training dataset. + * + * @return the nEpochs value. + */ + public Integer nEpochs() { + return this.nEpochs; + } + + /** + * Set the nEpochs property: The number of epochs to train the model for. An epoch refers to one full cycle through + * the training dataset. + * + * @param nEpochs the nEpochs value to set. + * @return the AzureOpenAiHyperParameters object itself. + */ + public AzureOpenAiHyperParameters withNEpochs(Integer nEpochs) { + this.nEpochs = nEpochs; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("batchSize", this.batchSize); + jsonWriter.writeNumberField("learningRateMultiplier", this.learningRateMultiplier); + jsonWriter.writeNumberField("nEpochs", this.nEpochs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureOpenAiHyperParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureOpenAiHyperParameters 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 AzureOpenAiHyperParameters. + */ + public static AzureOpenAiHyperParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureOpenAiHyperParameters deserializedAzureOpenAiHyperParameters = new AzureOpenAiHyperParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("batchSize".equals(fieldName)) { + deserializedAzureOpenAiHyperParameters.batchSize = reader.getNullable(JsonReader::getInt); + } else if ("learningRateMultiplier".equals(fieldName)) { + deserializedAzureOpenAiHyperParameters.learningRateMultiplier + = reader.getNullable(JsonReader::getDouble); + } else if ("nEpochs".equals(fieldName)) { + deserializedAzureOpenAiHyperParameters.nEpochs = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureOpenAiHyperParameters; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java index a1a49af990d9..650bde74e798 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,14 +21,14 @@ public final class BanditPolicy extends EarlyTerminationPolicy { private EarlyTerminationPolicyType policyType = EarlyTerminationPolicyType.BANDIT; /* - * Ratio of the allowed distance from the best performing run. + * Absolute distance allowed from the best performing run. */ - private Float slackFactor; + private Double slackAmount; /* - * Absolute distance allowed from the best performing run. + * Ratio of the allowed distance from the best performing run. */ - private Float slackAmount; + private Double slackFactor; /** * Creates an instance of BanditPolicy class. @@ -47,51 +47,42 @@ public EarlyTerminationPolicyType policyType() { } /** - * Get the slackFactor property: Ratio of the allowed distance from the best performing run. + * Get the slackAmount property: Absolute distance allowed from the best performing run. * - * @return the slackFactor value. + * @return the slackAmount value. */ - public Float slackFactor() { - return this.slackFactor; + public Double slackAmount() { + return this.slackAmount; } /** - * Set the slackFactor property: Ratio of the allowed distance from the best performing run. + * Set the slackAmount property: Absolute distance allowed from the best performing run. * - * @param slackFactor the slackFactor value to set. + * @param slackAmount the slackAmount value to set. * @return the BanditPolicy object itself. */ - public BanditPolicy withSlackFactor(Float slackFactor) { - this.slackFactor = slackFactor; + public BanditPolicy withSlackAmount(Double slackAmount) { + this.slackAmount = slackAmount; return this; } /** - * Get the slackAmount property: Absolute distance allowed from the best performing run. + * Get the slackFactor property: Ratio of the allowed distance from the best performing run. * - * @return the slackAmount value. + * @return the slackFactor value. */ - public Float slackAmount() { - return this.slackAmount; + public Double slackFactor() { + return this.slackFactor; } /** - * Set the slackAmount property: Absolute distance allowed from the best performing run. + * Set the slackFactor property: Ratio of the allowed distance from the best performing run. * - * @param slackAmount the slackAmount value to set. + * @param slackFactor the slackFactor value to set. * @return the BanditPolicy object itself. */ - public BanditPolicy withSlackAmount(Float slackAmount) { - this.slackAmount = slackAmount; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); + public BanditPolicy withSlackFactor(Double slackFactor) { + this.slackFactor = slackFactor; return this; } @@ -105,13 +96,12 @@ public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); + return this; } /** @@ -120,11 +110,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); + jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); - jsonWriter.writeNumberField("slackFactor", this.slackFactor); jsonWriter.writeNumberField("slackAmount", this.slackAmount); + jsonWriter.writeNumberField("slackFactor", this.slackFactor); return jsonWriter.writeEndObject(); } @@ -143,16 +133,16 @@ public static BanditPolicy fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("evaluationInterval".equals(fieldName)) { - deserializedBanditPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { + if ("delayEvaluation".equals(fieldName)) { deserializedBanditPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); + } else if ("evaluationInterval".equals(fieldName)) { + deserializedBanditPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); } else if ("policyType".equals(fieldName)) { deserializedBanditPolicy.policyType = EarlyTerminationPolicyType.fromString(reader.getString()); - } else if ("slackFactor".equals(fieldName)) { - deserializedBanditPolicy.slackFactor = reader.getNullable(JsonReader::getFloat); } else if ("slackAmount".equals(fieldName)) { - deserializedBanditPolicy.slackAmount = reader.getNullable(JsonReader::getFloat); + deserializedBanditPolicy.slackAmount = reader.getNullable(JsonReader::getDouble); + } else if ("slackFactor".equals(fieldName)) { + deserializedBanditPolicy.slackFactor = reader.getNullable(JsonReader::getDouble); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java index b79d166cd256..22f5609f4be0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -57,19 +57,19 @@ public interface BatchDeployment { BatchDeploymentProperties properties(); /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - String kind(); + ManagedServiceIdentity identity(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - ManagedServiceIdentity identity(); + String kind(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -159,8 +159,8 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName, endpointName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @return the next definition stage. */ WithProperties withExistingBatchEndpoint(String resourceGroupName, String workspaceName, @@ -184,8 +184,8 @@ interface WithProperties { * The stage of the BatchDeployment 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -216,32 +216,32 @@ interface WithTags { } /** - * The stage of the BatchDeployment definition allowing to specify kind. + * The stage of the BatchDeployment definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the BatchDeployment definition allowing to specify identity. + * The stage of the BatchDeployment definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java index 9cb759f0b14f..0aed4e5339bc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -37,14 +37,6 @@ public BatchDeploymentConfigurationType deploymentConfigurationType() { return this.deploymentConfigurationType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java index bf9f0030c2ae..952da6a934ae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java index c42c99f95b9c..4719c4a846e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,10 +36,16 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie private Integer errorThreshold; /* - * Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. + * Log verbosity for batch inferencing. + * Increasing verbosity order for logging is : Warning, Info and Debug. + * The default value is Info. */ - private BatchRetrySettings retrySettings; + private BatchLoggingLevel loggingLevel; + + /* + * Indicates maximum number of parallelism per instance. + */ + private Integer maxConcurrencyPerInstance; /* * Size of the mini-batch passed to each batch invocation. @@ -48,23 +54,13 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie */ private Long miniBatchSize; - /* - * Logging level for batch inference operation. - */ - private BatchLoggingLevel loggingLevel; - /* * Reference to the model asset for the endpoint deployment. */ private AssetReferenceBase model; /* - * Indicates maximum number of parallelism per instance. - */ - private Integer maxConcurrencyPerInstance; - - /* - * Indicates how the output will be organized. + * Enum to determine how batch inferencing will handle output */ private BatchOutputAction outputAction; @@ -73,6 +69,11 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie */ private String outputFileName; + /* + * Provisioning state for the endpoint deployment. + */ + private DeploymentProvisioningState provisioningState; + /* * Indicates compute configuration for the job. * If not provided, will default to the defaults defined in ResourceConfiguration. @@ -80,9 +81,10 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie private DeploymentResourceConfiguration resources; /* - * Provisioning state for the endpoint deployment. + * Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. */ - private DeploymentProvisioningState provisioningState; + private BatchRetrySettings retrySettings; /** * Creates an instance of BatchDeploymentProperties class. @@ -159,68 +161,70 @@ public BatchDeploymentProperties withErrorThreshold(Integer errorThreshold) { } /** - * Get the retrySettings property: Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. + * Get the loggingLevel property: Log verbosity for batch inferencing. + * Increasing verbosity order for logging is : Warning, Info and Debug. + * The default value is Info. * - * @return the retrySettings value. + * @return the loggingLevel value. */ - public BatchRetrySettings retrySettings() { - return this.retrySettings; + public BatchLoggingLevel loggingLevel() { + return this.loggingLevel; } /** - * Set the retrySettings property: Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. + * Set the loggingLevel property: Log verbosity for batch inferencing. + * Increasing verbosity order for logging is : Warning, Info and Debug. + * The default value is Info. * - * @param retrySettings the retrySettings value to set. + * @param loggingLevel the loggingLevel value to set. * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySettings) { - this.retrySettings = retrySettings; + public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel) { + this.loggingLevel = loggingLevel; return this; } /** - * Get the miniBatchSize property: Size of the mini-batch passed to each batch invocation. - * For FileDataset, this is the number of files per mini-batch. - * For TabularDataset, this is the size of the records in bytes, per mini-batch. + * Get the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. * - * @return the miniBatchSize value. + * @return the maxConcurrencyPerInstance value. */ - public Long miniBatchSize() { - return this.miniBatchSize; + public Integer maxConcurrencyPerInstance() { + return this.maxConcurrencyPerInstance; } /** - * Set the miniBatchSize property: Size of the mini-batch passed to each batch invocation. - * For FileDataset, this is the number of files per mini-batch. - * For TabularDataset, this is the size of the records in bytes, per mini-batch. + * Set the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. * - * @param miniBatchSize the miniBatchSize value to set. + * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { - this.miniBatchSize = miniBatchSize; + public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { + this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; return this; } /** - * Get the loggingLevel property: Logging level for batch inference operation. + * Get the miniBatchSize property: Size of the mini-batch passed to each batch invocation. + * For FileDataset, this is the number of files per mini-batch. + * For TabularDataset, this is the size of the records in bytes, per mini-batch. * - * @return the loggingLevel value. + * @return the miniBatchSize value. */ - public BatchLoggingLevel loggingLevel() { - return this.loggingLevel; + public Long miniBatchSize() { + return this.miniBatchSize; } /** - * Set the loggingLevel property: Logging level for batch inference operation. + * Set the miniBatchSize property: Size of the mini-batch passed to each batch invocation. + * For FileDataset, this is the number of files per mini-batch. + * For TabularDataset, this is the size of the records in bytes, per mini-batch. * - * @param loggingLevel the loggingLevel value to set. + * @param miniBatchSize the miniBatchSize value to set. * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel) { - this.loggingLevel = loggingLevel; + public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { + this.miniBatchSize = miniBatchSize; return this; } @@ -245,27 +249,7 @@ public BatchDeploymentProperties withModel(AssetReferenceBase model) { } /** - * Get the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @return the maxConcurrencyPerInstance value. - */ - public Integer maxConcurrencyPerInstance() { - return this.maxConcurrencyPerInstance; - } - - /** - * Set the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { - this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; - return this; - } - - /** - * Get the outputAction property: Indicates how the output will be organized. + * Get the outputAction property: Enum to determine how batch inferencing will handle output. * * @return the outputAction value. */ @@ -274,7 +258,7 @@ public BatchOutputAction outputAction() { } /** - * Set the outputAction property: Indicates how the output will be organized. + * Set the outputAction property: Enum to determine how batch inferencing will handle output. * * @param outputAction the outputAction value to set. * @return the BatchDeploymentProperties object itself. @@ -304,6 +288,15 @@ public BatchDeploymentProperties withOutputFileName(String outputFileName) { return this; } + /** + * Get the provisioningState property: Provisioning state for the endpoint deployment. + * + * @return the provisioningState value. + */ + public DeploymentProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the resources property: Indicates compute configuration for the job. * If not provided, will default to the defaults defined in ResourceConfiguration. @@ -327,20 +320,24 @@ public BatchDeploymentProperties withResources(DeploymentResourceConfiguration r } /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. + * Get the retrySettings property: Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. * - * @return the provisioningState value. + * @return the retrySettings value. */ - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; + public BatchRetrySettings retrySettings() { + return this.retrySettings; } /** - * {@inheritDoc} + * Set the retrySettings property: Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. + * + * @param retrySettings the retrySettings value to set. + * @return the BatchDeploymentProperties object itself. */ - @Override - public BatchDeploymentProperties withDescription(String description) { - super.withDescription(description); + public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySettings) { + this.retrySettings = retrySettings; return this; } @@ -348,8 +345,8 @@ public BatchDeploymentProperties withDescription(String description) { * {@inheritDoc} */ @Override - public BatchDeploymentProperties withProperties(Map properties) { - super.withProperties(properties); + public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -357,8 +354,8 @@ public BatchDeploymentProperties withProperties(Map properties) * {@inheritDoc} */ @Override - public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public BatchDeploymentProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -381,25 +378,12 @@ public BatchDeploymentProperties withEnvironmentVariables(Map en } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (deploymentConfiguration() != null) { - deploymentConfiguration().validate(); - } - if (retrySettings() != null) { - retrySettings().validate(); - } - if (model() != null) { - model().validate(); - } - if (resources() != null) { - resources().validate(); - } + public BatchDeploymentProperties withProperties(Map properties) { + super.withProperties(properties); + return this; } /** @@ -408,23 +392,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("compute", this.compute); jsonWriter.writeJsonField("deploymentConfiguration", this.deploymentConfiguration); jsonWriter.writeNumberField("errorThreshold", this.errorThreshold); - jsonWriter.writeJsonField("retrySettings", this.retrySettings); - jsonWriter.writeNumberField("miniBatchSize", this.miniBatchSize); jsonWriter.writeStringField("loggingLevel", this.loggingLevel == null ? null : this.loggingLevel.toString()); - jsonWriter.writeJsonField("model", this.model); jsonWriter.writeNumberField("maxConcurrencyPerInstance", this.maxConcurrencyPerInstance); + jsonWriter.writeNumberField("miniBatchSize", this.miniBatchSize); + jsonWriter.writeJsonField("model", this.model); jsonWriter.writeStringField("outputAction", this.outputAction == null ? null : this.outputAction.toString()); jsonWriter.writeStringField("outputFileName", this.outputFileName); jsonWriter.writeJsonField("resources", this.resources); + jsonWriter.writeJsonField("retrySettings", this.retrySettings); return jsonWriter.writeEndObject(); } @@ -443,18 +427,18 @@ public static BatchDeploymentProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedBatchDeploymentProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchDeploymentProperties.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedBatchDeploymentProperties.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedBatchDeploymentProperties.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedBatchDeploymentProperties.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedBatchDeploymentProperties.withEnvironmentVariables(environmentVariables); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedBatchDeploymentProperties.withProperties(properties); } else if ("compute".equals(fieldName)) { deserializedBatchDeploymentProperties.compute = reader.getString(); } else if ("deploymentConfiguration".equals(fieldName)) { @@ -462,28 +446,28 @@ public static BatchDeploymentProperties fromJson(JsonReader jsonReader) throws I = BatchDeploymentConfiguration.fromJson(reader); } else if ("errorThreshold".equals(fieldName)) { deserializedBatchDeploymentProperties.errorThreshold = reader.getNullable(JsonReader::getInt); - } else if ("retrySettings".equals(fieldName)) { - deserializedBatchDeploymentProperties.retrySettings = BatchRetrySettings.fromJson(reader); - } else if ("miniBatchSize".equals(fieldName)) { - deserializedBatchDeploymentProperties.miniBatchSize = reader.getNullable(JsonReader::getLong); } else if ("loggingLevel".equals(fieldName)) { deserializedBatchDeploymentProperties.loggingLevel = BatchLoggingLevel.fromString(reader.getString()); - } else if ("model".equals(fieldName)) { - deserializedBatchDeploymentProperties.model = AssetReferenceBase.fromJson(reader); } else if ("maxConcurrencyPerInstance".equals(fieldName)) { deserializedBatchDeploymentProperties.maxConcurrencyPerInstance = reader.getNullable(JsonReader::getInt); + } else if ("miniBatchSize".equals(fieldName)) { + deserializedBatchDeploymentProperties.miniBatchSize = reader.getNullable(JsonReader::getLong); + } else if ("model".equals(fieldName)) { + deserializedBatchDeploymentProperties.model = AssetReferenceBase.fromJson(reader); } else if ("outputAction".equals(fieldName)) { deserializedBatchDeploymentProperties.outputAction = BatchOutputAction.fromString(reader.getString()); } else if ("outputFileName".equals(fieldName)) { deserializedBatchDeploymentProperties.outputFileName = reader.getString(); - } else if ("resources".equals(fieldName)) { - deserializedBatchDeploymentProperties.resources = DeploymentResourceConfiguration.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedBatchDeploymentProperties.provisioningState = DeploymentProvisioningState.fromString(reader.getString()); + } else if ("resources".equals(fieldName)) { + deserializedBatchDeploymentProperties.resources = DeploymentResourceConfiguration.fromJson(reader); + } else if ("retrySettings".equals(fieldName)) { + deserializedBatchDeploymentProperties.retrySettings = BatchRetrySettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java index e01f17695683..65b417390d5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,43 +13,50 @@ */ public interface BatchDeployments { /** - * Lists Batch inference deployments in the workspace. + * Get batch inference deployment by id. + * + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. + * @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 paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** - * Lists Batch inference deployments in the workspace. + * Get batch inference deployment by id. + * + * Gets a batch inference deployment by id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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 paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id. */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); + BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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. @@ -60,9 +67,9 @@ PagedIterable list(String resourceGroupName, String workspaceNa * Delete Batch Inference deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param deploymentName The identifier for the Batch deployments. * @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. @@ -72,47 +79,54 @@ void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Gets a batch inference deployment by id. + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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 batch inference deployment by id along with {@link Response}. + * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); /** - * Gets a batch inference deployment by id. + * Lists Batch inference deployments in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. + * @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 batch inference deployment by id. + * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. */ - BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); /** + * Get batch inference deployment by id. + * * Gets a batch inference deployment by id. * * @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 a batch inference deployment by id along with {@link Response}. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id along with {@link Response}. */ BatchDeployment getById(String id); /** + * Get batch inference deployment by id. + * * Gets a batch inference deployment by id. * * @param id the resource ID. @@ -120,7 +134,9 @@ Response getWithResponse(String resourceGroupName, String works * @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 batch inference deployment by id along with {@link Response}. + * @return batch inference deployment by id. + * + * Gets a batch inference deployment by id along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java index 33ce2fff6eaa..9f43a4185c6a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -58,19 +58,19 @@ public interface BatchEndpoint { BatchEndpointProperties properties(); /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - String kind(); + ManagedServiceIdentity identity(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - ManagedServiceIdentity identity(); + String kind(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -160,7 +160,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); @@ -183,8 +183,8 @@ interface WithProperties { * The stage of the BatchEndpoint 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -215,32 +215,32 @@ interface WithTags { } /** - * The stage of the BatchEndpoint definition allowing to specify kind. + * The stage of the BatchEndpoint definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the BatchEndpoint definition allowing to specify identity. + * The stage of the BatchEndpoint definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java index e86266985a56..36ee51adad7d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -50,14 +50,6 @@ public BatchEndpointDefaults withDeploymentName(String deploymentName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java index db17ddd4397b..0dcd9a62ccbe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -29,14 +29,14 @@ public final class BatchEndpointProperties extends EndpointPropertiesBaseInner { private EndpointProvisioningState provisioningState; /* - * Endpoint URI. + * Endpoint Swagger URI. */ - private String scoringUri; + private String swaggerUri; /* - * Endpoint Swagger URI. + * Endpoint URI. */ - private String swaggerUri; + private String scoringUri; /** * Creates an instance of BatchEndpointProperties class. @@ -73,16 +73,6 @@ public EndpointProvisioningState provisioningState() { return this.provisioningState; } - /** - * Get the scoringUri property: Endpoint URI. - * - * @return the scoringUri value. - */ - @Override - public String scoringUri() { - return this.scoringUri; - } - /** * Get the swaggerUri property: Endpoint Swagger URI. * @@ -94,20 +84,21 @@ public String swaggerUri() { } /** - * {@inheritDoc} + * Get the scoringUri property: Endpoint URI. + * + * @return the scoringUri value. */ @Override - public BatchEndpointProperties withDescription(String description) { - super.withDescription(description); - return this; + public String scoringUri() { + return this.scoringUri; } /** * {@inheritDoc} */ @Override - public BatchEndpointProperties withProperties(Map properties) { - super.withProperties(properties); + public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { + super.withAuthMode(authMode); return this; } @@ -115,8 +106,8 @@ public BatchEndpointProperties withProperties(Map properties) { * {@inheritDoc} */ @Override - public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); + public BatchEndpointProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -130,16 +121,12 @@ public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (defaults() != null) { - defaults().validate(); - } + public BatchEndpointProperties withProperties(Map properties) { + super.withProperties(properties); + return this; } /** @@ -150,8 +137,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("keys", keys()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("defaults", this.defaults); return jsonWriter.writeEndObject(); } @@ -176,6 +163,8 @@ public static BatchEndpointProperties fromJson(JsonReader jsonReader) throws IOE deserializedBatchEndpointProperties.withAuthMode(EndpointAuthMode.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedBatchEndpointProperties.withDescription(reader.getString()); + } else if ("keys".equals(fieldName)) { + deserializedBatchEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedBatchEndpointProperties.withProperties(properties); @@ -183,8 +172,6 @@ public static BatchEndpointProperties fromJson(JsonReader jsonReader) throws IOE deserializedBatchEndpointProperties.scoringUri = reader.getString(); } else if ("swaggerUri".equals(fieldName)) { deserializedBatchEndpointProperties.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedBatchEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); } else if ("defaults".equals(fieldName)) { deserializedBatchEndpointProperties.defaults = BatchEndpointDefaults.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java index b53b23062d5d..0a828c07c737 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,39 +13,47 @@ */ public interface BatchEndpoints { /** - * Lists Batch inference endpoint in the workspace. + * Get batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. + * @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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** - * Lists Batch inference endpoint in the workspace. + * Get batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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 paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name. */ - PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, - Context context); + BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName); /** * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. @@ -56,8 +64,8 @@ PagedIterable list(String resourceGroupName, String workspaceName * Delete Batch Inference Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. @@ -66,39 +74,39 @@ PagedIterable list(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Gets a batch inference endpoint by name. + * Lists Batch inference endpoint in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. + * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets a batch inference endpoint by name. + * Lists Batch inference endpoint in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of endpoints to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @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 batch inference endpoint by name. + * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. */ - BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName); + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + Context context); /** * Lists batch Inference Endpoint keys. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. @@ -112,8 +120,8 @@ Response listKeysWithResponse(String resourceGroupName, String * Lists batch Inference Endpoint keys. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name for the Batch Endpoint. * @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. @@ -122,17 +130,23 @@ Response listKeysWithResponse(String resourceGroupName, String EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); /** + * Get batch inference endpoint by name. + * * Gets a batch inference endpoint by name. * * @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 a batch inference endpoint by name along with {@link Response}. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name along with {@link Response}. */ BatchEndpoint getById(String id); /** + * Get batch inference endpoint by name. + * * Gets a batch inference endpoint by name. * * @param id the resource ID. @@ -140,7 +154,9 @@ Response listKeysWithResponse(String resourceGroupName, String * @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 batch inference endpoint by name along with {@link Response}. + * @return batch inference endpoint by name. + * + * Gets a batch inference endpoint by name along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java index e9c1596ca911..af7e0a6c5545 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java index 2fb4652a0b7e..f41463137bfe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java index 0f9049644ad9..a0cc2357c8d0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -138,19 +138,6 @@ public BatchPipelineComponentDeploymentConfiguration withTags(Map { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java index 403713c16907..39f326274279 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Describes the bind options for the container. + * The BindOptions model. */ @Fluent public final class BindOptions implements JsonSerializable { @@ -97,14 +97,6 @@ public BindOptions withSelinux(String selinux) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java index 5da4b053005d..d8b47e6f59c3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The BlobReferenceForConsumptionDto model. */ -@Fluent +@Immutable public final class BlobReferenceForConsumptionDto implements JsonSerializable { /* * Blob URI path for client to upload data. @@ -23,19 +23,19 @@ public final class BlobReferenceForConsumptionDto implements JsonSerializable { /** - * Static value TextTargetEncoder for BlockedTransformers. + * Target encoding for text data. */ public static final BlockedTransformers TEXT_TARGET_ENCODER = fromString("TextTargetEncoder"); /** - * Static value OneHotEncoder for BlockedTransformers. + * Ohe hot encoding creates a binary feature transformation. */ public static final BlockedTransformers ONE_HOT_ENCODER = fromString("OneHotEncoder"); /** - * Static value CatTargetEncoder for BlockedTransformers. + * Target encoding for categorical data. */ public static final BlockedTransformers CAT_TARGET_ENCODER = fromString("CatTargetEncoder"); /** - * Static value TfIdf for BlockedTransformers. + * Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for + * identifying information from documents. */ public static final BlockedTransformers TF_IDF = fromString("TfIdf"); /** - * Static value WoETargetEncoder for BlockedTransformers. + * Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the + * P(1)/P(0) to create weights. */ public static final BlockedTransformers WO_ETARGET_ENCODER = fromString("WoETargetEncoder"); /** - * Static value LabelEncoder for BlockedTransformers. + * Label encoder converts labels/categorical variables in a numerical form. */ public static final BlockedTransformers LABEL_ENCODER = fromString("LabelEncoder"); /** - * Static value WordEmbedding for BlockedTransformers. + * Word embedding helps represents words or phrases as a vector, or a series of numbers. */ public static final BlockedTransformers WORD_EMBEDDING = fromString("WordEmbedding"); /** - * Static value NaiveBayes for BlockedTransformers. + * Naive Bayes is a classified that is used for classification of discrete features that are categorically + * distributed. */ public static final BlockedTransformers NAIVE_BAYES = fromString("NaiveBayes"); /** - * Static value CountVectorizer for BlockedTransformers. + * Count Vectorizer converts a collection of text documents to a matrix of token counts. */ public static final BlockedTransformers COUNT_VECTORIZER = fromString("CountVectorizer"); /** - * Static value HashOneHotEncoder for BlockedTransformers. + * Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used + * for high-cardinality categorical features. */ public static final BlockedTransformers HASH_ONE_HOT_ENCODER = fromString("HashOneHotEncoder"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java index f8e515bea021..1e9eadbcbd62 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -82,20 +81,6 @@ public BuildContext withDockerfilePath(String dockerfilePath) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contextUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property contextUri in model BuildContext")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuildContext.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java index eaf670a60353..ea46462d9af4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHost.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHost.java new file mode 100644 index 000000000000..0a78ca7820b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHost.java @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; + +/** + * An immutable client-side representation of CapabilityHost. + */ +public interface CapabilityHost { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + CapabilityHostProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner object. + * + * @return the inner object. + */ + CapabilityHostInner innerModel(); + + /** + * The entirety of the CapabilityHost definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The CapabilityHost definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the CapabilityHost definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the CapabilityHost definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the CapabilityHost definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(CapabilityHostProperties properties); + } + + /** + * The stage of the CapabilityHost 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + CapabilityHost create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + CapabilityHost create(Context context); + } + } + + /** + * Begins update for the CapabilityHost resource. + * + * @return the stage of resource update. + */ + CapabilityHost.Update update(); + + /** + * The template for CapabilityHost update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + CapabilityHost apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + CapabilityHost apply(Context context); + } + + /** + * The CapabilityHost update stages. + */ + interface UpdateStages { + /** + * The stage of the CapabilityHost update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(CapabilityHostProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + CapabilityHost refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + CapabilityHost refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java new file mode 100644 index 000000000000..cb1db23b5e9c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for CapabilityHostKind. + */ +public final class CapabilityHostKind extends ExpandableStringEnum { + /** + * Static value Agents for CapabilityHostKind. + */ + public static final CapabilityHostKind AGENTS = fromString("Agents"); + + /** + * Creates a new instance of CapabilityHostKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CapabilityHostKind() { + } + + /** + * Creates or finds a CapabilityHostKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding CapabilityHostKind. + */ + public static CapabilityHostKind fromString(String name) { + return fromString(name, CapabilityHostKind.class); + } + + /** + * Gets known CapabilityHostKind values. + * + * @return known CapabilityHostKind values. + */ + public static Collection values() { + return values(CapabilityHostKind.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java new file mode 100644 index 000000000000..5b2fd00bdc99 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; +import java.util.Map; + +/** + * The CapabilityHostProperties model. + */ +@Fluent +public final class CapabilityHostProperties extends ResourceBase { + /* + * List of Aca Environment connections. + */ + private List acaEnvironmentConnections; + + /* + * List of AI services connections. + */ + private List aiServicesConnections; + + /* + * Kind of this capability host. + */ + private CapabilityHostKind capabilityHostKind; + + /* + * Customer subnet info to help set up this capability host. + */ + private String customerSubnet; + + /* + * Provisioning state for the CapabilityHost. + */ + private CapabilityHostProvisioningState provisioningState; + + /* + * List of Storage connections. + */ + private List storageConnections; + + /* + * List of Thread storage connections. + */ + private List threadStorageConnections; + + /* + * List of VectorStore connections. + */ + private List vectorStoreConnections; + + /* + * List of messages containing errors. + */ + private List messages; + + /** + * Creates an instance of CapabilityHostProperties class. + */ + public CapabilityHostProperties() { + } + + /** + * Get the acaEnvironmentConnections property: List of Aca Environment connections. + * + * @return the acaEnvironmentConnections value. + */ + public List acaEnvironmentConnections() { + return this.acaEnvironmentConnections; + } + + /** + * Set the acaEnvironmentConnections property: List of Aca Environment connections. + * + * @param acaEnvironmentConnections the acaEnvironmentConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withAcaEnvironmentConnections(List acaEnvironmentConnections) { + this.acaEnvironmentConnections = acaEnvironmentConnections; + return this; + } + + /** + * Get the aiServicesConnections property: List of AI services connections. + * + * @return the aiServicesConnections value. + */ + public List aiServicesConnections() { + return this.aiServicesConnections; + } + + /** + * Set the aiServicesConnections property: List of AI services connections. + * + * @param aiServicesConnections the aiServicesConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withAiServicesConnections(List aiServicesConnections) { + this.aiServicesConnections = aiServicesConnections; + return this; + } + + /** + * Get the capabilityHostKind property: Kind of this capability host. + * + * @return the capabilityHostKind value. + */ + public CapabilityHostKind capabilityHostKind() { + return this.capabilityHostKind; + } + + /** + * Set the capabilityHostKind property: Kind of this capability host. + * + * @param capabilityHostKind the capabilityHostKind value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withCapabilityHostKind(CapabilityHostKind capabilityHostKind) { + this.capabilityHostKind = capabilityHostKind; + return this; + } + + /** + * Get the customerSubnet property: Customer subnet info to help set up this capability host. + * + * @return the customerSubnet value. + */ + public String customerSubnet() { + return this.customerSubnet; + } + + /** + * Set the customerSubnet property: Customer subnet info to help set up this capability host. + * + * @param customerSubnet the customerSubnet value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withCustomerSubnet(String customerSubnet) { + this.customerSubnet = customerSubnet; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the CapabilityHost. + * + * @return the provisioningState value. + */ + public CapabilityHostProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the storageConnections property: List of Storage connections. + * + * @return the storageConnections value. + */ + public List storageConnections() { + return this.storageConnections; + } + + /** + * Set the storageConnections property: List of Storage connections. + * + * @param storageConnections the storageConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withStorageConnections(List storageConnections) { + this.storageConnections = storageConnections; + return this; + } + + /** + * Get the threadStorageConnections property: List of Thread storage connections. + * + * @return the threadStorageConnections value. + */ + public List threadStorageConnections() { + return this.threadStorageConnections; + } + + /** + * Set the threadStorageConnections property: List of Thread storage connections. + * + * @param threadStorageConnections the threadStorageConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withThreadStorageConnections(List threadStorageConnections) { + this.threadStorageConnections = threadStorageConnections; + return this; + } + + /** + * Get the vectorStoreConnections property: List of VectorStore connections. + * + * @return the vectorStoreConnections value. + */ + public List vectorStoreConnections() { + return this.vectorStoreConnections; + } + + /** + * Set the vectorStoreConnections property: List of VectorStore connections. + * + * @param vectorStoreConnections the vectorStoreConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withVectorStoreConnections(List vectorStoreConnections) { + this.vectorStoreConnections = vectorStoreConnections; + return this; + } + + /** + * Get the messages property: List of messages containing errors. + * + * @return the messages value. + */ + public List messages() { + return this.messages; + } + + /** + * {@inheritDoc} + */ + @Override + public CapabilityHostProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CapabilityHostProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CapabilityHostProperties withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("acaEnvironmentConnections", this.acaEnvironmentConnections, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("aiServicesConnections", this.aiServicesConnections, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("capabilityHostKind", + this.capabilityHostKind == null ? null : this.capabilityHostKind.toString()); + jsonWriter.writeStringField("customerSubnet", this.customerSubnet); + jsonWriter.writeArrayField("storageConnections", this.storageConnections, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("threadStorageConnections", this.threadStorageConnections, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("vectorStoreConnections", this.vectorStoreConnections, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapabilityHostProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityHostProperties 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 CapabilityHostProperties. + */ + public static CapabilityHostProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityHostProperties deserializedCapabilityHostProperties = new CapabilityHostProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedCapabilityHostProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.withTags(tags); + } else if ("acaEnvironmentConnections".equals(fieldName)) { + List acaEnvironmentConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.acaEnvironmentConnections = acaEnvironmentConnections; + } else if ("aiServicesConnections".equals(fieldName)) { + List aiServicesConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.aiServicesConnections = aiServicesConnections; + } else if ("capabilityHostKind".equals(fieldName)) { + deserializedCapabilityHostProperties.capabilityHostKind + = CapabilityHostKind.fromString(reader.getString()); + } else if ("customerSubnet".equals(fieldName)) { + deserializedCapabilityHostProperties.customerSubnet = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedCapabilityHostProperties.provisioningState + = CapabilityHostProvisioningState.fromString(reader.getString()); + } else if ("storageConnections".equals(fieldName)) { + List storageConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.storageConnections = storageConnections; + } else if ("threadStorageConnections".equals(fieldName)) { + List threadStorageConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.threadStorageConnections = threadStorageConnections; + } else if ("vectorStoreConnections".equals(fieldName)) { + List vectorStoreConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.vectorStoreConnections = vectorStoreConnections; + } else if ("messages".equals(fieldName)) { + List messages = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.messages = messages; + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityHostProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java new file mode 100644 index 000000000000..cb0c561d88f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning state of capability host. + */ +public final class CapabilityHostProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of CapabilityHostProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CapabilityHostProvisioningState() { + } + + /** + * Creates or finds a CapabilityHostProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CapabilityHostProvisioningState. + */ + public static CapabilityHostProvisioningState fromString(String name) { + return fromString(name, CapabilityHostProvisioningState.class); + } + + /** + * Gets known CapabilityHostProvisioningState values. + * + * @return known CapabilityHostProvisioningState values. + */ + public static Collection values() { + return values(CapabilityHostProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java new file mode 100644 index 000000000000..7748e2b6fa7a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of CapabilityHosts. + */ +public interface CapabilityHosts { + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost 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 capabilityHost along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return capabilityHost. + */ + CapabilityHost get(String resourceGroupName, String workspaceName, String name); + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name); + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name CapabilityHost name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String name, Context context); + + /** + * Get capabilityHost. + * + * @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 capabilityHost along with {@link Response}. + */ + CapabilityHost getById(String id); + + /** + * Get capabilityHost. + * + * @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 capabilityHost along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete capabilityHost. + * + * @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); + + /** + * Delete capabilityHost. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new CapabilityHost resource. + * + * @param name resource name. + * @return the first stage of the new CapabilityHost definition. + */ + CapabilityHost.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java index 16dece761fa8..f90a0023f051 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class CategoricalDataDriftMetric extends ExpandableStringEnum { /** - * Static value JensenShannonDistance for CategoricalDataDriftMetric. + * The Jensen Shannon Distance (JSD) metric. */ public static final CategoricalDataDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); /** - * Static value PopulationStabilityIndex for CategoricalDataDriftMetric. + * The Population Stability Index (PSI) metric. */ public static final CategoricalDataDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); /** - * Static value PearsonsChiSquaredTest for CategoricalDataDriftMetric. + * The Pearsons Chi Squared Test metric. */ public static final CategoricalDataDriftMetric PEARSONS_CHI_SQUARED_TEST = fromString("PearsonsChiSquaredTest"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java index 2e1427398f0f..2aa1a3db87e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -71,23 +70,6 @@ public CategoricalDataDriftMetricThreshold withThreshold(MonitoringThreshold thr return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model CategoricalDataDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CategoricalDataDriftMetricThreshold.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java index 0f054d638710..9fc2d2f8cda0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class CategoricalDataQualityMetric extends ExpandableStringEnum { /** - * Static value NullValueRate for CategoricalDataQualityMetric. + * Calculates the rate of null values. */ public static final CategoricalDataQualityMetric NULL_VALUE_RATE = fromString("NullValueRate"); /** - * Static value DataTypeErrorRate for CategoricalDataQualityMetric. + * Calculates the rate of data type errors. */ public static final CategoricalDataQualityMetric DATA_TYPE_ERROR_RATE = fromString("DataTypeErrorRate"); /** - * Static value OutOfBoundsRate for CategoricalDataQualityMetric. + * Calculates the rate values are out of bounds. */ public static final CategoricalDataQualityMetric OUT_OF_BOUNDS_RATE = fromString("OutOfBoundsRate"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java index 4862103be229..cf07fd702137 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -71,23 +70,6 @@ public CategoricalDataQualityMetricThreshold withThreshold(MonitoringThreshold t return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model CategoricalDataQualityMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CategoricalDataQualityMetricThreshold.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java index 8f6b88e06a04..01761ac8d1f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,18 +12,18 @@ */ public final class CategoricalPredictionDriftMetric extends ExpandableStringEnum { /** - * Static value JensenShannonDistance for CategoricalPredictionDriftMetric. + * The Jensen Shannon Distance (JSD) metric. */ public static final CategoricalPredictionDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); /** - * Static value PopulationStabilityIndex for CategoricalPredictionDriftMetric. + * The Population Stability Index (PSI) metric. */ public static final CategoricalPredictionDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); /** - * Static value PearsonsChiSquaredTest for CategoricalPredictionDriftMetric. + * The Pearsons Chi Squared Test metric. */ public static final CategoricalPredictionDriftMetric PEARSONS_CHI_SQUARED_TEST = fromString("PearsonsChiSquaredTest"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java index aa10da87d9df..41ca58aff70d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -71,23 +70,6 @@ public CategoricalPredictionDriftMetricThreshold withThreshold(MonitoringThresho return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model CategoricalPredictionDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CategoricalPredictionDriftMetricThreshold.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java index e8526b485cec..bef945fb025b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; -import java.util.Objects; -import java.util.UUID; /** * Certificate datastore credentials configuration. @@ -28,31 +25,31 @@ public final class CertificateDatastoreCredentials extends DatastoreCredentials */ private String authorityUrl; + /* + * [Required] Service principal client ID. + */ + private String clientId; + /* * Resource the service principal has access to. */ private String resourceUrl; /* - * [Required] ID of the tenant to which the service principal belongs. + * [Required] Service principal secrets. */ - private UUID tenantId; + private CertificateDatastoreSecrets secrets; /* - * [Required] Service principal client ID. + * [Required] ID of the tenant to which the service principal belongs. */ - private UUID clientId; + private String tenantId; /* * [Required] Thumbprint of the certificate used for authentication. */ private String thumbprint; - /* - * [Required] Service principal secrets. - */ - private CertificateDatastoreSecrets secrets; - /** * Creates an instance of CertificateDatastoreCredentials class. */ @@ -89,6 +86,26 @@ public CertificateDatastoreCredentials withAuthorityUrl(String authorityUrl) { return this; } + /** + * Get the clientId property: [Required] Service principal client ID. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: [Required] Service principal client ID. + * + * @param clientId the clientId value to set. + * @return the CertificateDatastoreCredentials object itself. + */ + public CertificateDatastoreCredentials withClientId(String clientId) { + this.clientId = clientId; + return this; + } + /** * Get the resourceUrl property: Resource the service principal has access to. * @@ -110,42 +127,42 @@ public CertificateDatastoreCredentials withResourceUrl(String resourceUrl) { } /** - * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Get the secrets property: [Required] Service principal secrets. * - * @return the tenantId value. + * @return the secrets value. */ - public UUID tenantId() { - return this.tenantId; + public CertificateDatastoreSecrets secrets() { + return this.secrets; } /** - * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Set the secrets property: [Required] Service principal secrets. * - * @param tenantId the tenantId value to set. + * @param secrets the secrets value to set. * @return the CertificateDatastoreCredentials object itself. */ - public CertificateDatastoreCredentials withTenantId(UUID tenantId) { - this.tenantId = tenantId; + public CertificateDatastoreCredentials withSecrets(CertificateDatastoreSecrets secrets) { + this.secrets = secrets; return this; } /** - * Get the clientId property: [Required] Service principal client ID. + * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. * - * @return the clientId value. + * @return the tenantId value. */ - public UUID clientId() { - return this.clientId; + public String tenantId() { + return this.tenantId; } /** - * Set the clientId property: [Required] Service principal client ID. + * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. * - * @param clientId the clientId value to set. + * @param tenantId the tenantId value to set. * @return the CertificateDatastoreCredentials object itself. */ - public CertificateDatastoreCredentials withClientId(UUID clientId) { - this.clientId = clientId; + public CertificateDatastoreCredentials withTenantId(String tenantId) { + this.tenantId = tenantId; return this; } @@ -169,70 +186,16 @@ public CertificateDatastoreCredentials withThumbprint(String thumbprint) { return this; } - /** - * Get the secrets property: [Required] Service principal secrets. - * - * @return the secrets value. - */ - public CertificateDatastoreSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Service principal secrets. - * - * @param secrets the secrets value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withSecrets(CertificateDatastoreSecrets secrets) { - this.secrets = secrets; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tenantId in model CertificateDatastoreCredentials")); - } - if (clientId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property clientId in model CertificateDatastoreCredentials")); - } - if (thumbprint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property thumbprint in model CertificateDatastoreCredentials")); - } - if (secrets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secrets in model CertificateDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CertificateDatastoreCredentials.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); - jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); - jsonWriter.writeStringField("thumbprint", this.thumbprint); + jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeJsonField("secrets", this.secrets); + jsonWriter.writeStringField("tenantId", this.tenantId); + jsonWriter.writeStringField("thumbprint", this.thumbprint); jsonWriter.writeStringField("credentialsType", this.credentialsType == null ? null : this.credentialsType.toString()); jsonWriter.writeStringField("authorityUrl", this.authorityUrl); @@ -257,16 +220,14 @@ public static CertificateDatastoreCredentials fromJson(JsonReader jsonReader) th String fieldName = reader.getFieldName(); reader.nextToken(); - if ("tenantId".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("thumbprint".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.thumbprint = reader.getString(); + if ("clientId".equals(fieldName)) { + deserializedCertificateDatastoreCredentials.clientId = reader.getString(); } else if ("secrets".equals(fieldName)) { deserializedCertificateDatastoreCredentials.secrets = CertificateDatastoreSecrets.fromJson(reader); + } else if ("tenantId".equals(fieldName)) { + deserializedCertificateDatastoreCredentials.tenantId = reader.getString(); + } else if ("thumbprint".equals(fieldName)) { + deserializedCertificateDatastoreCredentials.thumbprint = reader.getString(); } else if ("credentialsType".equals(fieldName)) { deserializedCertificateDatastoreCredentials.credentialsType = CredentialsType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java index 5f47f4efcf8e..a85615822e90 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -62,16 +62,6 @@ public CertificateDatastoreSecrets withCertificate(String certificate) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java index 9584d5fac312..5e932acabaeb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,19 +22,14 @@ public final class Classification extends AutoMLVertical { private TaskType taskType = TaskType.CLASSIFICATION; /* - * Primary metric for the task. - */ - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Inputs for training phase for an AutoML Job. + * Columns to use for CVSplit data. */ - private ClassificationTrainingSettings trainingSettings; + private List cvSplitColumnNames; /* - * Positive label for binary metrics calculation. + * Featurization inputs needed for AutoML job. */ - private String positiveLabel; + private TableVerticalFeaturizationSettings featurizationSettings; /* * Execution constraints for AutoMLJob. @@ -48,26 +43,22 @@ public final class Classification extends AutoMLVertical { private NCrossValidations nCrossValidations; /* - * Columns to use for CVSplit data. + * Test data input. */ - private List cvSplitColumnNames; + private MLTableJobInput testData; /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. + * The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. */ - private String weightColumnName; + private Double testDataSize; /* * Validation data inputs. */ private MLTableJobInput validationData; - /* - * Test data input. - */ - private MLTableJobInput testData; - /* * The fraction of training dataset that needs to be set aside for validation purpose. * Values between (0.0 , 1.0) @@ -76,16 +67,25 @@ public final class Classification extends AutoMLVertical { private Double validationDataSize; /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the + * data to be weighted up or down. */ - private Double testDataSize; + private String weightColumnName; /* - * Featurization inputs needed for AutoML job. + * Positive label for binary metrics calculation. */ - private TableVerticalFeaturizationSettings featurizationSettings; + private String positiveLabel; + + /* + * Primary metrics for classification tasks. + */ + private ClassificationPrimaryMetrics primaryMetric; + + /* + * Inputs for training phase for an AutoML Job. + */ + private ClassificationTrainingSettings trainingSettings; /** * Creates an instance of Classification class. @@ -104,62 +104,42 @@ public TaskType taskType() { } /** - * Get the primaryMetric property: Primary metric for the task. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for the task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Classification object itself. - */ - public Classification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @return the trainingSettings value. + * @return the cvSplitColumnNames value. */ - public ClassificationTrainingSettings trainingSettings() { - return this.trainingSettings; + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @param trainingSettings the trainingSettings value to set. + * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Classification object itself. */ - public Classification withTrainingSettings(ClassificationTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + public Classification withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } /** - * Get the positiveLabel property: Positive label for binary metrics calculation. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the positiveLabel value. + * @return the featurizationSettings value. */ - public String positiveLabel() { - return this.positiveLabel; + public TableVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the positiveLabel property: Positive label for binary metrics calculation. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param positiveLabel the positiveLabel value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the Classification object itself. */ - public Classification withPositiveLabel(String positiveLabel) { - this.positiveLabel = positiveLabel; + public Classification withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } @@ -206,44 +186,46 @@ public Classification withNCrossValidations(NCrossValidations nCrossValidations) } /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * Get the testData property: Test data input. * - * @return the cvSplitColumnNames value. + * @return the testData value. */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; + public MLTableJobInput testData() { + return this.testData; } /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * Set the testData property: Test data input. * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @param testData the testData value to set. * @return the Classification object itself. */ - public Classification withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; + public Classification withTestData(MLTableJobInput testData) { + this.testData = testData; return this; } /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. + * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. * - * @return the weightColumnName value. + * @return the testDataSize value. */ - public String weightColumnName() { - return this.weightColumnName; + public Double testDataSize() { + return this.testDataSize; } /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. + * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. * - * @param weightColumnName the weightColumnName value to set. + * @param testDataSize the testDataSize value to set. * @return the Classification object itself. */ - public Classification withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; + public Classification withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; return this; } @@ -267,26 +249,6 @@ public Classification withValidationData(MLTableJobInput validationData) { return this; } - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Classification object itself. - */ - public Classification withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation * purpose. @@ -314,55 +276,84 @@ public Classification withValidationDataSize(Double validationDataSize) { } /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column + * as an input, causing rows in the data to be weighted up or down. * - * @return the testDataSize value. + * @return the weightColumnName value. */ - public Double testDataSize() { - return this.testDataSize; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column + * as an input, causing rows in the data to be weighted up or down. * - * @param testDataSize the testDataSize value to set. + * @param weightColumnName the weightColumnName value to set. * @return the Classification object itself. */ - public Classification withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; + public Classification withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the positiveLabel property: Positive label for binary metrics calculation. * - * @return the featurizationSettings value. + * @return the positiveLabel value. */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public String positiveLabel() { + return this.positiveLabel; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the positiveLabel property: Positive label for binary metrics calculation. * - * @param featurizationSettings the featurizationSettings value to set. + * @param positiveLabel the positiveLabel value to set. * @return the Classification object itself. */ - public Classification withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public Classification withPositiveLabel(String positiveLabel) { + this.positiveLabel = positiveLabel; return this; } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metrics for classification tasks. + * + * @return the primaryMetric value. */ - @Override - public Classification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); + public ClassificationPrimaryMetrics primaryMetric() { + return this.primaryMetric; + } + + /** + * Set the primaryMetric property: Primary metrics for classification tasks. + * + * @param primaryMetric the primaryMetric value to set. + * @return the Classification object itself. + */ + public Classification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; + return this; + } + + /** + * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * + * @return the trainingSettings value. + */ + public ClassificationTrainingSettings trainingSettings() { + return this.trainingSettings; + } + + /** + * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * + * @param trainingSettings the trainingSettings value to set. + * @return the Classification object itself. + */ + public Classification withTrainingSettings(ClassificationTrainingSettings trainingSettings) { + this.trainingSettings = trainingSettings; return this; } @@ -370,8 +361,8 @@ public Classification withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public Classification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public Classification withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -385,31 +376,12 @@ public Classification withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (trainingSettings() != null) { - trainingSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } + public Classification withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } /** @@ -422,19 +394,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeStringField("positiveLabel", this.positiveLabel); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); + jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("weightColumnName", this.weightColumnName); + jsonWriter.writeStringField("positiveLabel", this.positiveLabel); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); + jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); return jsonWriter.writeEndObject(); } @@ -462,33 +434,33 @@ public static Classification fromJson(JsonReader jsonReader) throws IOException deserializedClassification.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedClassification.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedClassification.primaryMetric - = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("trainingSettings".equals(fieldName)) { - deserializedClassification.trainingSettings = ClassificationTrainingSettings.fromJson(reader); - } else if ("positiveLabel".equals(fieldName)) { - deserializedClassification.positiveLabel = reader.getString(); + } else if ("cvSplitColumnNames".equals(fieldName)) { + List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedClassification.cvSplitColumnNames = cvSplitColumnNames; + } else if ("featurizationSettings".equals(fieldName)) { + deserializedClassification.featurizationSettings + = TableVerticalFeaturizationSettings.fromJson(reader); } else if ("limitSettings".equals(fieldName)) { deserializedClassification.limitSettings = TableVerticalLimitSettings.fromJson(reader); } else if ("nCrossValidations".equals(fieldName)) { deserializedClassification.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedClassification.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedClassification.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedClassification.validationData = MLTableJobInput.fromJson(reader); } else if ("testData".equals(fieldName)) { deserializedClassification.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedClassification.validationDataSize = reader.getNullable(JsonReader::getDouble); } else if ("testDataSize".equals(fieldName)) { deserializedClassification.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedClassification.featurizationSettings - = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedClassification.validationData = MLTableJobInput.fromJson(reader); + } else if ("validationDataSize".equals(fieldName)) { + deserializedClassification.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("weightColumnName".equals(fieldName)) { + deserializedClassification.weightColumnName = reader.getString(); + } else if ("positiveLabel".equals(fieldName)) { + deserializedClassification.positiveLabel = reader.getString(); + } else if ("primaryMetric".equals(fieldName)) { + deserializedClassification.primaryMetric + = ClassificationPrimaryMetrics.fromString(reader.getString()); + } else if ("trainingSettings".equals(fieldName)) { + deserializedClassification.trainingSettings = ClassificationTrainingSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java index f2da43698f82..7e1c0bd523fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,67 +12,89 @@ */ public final class ClassificationModels extends ExpandableStringEnum { /** - * Static value LogisticRegression for ClassificationModels. + * Logistic regression is a fundamental classification technique. + * It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. + * Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. + * Although it's essentially a method for binary classification, it can also be applied to multiclass problems. */ public static final ClassificationModels LOGISTIC_REGRESSION = fromString("LogisticRegression"); /** - * Static value SGD for ClassificationModels. + * SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + * to find the model parameters that correspond to the best fit between predicted and actual outputs. */ public static final ClassificationModels SGD = fromString("SGD"); /** - * Static value MultinomialNaiveBayes for ClassificationModels. + * The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts + * for text classification). + * The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts + * such as tf-idf may also work. */ public static final ClassificationModels MULTINOMIAL_NAIVE_BAYES = fromString("MultinomialNaiveBayes"); /** - * Static value BernoulliNaiveBayes for ClassificationModels. + * Naive Bayes classifier for multivariate Bernoulli models. */ public static final ClassificationModels BERNOULLI_NAIVE_BAYES = fromString("BernoulliNaiveBayes"); /** - * Static value SVM for ClassificationModels. + * A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for + * two-group classification problems. + * After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. */ public static final ClassificationModels SVM = fromString("SVM"); /** - * Static value LinearSVM for ClassificationModels. + * A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for + * two-group classification problems. + * After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. + * Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight + * line between classified values on a plotted graph. */ public static final ClassificationModels LINEAR_SVM = fromString("LinearSVM"); /** - * Static value KNN for ClassificationModels. + * K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + * which further means that the new data point will be assigned a value based on how closely it matches the points + * in the training set. */ public static final ClassificationModels KNN = fromString("KNN"); /** - * Static value DecisionTree for ClassificationModels. + * Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. + * The goal is to create a model that predicts the value of a target variable by learning simple decision rules + * inferred from the data features. */ public static final ClassificationModels DECISION_TREE = fromString("DecisionTree"); /** - * Static value RandomForest for ClassificationModels. + * Random forest is a supervised learning algorithm. + * The "forest" it builds, is an ensemble of decision trees, usually trained with the "bagging" method. + * The general idea of the bagging method is that a combination of learning models increases the overall result. */ public static final ClassificationModels RANDOM_FOREST = fromString("RandomForest"); /** - * Static value ExtremeRandomTrees for ClassificationModels. + * Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. + * It is related to the widely used random forest algorithm. */ public static final ClassificationModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); /** - * Static value LightGBM for ClassificationModels. + * LightGBM is a gradient boosting framework that uses tree based learning algorithms. */ public static final ClassificationModels LIGHT_GBM = fromString("LightGBM"); /** - * Static value GradientBoosting for ClassificationModels. + * The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting + * algorithm process works on this theory of execution. */ public static final ClassificationModels GRADIENT_BOOSTING = fromString("GradientBoosting"); /** - * Static value XGBoostClassifier for ClassificationModels. + * XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column + * values can be divided into distinct class values. */ public static final ClassificationModels XGBOOST_CLASSIFIER = fromString("XGBoostClassifier"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java index e885b6299479..01c3630b391b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,34 +13,38 @@ public final class ClassificationMultilabelPrimaryMetrics extends ExpandableStringEnum { /** - * Static value AUCWeighted for ClassificationMultilabelPrimaryMetrics. + * AUC is the Area under the curve. + * This metric represents arithmetic mean of the score for each class, + * weighted by the number of true instances in each class. */ public static final ClassificationMultilabelPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); /** - * Static value Accuracy for ClassificationMultilabelPrimaryMetrics. + * Accuracy is the ratio of predictions that exactly match the true class labels. */ public static final ClassificationMultilabelPrimaryMetrics ACCURACY = fromString("Accuracy"); /** - * Static value NormMacroRecall for ClassificationMultilabelPrimaryMetrics. + * Normalized macro recall is recall macro-averaged and normalized, so that random + * performance has a score of 0, and perfect performance has a score of 1. */ public static final ClassificationMultilabelPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); /** - * Static value AveragePrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. + * The arithmetic mean of the average precision score for each class, weighted by + * the number of true instances in each class. */ public static final ClassificationMultilabelPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED = fromString("AveragePrecisionScoreWeighted"); /** - * Static value PrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. + * The arithmetic mean of precision for each class, weighted by number of true instances in each class. */ public static final ClassificationMultilabelPrimaryMetrics PRECISION_SCORE_WEIGHTED = fromString("PrecisionScoreWeighted"); /** - * Static value IOU for ClassificationMultilabelPrimaryMetrics. + * Intersection Over Union. Intersection of predictions divided by union of predictions. */ public static final ClassificationMultilabelPrimaryMetrics IOU = fromString("IOU"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java index cdf1c8bed2fd..8c371fd943e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,28 +12,32 @@ */ public final class ClassificationPrimaryMetrics extends ExpandableStringEnum { /** - * Static value AUCWeighted for ClassificationPrimaryMetrics. + * AUC is the Area under the curve. + * This metric represents arithmetic mean of the score for each class, + * weighted by the number of true instances in each class. */ public static final ClassificationPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); /** - * Static value Accuracy for ClassificationPrimaryMetrics. + * Accuracy is the ratio of predictions that exactly match the true class labels. */ public static final ClassificationPrimaryMetrics ACCURACY = fromString("Accuracy"); /** - * Static value NormMacroRecall for ClassificationPrimaryMetrics. + * Normalized macro recall is recall macro-averaged and normalized, so that random + * performance has a score of 0, and perfect performance has a score of 1. */ public static final ClassificationPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); /** - * Static value AveragePrecisionScoreWeighted for ClassificationPrimaryMetrics. + * The arithmetic mean of the average precision score for each class, weighted by + * the number of true instances in each class. */ public static final ClassificationPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED = fromString("AveragePrecisionScoreWeighted"); /** - * Static value PrecisionScoreWeighted for ClassificationPrimaryMetrics. + * The arithmetic mean of precision for each class, weighted by number of true instances in each class. */ public static final ClassificationPrimaryMetrics PRECISION_SCORE_WEIGHTED = fromString("PrecisionScoreWeighted"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java index 3006428bbd8e..fe0398f7cf83 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -80,8 +80,8 @@ public List blockedTrainingAlgorithms() { * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); + public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + super.withEnableDnnTraining(enableDnnTraining); return this; } @@ -89,8 +89,8 @@ public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean ena * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); + public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + super.withEnableModelExplainability(enableModelExplainability); return this; } @@ -98,8 +98,8 @@ public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSet * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); + public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); return this; } @@ -107,8 +107,8 @@ public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStac * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); + public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { + super.withEnableStackEnsemble(enableStackEnsemble); return this; } @@ -116,8 +116,8 @@ public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteE * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); + public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { + super.withEnableVoteEnsemble(enableVoteEnsemble); return this; } @@ -125,8 +125,8 @@ public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); + public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { + super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); return this; } @@ -134,35 +134,25 @@ public ClassificationTrainingSettings withEnableModelExplainability(Boolean enab * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); + public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + super.withStackEnsembleSettings(stackEnsembleSettings); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); jsonWriter.writeBooleanField("enableOnnxCompatibleModels", enableOnnxCompatibleModels()); - jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeBooleanField("enableStackEnsemble", enableStackEnsemble()); jsonWriter.writeBooleanField("enableVoteEnsemble", enableVoteEnsemble()); jsonWriter.writeStringField("ensembleModelDownloadTimeout", CoreUtils.durationToStringWithDays(ensembleModelDownloadTimeout())); - jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); - jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeArrayField("allowedTrainingAlgorithms", this.allowedTrainingAlgorithms, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, @@ -186,12 +176,15 @@ public static ClassificationTrainingSettings fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { deserializedClassificationTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { + .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableModelExplainability".equals(fieldName)) { deserializedClassificationTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); + .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { + deserializedClassificationTrainingSettings + .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedClassificationTrainingSettings .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); @@ -201,12 +194,9 @@ public static ClassificationTrainingSettings fromJson(JsonReader jsonReader) thr } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedClassificationTrainingSettings.withEnsembleModelDownloadTimeout( reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { + } else if ("stackEnsembleSettings".equals(fieldName)) { deserializedClassificationTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); } else if ("allowedTrainingAlgorithms".equals(fieldName)) { List allowedTrainingAlgorithms = reader.readArray(reader1 -> ClassificationModels.fromString(reader1.getString())); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java index 24e49f2cbc2a..fd062abab180 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java index 6d2e80d2c494..7f96a5be3eec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -60,17 +60,6 @@ public ClusterUpdateParameters withProperties(ScaleSettingsInformation propertie return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java index e645bbbbacc3..5a10339ef0a9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -73,21 +72,6 @@ public CodeConfiguration withScoringScript(String scoringScript) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scoringScript() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property scoringScript in model CodeConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeConfiguration.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java index 6371a8227255..e7654f74ab62 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java index 6257379a5b61..f38708bd8571 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,14 +22,14 @@ public final class CodeContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of CodeContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -84,15 +84,6 @@ public CodeContainerProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public CodeContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -103,13 +94,12 @@ public CodeContainerProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public CodeContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -119,8 +109,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -142,12 +132,12 @@ public static CodeContainerProperties fromJson(JsonReader jsonReader) throws IOE if ("description".equals(fieldName)) { deserializedCodeContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedCodeContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCodeContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedCodeContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java index 5437e571293d..e7fb3ae127b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,30 +13,40 @@ */ public interface CodeContainers { /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return containers. + * + * Get container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List containers. + * Get containers. + * + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @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 paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return containers. + * + * Get container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); + CodeContainer get(String resourceGroupName, String workspaceName, String name); /** * Delete container. @@ -65,45 +75,49 @@ public interface CodeContainers { void delete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @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 container. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - CodeContainer get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); /** + * Get containers. + * * Get container. * * @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 container along with {@link Response}. + * @return containers. + * + * Get container along with {@link Response}. */ CodeContainer getById(String id); /** + * Get containers. + * * Get container. * * @param id the resource ID. @@ -111,7 +125,9 @@ Response getWithResponse(String resourceGroupName, String workspa * @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 container along with {@link Response}. + * @return containers. + * + * Get container along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java index ffc70fdfbf62..e18b35993479 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java index cca06a1869e4..677e3194b3bb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,15 +61,6 @@ public AssetProvisioningState provisioningState() { return this.provisioningState; } - /** - * {@inheritDoc} - */ - @Override - public CodeVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - /** * {@inheritDoc} */ @@ -83,8 +74,8 @@ public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { * {@inheritDoc} */ @Override - public CodeVersionProperties withDescription(String description) { - super.withDescription(description); + public CodeVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -92,8 +83,8 @@ public CodeVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public CodeVersionProperties withTags(Map tags) { - super.withTags(tags); + public CodeVersionProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -107,13 +98,12 @@ public CodeVersionProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public CodeVersionProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -123,10 +113,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("codeUri", this.codeUri); return jsonWriter.writeEndObject(); } @@ -148,16 +138,16 @@ public static CodeVersionProperties fromJson(JsonReader jsonReader) throws IOExc if ("description".equals(fieldName)) { deserializedCodeVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedCodeVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedCodeVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCodeVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedCodeVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedCodeVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("codeUri".equals(fieldName)) { deserializedCodeVersionProperties.codeUri = reader.getString(); } else if ("provisioningState".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java index 030b203233ac..282bea624502 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,37 +13,34 @@ */ public interface CodeVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, String version, + Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. - * @param hashVersion Hash algorithm version when listing by hash. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String hash, String hashVersion, Context context); + CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Delete version. @@ -75,42 +72,45 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param hash If specified, return CodeVersion assets with specified content hash value, regardless of name. + * @param hashVersion Hash algorithm version when listing by hash. + * @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 version. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String hash, String hashVersion, Context context); /** * Publish version asset into registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -123,8 +123,8 @@ Response getWithResponse(String resourceGroupName, String workspace * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java new file mode 100644 index 000000000000..6b069d0adcce --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 CognitiveServicesSku model. + */ +@Fluent +public final class CognitiveServicesSku implements JsonSerializable { + /* + * The capacity property. + */ + private Integer capacity; + + /* + * The family property. + */ + private String family; + + /* + * The name property. + */ + private String name; + + /* + * The size property. + */ + private String size; + + /* + * The tier property. + */ + private String tier; + + /** + * Creates an instance of CognitiveServicesSku class. + */ + public CognitiveServicesSku() { + } + + /** + * Get the capacity property: The capacity property. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The capacity property. + * + * @param capacity the capacity value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the family property: The family property. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Set the family property: The family property. + * + * @param family the family value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withName(String name) { + this.name = name; + return this; + } + + /** + * Get the size property: The size property. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: The size property. + * + * @param size the size value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the tier property: The tier property. + * + * @return the tier value. + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier property: The tier property. + * + * @param tier the tier value to set. + * @return the CognitiveServicesSku object itself. + */ + public CognitiveServicesSku withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("capacity", this.capacity); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeStringField("tier", this.tier); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CognitiveServicesSku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CognitiveServicesSku 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 CognitiveServicesSku. + */ + public static CognitiveServicesSku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CognitiveServicesSku deserializedCognitiveServicesSku = new CognitiveServicesSku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacity".equals(fieldName)) { + deserializedCognitiveServicesSku.capacity = reader.getNullable(JsonReader::getInt); + } else if ("family".equals(fieldName)) { + deserializedCognitiveServicesSku.family = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCognitiveServicesSku.name = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedCognitiveServicesSku.size = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedCognitiveServicesSku.tier = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCognitiveServicesSku; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java index 6dc7e1989260..54795a8dca24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,9 +17,10 @@ @Fluent public final class Collection implements JsonSerializable { /* - * The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + * The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint + * identity to auth. */ - private Double samplingRate; + private String clientId; /* * Enable or disable data collection. @@ -33,10 +34,9 @@ public final class Collection implements JsonSerializable { private String dataId; /* - * The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint - * identity to auth. + * The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. */ - private String clientId; + private Double samplingRate; /** * Creates an instance of Collection class. @@ -45,24 +45,24 @@ public Collection() { } /** - * Get the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data - * by default. + * Get the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will + * pick a registered endpoint identity to auth. * - * @return the samplingRate value. + * @return the clientId value. */ - public Double samplingRate() { - return this.samplingRate; + public String clientId() { + return this.clientId; } /** - * Set the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data - * by default. + * Set the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will + * pick a registered endpoint identity to auth. * - * @param samplingRate the samplingRate value to set. + * @param clientId the clientId value to set. * @return the Collection object itself. */ - public Collection withSamplingRate(Double samplingRate) { - this.samplingRate = samplingRate; + public Collection withClientId(String clientId) { + this.clientId = clientId; return this; } @@ -109,46 +109,38 @@ public Collection withDataId(String dataId) { } /** - * Get the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will - * pick a registered endpoint identity to auth. + * Get the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data + * by default. * - * @return the clientId value. + * @return the samplingRate value. */ - public String clientId() { - return this.clientId; + public Double samplingRate() { + return this.samplingRate; } /** - * Set the clientId property: The msi client id used to collect logging to blob storage. If it's null,backend will - * pick a registered endpoint identity to auth. + * Set the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data + * by default. * - * @param clientId the clientId value to set. + * @param samplingRate the samplingRate value to set. * @return the Collection object itself. */ - public Collection withClientId(String clientId) { - this.clientId = clientId; + public Collection withSamplingRate(Double samplingRate) { + this.samplingRate = samplingRate; 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("samplingRate", this.samplingRate); + jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeStringField("dataCollectionMode", this.dataCollectionMode == null ? null : this.dataCollectionMode.toString()); jsonWriter.writeStringField("dataId", this.dataId); - jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeNumberField("samplingRate", this.samplingRate); return jsonWriter.writeEndObject(); } @@ -167,14 +159,14 @@ public static Collection fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("samplingRate".equals(fieldName)) { - deserializedCollection.samplingRate = reader.getNullable(JsonReader::getDouble); + if ("clientId".equals(fieldName)) { + deserializedCollection.clientId = reader.getString(); } else if ("dataCollectionMode".equals(fieldName)) { deserializedCollection.dataCollectionMode = DataCollectionMode.fromString(reader.getString()); } else if ("dataId".equals(fieldName)) { deserializedCollection.dataId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedCollection.clientId = reader.getString(); + } else if ("samplingRate".equals(fieldName)) { + deserializedCollection.samplingRate = reader.getNullable(JsonReader::getDouble); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java index b1bd2bd6febb..be679d146649 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -76,14 +76,6 @@ public ColumnTransformer withParameters(Object parameters) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -91,7 +83,9 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("fields", this.fields, (writer, element) -> writer.writeString(element)); - jsonWriter.writeUntypedField("parameters", this.parameters); + if (this.parameters != null) { + jsonWriter.writeUntypedField("parameters", this.parameters); + } return jsonWriter.writeEndObject(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java index c0bd48df854b..9d76590d0ad9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,11 +21,6 @@ public final class CommandJob extends JobBaseProperties { */ private JobType jobType = JobType.COMMAND; - /* - * Compute Resource configuration for the job. - */ - private JobResourceConfiguration resources; - /* * ARM resource ID of the code asset. */ @@ -38,24 +32,24 @@ public final class CommandJob extends JobBaseProperties { private String command; /* - * [Required] The ARM resource ID of the Environment specification for the job. + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. */ - private String environmentId; + private DistributionConfiguration distribution; /* - * Mapping of input data bindings used in the job. + * [Required] The ARM resource ID of the Environment specification for the job. */ - private Map inputs; + private String environmentId; /* - * Mapping of output data bindings used in the job. + * Environment variables included in the job. */ - private Map outputs; + private Map environmentVariables; /* - * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + * Mapping of input data bindings used in the job. */ - private DistributionConfiguration distribution; + private Map inputs; /* * Command Job limit. @@ -63,9 +57,9 @@ public final class CommandJob extends JobBaseProperties { private CommandJobLimits limits; /* - * Environment variables included in the job. + * Mapping of output data bindings used in the job. */ - private Map environmentVariables; + private Map outputs; /* * Input parameters. @@ -78,9 +72,9 @@ public final class CommandJob extends JobBaseProperties { private QueueSettings queueSettings; /* - * Status of the job. + * Compute Resource configuration for the job. */ - private JobStatus status; + private JobResourceConfiguration resources; /** * Creates an instance of CommandJob class. @@ -98,26 +92,6 @@ public JobType jobType() { return this.jobType; } - /** - * Get the resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the CommandJob object itself. - */ - public CommandJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - /** * Get the codeId property: ARM resource ID of the code asset. * @@ -159,84 +133,84 @@ public CommandJob withCommand(String command) { } /** - * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. + * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. * - * @return the environmentId value. + * @return the distribution value. */ - public String environmentId() { - return this.environmentId; + public DistributionConfiguration distribution() { + return this.distribution; } /** - * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. + * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. * - * @param environmentId the environmentId value to set. + * @param distribution the distribution value to set. * @return the CommandJob object itself. */ - public CommandJob withEnvironmentId(String environmentId) { - this.environmentId = environmentId; + public CommandJob withDistribution(DistributionConfiguration distribution) { + this.distribution = distribution; return this; } /** - * Get the inputs property: Mapping of input data bindings used in the job. + * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. * - * @return the inputs value. + * @return the environmentId value. */ - public Map inputs() { - return this.inputs; + public String environmentId() { + return this.environmentId; } /** - * Set the inputs property: Mapping of input data bindings used in the job. + * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. * - * @param inputs the inputs value to set. + * @param environmentId the environmentId value to set. * @return the CommandJob object itself. */ - public CommandJob withInputs(Map inputs) { - this.inputs = inputs; + public CommandJob withEnvironmentId(String environmentId) { + this.environmentId = environmentId; return this; } /** - * Get the outputs property: Mapping of output data bindings used in the job. + * Get the environmentVariables property: Environment variables included in the job. * - * @return the outputs value. + * @return the environmentVariables value. */ - public Map outputs() { - return this.outputs; + public Map environmentVariables() { + return this.environmentVariables; } /** - * Set the outputs property: Mapping of output data bindings used in the job. + * Set the environmentVariables property: Environment variables included in the job. * - * @param outputs the outputs value to set. + * @param environmentVariables the environmentVariables value to set. * @return the CommandJob object itself. */ - public CommandJob withOutputs(Map outputs) { - this.outputs = outputs; + public CommandJob withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; return this; } /** - * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. + * Get the inputs property: Mapping of input data bindings used in the job. * - * @return the distribution value. + * @return the inputs value. */ - public DistributionConfiguration distribution() { - return this.distribution; + public Map inputs() { + return this.inputs; } /** - * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. + * Set the inputs property: Mapping of input data bindings used in the job. * - * @param distribution the distribution value to set. + * @param inputs the inputs value to set. * @return the CommandJob object itself. */ - public CommandJob withDistribution(DistributionConfiguration distribution) { - this.distribution = distribution; + public CommandJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -261,22 +235,22 @@ public CommandJob withLimits(CommandJobLimits limits) { } /** - * Get the environmentVariables property: Environment variables included in the job. + * Get the outputs property: Mapping of output data bindings used in the job. * - * @return the environmentVariables value. + * @return the outputs value. */ - public Map environmentVariables() { - return this.environmentVariables; + public Map outputs() { + return this.outputs; } /** - * Set the environmentVariables property: Environment variables included in the job. + * Set the outputs property: Mapping of output data bindings used in the job. * - * @param environmentVariables the environmentVariables value to set. + * @param outputs the outputs value to set. * @return the CommandJob object itself. */ - public CommandJob withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; + public CommandJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } @@ -310,21 +284,22 @@ public CommandJob withQueueSettings(QueueSettings queueSettings) { } /** - * Get the status property: Status of the job. + * Get the resources property: Compute Resource configuration for the job. * - * @return the status value. + * @return the resources value. */ - @Override - public JobStatus status() { - return this.status; + public JobResourceConfiguration resources() { + return this.resources; } /** - * {@inheritDoc} + * Set the resources property: Compute Resource configuration for the job. + * + * @param resources the resources value to set. + * @return the CommandJob object itself. */ - @Override - public CommandJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public CommandJob withResources(JobResourceConfiguration resources) { + this.resources = resources; return this; } @@ -332,8 +307,8 @@ public CommandJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public CommandJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public CommandJob withComponentId(String componentId) { + super.withComponentId(componentId); return this; } @@ -341,8 +316,8 @@ public CommandJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public CommandJob withServices(Map services) { - super.withServices(services); + public CommandJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -350,8 +325,8 @@ public CommandJob withServices(Map services) { * {@inheritDoc} */ @Override - public CommandJob withComputeId(String computeId) { - super.withComputeId(computeId); + public CommandJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -359,8 +334,8 @@ public CommandJob withComputeId(String computeId) { * {@inheritDoc} */ @Override - public CommandJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public CommandJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -377,8 +352,8 @@ public CommandJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public CommandJob withComponentId(String componentId) { - super.withComponentId(componentId); + public CommandJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -395,8 +370,8 @@ public CommandJob withNotificationSetting(NotificationSetting notificationSettin * {@inheritDoc} */ @Override - public CommandJob withDescription(String description) { - super.withDescription(description); + public CommandJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -404,8 +379,17 @@ public CommandJob withDescription(String description) { * {@inheritDoc} */ @Override - public CommandJob withTags(Map tags) { - super.withTags(tags); + public CommandJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CommandJob withDescription(String description) { + super.withDescription(description); return this; } @@ -419,51 +403,14 @@ public CommandJob withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } - if (command() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property command in model CommandJob")); - } - if (environmentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property environmentId in model CommandJob")); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (distribution() != null) { - distribution().validate(); - } - if (limits() != null) { - limits().validate(); - } - if (queueSettings() != null) { - queueSettings().validate(); - } + public CommandJob withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(CommandJob.class); - /** * {@inheritDoc} */ @@ -471,28 +418,29 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("command", this.command); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); jsonWriter.writeStringField("codeId", this.codeId); - jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("distribution", this.distribution); - jsonWriter.writeJsonField("limits", this.limits); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("limits", this.limits); + jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); + jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -514,58 +462,60 @@ public static CommandJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedCommandJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCommandJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedCommandJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCommandJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedCommandJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedCommandJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedCommandJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedCommandJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedCommandJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedCommandJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedCommandJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedCommandJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedCommandJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedCommandJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedCommandJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedCommandJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedCommandJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedCommandJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedCommandJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("command".equals(fieldName)) { deserializedCommandJob.command = reader.getString(); } else if ("environmentId".equals(fieldName)) { deserializedCommandJob.environmentId = reader.getString(); } else if ("jobType".equals(fieldName)) { deserializedCommandJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedCommandJob.resources = JobResourceConfiguration.fromJson(reader); } else if ("codeId".equals(fieldName)) { deserializedCommandJob.codeId = reader.getString(); + } else if ("distribution".equals(fieldName)) { + deserializedCommandJob.distribution = DistributionConfiguration.fromJson(reader); + } else if ("environmentVariables".equals(fieldName)) { + Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); + deserializedCommandJob.environmentVariables = environmentVariables; } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedCommandJob.inputs = inputs; + } else if ("limits".equals(fieldName)) { + deserializedCommandJob.limits = CommandJobLimits.fromJson(reader); } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedCommandJob.outputs = outputs; - } else if ("distribution".equals(fieldName)) { - deserializedCommandJob.distribution = DistributionConfiguration.fromJson(reader); - } else if ("limits".equals(fieldName)) { - deserializedCommandJob.limits = CommandJobLimits.fromJson(reader); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedCommandJob.environmentVariables = environmentVariables; } else if ("parameters".equals(fieldName)) { deserializedCommandJob.parameters = reader.readUntyped(); } else if ("queueSettings".equals(fieldName)) { deserializedCommandJob.queueSettings = QueueSettings.fromJson(reader); + } else if ("resources".equals(fieldName)) { + deserializedCommandJob.resources = JobResourceConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java index a45e5518cd9b..db29a1659829 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,16 +47,6 @@ public CommandJobLimits withTimeout(Duration timeout) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java index 25b1fdb61530..918fd3ab450a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java index 57d7926b42dd..95c6fe050c87 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -23,14 +23,14 @@ public final class ComponentContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of ComponentContainerProperties class. @@ -48,23 +48,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -85,15 +85,6 @@ public ComponentContainerProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ComponentContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -104,13 +95,12 @@ public ComponentContainerProperties withProperties(Map propertie } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public ComponentContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -120,8 +110,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +133,12 @@ public static ComponentContainerProperties fromJson(JsonReader jsonReader) throw if ("description".equals(fieldName)) { deserializedComponentContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedComponentContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedComponentContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedComponentContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java index ada3df49115e..0aa46529f316 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,32 +13,32 @@ */ public interface ComponentContainers { /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List component containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); + ComponentContainer get(String resourceGroupName, String workspaceName, String name); /** * Delete container. @@ -67,32 +67,32 @@ PagedIterable list(String resourceGroupName, String workspac void delete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container along with {@link Response}. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List component containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 container. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - ComponentContainer get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context); /** * Get container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java index 830fac22820b..8ff1b0312fa5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java index c13b4037b154..68325ac06873 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -64,15 +64,6 @@ public AssetProvisioningState provisioningState() { return this.provisioningState; } - /** - * {@inheritDoc} - */ - @Override - public ComponentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - /** * {@inheritDoc} */ @@ -86,8 +77,8 @@ public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { * {@inheritDoc} */ @Override - public ComponentVersionProperties withDescription(String description) { - super.withDescription(description); + public ComponentVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -95,8 +86,8 @@ public ComponentVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public ComponentVersionProperties withTags(Map tags) { - super.withTags(tags); + public ComponentVersionProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -110,13 +101,12 @@ public ComponentVersionProperties withProperties(Map properties) } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public ComponentVersionProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -126,11 +116,13 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeUntypedField("componentSpec", this.componentSpec); + jsonWriter.writeBooleanField("isArchived", isArchived()); + if (this.componentSpec != null) { + jsonWriter.writeUntypedField("componentSpec", this.componentSpec); + } return jsonWriter.writeEndObject(); } @@ -151,16 +143,16 @@ public static ComponentVersionProperties fromJson(JsonReader jsonReader) throws if ("description".equals(fieldName)) { deserializedComponentVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedComponentVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedComponentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedComponentVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedComponentVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedComponentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("componentSpec".equals(fieldName)) { deserializedComponentVersionProperties.componentSpec = reader.readUntyped(); } else if ("provisioningState".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java index 7931c40d3962..bfacb0505135 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,36 +13,34 @@ */ public interface ComponentVersions { /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List component versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, ListViewType listViewType, Context context); + ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Delete version. @@ -74,34 +72,36 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Get version. + * List component versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 version. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, ListViewType listViewType, Context context); /** * Publish version asset into registry. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java index 9a9e4bc15142..a7773178b915 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -272,14 +272,6 @@ public Compute withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -319,7 +311,7 @@ public static Compute fromJson(JsonReader jsonReader) throws IOException { } // Use the discriminator value to determine which subtype should be deserialized. if ("AKS".equals(discriminatorValue)) { - return Aks.fromJson(readerToUse.reset()); + return AKS.fromJson(readerToUse.reset()); } else if ("Kubernetes".equals(discriminatorValue)) { return Kubernetes.fromJson(readerToUse.reset()); } else if ("AmlCompute".equals(discriminatorValue)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java index 1bfa1ed54b16..e6caa801b220 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class ComputeInstance extends Compute { */ private ComputeInstanceProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of ComputeInstance class. */ @@ -91,58 +64,6 @@ public ComputeInstance withProperties(ComputeInstanceProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,23 @@ public static ComputeInstance fromJson(JsonReader jsonReader) throws IOException if ("computeLocation".equals(fieldName)) { deserializedComputeInstance.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedComputeInstance.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedComputeInstance.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedComputeInstance.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedComputeInstance.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedComputeInstance.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedComputeInstance.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedComputeInstance.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedComputeInstance.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedComputeInstance.provisioningErrors = provisioningErrors; + deserializedComputeInstance.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedComputeInstance.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedComputeInstance.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedComputeInstance.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java index cdf319054552..4f6f2039c5df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Defines an Aml Instance application and its connectivity endpoint URI. */ -@Fluent +@Immutable public final class ComputeInstanceApplication implements JsonSerializable { /* * Name of the ComputeInstance application. @@ -29,7 +29,7 @@ public final class ComputeInstanceApplication implements JsonSerializable { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java new file mode 100644 index 000000000000..5feb3cf95bc5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Specifies settings for autologger. + */ +@Fluent +public final class ComputeInstanceAutologgerSettings implements JsonSerializable { + /* + * Indicates whether mlflow autologger is enabled for notebooks. + */ + private MlflowAutologger mlflowAutologger; + + /** + * Creates an instance of ComputeInstanceAutologgerSettings class. + */ + public ComputeInstanceAutologgerSettings() { + } + + /** + * Get the mlflowAutologger property: Indicates whether mlflow autologger is enabled for notebooks. + * + * @return the mlflowAutologger value. + */ + public MlflowAutologger mlflowAutologger() { + return this.mlflowAutologger; + } + + /** + * Set the mlflowAutologger property: Indicates whether mlflow autologger is enabled for notebooks. + * + * @param mlflowAutologger the mlflowAutologger value to set. + * @return the ComputeInstanceAutologgerSettings object itself. + */ + public ComputeInstanceAutologgerSettings withMlflowAutologger(MlflowAutologger mlflowAutologger) { + this.mlflowAutologger = mlflowAutologger; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mlflowAutologger", + this.mlflowAutologger == null ? null : this.mlflowAutologger.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComputeInstanceAutologgerSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComputeInstanceAutologgerSettings 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 ComputeInstanceAutologgerSettings. + */ + public static ComputeInstanceAutologgerSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComputeInstanceAutologgerSettings deserializedComputeInstanceAutologgerSettings + = new ComputeInstanceAutologgerSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mlflowAutologger".equals(fieldName)) { + deserializedComputeInstanceAutologgerSettings.mlflowAutologger + = MlflowAutologger.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedComputeInstanceAutologgerSettings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java index 8332cf71567a..9e0306273fd5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,7 +30,7 @@ public final class ComputeInstanceConnectivityEndpoints /** * Creates an instance of ComputeInstanceConnectivityEndpoints class. */ - public ComputeInstanceConnectivityEndpoints() { + private ComputeInstanceConnectivityEndpoints() { } /** @@ -52,14 +52,6 @@ public String privateIpAddress() { return this.privateIpAddress; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java index 6460065125a0..4ddddf3f633a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Defines an Aml Instance container. */ -@Fluent +@Immutable public final class ComputeInstanceContainer implements JsonSerializable { /* * Name of the ComputeInstance container. @@ -50,7 +50,7 @@ public final class ComputeInstanceContainer implements JsonSerializable services() { return this.services; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environment() != null) { - environment().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java index 0af4b6db865d..d4e2219c666e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -19,7 +19,7 @@ public final class ComputeInstanceCreatedBy implements JsonSerializable { /* * Caching type of Data Disk. @@ -27,6 +27,8 @@ public final class ComputeInstanceDataDisk implements JsonSerializable { /* * name of environment. @@ -29,7 +29,7 @@ public final class ComputeInstanceEnvironmentInfo implements JsonSerializable { /* * Name of the last operation. @@ -42,7 +42,7 @@ public final class ComputeInstanceLastOperation implements JsonSerializable errors; @@ -76,11 +87,44 @@ public final class ComputeInstanceProperties implements JsonSerializable e.validate()); - } - if (osImageMetadata() != null) { - osImageMetadata().validate(); - } - if (connectivityEndpoints() != null) { - connectivityEndpoints().validate(); - } - if (applications() != null) { - applications().forEach(e -> e.validate()); - } - if (createdBy() != null) { - createdBy().validate(); - } - if (personalComputeInstanceSettings() != null) { - personalComputeInstanceSettings().validate(); - } - if (setupScripts() != null) { - setupScripts().validate(); - } - if (lastOperation() != null) { - lastOperation().validate(); - } - if (schedules() != null) { - schedules().validate(); - } - if (containers() != null) { - containers().forEach(e -> e.validate()); - } - if (dataDisks() != null) { - dataDisks().forEach(e -> e.validate()); - } - if (dataMounts() != null) { - dataMounts().forEach(e -> e.validate()); - } - if (versions() != null) { - versions().validate(); - } - } - /** * {@inheritDoc} */ @@ -507,14 +666,20 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("subnet", this.subnet); jsonWriter.writeStringField("applicationSharingPolicy", this.applicationSharingPolicy == null ? null : this.applicationSharingPolicy.toString()); + jsonWriter.writeJsonField("autologgerSettings", this.autologgerSettings); jsonWriter.writeJsonField("sshSettings", this.sshSettings); jsonWriter.writeArrayField("customServices", this.customServices, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("computeInstanceAuthorizationType", this.computeInstanceAuthorizationType == null ? null : this.computeInstanceAuthorizationType.toString()); + jsonWriter.writeBooleanField("enableOSPatching", this.enableOSPatching); + jsonWriter.writeBooleanField("enableRootAccess", this.enableRootAccess); + jsonWriter.writeBooleanField("enableSSO", this.enableSSO); + jsonWriter.writeBooleanField("releaseQuotaOnStop", this.releaseQuotaOnStop); jsonWriter.writeJsonField("personalComputeInstanceSettings", this.personalComputeInstanceSettings); jsonWriter.writeJsonField("setupScripts", this.setupScripts); jsonWriter.writeJsonField("schedules", this.schedules); + jsonWriter.writeStringField("idleTimeBeforeShutdown", this.idleTimeBeforeShutdown); jsonWriter.writeBooleanField("enableNodePublicIp", this.enableNodePublicIp); return jsonWriter.writeEndObject(); } @@ -541,6 +706,9 @@ public static ComputeInstanceProperties fromJson(JsonReader jsonReader) throws I } else if ("applicationSharingPolicy".equals(fieldName)) { deserializedComputeInstanceProperties.applicationSharingPolicy = ApplicationSharingPolicy.fromString(reader.getString()); + } else if ("autologgerSettings".equals(fieldName)) { + deserializedComputeInstanceProperties.autologgerSettings + = ComputeInstanceAutologgerSettings.fromJson(reader); } else if ("sshSettings".equals(fieldName)) { deserializedComputeInstanceProperties.sshSettings = ComputeInstanceSshSettings.fromJson(reader); } else if ("customServices".equals(fieldName)) { @@ -565,6 +733,15 @@ public static ComputeInstanceProperties fromJson(JsonReader jsonReader) throws I } else if ("computeInstanceAuthorizationType".equals(fieldName)) { deserializedComputeInstanceProperties.computeInstanceAuthorizationType = ComputeInstanceAuthorizationType.fromString(reader.getString()); + } else if ("enableOSPatching".equals(fieldName)) { + deserializedComputeInstanceProperties.enableOSPatching = reader.getNullable(JsonReader::getBoolean); + } else if ("enableRootAccess".equals(fieldName)) { + deserializedComputeInstanceProperties.enableRootAccess = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSSO".equals(fieldName)) { + deserializedComputeInstanceProperties.enableSSO = reader.getNullable(JsonReader::getBoolean); + } else if ("releaseQuotaOnStop".equals(fieldName)) { + deserializedComputeInstanceProperties.releaseQuotaOnStop + = reader.getNullable(JsonReader::getBoolean); } else if ("personalComputeInstanceSettings".equals(fieldName)) { deserializedComputeInstanceProperties.personalComputeInstanceSettings = PersonalComputeInstanceSettings.fromJson(reader); @@ -574,6 +751,8 @@ public static ComputeInstanceProperties fromJson(JsonReader jsonReader) throws I deserializedComputeInstanceProperties.lastOperation = ComputeInstanceLastOperation.fromJson(reader); } else if ("schedules".equals(fieldName)) { deserializedComputeInstanceProperties.schedules = ComputeSchedules.fromJson(reader); + } else if ("idleTimeBeforeShutdown".equals(fieldName)) { + deserializedComputeInstanceProperties.idleTimeBeforeShutdown = reader.getString(); } else if ("enableNodePublicIp".equals(fieldName)) { deserializedComputeInstanceProperties.enableNodePublicIp = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java deleted file mode 100644 index be7024d12bca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties(top level) of ComputeInstance. - */ -@Fluent -public class ComputeInstanceSchema implements JsonSerializable { - /* - * Properties of ComputeInstance - */ - private ComputeInstanceProperties properties; - - /** - * Creates an instance of ComputeInstanceSchema class. - */ - public ComputeInstanceSchema() { - } - - /** - * Get the properties property: Properties of ComputeInstance. - * - * @return the properties value. - */ - public ComputeInstanceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of ComputeInstance. - * - * @param properties the properties value to set. - * @return the ComputeInstanceSchema object itself. - */ - public ComputeInstanceSchema withProperties(ComputeInstanceProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeInstanceSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeInstanceSchema 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 ComputeInstanceSchema. - */ - public static ComputeInstanceSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeInstanceSchema deserializedComputeInstanceSchema = new ComputeInstanceSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedComputeInstanceSchema.properties = ComputeInstanceProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeInstanceSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java index 1c616449229b..24f9bc7b13f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,6 +17,8 @@ @Fluent public final class ComputeInstanceSshSettings implements JsonSerializable { /* + * Access policy for SSH + * * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on * this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet * policy if applicable. @@ -46,9 +48,11 @@ public ComputeInstanceSshSettings() { } /** - * Get the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that - * the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and - * accessible according to the VNet/subnet policy if applicable. + * Get the sshPublicAccess property: Access policy for SSH + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on + * this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet + * policy if applicable. * * @return the sshPublicAccess value. */ @@ -57,9 +61,11 @@ public SshPublicAccess sshPublicAccess() { } /** - * Set the sshPublicAccess property: State of the public SSH port. Possible values are: Disabled - Indicates that - * the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and - * accessible according to the VNet/subnet policy if applicable. + * Set the sshPublicAccess property: Access policy for SSH + * + * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on + * this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet + * policy if applicable. * * @param sshPublicAccess the sshPublicAccess value to set. * @return the ComputeInstanceSshSettings object itself. @@ -109,14 +115,6 @@ public ComputeInstanceSshSettings withAdminPublicKey(String adminPublicKey) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java index 6c26b3a23bdb..4046c9580a30 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,6 +36,11 @@ public final class ComputeInstanceState extends ExpandableStringEnum { /* * Runtime of compute instance. @@ -24,7 +24,7 @@ public final class ComputeInstanceVersion implements JsonSerializable { /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java index 81a219975c79..87ab7750661e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,27 +12,27 @@ */ public final class ComputeRecurrenceFrequency extends ExpandableStringEnum { /** - * Static value Minute for ComputeRecurrenceFrequency. + * Minute frequency. */ public static final ComputeRecurrenceFrequency MINUTE = fromString("Minute"); /** - * Static value Hour for ComputeRecurrenceFrequency. + * Hour frequency. */ public static final ComputeRecurrenceFrequency HOUR = fromString("Hour"); /** - * Static value Day for ComputeRecurrenceFrequency. + * Day frequency. */ public static final ComputeRecurrenceFrequency DAY = fromString("Day"); /** - * Static value Week for ComputeRecurrenceFrequency. + * Week frequency. */ public static final ComputeRecurrenceFrequency WEEK = fromString("Week"); /** - * Static value Month for ComputeRecurrenceFrequency. + * Month frequency. */ public static final ComputeRecurrenceFrequency MONTH = fromString("Month"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java index 8d738d7ad55a..58f8c847fed4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -124,26 +123,6 @@ public ComputeRecurrenceSchedule withWeekDays(List weekDays) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hours() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property hours in model ComputeRecurrenceSchedule")); - } - if (minutes() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property minutes in model ComputeRecurrenceSchedule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComputeRecurrenceSchedule.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java index df09ca34c41a..3c5dd3ee8cd2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -10,6 +10,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; +import java.util.List; import java.util.Map; /** @@ -38,11 +39,11 @@ public interface ComputeResource { String type(); /** - * Gets the identity property: The identity of the resource. + * Gets the properties property: The resource-specific properties for this resource. * - * @return the identity value. + * @return the properties value. */ - ManagedServiceIdentity identity(); + Compute properties(); /** * Gets the location property: Specifies the location of the resource. @@ -66,18 +67,18 @@ public interface ComputeResource { Sku sku(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the identity property: The identity of the resource. * - * @return the systemData value. + * @return the identity value. */ - SystemData systemData(); + ManagedServiceIdentity identity(); /** - * Gets the properties property: Compute properties. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the properties value. + * @return the systemData value. */ - Compute properties(); + SystemData systemData(); /** * Gets the region of the resource. @@ -132,7 +133,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); @@ -143,7 +144,7 @@ interface WithParentResource { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, - DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithProperties { + DefinitionStages.WithProperties, DefinitionStages.WithSku, DefinitionStages.WithIdentity { /** * Executes the create request. * @@ -195,16 +196,16 @@ interface WithTags { } /** - * The stage of the ComputeResource definition allowing to specify identity. + * The stage of the ComputeResource definition allowing to specify properties. */ - interface WithIdentity { + interface WithProperties { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the properties property: The resource-specific properties for this resource.. * - * @param identity The identity of the resource. + * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withProperties(Compute properties); } /** @@ -221,16 +222,16 @@ interface WithSku { } /** - * The stage of the ComputeResource definition allowing to specify properties. + * The stage of the ComputeResource definition allowing to specify identity. */ - interface WithProperties { + interface WithIdentity { /** - * Specifies the properties property: Compute properties. + * Specifies the identity property: The identity of the resource.. * - * @param properties Compute properties. + * @param identity The identity of the resource. * @return the next definition stage. */ - WithCreate withProperties(Compute properties); + WithCreate withIdentity(ManagedServiceIdentity identity); } } @@ -294,6 +295,28 @@ interface WithProperties { */ ComputeResource refresh(Context context); + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param customServices New list of Custom Services. + * @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 updateCustomServicesWithResponse(List customServices, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param customServices New list of Custom Services. + * @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 updateCustomServices(List customServices); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * @@ -337,6 +360,28 @@ interface WithProperties { */ ComputeSecrets listKeys(); + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param dataMounts The parameters for creating or updating a machine learning workspace. + * @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 updateDataMountsWithResponse(List dataMounts, Context context); + + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param dataMounts The parameters for creating or updating a machine learning workspace. + * @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 updateDataMounts(List dataMounts); + /** * Posts a start action to a compute instance. * @@ -390,4 +435,67 @@ interface WithProperties { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void restart(Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @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 updateIdleShutdownSettingWithResponse(IdleShutdownSetting parameters, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @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 updateIdleShutdownSetting(IdleShutdownSetting parameters); + + /** + * Returns supported virtual machine sizes for resize. + * + * @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 Virtual Machine size operation response along with {@link Response}. + */ + Response getAllowedResizeSizesWithResponse(Context context); + + /** + * Returns supported virtual machine sizes for resize. + * + * @throws com.azure.core.management.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 Virtual Machine size operation response. + */ + VirtualMachineSizeListResult getAllowedResizeSizes(); + + /** + * Updates the size of a Compute Instance. + * + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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 resize(ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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 resize(ResizeSchema parameters, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java deleted file mode 100644 index 018f7e1e3388..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 ComputeResourceSchema model. - */ -@Fluent -public class ComputeResourceSchema implements JsonSerializable { - /* - * Compute properties - */ - private Compute properties; - - /** - * Creates an instance of ComputeResourceSchema class. - */ - public ComputeResourceSchema() { - } - - /** - * Get the properties property: Compute properties. - * - * @return the properties value. - */ - public Compute properties() { - return this.properties; - } - - /** - * Set the properties property: Compute properties. - * - * @param properties the properties value to set. - * @return the ComputeResourceSchema object itself. - */ - public ComputeResourceSchema withProperties(Compute properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ComputeResourceSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ComputeResourceSchema 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 ComputeResourceSchema. - */ - public static ComputeResourceSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ComputeResourceSchema deserializedComputeResourceSchema = new ComputeResourceSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedComputeResourceSchema.properties = Compute.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedComputeResourceSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java index ad32d64c5000..98b8ddd1d008 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Compute runtime config for feature store type workspace. + * The ComputeRuntimeDto model. */ @Fluent public final class ComputeRuntimeDto implements JsonSerializable { @@ -47,14 +47,6 @@ public ComputeRuntimeDto withSparkRuntimeVersion(String sparkRuntimeVersion) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java index d40a2846fa07..7b18a5ecb2cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -48,17 +48,6 @@ public ComputeSchedules withComputeStartStop(List comp return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeStartStop() != null) { - computeStartStop().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java index 9a9ecbac7777..0b61cb169d28 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java index 02bd326c80a4..1bbc6cc818aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -200,23 +200,6 @@ public ComputeStartStopSchedule withSchedule(ScheduleBase schedule) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (recurrence() != null) { - recurrence().validate(); - } - if (cron() != null) { - cron().validate(); - } - if (schedule() != null) { - schedule().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java index 3fde166513a0..f7be013bed2c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Is the trigger type recurrence or cron. + * Defines values for ComputeTriggerType. */ public final class ComputeTriggerType extends ExpandableStringEnum { /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java index c57b6fc0c187..835d5cd00b80 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java index 40c64d9e242c..37e9059dfc12 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,37 +12,37 @@ */ public final class ComputeWeekDay extends ExpandableStringEnum { /** - * Static value Monday for ComputeWeekDay. + * Monday weekday. */ public static final ComputeWeekDay MONDAY = fromString("Monday"); /** - * Static value Tuesday for ComputeWeekDay. + * Tuesday weekday. */ public static final ComputeWeekDay TUESDAY = fromString("Tuesday"); /** - * Static value Wednesday for ComputeWeekDay. + * Wednesday weekday. */ public static final ComputeWeekDay WEDNESDAY = fromString("Wednesday"); /** - * Static value Thursday for ComputeWeekDay. + * Thursday weekday. */ public static final ComputeWeekDay THURSDAY = fromString("Thursday"); /** - * Static value Friday for ComputeWeekDay. + * Friday weekday. */ public static final ComputeWeekDay FRIDAY = fromString("Friday"); /** - * Static value Saturday for ComputeWeekDay. + * Saturday weekday. */ public static final ComputeWeekDay SATURDAY = fromString("Saturday"); /** - * Static value Sunday for ComputeWeekDay. + * Sunday weekday. */ public static final ComputeWeekDay SUNDAY = fromString("Sunday"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java index 23ed47cce177..3858525f8e0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java @@ -1,49 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import java.util.List; /** * Resource collection API of Computes. */ public interface Computes { - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @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 computes in specified workspace as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); - /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -59,7 +34,7 @@ Response getWithResponse(String resourceGroupName, String works * 'keys' nested resource to get them. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -72,7 +47,7 @@ Response getWithResponse(String resourceGroupName, String works * Deletes specified Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from * workspace if 'Detach'. @@ -87,7 +62,7 @@ void delete(String resourceGroupName, String workspaceName, String computeName, * Deletes specified Machine Learning compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from * workspace if 'Detach'. @@ -99,11 +74,67 @@ void delete(String resourceGroupName, String workspaceName, String computeName, void delete(String resourceGroupName, String workspaceName, String computeName, UnderlyingResourceAction underlyingResourceAction, Context context); + /** + * Gets computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return computes in specified workspace as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * Gets computes in specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 computes in specified workspace as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @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 updateCustomServicesWithResponse(String resourceGroupName, String workspaceName, String computeName, + List customServices, Context context); + + /** + * Updates the custom services list. The list of custom services provided shall be overwritten. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param customServices New list of Custom Services. + * @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 updateCustomServices(String resourceGroupName, String workspaceName, String computeName, + List customServices); + /** * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -118,7 +149,7 @@ PagedIterable listNodes(String resourceGroupName, Str * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +165,7 @@ PagedIterable listNodes(String resourceGroupName, Str * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -150,7 +181,7 @@ Response listKeysWithResponse(String resourceGroupName, String w * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -159,11 +190,41 @@ Response listKeysWithResponse(String resourceGroupName, String w */ ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName); + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating a machine learning workspace. + * @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 updateDataMountsWithResponse(String resourceGroupName, String workspaceName, String computeName, + List dataMounts, Context context); + + /** + * Update Data Mounts of a Machine Learning compute. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param dataMounts The parameters for creating or updating a machine learning workspace. + * @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 updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts); + /** * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -175,7 +236,7 @@ Response listKeysWithResponse(String resourceGroupName, String w * Posts a start action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -188,7 +249,7 @@ Response listKeysWithResponse(String resourceGroupName, String w * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -200,7 +261,7 @@ Response listKeysWithResponse(String resourceGroupName, String w * Posts a stop action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -213,7 +274,7 @@ Response listKeysWithResponse(String resourceGroupName, String w * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -225,7 +286,7 @@ Response listKeysWithResponse(String resourceGroupName, String w * Posts a restart action to a compute instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param computeName Name of the Azure Machine Learning compute. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -234,6 +295,93 @@ Response listKeysWithResponse(String resourceGroupName, String w */ void restart(String resourceGroupName, String workspaceName, String computeName, Context context); + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @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 updateIdleShutdownSettingWithResponse(String resourceGroupName, String workspaceName, + String computeName, IdleShutdownSetting parameters, Context context); + + /** + * Updates the idle shutdown setting of a compute instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating idle shutdown setting of specified ComputeInstance. + * @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 updateIdleShutdownSetting(String resourceGroupName, String workspaceName, String computeName, + IdleShutdownSetting parameters); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @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 Virtual Machine size operation response along with {@link Response}. + */ + Response getAllowedResizeSizesWithResponse(String resourceGroupName, + String workspaceName, String computeName, Context context); + + /** + * Returns supported virtual machine sizes for resize. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @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 Virtual Machine size operation response. + */ + VirtualMachineSizeListResult getAllowedResizeSizes(String resourceGroupName, String workspaceName, + String computeName); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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 resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters); + + /** + * Updates the size of a Compute Instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param computeName Name of the Azure Machine Learning compute. + * @param parameters The object for updating VM size setting of specified Compute Instance. + * @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 resize(String resourceGroupName, String workspaceName, String computeName, ResizeSchema parameters, + Context context); + /** * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use * 'keys' nested resource to get them. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java index 8256a868a1bd..7c92804a6815 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -71,6 +71,41 @@ public final class ConnectionAuthType extends ExpandableStringEnum addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @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. + */ + List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body, Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist item associated with the Azure OpenAI connection. + */ + RaiBlocklistItemPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, String raiBlocklistItemName); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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 resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 specified custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + RaiBlocklistItemPropertiesBasicResource getById(String id); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 specified custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new RaiBlocklistItemPropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new RaiBlocklistItemPropertiesBasicResource definition. + */ + RaiBlocklistItemPropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java new file mode 100644 index 000000000000..4d5b7a1b9adb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiBlocklistItemsOperations. + */ +public interface ConnectionRaiBlocklistItemsOperations { + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName); + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java new file mode 100644 index 000000000000..f076cd951d75 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiBlocklists. + */ +public interface ConnectionRaiBlocklists { + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified custom blocklist associated with the Azure OpenAI connection. + */ + RaiBlocklistPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @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 resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Context context); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 specified custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + RaiBlocklistPropertiesBasicResource getById(String id); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 specified custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 specified custom blocklist associated with the Azure OpenAI connection. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new RaiBlocklistPropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new RaiBlocklistPropertiesBasicResource definition. + */ + RaiBlocklistPropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistsOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistsOperations.java new file mode 100644 index 000000000000..ad560d3957a3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistsOperations.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiBlocklistsOperations. + */ +public interface ConnectionRaiBlocklistsOperations { + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java new file mode 100644 index 000000000000..ac8dc063a1ec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * Resource collection API of ConnectionRaiPolicies. + */ +public interface ConnectionRaiPolicies { + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI connection. + */ + RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param body The body 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 azure OpenAI Content Filters resource. + */ + RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @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 resourceGroupName, String workspaceName, String connectionName, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPoliciesOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPoliciesOperations.java new file mode 100644 index 000000000000..8ca67aa0ff11 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPoliciesOperations.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiPoliciesOperations. + */ +public interface ConnectionRaiPoliciesOperations { + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java new file mode 100644 index 000000000000..fed7f61cf6ee --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; + +/** + * Resource collection API of Connections. + */ +public interface Connections { + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response}. + */ + Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Get all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + */ + EndpointModels getAllModels(String resourceGroupName, String workspaceName); + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Get available models under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, Context context); + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deployments under the Azure OpenAI connection by name along with {@link Response}. + */ + Response getDeploymentWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, Context context); + + /** + * Get deployments under the Azure OpenAI connection by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deployments under the Azure OpenAI connection by name. + */ + EndpointDeploymentResourcePropertiesBasicResource getDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName); + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + EndpointDeploymentResourcePropertiesBasicResource createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update Azure OpenAI connection deployment resource with the specified parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return endpointDeploymentResourcePropertiesBasicResource is preview-only. + */ + EndpointDeploymentResourcePropertiesBasicResource createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context); + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName); + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + Context context); + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName); + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java index e689a8e9fcf0..ca7dd478d76c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,14 +17,14 @@ @Fluent public final class ContainerResourceRequirements implements JsonSerializable { /* - * Container resource request info: + * Container resource limit info: */ - private ContainerResourceSettings containerResourceRequests; + private ContainerResourceSettings containerResourceLimits; /* - * Container resource limit info: + * Container resource request info: */ - private ContainerResourceSettings containerResourceLimits; + private ContainerResourceSettings containerResourceRequests; /** * Creates an instance of ContainerResourceRequirements class. @@ -32,27 +32,6 @@ public final class ContainerResourceRequirements implements JsonSerializable { + /* + * Specifies the current safety level for content safety. + */ + private ContentSafetyLevel contentSafetyLevel; + /* * [Required] Specifies the status of content safety. */ @@ -28,6 +32,26 @@ public final class ContentSafety implements JsonSerializable { public ContentSafety() { } + /** + * Get the contentSafetyLevel property: Specifies the current safety level for content safety. + * + * @return the contentSafetyLevel value. + */ + public ContentSafetyLevel contentSafetyLevel() { + return this.contentSafetyLevel; + } + + /** + * Set the contentSafetyLevel property: Specifies the current safety level for content safety. + * + * @param contentSafetyLevel the contentSafetyLevel value to set. + * @return the ContentSafety object itself. + */ + public ContentSafety withContentSafetyLevel(ContentSafetyLevel contentSafetyLevel) { + this.contentSafetyLevel = contentSafetyLevel; + return this; + } + /** * Get the contentSafetyStatus property: [Required] Specifies the status of content safety. * @@ -48,21 +72,6 @@ public ContentSafety withContentSafetyStatus(ContentSafetyStatus contentSafetySt return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contentSafetyStatus() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property contentSafetyStatus in model ContentSafety")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContentSafety.class); - /** * {@inheritDoc} */ @@ -71,6 +80,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("contentSafetyStatus", this.contentSafetyStatus == null ? null : this.contentSafetyStatus.toString()); + jsonWriter.writeStringField("contentSafetyLevel", + this.contentSafetyLevel == null ? null : this.contentSafetyLevel.toString()); return jsonWriter.writeEndObject(); } @@ -92,6 +103,8 @@ public static ContentSafety fromJson(JsonReader jsonReader) throws IOException { if ("contentSafetyStatus".equals(fieldName)) { deserializedContentSafety.contentSafetyStatus = ContentSafetyStatus.fromString(reader.getString()); + } else if ("contentSafetyLevel".equals(fieldName)) { + deserializedContentSafety.contentSafetyLevel = ContentSafetyLevel.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java new file mode 100644 index 000000000000..c8fa37f399a8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ContentSafetyEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class ContentSafetyEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "Azure.ContentSafety"; + + /* + * Model used for the endpoint deployment. + */ + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + private String raiPolicyName; + + /* + * The sku property. + */ + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of ContentSafetyEndpointDeploymentResourceProperties class. + */ + public ContentSafetyEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the model property: Model used for the endpoint deployment. + * + * @return the model value. + */ + public EndpointDeploymentModel model() { + return this.model; + } + + /** + * Set the model property: Model used for the endpoint deployment. + * + * @param model the model value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties withModel(EndpointDeploymentModel model) { + this.model = model; + return this; + } + + /** + * Get the raiPolicyName property: The name of RAI policy. + * + * @return the raiPolicyName value. + */ + public String raiPolicyName() { + return this.raiPolicyName; + } + + /** + * Set the raiPolicyName property: The name of RAI policy. + * + * @param raiPolicyName the raiPolicyName value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties withRaiPolicyName(String raiPolicyName) { + this.raiPolicyName = raiPolicyName; + return this; + } + + /** + * Get the sku property: The sku property. + * + * @return the sku value. + */ + public CognitiveServicesSku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku property. + * + * @param sku the sku value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties withSku(CognitiveServicesSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the versionUpgradeOption property: Deployment model version upgrade option. + * + * @return the versionUpgradeOption value. + */ + public DeploymentModelVersionUpgradeOption versionUpgradeOption() { + return this.versionUpgradeOption; + } + + /** + * Set the versionUpgradeOption property: Deployment model version upgrade option. + * + * @param versionUpgradeOption the versionUpgradeOption value to set. + * @return the ContentSafetyEndpointDeploymentResourceProperties object itself. + */ + public ContentSafetyEndpointDeploymentResourceProperties + withVersionUpgradeOption(DeploymentModelVersionUpgradeOption versionUpgradeOption) { + this.versionUpgradeOption = versionUpgradeOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("raiPolicyName", this.raiPolicyName); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("versionUpgradeOption", + this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContentSafetyEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContentSafetyEndpointDeploymentResourceProperties 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 ContentSafetyEndpointDeploymentResourceProperties. + */ + public static ContentSafetyEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContentSafetyEndpointDeploymentResourceProperties deserializedContentSafetyEndpointDeploymentResourceProperties + = new ContentSafetyEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("model".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.model + = EndpointDeploymentModel.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("raiPolicyName".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.raiPolicyName = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.sku + = CognitiveServicesSku.fromJson(reader); + } else if ("versionUpgradeOption".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.versionUpgradeOption + = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedContentSafetyEndpointDeploymentResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java new file mode 100644 index 000000000000..b8224a2d9503 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The ContentSafetyEndpointResourceProperties model. + */ +@Fluent +public final class ContentSafetyEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.AZURE_CONTENT_SAFETY; + + /** + * Creates an instance of ContentSafetyEndpointResourceProperties class. + */ + public ContentSafetyEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties + withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContentSafetyEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContentSafetyEndpointResourceProperties 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 ContentSafetyEndpointResourceProperties. + */ + public static ContentSafetyEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContentSafetyEndpointResourceProperties deserializedContentSafetyEndpointResourceProperties + = new ContentSafetyEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedContentSafetyEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedContentSafetyEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java new file mode 100644 index 000000000000..a7cd90d54fe6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the current safety level for content safety. + */ +public final class ContentSafetyLevel extends ExpandableStringEnum { + /** + * Static value Blocking for ContentSafetyLevel. + */ + public static final ContentSafetyLevel BLOCKING = fromString("Blocking"); + + /** + * Static value Deferred for ContentSafetyLevel. + */ + public static final ContentSafetyLevel DEFERRED = fromString("Deferred"); + + /** + * Creates a new instance of ContentSafetyLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContentSafetyLevel() { + } + + /** + * Creates or finds a ContentSafetyLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContentSafetyLevel. + */ + public static ContentSafetyLevel fromString(String name) { + return fromString(name, ContentSafetyLevel.class); + } + + /** + * Gets known ContentSafetyLevel values. + * + * @return known ContentSafetyLevel values. + */ + public static Collection values() { + return values(ContentSafetyLevel.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java index 22cba5cdda41..80d95c17e211 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java index 1578c354e5d9..b5fdc1be85dc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,7 +17,7 @@ @Fluent public final class CosmosDbSettings implements JsonSerializable { /* - * The throughput of the collections in cosmosdb database + * The collectionsThroughput property. */ private Integer collectionsThroughput; @@ -28,7 +28,7 @@ public CosmosDbSettings() { } /** - * Get the collectionsThroughput property: The throughput of the collections in cosmosdb database. + * Get the collectionsThroughput property: The collectionsThroughput property. * * @return the collectionsThroughput value. */ @@ -37,7 +37,7 @@ public Integer collectionsThroughput() { } /** - * Set the collectionsThroughput property: The throughput of the collections in cosmosdb database. + * Set the collectionsThroughput property: The collectionsThroughput property. * * @param collectionsThroughput the collectionsThroughput value to set. * @return the CosmosDbSettings object itself. @@ -47,14 +47,6 @@ public CosmosDbSettings withCollectionsThroughput(Integer collectionsThroughput) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java index c98290a484cc..b1b1d16d9f00 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,25 +61,6 @@ public CreateMonitorAction withMonitorDefinition(MonitorDefinition monitorDefini return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (monitorDefinition() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property monitorDefinition in model CreateMonitorAction")); - } else { - monitorDefinition().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CreateMonitorAction.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java index da5ce9a5ee0a..389950383e00 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java index bdfe885b6437..1bac56758323 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -106,14 +106,6 @@ public Cron withExpression(String expression) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java index bcf293efc974..5a0582490adb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -92,22 +91,6 @@ public CronTrigger withTimeZone(String timeZone) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (expression() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property expression in model CronTrigger")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CronTrigger.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java index b3d3c25650eb..32e7b4fa698b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,16 +61,6 @@ public CustomForecastHorizon withValue(int value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java index cde6f6ddac28..6966038a152a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -18,7 +18,7 @@ @Fluent public final class CustomKeys implements JsonSerializable { /* - * Dictionary of + * The keys property. */ private Map keys; @@ -29,7 +29,7 @@ public CustomKeys() { } /** - * Get the keys property: Dictionary of <string>. + * Get the keys property: The keys property. * * @return the keys value. */ @@ -38,7 +38,7 @@ public Map keys() { } /** - * Set the keys property: Dictionary of <string>. + * Set the keys property: The keys property. * * @param keys the keys value to set. * @return the CustomKeys object itself. @@ -48,14 +48,6 @@ public CustomKeys withKeys(Map keys) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java index 3b2acc870c51..77e0ab9f9bcd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -34,16 +34,6 @@ public final class CustomKeysWorkspaceConnectionProperties extends WorkspaceConn */ private CustomKeys credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of CustomKeysWorkspaceConnectionProperties class. */ @@ -81,31 +71,20 @@ public CustomKeysWorkspaceConnectionProperties withCredentials(CustomKeys creden } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public CustomKeysWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public CustomKeysWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -131,8 +110,8 @@ public CustomKeysWorkspaceConnectionProperties withIsSharedToAll(Boolean isShare * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public CustomKeysWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -140,8 +119,8 @@ public CustomKeysWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public CustomKeysWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -149,8 +128,8 @@ public CustomKeysWorkspaceConnectionProperties withMetadata(Map * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); + public CustomKeysWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -158,8 +137,8 @@ public CustomKeysWorkspaceConnectionProperties withSharedUserList(List s * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public CustomKeysWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -167,22 +146,19 @@ public CustomKeysWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public CustomKeysWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public CustomKeysWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -192,15 +168,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -226,29 +204,35 @@ public static CustomKeysWorkspaceConnectionProperties fromJson(JsonReader jsonRe deserializedCustomKeysWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedCustomKeysWorkspaceConnectionProperties.withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedCustomKeysWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedCustomKeysWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedCustomKeysWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java index ab4f07ea6505..b7514242deb1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,14 +17,14 @@ @Fluent public final class CustomMetricThreshold implements JsonSerializable { /* - * The threshold value. If null, a default value will be set depending on the selected metric. + * [Required] The user-defined metric to calculate. */ - private MonitoringThreshold threshold; + private String metric; /* - * [Required] The user-defined metric to calculate. + * The threshold value. If null, a default value will be set depending on the selected metric. */ - private String metric; + private MonitoringThreshold threshold; /** * Creates an instance of CustomMetricThreshold class. @@ -33,28 +32,6 @@ public final class CustomMetricThreshold implements JsonSerializable hyperParameters; + + /** + * Creates an instance of CustomModelFineTuning class. + */ + public CustomModelFineTuning() { + } + + /** + * Get the modelProvider property: [Required] Enum to determine the type of fine tuning. + * + * @return the modelProvider value. + */ + @Override + public ModelProvider modelProvider() { + return this.modelProvider; + } + + /** + * Get the hyperParameters property: HyperParameters for fine tuning custom model. + * + * @return the hyperParameters value. + */ + public Map hyperParameters() { + return this.hyperParameters; + } + + /** + * Set the hyperParameters property: HyperParameters for fine tuning custom model. + * + * @param hyperParameters the hyperParameters value to set. + * @return the CustomModelFineTuning object itself. + */ + public CustomModelFineTuning withHyperParameters(Map hyperParameters) { + this.hyperParameters = hyperParameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withModel(JobInput model) { + super.withModel(model); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withTaskType(FineTuningTaskType taskType) { + super.withTaskType(taskType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withTrainingData(JobInput trainingData) { + super.withTrainingData(trainingData); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CustomModelFineTuning withValidationData(JobInput validationData) { + super.withValidationData(validationData); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("model", model()); + jsonWriter.writeStringField("taskType", taskType() == null ? null : taskType().toString()); + jsonWriter.writeJsonField("trainingData", trainingData()); + jsonWriter.writeJsonField("validationData", validationData()); + jsonWriter.writeStringField("modelProvider", this.modelProvider == null ? null : this.modelProvider.toString()); + jsonWriter.writeMapField("hyperParameters", this.hyperParameters, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomModelFineTuning from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomModelFineTuning 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 CustomModelFineTuning. + */ + public static CustomModelFineTuning fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomModelFineTuning deserializedCustomModelFineTuning = new CustomModelFineTuning(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedCustomModelFineTuning.withModel(JobInput.fromJson(reader)); + } else if ("taskType".equals(fieldName)) { + deserializedCustomModelFineTuning.withTaskType(FineTuningTaskType.fromString(reader.getString())); + } else if ("trainingData".equals(fieldName)) { + deserializedCustomModelFineTuning.withTrainingData(JobInput.fromJson(reader)); + } else if ("validationData".equals(fieldName)) { + deserializedCustomModelFineTuning.withValidationData(JobInput.fromJson(reader)); + } else if ("modelProvider".equals(fieldName)) { + deserializedCustomModelFineTuning.modelProvider = ModelProvider.fromString(reader.getString()); + } else if ("hyperParameters".equals(fieldName)) { + Map hyperParameters = reader.readMap(reader1 -> reader1.getString()); + deserializedCustomModelFineTuning.hyperParameters = hyperParameters; + } else { + reader.skipChildren(); + } + } + + return deserializedCustomModelFineTuning; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java index 3d895c8d9fd5..cebfc15ae545 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,14 +21,14 @@ public final class CustomModelJobInput extends JobInput { private JobInputType jobInputType = JobInputType.CUSTOM_MODEL; /* - * [Required] Input Asset URI. + * Enum to determine the input data delivery mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of CustomModelJobInput class. @@ -48,42 +47,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Enum to determine the input data delivery mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Enum to determine the input data delivery mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the CustomModelJobInput object itself. */ - public CustomModelJobInput withUri(String uri) { - this.uri = uri; + public CustomModelJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the CustomModelJobInput object itself. */ - public CustomModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public CustomModelJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -96,22 +95,6 @@ public CustomModelJobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model CustomModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomModelJobInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java index a7820eb16a67..267662c32e03 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,15 +21,20 @@ public final class CustomModelJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.CUSTOM_MODEL; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* - * Output Asset Delivery Mode. + * Output data delivery mode enums. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of CustomModelJobOutput class. */ @@ -47,27 +52,27 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the CustomModelJobOutput object itself. */ - public CustomModelJobOutput withUri(String uri) { - this.uri = uri; + public CustomModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } /** - * Get the mode property: Output Asset Delivery Mode. + * Get the mode property: Output data delivery mode enums. * * @return the mode value. */ @@ -76,7 +81,7 @@ public OutputDeliveryMode mode() { } /** - * Set the mode property: Output Asset Delivery Mode. + * Set the mode property: Output data delivery mode enums. * * @param mode the mode value to set. * @return the CustomModelJobOutput object itself. @@ -87,22 +92,32 @@ public CustomModelJobOutput withMode(OutputDeliveryMode mode) { } /** - * {@inheritDoc} + * Get the uri property: Output Asset URI. + * + * @return the uri value. */ - @Override - public CustomModelJobOutput withDescription(String description) { - super.withDescription(description); - return this; + public String uri() { + return this.uri; } /** - * Validates the instance. + * Set the uri property: Output Asset URI. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param uri the uri value to set. + * @return the CustomModelJobOutput object itself. + */ + public CustomModelJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public CustomModelJobOutput withDescription(String description) { + super.withDescription(description); + return this; } /** @@ -113,8 +128,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +153,12 @@ public static CustomModelJobOutput fromJson(JsonReader jsonReader) throws IOExce deserializedCustomModelJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedCustomModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedCustomModelJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedCustomModelJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedCustomModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedCustomModelJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java index 64a217b9f8d0..e7f1761c10db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,6 +22,11 @@ public final class CustomMonitoringSignal extends MonitoringSignalBase { */ private MonitoringSignalType signalType = MonitoringSignalType.CUSTOM; + /* + * [Required] Reference to the component asset used to calculate the custom metrics. + */ + private String componentId; + /* * Monitoring assets to take as input. Key is the component input port name, value is the data asset. */ @@ -34,11 +38,6 @@ public final class CustomMonitoringSignal extends MonitoringSignalBase { */ private Map inputs; - /* - * [Required] Reference to the component asset used to calculate the custom metrics. - */ - private String componentId; - /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -60,6 +59,26 @@ public MonitoringSignalType signalType() { return this.signalType; } + /** + * Get the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. + * + * @param componentId the componentId value to set. + * @return the CustomMonitoringSignal object itself. + */ + public CustomMonitoringSignal withComponentId(String componentId) { + this.componentId = componentId; + return this; + } + /** * Get the inputAssets property: Monitoring assets to take as input. Key is the component input port name, value is * the data asset. @@ -104,26 +123,6 @@ public CustomMonitoringSignal withInputs(Map inputs) { return this; } - /** - * Get the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Set the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. - * - * @param componentId the componentId value to set. - * @return the CustomMonitoringSignal object itself. - */ - public CustomMonitoringSignal withComponentId(String componentId) { - this.componentId = componentId; - return this; - } - /** * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. * @@ -162,44 +161,6 @@ public CustomMonitoringSignal withProperties(Map properties) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (inputAssets() != null) { - inputAssets().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (componentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property componentId in model CustomMonitoringSignal")); - } - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model CustomMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomMonitoringSignal.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java index 000e6185d5e5..b9ff4ad713b0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,16 +61,6 @@ public CustomNCrossValidations withValue(int value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java index 30010953c90b..ec31387793dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,16 +61,6 @@ public CustomSeasonality withValue(int value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java index 60bc67ca2f9b..7cf8a650a001 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -49,6 +49,11 @@ public final class CustomService implements JsonSerializable { */ private List volumes; + /* + * Describes the jupyter kernel settings for the image if its a custom environment + */ + private JupyterKernelConfig kernel; + /* * Specifies the custom service configuration */ @@ -180,6 +185,26 @@ public CustomService withVolumes(List volumes) { return this; } + /** + * Get the kernel property: Describes the jupyter kernel settings for the image if its a custom environment. + * + * @return the kernel value. + */ + public JupyterKernelConfig kernel() { + return this.kernel; + } + + /** + * Set the kernel property: Describes the jupyter kernel settings for the image if its a custom environment. + * + * @param kernel the kernel value to set. + * @return the CustomService object itself. + */ + public CustomService withKernel(JupyterKernelConfig kernel) { + this.kernel = kernel; + return this; + } + /** * Get the additionalProperties property: Specifies the custom service configuration. * @@ -200,33 +225,6 @@ public CustomService withAdditionalProperties(Map additionalProp return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (image() != null) { - image().validate(); - } - if (environmentVariables() != null) { - environmentVariables().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (docker() != null) { - docker().validate(); - } - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - if (volumes() != null) { - volumes().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -240,6 +238,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("docker", this.docker); jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("kernel", this.kernel); if (additionalProperties != null) { for (Map.Entry additionalProperty : additionalProperties.entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -280,6 +279,8 @@ public static CustomService fromJson(JsonReader jsonReader) throws IOException { } else if ("volumes".equals(fieldName)) { List volumes = reader.readArray(reader1 -> VolumeDefinition.fromJson(reader1)); deserializedCustomService.volumes = volumes; + } else if ("kernel".equals(fieldName)) { + deserializedCustomService.kernel = JupyterKernelConfig.fromJson(reader); } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java index 7234e7df1197..d67657c96df6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -63,22 +62,6 @@ public CustomTargetLags withValues(List values) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (values() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property values in model CustomTargetLags")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomTargetLags.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java index 4ed9f0833981..d544a61e6b99 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,16 +61,6 @@ public CustomTargetRollingWindowSize withValue(int value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java index 721b6ecae781..eb122766d52a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java index 303b59a49c1f..0c1b309edc5d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java index 160e0fd1c261..847218c7d22e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,6 +18,7 @@ @Fluent public final class DataCollector implements JsonSerializable { /* + * * [Required] The collection configuration. Each collection has it own configuration to collect model data and the * name of collection can be arbitrary string. * Model data collector can be used for either payload logging or custom logging or both of them. Collection request @@ -27,6 +27,13 @@ public final class DataCollector implements JsonSerializable { private Map collections; /* + * The request logging configuration for mdc, it includes advanced logging settings for all collections. It's + * optional. + */ + private RequestLogging requestLogging; + + /* + * * When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of * them in a single blob file. * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. @@ -36,12 +43,6 @@ public final class DataCollector implements JsonSerializable { */ private RollingRateType rollingRate; - /* - * The request logging configuration for mdc, it includes advanced logging settings for all collections. It's - * optional. - */ - private RequestLogging requestLogging; - /** * Creates an instance of DataCollector class. */ @@ -49,8 +50,9 @@ public DataCollector() { } /** - * Get the collections property: [Required] The collection configuration. Each collection has it own configuration - * to collect model data and the name of collection can be arbitrary string. + * Get the collections property: + * [Required] The collection configuration. Each collection has it own configuration to collect model data and the + * name of collection can be arbitrary string. * Model data collector can be used for either payload logging or custom logging or both of them. Collection request * and response are reserved for payload logging, others are for custom logging. * @@ -61,8 +63,9 @@ public Map collections() { } /** - * Set the collections property: [Required] The collection configuration. Each collection has it own configuration - * to collect model data and the name of collection can be arbitrary string. + * Set the collections property: + * [Required] The collection configuration. Each collection has it own configuration to collect model data and the + * name of collection can be arbitrary string. * Model data collector can be used for either payload logging or custom logging or both of them. Collection request * and response are reserved for payload logging, others are for custom logging. * @@ -74,36 +77,6 @@ public DataCollector withCollections(Map collections) { return this; } - /** - * Get the rollingRate property: When model data is collected to blob storage, we need to roll the data to different - * path to avoid logging all of them in a single blob file. - * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. - * If it's day, all data will be collected in blob path /yyyy/MM/dd/. - * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very - * quickly. - * - * @return the rollingRate value. - */ - public RollingRateType rollingRate() { - return this.rollingRate; - } - - /** - * Set the rollingRate property: When model data is collected to blob storage, we need to roll the data to different - * path to avoid logging all of them in a single blob file. - * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. - * If it's day, all data will be collected in blob path /yyyy/MM/dd/. - * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very - * quickly. - * - * @param rollingRate the rollingRate value to set. - * @return the DataCollector object itself. - */ - public DataCollector withRollingRate(RollingRateType rollingRate) { - this.rollingRate = rollingRate; - return this; - } - /** * Get the requestLogging property: The request logging configuration for mdc, it includes advanced logging settings * for all collections. It's optional. @@ -127,27 +100,36 @@ public DataCollector withRequestLogging(RequestLogging requestLogging) { } /** - * Validates the instance. + * Get the rollingRate property: + * When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of + * them in a single blob file. + * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + * If it's day, all data will be collected in blob path /yyyy/MM/dd/. + * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very + * quickly. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the rollingRate value. */ - public void validate() { - if (collections() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property collections in model DataCollector")); - } else { - collections().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (requestLogging() != null) { - requestLogging().validate(); - } + public RollingRateType rollingRate() { + return this.rollingRate; } - private static final ClientLogger LOGGER = new ClientLogger(DataCollector.class); + /** + * Set the rollingRate property: + * When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of + * them in a single blob file. + * If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. + * If it's day, all data will be collected in blob path /yyyy/MM/dd/. + * The other benefit of rolling path is that model monitoring ui is able to select a time range of data very + * quickly. + * + * @param rollingRate the rollingRate value to set. + * @return the DataCollector object itself. + */ + public DataCollector withRollingRate(RollingRateType rollingRate) { + this.rollingRate = rollingRate; + return this; + } /** * {@inheritDoc} @@ -156,8 +138,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("collections", this.collections, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("rollingRate", this.rollingRate == null ? null : this.rollingRate.toString()); jsonWriter.writeJsonField("requestLogging", this.requestLogging); + jsonWriter.writeStringField("rollingRate", this.rollingRate == null ? null : this.rollingRate.toString()); return jsonWriter.writeEndObject(); } @@ -180,10 +162,10 @@ public static DataCollector fromJson(JsonReader jsonReader) throws IOException { if ("collections".equals(fieldName)) { Map collections = reader.readMap(reader1 -> Collection.fromJson(reader1)); deserializedDataCollector.collections = collections; - } else if ("rollingRate".equals(fieldName)) { - deserializedDataCollector.rollingRate = RollingRateType.fromString(reader.getString()); } else if ("requestLogging".equals(fieldName)) { deserializedDataCollector.requestLogging = RequestLogging.fromJson(reader); + } else if ("rollingRate".equals(fieldName)) { + deserializedDataCollector.rollingRate = RollingRateType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java index 5a1eb419ecca..8e685e2e5015 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java index db1bf0750a7d..a8feca153ccf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,14 +22,14 @@ public final class DataContainerProperties extends AssetContainer { private DataType dataType; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of DataContainerProperties class. @@ -59,23 +58,23 @@ public DataContainerProperties withDataType(DataType dataType) { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -96,15 +95,6 @@ public DataContainerProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public DataContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -115,22 +105,14 @@ public DataContainerProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (dataType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataType in model DataContainerProperties")); - } + public DataContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(DataContainerProperties.class); - /** * {@inheritDoc} */ @@ -138,8 +120,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); @@ -163,12 +145,12 @@ public static DataContainerProperties fromJson(JsonReader jsonReader) throws IOE if ("description".equals(fieldName)) { deserializedDataContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDataContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedDataContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDataContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedDataContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java index abbe6939107c..05280e89a804 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,32 +13,32 @@ */ public interface DataContainers { /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); + DataContainer get(String resourceGroupName, String workspaceName, String name); /** * Delete container. @@ -67,32 +67,32 @@ PagedIterable list(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container 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 container along with {@link Response}. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 container. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - DataContainer get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context); /** * Get container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java index e3026cd89ddf..2ad4cde50a95 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -63,17 +63,6 @@ public DataDriftMetricThresholdBase withThreshold(MonitoringThreshold threshold) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java index 34ba11d52a67..80fcf5938120 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -24,15 +23,20 @@ public final class DataDriftMonitoringSignal extends MonitoringSignalBase { private MonitoringSignalType signalType = MonitoringSignalType.DATA_DRIFT; /* - * The feature filter which identifies which feature to calculate drift over. + * A dictionary that maps feature names to their respective data types. */ - private MonitoringFeatureFilterBase features; + private Map featureDataTypeOverride; /* * The settings for computing feature importance. */ private FeatureImportanceSettings featureImportanceSettings; + /* + * The feature filter which identifies which feature to calculate drift over. + */ + private MonitoringFeatureFilterBase features; + /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -48,11 +52,6 @@ public final class DataDriftMonitoringSignal extends MonitoringSignalBase { */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of DataDriftMonitoringSignal class. */ @@ -70,22 +69,23 @@ public MonitoringSignalType signalType() { } /** - * Get the features property: The feature filter which identifies which feature to calculate drift over. + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @return the features value. + * @return the featureDataTypeOverride value. */ - public MonitoringFeatureFilterBase features() { - return this.features; + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; } /** - * Set the features property: The feature filter which identifies which feature to calculate drift over. + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @param features the features value to set. + * @param featureDataTypeOverride the featureDataTypeOverride value to set. * @return the DataDriftMonitoringSignal object itself. */ - public DataDriftMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { - this.features = features; + public DataDriftMonitoringSignal + withFeatureDataTypeOverride(Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; return this; } @@ -110,6 +110,26 @@ public FeatureImportanceSettings featureImportanceSettings() { return this; } + /** + * Get the features property: The feature filter which identifies which feature to calculate drift over. + * + * @return the features value. + */ + public MonitoringFeatureFilterBase features() { + return this.features; + } + + /** + * Set the features property: The feature filter which identifies which feature to calculate drift over. + * + * @param features the features value to set. + * @return the DataDriftMonitoringSignal object itself. + */ + public DataDriftMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { + this.features = features; + return this; + } + /** * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. * @@ -170,27 +190,6 @@ public DataDriftMonitoringSignal withReferenceData(MonitoringInputDataBase refer return this; } - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the DataDriftMonitoringSignal object itself. - */ - public DataDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - /** * {@inheritDoc} */ @@ -209,45 +208,6 @@ public DataDriftMonitoringSignal withProperties(Map properties) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (features() != null) { - features().validate(); - } - if (featureImportanceSettings() != null) { - featureImportanceSettings().validate(); - } - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model DataDriftMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - if (productionData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property productionData in model DataDriftMonitoringSignal")); - } else { - productionData().validate(); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model DataDriftMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataDriftMonitoringSignal.class); - /** * {@inheritDoc} */ @@ -262,10 +222,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("productionData", this.productionData); jsonWriter.writeJsonField("referenceData", this.referenceData); jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeJsonField("features", this.features); - jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); + jsonWriter.writeJsonField("features", this.features); return jsonWriter.writeEndObject(); } @@ -303,15 +263,15 @@ public static DataDriftMonitoringSignal fromJson(JsonReader jsonReader) throws I } else if ("signalType".equals(fieldName)) { deserializedDataDriftMonitoringSignal.signalType = MonitoringSignalType.fromString(reader.getString()); - } else if ("features".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); - } else if ("featureImportanceSettings".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.featureImportanceSettings - = FeatureImportanceSettings.fromJson(reader); } else if ("featureDataTypeOverride".equals(fieldName)) { Map featureDataTypeOverride = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); deserializedDataDriftMonitoringSignal.featureDataTypeOverride = featureDataTypeOverride; + } else if ("featureImportanceSettings".equals(fieldName)) { + deserializedDataDriftMonitoringSignal.featureImportanceSettings + = FeatureImportanceSettings.fromJson(reader); + } else if ("features".equals(fieldName)) { + deserializedDataDriftMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java index 1de839ee3698..5db464054048 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -24,32 +23,6 @@ public final class DataFactory extends Compute { */ private ComputeType computeType = ComputeType.DATA_FACTORY; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of DataFactory class. */ @@ -66,58 +39,6 @@ public ComputeType computeType() { return this.computeType; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -154,16 +75,6 @@ public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -196,23 +107,23 @@ public static DataFactory fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedDataFactory.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedDataFactory.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedDataFactory.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedDataFactory.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedDataFactory.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataFactory.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedDataFactory.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataFactory.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedDataFactory.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDataFactory.provisioningErrors = provisioningErrors; + deserializedDataFactory.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDataFactory.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedDataFactory.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedDataFactory.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationTaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationTaskType.java new file mode 100644 index 000000000000..2282d133f859 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationTaskType.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum to determine the type of Data Generation Task. + */ +public final class DataGenerationTaskType extends ExpandableStringEnum { + /** + * Generate conversational data (multi/single turn). + */ + public static final DataGenerationTaskType CONVERSATION = fromString("Conversation"); + + /** + * Generate Math data for numerical responses. + */ + public static final DataGenerationTaskType MATH = fromString("Math"); + + /** + * Generate Natural Language Inference data. + */ + public static final DataGenerationTaskType NLI = fromString("Nli"); + + /** + * Generate Natural Language Understanding data for Question Answering data. + */ + public static final DataGenerationTaskType NLU_QA = fromString("NluQa"); + + /** + * Generate Key Summary for an Article. + */ + public static final DataGenerationTaskType SUMMARIZATION = fromString("Summarization"); + + /** + * Creates a new instance of DataGenerationTaskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataGenerationTaskType() { + } + + /** + * Creates or finds a DataGenerationTaskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataGenerationTaskType. + */ + public static DataGenerationTaskType fromString(String name) { + return fromString(name, DataGenerationTaskType.class); + } + + /** + * Gets known DataGenerationTaskType values. + * + * @return known DataGenerationTaskType values. + */ + public static Collection values() { + return values(DataGenerationTaskType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationType.java new file mode 100644 index 000000000000..0bcb9c6a1f54 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum to determine the type of Data Generation. + */ +public final class DataGenerationType extends ExpandableStringEnum { + /** + * Label Generation by Teacher Model Inferencing. + */ + public static final DataGenerationType LABEL_GENERATION = fromString("LabelGeneration"); + + /** + * Synthetic Data Generation. + */ + public static final DataGenerationType DATA_GENERATION = fromString("DataGeneration"); + + /** + * Creates a new instance of DataGenerationType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataGenerationType() { + } + + /** + * Creates or finds a DataGenerationType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataGenerationType. + */ + public static DataGenerationType fromString(String name) { + return fromString(name, DataGenerationType.class); + } + + /** + * Gets known DataGenerationType values. + * + * @return known DataGenerationType values. + */ + public static Collection values() { + return values(DataGenerationType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationVertical.java new file mode 100644 index 000000000000..84ab6dee67c2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationVertical.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 DataGenerationVertical model. + */ +@Fluent +public class DataGenerationVertical implements JsonSerializable { + /* + * [Required] Enum to determine the type of Data Generation. + */ + private DataGenerationType dataGenerationType = DataGenerationType.fromString("DataGenerationVertical"); + + /* + * [Required] DataGeneration Task type. + */ + private DataGenerationTaskType dataGenerationTaskType; + + /* + * Prompt Settings. + */ + private PromptSettings promptSettings; + + /* + * [Required] Teacher Model Endpoint Details. + */ + private TeacherModelEndpoint teacherModelEndpoint; + + /* + * The teacherModelSettings property. + */ + private TeacherModelSettings teacherModelSettings; + + /** + * Creates an instance of DataGenerationVertical class. + */ + public DataGenerationVertical() { + } + + /** + * Get the dataGenerationType property: [Required] Enum to determine the type of Data Generation. + * + * @return the dataGenerationType value. + */ + public DataGenerationType dataGenerationType() { + return this.dataGenerationType; + } + + /** + * Get the dataGenerationTaskType property: [Required] DataGeneration Task type. + * + * @return the dataGenerationTaskType value. + */ + public DataGenerationTaskType dataGenerationTaskType() { + return this.dataGenerationTaskType; + } + + /** + * Set the dataGenerationTaskType property: [Required] DataGeneration Task type. + * + * @param dataGenerationTaskType the dataGenerationTaskType value to set. + * @return the DataGenerationVertical object itself. + */ + public DataGenerationVertical withDataGenerationTaskType(DataGenerationTaskType dataGenerationTaskType) { + this.dataGenerationTaskType = dataGenerationTaskType; + return this; + } + + /** + * Get the promptSettings property: Prompt Settings. + * + * @return the promptSettings value. + */ + public PromptSettings promptSettings() { + return this.promptSettings; + } + + /** + * Set the promptSettings property: Prompt Settings. + * + * @param promptSettings the promptSettings value to set. + * @return the DataGenerationVertical object itself. + */ + public DataGenerationVertical withPromptSettings(PromptSettings promptSettings) { + this.promptSettings = promptSettings; + return this; + } + + /** + * Get the teacherModelEndpoint property: [Required] Teacher Model Endpoint Details. + * + * @return the teacherModelEndpoint value. + */ + public TeacherModelEndpoint teacherModelEndpoint() { + return this.teacherModelEndpoint; + } + + /** + * Set the teacherModelEndpoint property: [Required] Teacher Model Endpoint Details. + * + * @param teacherModelEndpoint the teacherModelEndpoint value to set. + * @return the DataGenerationVertical object itself. + */ + public DataGenerationVertical withTeacherModelEndpoint(TeacherModelEndpoint teacherModelEndpoint) { + this.teacherModelEndpoint = teacherModelEndpoint; + return this; + } + + /** + * Get the teacherModelSettings property: The teacherModelSettings property. + * + * @return the teacherModelSettings value. + */ + public TeacherModelSettings teacherModelSettings() { + return this.teacherModelSettings; + } + + /** + * Set the teacherModelSettings property: The teacherModelSettings property. + * + * @param teacherModelSettings the teacherModelSettings value to set. + * @return the DataGenerationVertical object itself. + */ + public DataGenerationVertical withTeacherModelSettings(TeacherModelSettings teacherModelSettings) { + this.teacherModelSettings = teacherModelSettings; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dataGenerationTaskType", + this.dataGenerationTaskType == null ? null : this.dataGenerationTaskType.toString()); + jsonWriter.writeJsonField("teacherModelEndpoint", this.teacherModelEndpoint); + jsonWriter.writeStringField("dataGenerationType", + this.dataGenerationType == null ? null : this.dataGenerationType.toString()); + jsonWriter.writeJsonField("promptSettings", this.promptSettings); + jsonWriter.writeJsonField("teacherModelSettings", this.teacherModelSettings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DataGenerationVertical from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DataGenerationVertical 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 DataGenerationVertical. + */ + public static DataGenerationVertical fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("dataGenerationType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("LabelGeneration".equals(discriminatorValue)) { + return LabelGeneration.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static DataGenerationVertical fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DataGenerationVertical deserializedDataGenerationVertical = new DataGenerationVertical(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dataGenerationTaskType".equals(fieldName)) { + deserializedDataGenerationVertical.dataGenerationTaskType + = DataGenerationTaskType.fromString(reader.getString()); + } else if ("teacherModelEndpoint".equals(fieldName)) { + deserializedDataGenerationVertical.teacherModelEndpoint = TeacherModelEndpoint.fromJson(reader); + } else if ("dataGenerationType".equals(fieldName)) { + deserializedDataGenerationVertical.dataGenerationType + = DataGenerationType.fromString(reader.getString()); + } else if ("promptSettings".equals(fieldName)) { + deserializedDataGenerationVertical.promptSettings = PromptSettings.fromJson(reader); + } else if ("teacherModelSettings".equals(fieldName)) { + deserializedDataGenerationVertical.teacherModelSettings = TeacherModelSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDataGenerationVertical; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java index 0fc59f89cb7b..ef4e8d203065 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class DataLakeAnalytics extends Compute { */ private DataLakeAnalyticsSchemaProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of DataLakeAnalytics class. */ @@ -91,58 +64,6 @@ public DataLakeAnalytics withProperties(DataLakeAnalyticsSchemaProperties proper return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,24 @@ public static DataLakeAnalytics fromJson(JsonReader jsonReader) throws IOExcepti if ("computeLocation".equals(fieldName)) { deserializedDataLakeAnalytics.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedDataLakeAnalytics.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedDataLakeAnalytics + .withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedDataLakeAnalytics.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedDataLakeAnalytics.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataLakeAnalytics.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedDataLakeAnalytics.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataLakeAnalytics.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedDataLakeAnalytics.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDataLakeAnalytics.provisioningErrors = provisioningErrors; + deserializedDataLakeAnalytics.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDataLakeAnalytics.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedDataLakeAnalytics.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedDataLakeAnalytics.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java deleted file mode 100644 index fa249102d79e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 DataLakeAnalyticsSchema model. - */ -@Fluent -public class DataLakeAnalyticsSchema implements JsonSerializable { - /* - * The properties property. - */ - private DataLakeAnalyticsSchemaProperties properties; - - /** - * Creates an instance of DataLakeAnalyticsSchema class. - */ - public DataLakeAnalyticsSchema() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public DataLakeAnalyticsSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the DataLakeAnalyticsSchema object itself. - */ - public DataLakeAnalyticsSchema withProperties(DataLakeAnalyticsSchemaProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataLakeAnalyticsSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataLakeAnalyticsSchema 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 DataLakeAnalyticsSchema. - */ - public static DataLakeAnalyticsSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataLakeAnalyticsSchema deserializedDataLakeAnalyticsSchema = new DataLakeAnalyticsSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDataLakeAnalyticsSchema.properties = DataLakeAnalyticsSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDataLakeAnalyticsSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java index 1a8b16c22485..b102f3035344 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public DataLakeAnalyticsSchemaProperties withDataLakeStoreAccountName(String dat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java index a9084e06af97..cd6707dc2e05 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,14 +21,14 @@ public final class DataPathAssetReference extends AssetReferenceBase { private ReferenceType referenceType = ReferenceType.DATA_PATH; /* - * The path of the file/directory in the datastore. + * ARM resource ID of the datastore where the asset is located. */ - private String path; + private String datastoreId; /* - * ARM resource ID of the datastore where the asset is located. + * The path of the file/directory in the datastore. */ - private String datastoreId; + private String path; /** * Creates an instance of DataPathAssetReference class. @@ -46,26 +46,6 @@ public ReferenceType referenceType() { return this.referenceType; } - /** - * Get the path property: The path of the file/directory in the datastore. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path of the file/directory in the datastore. - * - * @param path the path value to set. - * @return the DataPathAssetReference object itself. - */ - public DataPathAssetReference withPath(String path) { - this.path = path; - return this; - } - /** * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. * @@ -87,13 +67,23 @@ public DataPathAssetReference withDatastoreId(String datastoreId) { } /** - * Validates the instance. + * Get the path property: The path of the file/directory in the datastore. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the path value. */ - @Override - public void validate() { - super.validate(); + public String path() { + return this.path; + } + + /** + * Set the path property: The path of the file/directory in the datastore. + * + * @param path the path value to set. + * @return the DataPathAssetReference object itself. + */ + public DataPathAssetReference withPath(String path) { + this.path = path; + return this; } /** @@ -103,8 +93,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - jsonWriter.writeStringField("path", this.path); jsonWriter.writeStringField("datastoreId", this.datastoreId); + jsonWriter.writeStringField("path", this.path); return jsonWriter.writeEndObject(); } @@ -125,10 +115,10 @@ public static DataPathAssetReference fromJson(JsonReader jsonReader) throws IOEx if ("referenceType".equals(fieldName)) { deserializedDataPathAssetReference.referenceType = ReferenceType.fromString(reader.getString()); - } else if ("path".equals(fieldName)) { - deserializedDataPathAssetReference.path = reader.getString(); } else if ("datastoreId".equals(fieldName)) { deserializedDataPathAssetReference.datastoreId = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedDataPathAssetReference.path = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java index 8ec4a6973981..c272e641e4cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -63,17 +63,6 @@ public DataQualityMetricThresholdBase withThreshold(MonitoringThreshold threshol return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java index b80a6afbd0fc..cd72c7468513 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -24,15 +23,20 @@ public final class DataQualityMonitoringSignal extends MonitoringSignalBase { private MonitoringSignalType signalType = MonitoringSignalType.DATA_QUALITY; /* - * The features to calculate drift over. + * A dictionary that maps feature names to their respective data types. */ - private MonitoringFeatureFilterBase features; + private Map featureDataTypeOverride; /* * The settings for computing feature importance. */ private FeatureImportanceSettings featureImportanceSettings; + /* + * The features to calculate drift over. + */ + private MonitoringFeatureFilterBase features; + /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -48,11 +52,6 @@ public final class DataQualityMonitoringSignal extends MonitoringSignalBase { */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of DataQualityMonitoringSignal class. */ @@ -70,22 +69,23 @@ public MonitoringSignalType signalType() { } /** - * Get the features property: The features to calculate drift over. + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @return the features value. + * @return the featureDataTypeOverride value. */ - public MonitoringFeatureFilterBase features() { - return this.features; + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; } /** - * Set the features property: The features to calculate drift over. + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @param features the features value to set. + * @param featureDataTypeOverride the featureDataTypeOverride value to set. * @return the DataQualityMonitoringSignal object itself. */ - public DataQualityMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { - this.features = features; + public DataQualityMonitoringSignal + withFeatureDataTypeOverride(Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; return this; } @@ -110,6 +110,26 @@ public FeatureImportanceSettings featureImportanceSettings() { return this; } + /** + * Get the features property: The features to calculate drift over. + * + * @return the features value. + */ + public MonitoringFeatureFilterBase features() { + return this.features; + } + + /** + * Set the features property: The features to calculate drift over. + * + * @param features the features value to set. + * @return the DataQualityMonitoringSignal object itself. + */ + public DataQualityMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { + this.features = features; + return this; + } + /** * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. * @@ -172,27 +192,6 @@ public DataQualityMonitoringSignal withReferenceData(MonitoringInputDataBase ref return this; } - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - /** * {@inheritDoc} */ @@ -211,45 +210,6 @@ public DataQualityMonitoringSignal withProperties(Map properties return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (features() != null) { - features().validate(); - } - if (featureImportanceSettings() != null) { - featureImportanceSettings().validate(); - } - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model DataQualityMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - if (productionData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property productionData in model DataQualityMonitoringSignal")); - } else { - productionData().validate(); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model DataQualityMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataQualityMonitoringSignal.class); - /** * {@inheritDoc} */ @@ -264,10 +224,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("productionData", this.productionData); jsonWriter.writeJsonField("referenceData", this.referenceData); jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeJsonField("features", this.features); - jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); + jsonWriter.writeJsonField("features", this.features); return jsonWriter.writeEndObject(); } @@ -305,15 +265,15 @@ public static DataQualityMonitoringSignal fromJson(JsonReader jsonReader) throws } else if ("signalType".equals(fieldName)) { deserializedDataQualityMonitoringSignal.signalType = MonitoringSignalType.fromString(reader.getString()); - } else if ("features".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); - } else if ("featureImportanceSettings".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.featureImportanceSettings - = FeatureImportanceSettings.fromJson(reader); } else if ("featureDataTypeOverride".equals(fieldName)) { Map featureDataTypeOverride = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); deserializedDataQualityMonitoringSignal.featureDataTypeOverride = featureDataTypeOverride; + } else if ("featureImportanceSettings".equals(fieldName)) { + deserializedDataQualityMonitoringSignal.featureImportanceSettings + = FeatureImportanceSettings.fromJson(reader); + } else if ("features".equals(fieldName)) { + deserializedDataQualityMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java index 628cd4ec4a6c..fc4392b358e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -25,7 +25,7 @@ public class DataReferenceCredential implements JsonSerializable tags) { - super.withTags(tags); + public DataVersionBaseProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -108,22 +98,14 @@ public DataVersionBaseProperties withProperties(Map properties) } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (dataUri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property dataUri in model DataVersionBaseProperties")); - } + public DataVersionBaseProperties withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseProperties.class); - /** * {@inheritDoc} */ @@ -131,10 +113,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataUri", this.dataUri); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); @@ -187,16 +169,16 @@ static DataVersionBaseProperties fromJsonKnownDiscriminator(JsonReader jsonReade if ("description".equals(fieldName)) { deserializedDataVersionBaseProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDataVersionBaseProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedDataVersionBaseProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedDataVersionBaseProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDataVersionBaseProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedDataVersionBaseProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedDataVersionBaseProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataUri".equals(fieldName)) { deserializedDataVersionBaseProperties.dataUri = reader.getString(); } else if ("dataType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java index 97c13eebe19b..57e708b9ef80 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,39 +13,34 @@ */ public interface DataVersions { /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, String tags, ListViewType listViewType, Context context); + DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); /** * Delete version. @@ -77,34 +72,39 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. - * @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 version along with {@link Response}. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Get version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. - * @param version Version identifier. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @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 version. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, String tags, ListViewType listViewType, Context context); /** * Publish version asset into registry. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java index a4ce92e15f05..459514ec036c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -25,36 +24,10 @@ public final class Databricks extends Compute { private ComputeType computeType = ComputeType.DATABRICKS; /* - * Properties of Databricks + * The properties property. */ private DatabricksProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of Databricks class. */ @@ -72,7 +45,7 @@ public ComputeType computeType() { } /** - * Get the properties property: Properties of Databricks. + * Get the properties property: The properties property. * * @return the properties value. */ @@ -81,7 +54,7 @@ public DatabricksProperties properties() { } /** - * Set the properties property: Properties of Databricks. + * Set the properties property: The properties property. * * @param properties the properties value to set. * @return the Databricks object itself. @@ -91,58 +64,6 @@ public Databricks withProperties(DatabricksProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,23 @@ public static Databricks fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedDatabricks.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedDatabricks.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedDatabricks.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedDatabricks.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedDatabricks.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDatabricks.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedDatabricks.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDatabricks.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedDatabricks.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDatabricks.provisioningErrors = provisioningErrors; + deserializedDatabricks.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDatabricks.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedDatabricks.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedDatabricks.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java index 846d0988f71a..1c5761b3c94d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * Secrets related to a Machine Learning compute based on Databricks. */ -@Fluent +@Immutable public final class DatabricksComputeSecrets extends ComputeSecretsInner { /* * The type of compute @@ -29,7 +29,7 @@ public final class DatabricksComputeSecrets extends ComputeSecretsInner { /** * Creates an instance of DatabricksComputeSecrets class. */ - public DatabricksComputeSecrets() { + private DatabricksComputeSecrets() { } /** @@ -51,27 +51,6 @@ public String databricksAccessToken() { return this.databricksAccessToken; } - /** - * Set the databricksAccessToken property: access token for databricks account. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksComputeSecrets object itself. - */ - public DatabricksComputeSecrets withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java deleted file mode 100644 index 39459ed8d282..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties of Databricks Compute Secrets. - */ -@Fluent -public class DatabricksComputeSecretsProperties implements JsonSerializable { - /* - * access token for databricks account. - */ - private String databricksAccessToken; - - /** - * Creates an instance of DatabricksComputeSecretsProperties class. - */ - public DatabricksComputeSecretsProperties() { - } - - /** - * Get the databricksAccessToken property: access token for databricks account. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: access token for databricks account. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksComputeSecretsProperties object itself. - */ - public DatabricksComputeSecretsProperties withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - 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("databricksAccessToken", this.databricksAccessToken); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabricksComputeSecretsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabricksComputeSecretsProperties 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 DatabricksComputeSecretsProperties. - */ - public static DatabricksComputeSecretsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabricksComputeSecretsProperties deserializedDatabricksComputeSecretsProperties - = new DatabricksComputeSecretsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("databricksAccessToken".equals(fieldName)) { - deserializedDatabricksComputeSecretsProperties.databricksAccessToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabricksComputeSecretsProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java index 5f73a76b73c0..7abe09e69566 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,6 @@ public DatabricksProperties withWorkspaceUrl(String workspaceUrl) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java deleted file mode 100644 index 80f84da479f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 DatabricksSchema model. - */ -@Fluent -public class DatabricksSchema implements JsonSerializable { - /* - * Properties of Databricks - */ - private DatabricksProperties properties; - - /** - * Creates an instance of DatabricksSchema class. - */ - public DatabricksSchema() { - } - - /** - * Get the properties property: Properties of Databricks. - * - * @return the properties value. - */ - public DatabricksProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Databricks. - * - * @param properties the properties value to set. - * @return the DatabricksSchema object itself. - */ - public DatabricksSchema withProperties(DatabricksProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabricksSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabricksSchema 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 DatabricksSchema. - */ - public static DatabricksSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabricksSchema deserializedDatabricksSchema = new DatabricksSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDatabricksSchema.properties = DatabricksProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabricksSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetReference.java new file mode 100644 index 000000000000..3ed9ba29f58e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetReference.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Dataset reference object. + */ +@Fluent +public final class DatasetReference implements JsonSerializable { + /* + * The name of the dataset reference. + */ + private String name; + + /* + * The fully qualified ARM id of the dataset reference. + */ + private String id; + + /** + * Creates an instance of DatasetReference class. + */ + public DatasetReference() { + } + + /** + * Get the name property: The name of the dataset reference. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the dataset reference. + * + * @param name the name value to set. + * @return the DatasetReference object itself. + */ + public DatasetReference withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: The fully qualified ARM id of the dataset reference. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The fully qualified ARM id of the dataset reference. + * + * @param id the id value to set. + * @return the DatasetReference object itself. + */ + public DatasetReference withId(String id) { + this.id = id; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DatasetReference from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DatasetReference 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 DatasetReference. + */ + public static DatasetReference fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DatasetReference deserializedDatasetReference = new DatasetReference(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedDatasetReference.name = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedDatasetReference.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDatasetReference; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java index b2134852d145..2b701c653034 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -87,7 +87,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); @@ -217,13 +217,14 @@ interface WithSkipValidation { /** * Get datastore secrets. * + * @param body Secret expiry information. * @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 datastore secrets along with {@link Response}. */ - Response listSecretsWithResponse(Context context); + Response listSecretsWithResponse(SecretExpiry body, Context context); /** * Get datastore secrets. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java index 8a2822c5920e..3cdb4b705536 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public CredentialsType credentialsType() { return this.credentialsType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java index 966f35cbc1e9..49b2df2a923f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,19 +17,19 @@ @Fluent public class DatastoreProperties extends ResourceBase { /* - * [Required] Storage type backing the datastore. + * Enum to determine the datastore contents type. */ private DatastoreType datastoreType = DatastoreType.fromString("DatastoreProperties"); /* - * Readonly property to indicate if datastore is the workspace default datastore + * [Required] Account credentials. */ - private Boolean isDefault; + private DatastoreCredentials credentials; /* - * [Required] Account credentials. + * Readonly property to indicate if datastore is the workspace default datastore */ - private DatastoreCredentials credentials; + private Boolean isDefault; /** * Creates an instance of DatastoreProperties class. @@ -39,7 +38,7 @@ public DatastoreProperties() { } /** - * Get the datastoreType property: [Required] Storage type backing the datastore. + * Get the datastoreType property: Enum to determine the datastore contents type. * * @return the datastoreType value. */ @@ -48,42 +47,42 @@ public DatastoreType datastoreType() { } /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Get the credentials property: [Required] Account credentials. * - * @return the isDefault value. + * @return the credentials value. */ - public Boolean isDefault() { - return this.isDefault; + public DatastoreCredentials credentials() { + return this.credentials; } /** - * Set the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Set the credentials property: [Required] Account credentials. * - * @param isDefault the isDefault value to set. + * @param credentials the credentials value to set. * @return the DatastoreProperties object itself. */ - DatastoreProperties withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; + public DatastoreProperties withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; return this; } /** - * Get the credentials property: [Required] Account credentials. + * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. * - * @return the credentials value. + * @return the isDefault value. */ - public DatastoreCredentials credentials() { - return this.credentials; + public Boolean isDefault() { + return this.isDefault; } /** - * Set the credentials property: [Required] Account credentials. + * Set the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. * - * @param credentials the credentials value to set. + * @param isDefault the isDefault value to set. * @return the DatastoreProperties object itself. */ - public DatastoreProperties withCredentials(DatastoreCredentials credentials) { - this.credentials = credentials; + DatastoreProperties withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; return this; } @@ -96,15 +95,6 @@ public DatastoreProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public DatastoreProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -115,24 +105,14 @@ public DatastoreProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property credentials in model DatastoreProperties")); - } else { - credentials().validate(); - } + public DatastoreProperties withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(DatastoreProperties.class); - /** * {@inheritDoc} */ @@ -140,8 +120,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("credentials", this.credentials); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); return jsonWriter.writeEndObject(); @@ -198,12 +178,12 @@ static DatastoreProperties fromJsonKnownDiscriminator(JsonReader jsonReader) thr if ("description".equals(fieldName)) { deserializedDatastoreProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDatastoreProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedDatastoreProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDatastoreProperties.withTags(tags); } else if ("credentials".equals(fieldName)) { deserializedDatastoreProperties.credentials = DatastoreCredentials.fromJson(reader); } else if ("datastoreType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java index 9e4949c1c8f6..7886eadd67a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java index 1e3c89c1091d..819063a02a4f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java index eae2adceb76d..a0707601e174 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,43 +14,37 @@ */ public interface Datastores { /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. + * @return datastore along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * List datastores. + * Get datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. + * @return datastore. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); + Datastore get(String resourceGroupName, String workspaceName, String name); /** * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -64,7 +58,7 @@ PagedIterable list(String resourceGroupName, String workspaceName, St * Delete datastore. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -73,38 +67,45 @@ PagedIterable list(String resourceGroupName, String workspaceName, St void delete(String resourceGroupName, String workspaceName, String name); /** - * Get datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. + * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get datastore. + * List datastores. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param isDefault Filter down to the workspace default datastore. + * @param names Names of datastores to return. + * @param searchText Text to search for in the datastore names. + * @param orderBy Order by property (createdtime | modifiedtime | name). + * @param orderByAsc Order by property in ascending order. + * @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 datastore. + * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. */ - Datastore get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + Boolean isDefault, List names, String searchText, String orderBy, Boolean orderByAsc, Context context); /** * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. + * @param body Secret expiry information. * @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. @@ -112,13 +113,13 @@ PagedIterable list(String resourceGroupName, String workspaceName, St * @return datastore secrets along with {@link Response}. */ Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + SecretExpiry body, Context context); /** * Get datastore secrets. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Datastore name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java new file mode 100644 index 000000000000..4cc53b64b775 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for DefaultActionType. + */ +public final class DefaultActionType extends ExpandableStringEnum { + /** + * Static value Deny for DefaultActionType. + */ + public static final DefaultActionType DENY = fromString("Deny"); + + /** + * Static value Allow for DefaultActionType. + */ + public static final DefaultActionType ALLOW = fromString("Allow"); + + /** + * Creates a new instance of DefaultActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultActionType() { + } + + /** + * Creates or finds a DefaultActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultActionType. + */ + public static DefaultActionType fromString(String name) { + return fromString(name, DefaultActionType.class); + } + + /** + * Gets known DefaultActionType values. + * + * @return known DefaultActionType values. + */ + public static Collection values() { + return values(DefaultActionType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java new file mode 100644 index 000000000000..1e04d5d7b4dd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for DefaultResourceProvisioningState. + */ +public final class DefaultResourceProvisioningState extends ExpandableStringEnum { + /** + * Static value NotStarted for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState NOT_STARTED = fromString("NotStarted"); + + /** + * Static value Failed for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Creating for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Succeeded for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Deleting for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Accepted for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Static value Canceled for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Scaling for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState SCALING = fromString("Scaling"); + + /** + * Static value Disabled for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of DefaultResourceProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultResourceProvisioningState() { + } + + /** + * Creates or finds a DefaultResourceProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultResourceProvisioningState. + */ + public static DefaultResourceProvisioningState fromString(String name) { + return fromString(name, DefaultResourceProvisioningState.class); + } + + /** + * Gets known DefaultResourceProvisioningState values. + * + * @return known DefaultResourceProvisioningState values. + */ + public static Collection values() { + return values(DefaultResourceProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java index cb04bce37c10..a238d644c75f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public ScaleType scaleType() { return this.scaleType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java new file mode 100644 index 000000000000..c29511bc7da9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Contract for DeltaModelCurrentState. + */ +@Immutable +public final class DeltaModelCurrentState implements JsonSerializable { + /* + * Gets or sets Count of instances with model. + */ + private Integer count; + + /* + * Gets or sets sample of instances with model. + */ + private String sampleInstanceID; + + /* + * Gets or sets status. + */ + private String status; + + /** + * Creates an instance of DeltaModelCurrentState class. + */ + private DeltaModelCurrentState() { + } + + /** + * Get the count property: Gets or sets Count of instances with model. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Get the sampleInstanceID property: Gets or sets sample of instances with model. + * + * @return the sampleInstanceID value. + */ + public String sampleInstanceID() { + return this.sampleInstanceID; + } + + /** + * Get the status property: Gets or sets status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("sampleInstanceID", this.sampleInstanceID); + jsonWriter.writeStringField("status", this.status); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelCurrentState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelCurrentState 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 DeltaModelCurrentState. + */ + public static DeltaModelCurrentState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelCurrentState deserializedDeltaModelCurrentState = new DeltaModelCurrentState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedDeltaModelCurrentState.count = reader.getNullable(JsonReader::getInt); + } else if ("sampleInstanceID".equals(fieldName)) { + deserializedDeltaModelCurrentState.sampleInstanceID = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedDeltaModelCurrentState.status = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelCurrentState; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java new file mode 100644 index 000000000000..0d85e2f005f3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 DeltaModelListRequest model. + */ +@Fluent +public final class DeltaModelListRequest implements JsonSerializable { + /* + * Gets or sets number of delta models to return. Default: -1, means that all will be returned. + */ + private Integer count; + + /* + * Gets or sets skip token for paginated response. + */ + private String skipToken; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelListRequest class. + */ + public DeltaModelListRequest() { + } + + /** + * Get the count property: Gets or sets number of delta models to return. Default: -1, means that all will be + * returned. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Gets or sets number of delta models to return. Default: -1, means that all will be + * returned. + * + * @param count the count value to set. + * @return the DeltaModelListRequest object itself. + */ + public DeltaModelListRequest withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the skipToken property: Gets or sets skip token for paginated response. + * + * @return the skipToken value. + */ + public String skipToken() { + return this.skipToken; + } + + /** + * Set the skipToken property: Gets or sets skip token for paginated response. + * + * @param skipToken the skipToken value to set. + * @return the DeltaModelListRequest object itself. + */ + public DeltaModelListRequest withSkipToken(String skipToken) { + this.skipToken = skipToken; + return this; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * Set the targetBaseModel property: Gets or sets target base model. + * + * @param targetBaseModel the targetBaseModel value to set. + * @return the DeltaModelListRequest object itself. + */ + public DeltaModelListRequest withTargetBaseModel(String targetBaseModel) { + this.targetBaseModel = targetBaseModel; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("skipToken", this.skipToken); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelListRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelListRequest 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 DeltaModelListRequest. + */ + public static DeltaModelListRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelListRequest deserializedDeltaModelListRequest = new DeltaModelListRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedDeltaModelListRequest.count = reader.getNullable(JsonReader::getInt); + } else if ("skipToken".equals(fieldName)) { + deserializedDeltaModelListRequest.skipToken = reader.getString(); + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelListRequest.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelListRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java new file mode 100644 index 000000000000..1894ce6fbdc9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Contract base for DeltaModelChangeRequest. Used for adding or removing. + */ +@Fluent +public final class DeltaModelModifyRequest implements JsonSerializable { + /* + * Gets or sets delta models to remove. + */ + private List addDeltaModels; + + /* + * Gets or sets delta models to remove. + */ + private List removeDeltaModels; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelModifyRequest class. + */ + public DeltaModelModifyRequest() { + } + + /** + * Get the addDeltaModels property: Gets or sets delta models to remove. + * + * @return the addDeltaModels value. + */ + public List addDeltaModels() { + return this.addDeltaModels; + } + + /** + * Set the addDeltaModels property: Gets or sets delta models to remove. + * + * @param addDeltaModels the addDeltaModels value to set. + * @return the DeltaModelModifyRequest object itself. + */ + public DeltaModelModifyRequest withAddDeltaModels(List addDeltaModels) { + this.addDeltaModels = addDeltaModels; + return this; + } + + /** + * Get the removeDeltaModels property: Gets or sets delta models to remove. + * + * @return the removeDeltaModels value. + */ + public List removeDeltaModels() { + return this.removeDeltaModels; + } + + /** + * Set the removeDeltaModels property: Gets or sets delta models to remove. + * + * @param removeDeltaModels the removeDeltaModels value to set. + * @return the DeltaModelModifyRequest object itself. + */ + public DeltaModelModifyRequest withRemoveDeltaModels(List removeDeltaModels) { + this.removeDeltaModels = removeDeltaModels; + return this; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * Set the targetBaseModel property: Gets or sets target base model. + * + * @param targetBaseModel the targetBaseModel value to set. + * @return the DeltaModelModifyRequest object itself. + */ + public DeltaModelModifyRequest withTargetBaseModel(String targetBaseModel) { + this.targetBaseModel = targetBaseModel; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("addDeltaModels", this.addDeltaModels, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("removeDeltaModels", this.removeDeltaModels, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelModifyRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelModifyRequest 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 DeltaModelModifyRequest. + */ + public static DeltaModelModifyRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelModifyRequest deserializedDeltaModelModifyRequest = new DeltaModelModifyRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addDeltaModels".equals(fieldName)) { + List addDeltaModels = reader.readArray(reader1 -> reader1.getString()); + deserializedDeltaModelModifyRequest.addDeltaModels = addDeltaModels; + } else if ("removeDeltaModels".equals(fieldName)) { + List removeDeltaModels = reader.readArray(reader1 -> reader1.getString()); + deserializedDeltaModelModifyRequest.removeDeltaModels = removeDeltaModels; + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelModifyRequest.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelModifyRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java new file mode 100644 index 000000000000..89c08ab7b4a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 DeltaModelStatusRequest model. + */ +@Fluent +public final class DeltaModelStatusRequest implements JsonSerializable { + /* + * Gets or sets collection of delta models to retrieve status for. + */ + private List deltaModels; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelStatusRequest class. + */ + public DeltaModelStatusRequest() { + } + + /** + * Get the deltaModels property: Gets or sets collection of delta models to retrieve status for. + * + * @return the deltaModels value. + */ + public List deltaModels() { + return this.deltaModels; + } + + /** + * Set the deltaModels property: Gets or sets collection of delta models to retrieve status for. + * + * @param deltaModels the deltaModels value to set. + * @return the DeltaModelStatusRequest object itself. + */ + public DeltaModelStatusRequest withDeltaModels(List deltaModels) { + this.deltaModels = deltaModels; + return this; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * Set the targetBaseModel property: Gets or sets target base model. + * + * @param targetBaseModel the targetBaseModel value to set. + * @return the DeltaModelStatusRequest object itself. + */ + public DeltaModelStatusRequest withTargetBaseModel(String targetBaseModel) { + this.targetBaseModel = targetBaseModel; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("deltaModels", this.deltaModels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelStatusRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelStatusRequest 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 DeltaModelStatusRequest. + */ + public static DeltaModelStatusRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelStatusRequest deserializedDeltaModelStatusRequest = new DeltaModelStatusRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deltaModels".equals(fieldName)) { + List deltaModels = reader.readArray(reader1 -> reader1.getString()); + deserializedDeltaModelStatusRequest.deltaModels = deltaModels; + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelStatusRequest.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelStatusRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java new file mode 100644 index 000000000000..de9c8fe34009 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of DeltaModelStatusResponse. + */ +public interface DeltaModelStatusResponse { + /** + * Gets the actualInstanceCount property: Gets or sets actual instance count. + * + * @return the actualInstanceCount value. + */ + Integer actualInstanceCount(); + + /** + * Gets the deltaModels property: Gets or sets dictionary representing modelID and its current state. + * + * @return the deltaModels value. + */ + Map> deltaModels(); + + /** + * Gets the expectedInstanceCount property: Gets or sets expected instance count. + * + * @return the expectedInstanceCount value. + */ + Integer expectedInstanceCount(); + + /** + * Gets the revisionId property: Gets or sets revision ID. + * + * @return the revisionId value. + */ + String revisionId(); + + /** + * Gets the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + String targetBaseModel(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner object. + * + * @return the inner object. + */ + DeltaModelStatusResponseInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java index b2144defa3e0..7a89eb8dc5b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java index 755e973638f3..7378559fbcb1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,6 @@ public DeploymentLogsRequest withTail(Integer tail) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java new file mode 100644 index 000000000000..5a5d787af5d6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Deployment model version upgrade option. + */ +public final class DeploymentModelVersionUpgradeOption + extends ExpandableStringEnum { + /** + * Static value OnceNewDefaultVersionAvailable for DeploymentModelVersionUpgradeOption. + */ + public static final DeploymentModelVersionUpgradeOption ONCE_NEW_DEFAULT_VERSION_AVAILABLE + = fromString("OnceNewDefaultVersionAvailable"); + + /** + * Static value OnceCurrentVersionExpired for DeploymentModelVersionUpgradeOption. + */ + public static final DeploymentModelVersionUpgradeOption ONCE_CURRENT_VERSION_EXPIRED + = fromString("OnceCurrentVersionExpired"); + + /** + * Static value NoAutoUpgrade for DeploymentModelVersionUpgradeOption. + */ + public static final DeploymentModelVersionUpgradeOption NO_AUTO_UPGRADE = fromString("NoAutoUpgrade"); + + /** + * Creates a new instance of DeploymentModelVersionUpgradeOption value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentModelVersionUpgradeOption() { + } + + /** + * Creates or finds a DeploymentModelVersionUpgradeOption from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentModelVersionUpgradeOption. + */ + public static DeploymentModelVersionUpgradeOption fromString(String name) { + return fromString(name, DeploymentModelVersionUpgradeOption.class); + } + + /** + * Gets known DeploymentModelVersionUpgradeOption values. + * + * @return known DeploymentModelVersionUpgradeOption values. + */ + public static Collection values() { + return values(DeploymentModelVersionUpgradeOption.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java index 5f476db23fa0..8cd5ddd4d166 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java index 9478808332d5..62ec23d1f40b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -49,16 +49,6 @@ public DeploymentResourceConfiguration withProperties(Map proper return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java index 48aada0f708f..4a03eb29a4b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -16,11 +16,6 @@ */ @Fluent public final class DestinationAsset implements JsonSerializable { - /* - * Destination registry name - */ - private String registryName; - /* * Destination asset name */ @@ -31,30 +26,15 @@ public final class DestinationAsset implements JsonSerializable { /* - * Setting for diagnosing user defined routing + * Setting for diagnosing dependent application insights */ - private Map udr; + private Map applicationInsights; /* - * Setting for diagnosing network security group + * Setting for diagnosing dependent container registry */ - private Map nsg; + private Map containerRegistry; /* - * Setting for diagnosing resource lock + * Setting for diagnosing dns resolution */ - private Map resourceLock; + private Map dnsResolution; /* - * Setting for diagnosing dns resolution + * Setting for diagnosing dependent key vault */ - private Map dnsResolution; + private Map keyVault; /* - * Setting for diagnosing dependent storage account + * Setting for diagnosing network security group */ - private Map storageAccount; + private Map nsg; /* - * Setting for diagnosing dependent key vault + * Setting for diagnosing unclassified category of problems */ - private Map keyVault; + private Map others; /* - * Setting for diagnosing dependent container registry + * Setting for diagnosing the presence of required resource providers in the workspace. */ - private Map containerRegistry; + private Map requiredResourceProviders; /* - * Setting for diagnosing dependent application insights + * Setting for diagnosing resource lock */ - private Map applicationInsights; + private Map resourceLock; /* - * Setting for diagnosing unclassified category of problems + * Setting for diagnosing dependent storage account */ - private Map others; + private Map storageAccount; + + /* + * Setting for diagnosing user defined routing + */ + private Map udr; /** * Creates an instance of DiagnoseRequestProperties class. @@ -69,191 +74,205 @@ public DiagnoseRequestProperties() { } /** - * Get the udr property: Setting for diagnosing user defined routing. + * Get the applicationInsights property: Setting for diagnosing dependent application insights. * - * @return the udr value. + * @return the applicationInsights value. */ - public Map udr() { - return this.udr; + public Map applicationInsights() { + return this.applicationInsights; } /** - * Set the udr property: Setting for diagnosing user defined routing. + * Set the applicationInsights property: Setting for diagnosing dependent application insights. * - * @param udr the udr value to set. + * @param applicationInsights the applicationInsights value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withUdr(Map udr) { - this.udr = udr; + public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { + this.applicationInsights = applicationInsights; return this; } /** - * Get the nsg property: Setting for diagnosing network security group. + * Get the containerRegistry property: Setting for diagnosing dependent container registry. * - * @return the nsg value. + * @return the containerRegistry value. */ - public Map nsg() { - return this.nsg; + public Map containerRegistry() { + return this.containerRegistry; } /** - * Set the nsg property: Setting for diagnosing network security group. + * Set the containerRegistry property: Setting for diagnosing dependent container registry. * - * @param nsg the nsg value to set. + * @param containerRegistry the containerRegistry value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withNsg(Map nsg) { - this.nsg = nsg; + public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { + this.containerRegistry = containerRegistry; return this; } /** - * Get the resourceLock property: Setting for diagnosing resource lock. + * Get the dnsResolution property: Setting for diagnosing dns resolution. * - * @return the resourceLock value. + * @return the dnsResolution value. */ - public Map resourceLock() { - return this.resourceLock; + public Map dnsResolution() { + return this.dnsResolution; } /** - * Set the resourceLock property: Setting for diagnosing resource lock. + * Set the dnsResolution property: Setting for diagnosing dns resolution. * - * @param resourceLock the resourceLock value to set. + * @param dnsResolution the dnsResolution value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withResourceLock(Map resourceLock) { - this.resourceLock = resourceLock; + public DiagnoseRequestProperties withDnsResolution(Map dnsResolution) { + this.dnsResolution = dnsResolution; return this; } /** - * Get the dnsResolution property: Setting for diagnosing dns resolution. + * Get the keyVault property: Setting for diagnosing dependent key vault. * - * @return the dnsResolution value. + * @return the keyVault value. */ - public Map dnsResolution() { - return this.dnsResolution; + public Map keyVault() { + return this.keyVault; } /** - * Set the dnsResolution property: Setting for diagnosing dns resolution. + * Set the keyVault property: Setting for diagnosing dependent key vault. * - * @param dnsResolution the dnsResolution value to set. + * @param keyVault the keyVault value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withDnsResolution(Map dnsResolution) { - this.dnsResolution = dnsResolution; + public DiagnoseRequestProperties withKeyVault(Map keyVault) { + this.keyVault = keyVault; return this; } /** - * Get the storageAccount property: Setting for diagnosing dependent storage account. + * Get the nsg property: Setting for diagnosing network security group. * - * @return the storageAccount value. + * @return the nsg value. */ - public Map storageAccount() { - return this.storageAccount; + public Map nsg() { + return this.nsg; } /** - * Set the storageAccount property: Setting for diagnosing dependent storage account. + * Set the nsg property: Setting for diagnosing network security group. * - * @param storageAccount the storageAccount value to set. + * @param nsg the nsg value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withStorageAccount(Map storageAccount) { - this.storageAccount = storageAccount; + public DiagnoseRequestProperties withNsg(Map nsg) { + this.nsg = nsg; return this; } /** - * Get the keyVault property: Setting for diagnosing dependent key vault. + * Get the others property: Setting for diagnosing unclassified category of problems. * - * @return the keyVault value. + * @return the others value. */ - public Map keyVault() { - return this.keyVault; + public Map others() { + return this.others; } /** - * Set the keyVault property: Setting for diagnosing dependent key vault. + * Set the others property: Setting for diagnosing unclassified category of problems. * - * @param keyVault the keyVault value to set. + * @param others the others value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withKeyVault(Map keyVault) { - this.keyVault = keyVault; + public DiagnoseRequestProperties withOthers(Map others) { + this.others = others; return this; } /** - * Get the containerRegistry property: Setting for diagnosing dependent container registry. + * Get the requiredResourceProviders property: Setting for diagnosing the presence of required resource providers in + * the workspace. * - * @return the containerRegistry value. + * @return the requiredResourceProviders value. */ - public Map containerRegistry() { - return this.containerRegistry; + public Map requiredResourceProviders() { + return this.requiredResourceProviders; } /** - * Set the containerRegistry property: Setting for diagnosing dependent container registry. + * Set the requiredResourceProviders property: Setting for diagnosing the presence of required resource providers in + * the workspace. * - * @param containerRegistry the containerRegistry value to set. + * @param requiredResourceProviders the requiredResourceProviders value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { - this.containerRegistry = containerRegistry; + public DiagnoseRequestProperties withRequiredResourceProviders(Map requiredResourceProviders) { + this.requiredResourceProviders = requiredResourceProviders; return this; } /** - * Get the applicationInsights property: Setting for diagnosing dependent application insights. + * Get the resourceLock property: Setting for diagnosing resource lock. * - * @return the applicationInsights value. + * @return the resourceLock value. */ - public Map applicationInsights() { - return this.applicationInsights; + public Map resourceLock() { + return this.resourceLock; } /** - * Set the applicationInsights property: Setting for diagnosing dependent application insights. + * Set the resourceLock property: Setting for diagnosing resource lock. * - * @param applicationInsights the applicationInsights value to set. + * @param resourceLock the resourceLock value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { - this.applicationInsights = applicationInsights; + public DiagnoseRequestProperties withResourceLock(Map resourceLock) { + this.resourceLock = resourceLock; return this; } /** - * Get the others property: Setting for diagnosing unclassified category of problems. + * Get the storageAccount property: Setting for diagnosing dependent storage account. * - * @return the others value. + * @return the storageAccount value. */ - public Map others() { - return this.others; + public Map storageAccount() { + return this.storageAccount; } /** - * Set the others property: Setting for diagnosing unclassified category of problems. + * Set the storageAccount property: Setting for diagnosing dependent storage account. * - * @param others the others value to set. + * @param storageAccount the storageAccount value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withOthers(Map others) { - this.others = others; + public DiagnoseRequestProperties withStorageAccount(Map storageAccount) { + this.storageAccount = storageAccount; return this; } /** - * Validates the instance. + * Get the udr property: Setting for diagnosing user defined routing. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the udr value. */ - public void validate() { + public Map udr() { + return this.udr; + } + + /** + * Set the udr property: Setting for diagnosing user defined routing. + * + * @param udr the udr value to set. + * @return the DiagnoseRequestProperties object itself. + */ + public DiagnoseRequestProperties withUdr(Map udr) { + this.udr = udr; + return this; } /** @@ -262,19 +281,21 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("udr", this.udr, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("nsg", this.nsg, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("resourceLock", this.resourceLock, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("dnsResolution", this.dnsResolution, - (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("storageAccount", this.storageAccount, + jsonWriter.writeMapField("applicationInsights", this.applicationInsights, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("keyVault", this.keyVault, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("containerRegistry", this.containerRegistry, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("applicationInsights", this.applicationInsights, + jsonWriter.writeMapField("dnsResolution", this.dnsResolution, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("keyVault", this.keyVault, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("nsg", this.nsg, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("others", this.others, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("requiredResourceProviders", this.requiredResourceProviders, + (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("resourceLock", this.resourceLock, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("storageAccount", this.storageAccount, + (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("udr", this.udr, (writer, element) -> writer.writeUntyped(element)); return jsonWriter.writeEndObject(); } @@ -293,33 +314,36 @@ public static DiagnoseRequestProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("udr".equals(fieldName)) { - Map udr = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.udr = udr; - } else if ("nsg".equals(fieldName)) { - Map nsg = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.nsg = nsg; - } else if ("resourceLock".equals(fieldName)) { - Map resourceLock = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.resourceLock = resourceLock; + if ("applicationInsights".equals(fieldName)) { + Map applicationInsights = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.applicationInsights = applicationInsights; + } else if ("containerRegistry".equals(fieldName)) { + Map containerRegistry = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.containerRegistry = containerRegistry; } else if ("dnsResolution".equals(fieldName)) { Map dnsResolution = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDiagnoseRequestProperties.dnsResolution = dnsResolution; - } else if ("storageAccount".equals(fieldName)) { - Map storageAccount = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.storageAccount = storageAccount; } else if ("keyVault".equals(fieldName)) { Map keyVault = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDiagnoseRequestProperties.keyVault = keyVault; - } else if ("containerRegistry".equals(fieldName)) { - Map containerRegistry = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.containerRegistry = containerRegistry; - } else if ("applicationInsights".equals(fieldName)) { - Map applicationInsights = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.applicationInsights = applicationInsights; + } else if ("nsg".equals(fieldName)) { + Map nsg = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.nsg = nsg; } else if ("others".equals(fieldName)) { Map others = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDiagnoseRequestProperties.others = others; + } else if ("requiredResourceProviders".equals(fieldName)) { + Map requiredResourceProviders = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.requiredResourceProviders = requiredResourceProviders; + } else if ("resourceLock".equals(fieldName)) { + Map resourceLock = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.resourceLock = resourceLock; + } else if ("storageAccount".equals(fieldName)) { + Map storageAccount = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.storageAccount = storageAccount; + } else if ("udr".equals(fieldName)) { + Map udr = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.udr = udr; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java index 6dc007e7d30e..4178d2614f41 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java index 2eb53c188f79..69ac4bdfeb05 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The DiagnoseResponseResultValue model. */ -@Fluent +@Immutable public final class DiagnoseResponseResultValue implements JsonSerializable { /* * The userDefinedRouteResults property. @@ -65,7 +65,7 @@ public final class DiagnoseResponseResultValue implements JsonSerializable userDefinedRouteResults() { return this.userDefinedRouteResults; } - /** - * Set the userDefinedRouteResults property: The userDefinedRouteResults property. - * - * @param userDefinedRouteResults the userDefinedRouteResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withUserDefinedRouteResults(List userDefinedRouteResults) { - this.userDefinedRouteResults = userDefinedRouteResults; - return this; - } - /** * Get the networkSecurityRuleResults property: The networkSecurityRuleResults property. * @@ -97,17 +86,6 @@ public List networkSecurityRuleResults() { return this.networkSecurityRuleResults; } - /** - * Set the networkSecurityRuleResults property: The networkSecurityRuleResults property. - * - * @param networkSecurityRuleResults the networkSecurityRuleResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withNetworkSecurityRuleResults(List networkSecurityRuleResults) { - this.networkSecurityRuleResults = networkSecurityRuleResults; - return this; - } - /** * Get the resourceLockResults property: The resourceLockResults property. * @@ -117,17 +95,6 @@ public List resourceLockResults() { return this.resourceLockResults; } - /** - * Set the resourceLockResults property: The resourceLockResults property. - * - * @param resourceLockResults the resourceLockResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withResourceLockResults(List resourceLockResults) { - this.resourceLockResults = resourceLockResults; - return this; - } - /** * Get the dnsResolutionResults property: The dnsResolutionResults property. * @@ -137,17 +104,6 @@ public List dnsResolutionResults() { return this.dnsResolutionResults; } - /** - * Set the dnsResolutionResults property: The dnsResolutionResults property. - * - * @param dnsResolutionResults the dnsResolutionResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withDnsResolutionResults(List dnsResolutionResults) { - this.dnsResolutionResults = dnsResolutionResults; - return this; - } - /** * Get the storageAccountResults property: The storageAccountResults property. * @@ -157,17 +113,6 @@ public List storageAccountResults() { return this.storageAccountResults; } - /** - * Set the storageAccountResults property: The storageAccountResults property. - * - * @param storageAccountResults the storageAccountResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withStorageAccountResults(List storageAccountResults) { - this.storageAccountResults = storageAccountResults; - return this; - } - /** * Get the keyVaultResults property: The keyVaultResults property. * @@ -177,17 +122,6 @@ public List keyVaultResults() { return this.keyVaultResults; } - /** - * Set the keyVaultResults property: The keyVaultResults property. - * - * @param keyVaultResults the keyVaultResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withKeyVaultResults(List keyVaultResults) { - this.keyVaultResults = keyVaultResults; - return this; - } - /** * Get the containerRegistryResults property: The containerRegistryResults property. * @@ -197,17 +131,6 @@ public List containerRegistryResults() { return this.containerRegistryResults; } - /** - * Set the containerRegistryResults property: The containerRegistryResults property. - * - * @param containerRegistryResults the containerRegistryResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withContainerRegistryResults(List containerRegistryResults) { - this.containerRegistryResults = containerRegistryResults; - return this; - } - /** * Get the applicationInsightsResults property: The applicationInsightsResults property. * @@ -217,17 +140,6 @@ public List applicationInsightsResults() { return this.applicationInsightsResults; } - /** - * Set the applicationInsightsResults property: The applicationInsightsResults property. - * - * @param applicationInsightsResults the applicationInsightsResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withApplicationInsightsResults(List applicationInsightsResults) { - this.applicationInsightsResults = applicationInsightsResults; - return this; - } - /** * Get the otherResults property: The otherResults property. * @@ -237,52 +149,6 @@ public List otherResults() { return this.otherResults; } - /** - * Set the otherResults property: The otherResults property. - * - * @param otherResults the otherResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withOtherResults(List otherResults) { - this.otherResults = otherResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userDefinedRouteResults() != null) { - userDefinedRouteResults().forEach(e -> e.validate()); - } - if (networkSecurityRuleResults() != null) { - networkSecurityRuleResults().forEach(e -> e.validate()); - } - if (resourceLockResults() != null) { - resourceLockResults().forEach(e -> e.validate()); - } - if (dnsResolutionResults() != null) { - dnsResolutionResults().forEach(e -> e.validate()); - } - if (storageAccountResults() != null) { - storageAccountResults().forEach(e -> e.validate()); - } - if (keyVaultResults() != null) { - keyVaultResults().forEach(e -> e.validate()); - } - if (containerRegistryResults() != null) { - containerRegistryResults().forEach(e -> e.validate()); - } - if (applicationInsightsResults() != null) { - applicationInsightsResults().forEach(e -> e.validate()); - } - if (otherResults() != null) { - otherResults().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java index eb24aa66d628..c96f3f6d9bc9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -34,7 +34,7 @@ public final class DiagnoseResult implements JsonSerializable { /** * Creates an instance of DiagnoseResult class. */ - public DiagnoseResult() { + private DiagnoseResult() { } /** @@ -64,14 +64,6 @@ public String message() { return this.message; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java index 0e892dbb5e7e..4de7f1c98a6e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java index 338b6300f93d..870c50156721 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,7 +17,7 @@ @Fluent public final class DiagnoseWorkspaceParameters implements JsonSerializable { /* - * Value of Parameters + * The value property. */ private DiagnoseRequestProperties value; @@ -28,7 +28,7 @@ public DiagnoseWorkspaceParameters() { } /** - * Get the value property: Value of Parameters. + * Get the value property: The value property. * * @return the value value. */ @@ -37,7 +37,7 @@ public DiagnoseRequestProperties value() { } /** - * Set the value property: Value of Parameters. + * Set the value property: The value property. * * @param value the value value to set. * @return the DiagnoseWorkspaceParameters object itself. @@ -47,17 +47,6 @@ public DiagnoseWorkspaceParameters withValue(DiagnoseRequestProperties value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistillationJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistillationJob.java new file mode 100644 index 000000000000..302929d13907 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistillationJob.java @@ -0,0 +1,366 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.Map; + +/** + * Distillation Job definition. + */ +@Fluent +public final class DistillationJob extends JobBaseProperties { + /* + * [Required] Specifies the type of job. + */ + private JobType jobType = JobType.DISTILLATION; + + /* + * [Required] + */ + private DataGenerationVertical dataGenerationDetails; + + /* + * [Required] + */ + private FinetuningDetails finetuningDetails; + + /* + * [Required] + */ + private Map outputs; + + /* + * Queue settings for the job + */ + private QueueSettings queueSettings; + + /* + * Instance types and other resources for the job + */ + private JobResources resources; + + /** + * Creates an instance of DistillationJob class. + */ + public DistillationJob() { + } + + /** + * Get the jobType property: [Required] Specifies the type of job. + * + * @return the jobType value. + */ + @Override + public JobType jobType() { + return this.jobType; + } + + /** + * Get the dataGenerationDetails property: [Required]. + * + * @return the dataGenerationDetails value. + */ + public DataGenerationVertical dataGenerationDetails() { + return this.dataGenerationDetails; + } + + /** + * Set the dataGenerationDetails property: [Required]. + * + * @param dataGenerationDetails the dataGenerationDetails value to set. + * @return the DistillationJob object itself. + */ + public DistillationJob withDataGenerationDetails(DataGenerationVertical dataGenerationDetails) { + this.dataGenerationDetails = dataGenerationDetails; + return this; + } + + /** + * Get the finetuningDetails property: [Required]. + * + * @return the finetuningDetails value. + */ + public FinetuningDetails finetuningDetails() { + return this.finetuningDetails; + } + + /** + * Set the finetuningDetails property: [Required]. + * + * @param finetuningDetails the finetuningDetails value to set. + * @return the DistillationJob object itself. + */ + public DistillationJob withFinetuningDetails(FinetuningDetails finetuningDetails) { + this.finetuningDetails = finetuningDetails; + return this; + } + + /** + * Get the outputs property: [Required]. + * + * @return the outputs value. + */ + public Map outputs() { + return this.outputs; + } + + /** + * Set the outputs property: [Required]. + * + * @param outputs the outputs value to set. + * @return the DistillationJob object itself. + */ + public DistillationJob withOutputs(Map outputs) { + this.outputs = outputs; + return this; + } + + /** + * Get the queueSettings property: Queue settings for the job. + * + * @return the queueSettings value. + */ + public QueueSettings queueSettings() { + return this.queueSettings; + } + + /** + * Set the queueSettings property: Queue settings for the job. + * + * @param queueSettings the queueSettings value to set. + * @return the DistillationJob object itself. + */ + public DistillationJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; + return this; + } + + /** + * Get the resources property: Instance types and other resources for the job. + * + * @return the resources value. + */ + public JobResources resources() { + return this.resources; + } + + /** + * Set the resources property: Instance types and other resources for the job. + * + * @param resources the resources value to set. + * @return the DistillationJob object itself. + */ + public DistillationJob withResources(JobResources resources) { + this.resources = resources; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withComputeId(String computeId) { + super.withComputeId(computeId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public DistillationJob withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeStringField("experimentName", experimentName()); + jsonWriter.writeJsonField("identity", identity()); + jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("dataGenerationDetails", this.dataGenerationDetails); + jsonWriter.writeJsonField("finetuningDetails", this.finetuningDetails); + jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeJsonField("queueSettings", this.queueSettings); + jsonWriter.writeJsonField("resources", this.resources); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DistillationJob from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DistillationJob 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 DistillationJob. + */ + public static DistillationJob fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DistillationJob deserializedDistillationJob = new DistillationJob(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedDistillationJob.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedDistillationJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDistillationJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedDistillationJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedDistillationJob.withComputeId(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedDistillationJob.withDisplayName(reader.getString()); + } else if ("experimentName".equals(fieldName)) { + deserializedDistillationJob.withExperimentName(reader.getString()); + } else if ("identity".equals(fieldName)) { + deserializedDistillationJob.withIdentity(IdentityConfiguration.fromJson(reader)); + } else if ("isArchived".equals(fieldName)) { + deserializedDistillationJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("notificationSetting".equals(fieldName)) { + deserializedDistillationJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedDistillationJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedDistillationJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedDistillationJob.withStatus(JobStatus.fromString(reader.getString())); + } else if ("dataGenerationDetails".equals(fieldName)) { + deserializedDistillationJob.dataGenerationDetails = DataGenerationVertical.fromJson(reader); + } else if ("finetuningDetails".equals(fieldName)) { + deserializedDistillationJob.finetuningDetails = FinetuningDetails.fromJson(reader); + } else if ("outputs".equals(fieldName)) { + Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); + deserializedDistillationJob.outputs = outputs; + } else if ("jobType".equals(fieldName)) { + deserializedDistillationJob.jobType = JobType.fromString(reader.getString()); + } else if ("queueSettings".equals(fieldName)) { + deserializedDistillationJob.queueSettings = QueueSettings.fromJson(reader); + } else if ("resources".equals(fieldName)) { + deserializedDistillationJob.resources = JobResources.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDistillationJob; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java index 83d8d323b9a4..03eea3d4cee0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public DistributionType distributionType() { return this.distributionType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -83,6 +75,8 @@ public static DistributionConfiguration fromJson(JsonReader jsonReader) throws I return Mpi.fromJson(readerToUse.reset()); } else if ("PyTorch".equals(discriminatorValue)) { return PyTorch.fromJson(readerToUse.reset()); + } else if ("Ray".equals(discriminatorValue)) { + return Ray.fromJson(readerToUse.reset()); } else if ("TensorFlow".equals(discriminatorValue)) { return TensorFlow.fromJson(readerToUse.reset()); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java index 804fcb1fec18..cd3e218c1fad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -26,6 +26,11 @@ public final class DistributionType extends ExpandableStringEnum { @@ -24,7 +24,7 @@ public final class Docker implements JsonSerializable { private Boolean privileged; /* - * Docker container configuration + * Additional properties */ private Map additionalProperties; @@ -55,7 +55,7 @@ public Docker withPrivileged(Boolean privileged) { } /** - * Get the additionalProperties property: Docker container configuration. + * Get the additionalProperties property: Additional properties. * * @return the additionalProperties value. */ @@ -64,7 +64,7 @@ public Map additionalProperties() { } /** - * Set the additionalProperties property: Docker container configuration. + * Set the additionalProperties property: Additional properties. * * @param additionalProperties the additionalProperties value to set. * @return the Docker object itself. @@ -74,14 +74,6 @@ public Docker withAdditionalProperties(Map additionalProperties) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java index 6b2c8d670586..9f8c8b6e339a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Credential for docker with username and password. */ -@Fluent +@Immutable public final class DockerCredential extends DataReferenceCredential { /* * [Required] Credential type used to authentication with storage. @@ -21,19 +21,19 @@ public final class DockerCredential extends DataReferenceCredential { private DataReferenceCredentialType credentialType = DataReferenceCredentialType.DOCKER_CREDENTIALS; /* - * DockerCredential user name + * DockerCredential user password */ - private String username; + private String password; /* - * DockerCredential user password + * DockerCredential user name */ - private String password; + private String userName; /** * Creates an instance of DockerCredential class. */ - public DockerCredential() { + private DockerCredential() { } /** @@ -46,26 +46,6 @@ public DataReferenceCredentialType credentialType() { return this.credentialType; } - /** - * Get the username property: DockerCredential user name. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: DockerCredential user name. - * - * @param username the username value to set. - * @return the DockerCredential object itself. - */ - public DockerCredential withUsername(String username) { - this.username = username; - return this; - } - /** * Get the password property: DockerCredential user password. * @@ -76,24 +56,12 @@ public String password() { } /** - * Set the password property: DockerCredential user password. - * - * @param password the password value to set. - * @return the DockerCredential object itself. - */ - public DockerCredential withPassword(String password) { - this.password = password; - return this; - } - - /** - * Validates the instance. + * Get the userName property: DockerCredential user name. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the userName value. */ - @Override - public void validate() { - super.validate(); + public String userName() { + return this.userName; } /** @@ -104,8 +72,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("credentialType", this.credentialType == null ? null : this.credentialType.toString()); - jsonWriter.writeStringField("userName", this.username); jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("userName", this.userName); return jsonWriter.writeEndObject(); } @@ -127,10 +95,10 @@ public static DockerCredential fromJson(JsonReader jsonReader) throws IOExceptio if ("credentialType".equals(fieldName)) { deserializedDockerCredential.credentialType = DataReferenceCredentialType.fromString(reader.getString()); - } else if ("userName".equals(fieldName)) { - deserializedDockerCredential.username = reader.getString(); } else if ("password".equals(fieldName)) { deserializedDockerCredential.password = reader.getString(); + } else if ("userName".equals(fieldName)) { + deserializedDockerCredential.userName = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java index e42a13919c47..9dac5964b462 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,14 +22,14 @@ public class EarlyTerminationPolicy implements JsonSerializable { - /* - * The ArmId of the keyVault where the customer owned encryption key is present. - */ - private String keyVaultArmId; - - /* - * Key vault uri to access the encryption key. - */ - private String keyIdentifier; - - /* - * For future use - The client id of the identity which will be used to access key vault. - */ - private String identityClientId; - - /** - * Creates an instance of EncryptionKeyVaultProperties class. - */ - public EncryptionKeyVaultProperties() { - } - - /** - * Get the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @return the keyVaultArmId value. - */ - public String keyVaultArmId() { - return this.keyVaultArmId; - } - - /** - * Set the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @param keyVaultArmId the keyVaultArmId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { - this.keyVaultArmId = keyVaultArmId; - return this; - } - - /** - * Get the keyIdentifier property: Key vault uri to access the encryption key. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: Key vault uri to access the encryption key. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @return the identityClientId value. - */ - public String identityClientId() { - return this.identityClientId; - } - - /** - * Set the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @param identityClientId the identityClientId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withIdentityClientId(String identityClientId) { - this.identityClientId = identityClientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultArmId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultArmId in model EncryptionKeyVaultProperties")); - } - if (keyIdentifier() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyIdentifier in model EncryptionKeyVaultProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyVaultArmId", this.keyVaultArmId); - jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); - jsonWriter.writeStringField("identityClientId", this.identityClientId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionKeyVaultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionKeyVaultProperties 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 EncryptionKeyVaultProperties. - */ - public static EncryptionKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionKeyVaultProperties deserializedEncryptionKeyVaultProperties = new EncryptionKeyVaultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("keyVaultArmId".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.keyVaultArmId = reader.getString(); - } else if ("keyIdentifier".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.keyIdentifier = reader.getString(); - } else if ("identityClientId".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.identityClientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionKeyVaultProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java index 72d9bdc0de9f..d2dde0ea9242 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -48,21 +47,6 @@ public EncryptionKeyVaultUpdateProperties withKeyIdentifier(String keyIdentifier return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyIdentifier() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyIdentifier in model EncryptionKeyVaultUpdateProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultUpdateProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java index 4ccbbab3eeb7..3fd912be9d23 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,19 +17,37 @@ @Fluent public final class EncryptionProperty implements JsonSerializable { /* - * Indicates whether or not the encryption is enabled for the workspace. + * The byok cosmosdb account that customer brings to store customer's data + * with encryption */ - private EncryptionStatus status; + private String cosmosDbResourceId; /* - * The identity that will be used to access the key vault for encryption at rest. + * Identity to be used with the keyVault */ private IdentityForCmk identity; /* - * Customer Key vault properties. + * KeyVault details to do the encryption + */ + private KeyVaultProperties keyVaultProperties; + + /* + * The byok search account that customer brings to store customer's data + * with encryption + */ + private String searchAccountResourceId; + + /* + * Indicates whether or not the encryption is enabled for the workspace. + */ + private EncryptionStatus status; + + /* + * The byok storage account that customer brings to store customer's data + * with encryption */ - private EncryptionKeyVaultProperties keyVaultProperties; + private String storageAccountResourceId; /** * Creates an instance of EncryptionProperty class. @@ -39,27 +56,29 @@ public EncryptionProperty() { } /** - * Get the status property: Indicates whether or not the encryption is enabled for the workspace. + * Get the cosmosDbResourceId property: The byok cosmosdb account that customer brings to store customer's data + * with encryption. * - * @return the status value. + * @return the cosmosDbResourceId value. */ - public EncryptionStatus status() { - return this.status; + public String cosmosDbResourceId() { + return this.cosmosDbResourceId; } /** - * Set the status property: Indicates whether or not the encryption is enabled for the workspace. + * Set the cosmosDbResourceId property: The byok cosmosdb account that customer brings to store customer's data + * with encryption. * - * @param status the status value to set. + * @param cosmosDbResourceId the cosmosDbResourceId value to set. * @return the EncryptionProperty object itself. */ - public EncryptionProperty withStatus(EncryptionStatus status) { - this.status = status; + public EncryptionProperty withCosmosDbResourceId(String cosmosDbResourceId) { + this.cosmosDbResourceId = cosmosDbResourceId; return this; } /** - * Get the identity property: The identity that will be used to access the key vault for encryption at rest. + * Get the identity property: Identity to be used with the keyVault. * * @return the identity value. */ @@ -68,7 +87,7 @@ public IdentityForCmk identity() { } /** - * Set the identity property: The identity that will be used to access the key vault for encryption at rest. + * Set the identity property: Identity to be used with the keyVault. * * @param identity the identity value to set. * @return the EncryptionProperty object itself. @@ -79,48 +98,88 @@ public EncryptionProperty withIdentity(IdentityForCmk identity) { } /** - * Get the keyVaultProperties property: Customer Key vault properties. + * Get the keyVaultProperties property: KeyVault details to do the encryption. * * @return the keyVaultProperties value. */ - public EncryptionKeyVaultProperties keyVaultProperties() { + public KeyVaultProperties keyVaultProperties() { return this.keyVaultProperties; } /** - * Set the keyVaultProperties property: Customer Key vault properties. + * Set the keyVaultProperties property: KeyVault details to do the encryption. * * @param keyVaultProperties the keyVaultProperties value to set. * @return the EncryptionProperty object itself. */ - public EncryptionProperty withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultProperties) { + public EncryptionProperty withKeyVaultProperties(KeyVaultProperties keyVaultProperties) { this.keyVaultProperties = keyVaultProperties; return this; } /** - * Validates the instance. + * Get the searchAccountResourceId property: The byok search account that customer brings to store customer's data + * with encryption. + * + * @return the searchAccountResourceId value. + */ + public String searchAccountResourceId() { + return this.searchAccountResourceId; + } + + /** + * Set the searchAccountResourceId property: The byok search account that customer brings to store customer's data + * with encryption. + * + * @param searchAccountResourceId the searchAccountResourceId value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withSearchAccountResourceId(String searchAccountResourceId) { + this.searchAccountResourceId = searchAccountResourceId; + return this; + } + + /** + * Get the status property: Indicates whether or not the encryption is enabled for the workspace. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property status in model EncryptionProperty")); - } - if (identity() != null) { - identity().validate(); - } - if (keyVaultProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultProperties in model EncryptionProperty")); - } else { - keyVaultProperties().validate(); - } + * @return the status value. + */ + public EncryptionStatus status() { + return this.status; } - private static final ClientLogger LOGGER = new ClientLogger(EncryptionProperty.class); + /** + * Set the status property: Indicates whether or not the encryption is enabled for the workspace. + * + * @param status the status value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withStatus(EncryptionStatus status) { + this.status = status; + return this; + } + + /** + * Get the storageAccountResourceId property: The byok storage account that customer brings to store customer's data + * with encryption. + * + * @return the storageAccountResourceId value. + */ + public String storageAccountResourceId() { + return this.storageAccountResourceId; + } + + /** + * Set the storageAccountResourceId property: The byok storage account that customer brings to store customer's data + * with encryption. + * + * @param storageAccountResourceId the storageAccountResourceId value to set. + * @return the EncryptionProperty object itself. + */ + public EncryptionProperty withStorageAccountResourceId(String storageAccountResourceId) { + this.storageAccountResourceId = storageAccountResourceId; + return this; + } /** * {@inheritDoc} @@ -128,9 +187,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("cosmosDbResourceId", this.cosmosDbResourceId); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("searchAccountResourceId", this.searchAccountResourceId); + jsonWriter.writeStringField("storageAccountResourceId", this.storageAccountResourceId); return jsonWriter.writeEndObject(); } @@ -150,12 +212,18 @@ public static EncryptionProperty fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("status".equals(fieldName)) { + if ("keyVaultProperties".equals(fieldName)) { + deserializedEncryptionProperty.keyVaultProperties = KeyVaultProperties.fromJson(reader); + } else if ("status".equals(fieldName)) { deserializedEncryptionProperty.status = EncryptionStatus.fromString(reader.getString()); - } else if ("keyVaultProperties".equals(fieldName)) { - deserializedEncryptionProperty.keyVaultProperties = EncryptionKeyVaultProperties.fromJson(reader); + } else if ("cosmosDbResourceId".equals(fieldName)) { + deserializedEncryptionProperty.cosmosDbResourceId = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedEncryptionProperty.identity = IdentityForCmk.fromJson(reader); + } else if ("searchAccountResourceId".equals(fieldName)) { + deserializedEncryptionProperty.searchAccountResourceId = reader.getString(); + } else if ("storageAccountResourceId".equals(fieldName)) { + deserializedEncryptionProperty.storageAccountResourceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java index 545f6cafe0e8..1f654886c82e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java index 851cb862af2d..b34993ba8ee4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -48,23 +47,6 @@ public EncryptionUpdateProperties withKeyVaultProperties(EncryptionKeyVaultUpdat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultProperties() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyVaultProperties in model EncryptionUpdateProperties")); - } else { - keyVaultProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionUpdateProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java index 03377af95217..da484e428b66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,11 +12,13 @@ import java.io.IOException; /** - * Describes the endpoint configuration for the container. + * The Endpoint model. */ @Fluent public final class Endpoint implements JsonSerializable { /* + * Endpoint Communication Protocol + * * Protocol over which communication will happen over this endpoint */ private Protocol protocol; @@ -48,7 +50,9 @@ public Endpoint() { } /** - * Get the protocol property: Protocol over which communication will happen over this endpoint. + * Get the protocol property: Endpoint Communication Protocol + * + * Protocol over which communication will happen over this endpoint. * * @return the protocol value. */ @@ -57,7 +61,9 @@ public Protocol protocol() { } /** - * Set the protocol property: Protocol over which communication will happen over this endpoint. + * Set the protocol property: Endpoint Communication Protocol + * + * Protocol over which communication will happen over this endpoint. * * @param protocol the protocol value to set. * @return the Endpoint object itself. @@ -147,14 +153,6 @@ public Endpoint withHostIp(String hostIp) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java index 91480236604d..3fc6028aca30 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java index 342a2f2fd94e..703662fc6f75 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java index c6d864d48a98..325d35101e52 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,13 +17,6 @@ public interface EndpointAuthToken { */ String accessToken(); - /** - * Gets the tokenType property: Access token type. - * - * @return the tokenType value. - */ - String tokenType(); - /** * Gets the expiryTimeUtc property: Access token expiry time (UTC). * @@ -38,6 +31,13 @@ public interface EndpointAuthToken { */ Long refreshAfterTimeUtc(); + /** + * Gets the tokenType property: Access token type. + * + * @return the tokenType value. + */ + String tokenType(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java index f92159af135e..2f9d873e2387 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java new file mode 100644 index 000000000000..d16be88e9549 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 EndpointDeploymentModel model. + */ +@Fluent +public final class EndpointDeploymentModel implements JsonSerializable { + /* + * Model format + */ + private String format; + + /* + * Model name. + */ + private String name; + + /* + * Optional. Deployment model source ARM resource ID. + */ + private String source; + + /* + * Model version. + */ + private String version; + + /** + * Creates an instance of EndpointDeploymentModel class. + */ + public EndpointDeploymentModel() { + } + + /** + * Get the format property: Model format. + * + * @return the format value. + */ + public String format() { + return this.format; + } + + /** + * Set the format property: Model format. + * + * @param format the format value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withFormat(String format) { + this.format = format; + return this; + } + + /** + * Get the name property: Model name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Model name. + * + * @param name the name value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withName(String name) { + this.name = name; + return this; + } + + /** + * Get the source property: Optional. Deployment model source ARM resource ID. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Optional. Deployment model source ARM resource ID. + * + * @param source the source value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the version property: Model version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Model version. + * + * @param version the version value to set. + * @return the EndpointDeploymentModel object itself. + */ + public EndpointDeploymentModel withVersion(String version) { + this.version = version; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("format", this.format); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("source", this.source); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDeploymentModel from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDeploymentModel 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 EndpointDeploymentModel. + */ + public static EndpointDeploymentModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDeploymentModel deserializedEndpointDeploymentModel = new EndpointDeploymentModel(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("format".equals(fieldName)) { + deserializedEndpointDeploymentModel.format = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointDeploymentModel.name = reader.getString(); + } else if ("source".equals(fieldName)) { + deserializedEndpointDeploymentModel.source = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedEndpointDeploymentModel.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentModel; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java index 54c74659ee49..788ea653ed7e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -18,19 +18,14 @@ @Fluent public class EndpointDeploymentPropertiesBase implements JsonSerializable { /* - * Description of the endpoint deployment. - */ - private String description; - - /* - * Property dictionary. Properties can be added, but not removed or altered. + * Code configuration for the endpoint deployment. */ - private Map properties; + private CodeConfiguration codeConfiguration; /* - * Code configuration for the endpoint deployment. + * Description of the endpoint deployment. */ - private CodeConfiguration codeConfiguration; + private String description; /* * ARM resource ID or AssetId of the environment specification for the endpoint deployment. @@ -42,69 +37,54 @@ public class EndpointDeploymentPropertiesBase implements JsonSerializable environmentVariables; - /** - * Creates an instance of EndpointDeploymentPropertiesBase class. - */ - public EndpointDeploymentPropertiesBase() { - } - - /** - * Get the description property: Description of the endpoint deployment. - * - * @return the description value. + /* + * Property dictionary. Properties can be added, but not removed or altered. */ - public String description() { - return this.description; - } + private Map properties; /** - * Set the description property: Description of the endpoint deployment. - * - * @param description the description value to set. - * @return the EndpointDeploymentPropertiesBase object itself. + * Creates an instance of EndpointDeploymentPropertiesBase class. */ - public EndpointDeploymentPropertiesBase withDescription(String description) { - this.description = description; - return this; + public EndpointDeploymentPropertiesBase() { } /** - * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * Get the codeConfiguration property: Code configuration for the endpoint deployment. * - * @return the properties value. + * @return the codeConfiguration value. */ - public Map properties() { - return this.properties; + public CodeConfiguration codeConfiguration() { + return this.codeConfiguration; } /** - * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. + * Set the codeConfiguration property: Code configuration for the endpoint deployment. * - * @param properties the properties value to set. + * @param codeConfiguration the codeConfiguration value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ - public EndpointDeploymentPropertiesBase withProperties(Map properties) { - this.properties = properties; + public EndpointDeploymentPropertiesBase withCodeConfiguration(CodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; return this; } /** - * Get the codeConfiguration property: Code configuration for the endpoint deployment. + * Get the description property: Description of the endpoint deployment. * - * @return the codeConfiguration value. + * @return the description value. */ - public CodeConfiguration codeConfiguration() { - return this.codeConfiguration; + public String description() { + return this.description; } /** - * Set the codeConfiguration property: Code configuration for the endpoint deployment. + * Set the description property: Description of the endpoint deployment. * - * @param codeConfiguration the codeConfiguration value to set. + * @param description the description value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ - public EndpointDeploymentPropertiesBase withCodeConfiguration(CodeConfiguration codeConfiguration) { - this.codeConfiguration = codeConfiguration; + public EndpointDeploymentPropertiesBase withDescription(String description) { + this.description = description; return this; } @@ -151,14 +131,23 @@ public EndpointDeploymentPropertiesBase withEnvironmentVariables(Map properties() { + return this.properties; + } + + /** + * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param properties the properties value to set. + * @return the EndpointDeploymentPropertiesBase object itself. */ - public void validate() { - if (codeConfiguration() != null) { - codeConfiguration().validate(); - } + public EndpointDeploymentPropertiesBase withProperties(Map properties) { + this.properties = properties; + return this; } /** @@ -167,12 +156,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", this.codeConfiguration); + jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -192,18 +181,18 @@ public static EndpointDeploymentPropertiesBase fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedEndpointDeploymentPropertiesBase.description = reader.getString(); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedEndpointDeploymentPropertiesBase.properties = properties; - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedEndpointDeploymentPropertiesBase.codeConfiguration = CodeConfiguration.fromJson(reader); + } else if ("description".equals(fieldName)) { + deserializedEndpointDeploymentPropertiesBase.description = reader.getString(); } else if ("environmentId".equals(fieldName)) { deserializedEndpointDeploymentPropertiesBase.environmentId = reader.getString(); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedEndpointDeploymentPropertiesBase.environmentVariables = environmentVariables; + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedEndpointDeploymentPropertiesBase.properties = properties; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java new file mode 100644 index 000000000000..524c04f1eb97 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 EndpointDeploymentResourceProperties model. + */ +@Fluent +public class EndpointDeploymentResourceProperties implements JsonSerializable { + /* + * Kind of the deployment. + */ + private String type = "EndpointDeploymentResourceProperties"; + + /* + * The failure reason if the creation failed. + */ + private String failureReason; + + /* + * Read-only provision state status property. + */ + private DefaultResourceProvisioningState provisioningState; + + /** + * Creates an instance of EndpointDeploymentResourceProperties class. + */ + public EndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the failureReason property: The failure reason if the creation failed. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set the failureReason property: The failure reason if the creation failed. + * + * @param failureReason the failureReason value to set. + * @return the EndpointDeploymentResourceProperties object itself. + */ + public EndpointDeploymentResourceProperties withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get the provisioningState property: Read-only provision state status property. + * + * @return the provisioningState value. + */ + public DefaultResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: Read-only provision state status property. + * + * @param provisioningState the provisioningState value to set. + * @return the EndpointDeploymentResourceProperties object itself. + */ + EndpointDeploymentResourceProperties withProvisioningState(DefaultResourceProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("failureReason", this.failureReason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDeploymentResourceProperties 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 EndpointDeploymentResourceProperties. + */ + public static EndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Azure.ContentSafety".equals(discriminatorValue)) { + return ContentSafetyEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else if ("managedOnlineEndpoint".equals(discriminatorValue)) { + return ManagedOnlineEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.OpenAI".equals(discriminatorValue)) { + return OpenAIEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.Speech".equals(discriminatorValue)) { + return SpeechEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static EndpointDeploymentResourceProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDeploymentResourceProperties deserializedEndpointDeploymentResourceProperties + = new EndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("failureReason".equals(fieldName)) { + deserializedEndpointDeploymentResourceProperties.failureReason = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedEndpointDeploymentResourceProperties.provisioningState + = DefaultResourceProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java new file mode 100644 index 000000000000..c0954d463983 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; + +/** + * An immutable client-side representation of EndpointDeploymentResourcePropertiesBasicResource. + */ +public interface EndpointDeploymentResourcePropertiesBasicResource { + /** + * 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. + */ + EndpointDeploymentResourceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner + * object. + * + * @return the inner object. + */ + EndpointDeploymentResourcePropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the EndpointDeploymentResourcePropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The EndpointDeploymentResourcePropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the EndpointDeploymentResourcePropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource definition allowing to specify parent + * resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, endpointName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @return the next definition stage. + */ + WithProperties withExistingEndpoint(String resourceGroupName, String workspaceName, String endpointName); + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource 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(EndpointDeploymentResourceProperties properties); + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + EndpointDeploymentResourcePropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EndpointDeploymentResourcePropertiesBasicResource create(Context context); + } + } + + /** + * Begins update for the EndpointDeploymentResourcePropertiesBasicResource resource. + * + * @return the stage of resource update. + */ + EndpointDeploymentResourcePropertiesBasicResource.Update update(); + + /** + * The template for EndpointDeploymentResourcePropertiesBasicResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EndpointDeploymentResourcePropertiesBasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EndpointDeploymentResourcePropertiesBasicResource apply(Context context); + } + + /** + * The EndpointDeploymentResourcePropertiesBasicResource update stages. + */ + interface UpdateStages { + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource 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(EndpointDeploymentResourceProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EndpointDeploymentResourcePropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EndpointDeploymentResourcePropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java new file mode 100644 index 000000000000..add97cc73006 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 EndpointDeployments. + */ +public interface EndpointDeployments { + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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 deployments under endpoint resource by name along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, Context context); + + /** + * Get deployments under endpoint resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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 deployments under endpoint resource by name. + */ + EndpointDeploymentResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, + String endpointName, String deploymentName); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @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 resourceGroupName, String workspaceName, String endpointName, String deploymentName); + + /** + * Delete endpoint deployment resource by name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param deploymentName Name of the deployment resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName, + Context context); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName); + + /** + * Get all the deployments under the endpoint resource scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 all the deployments under the endpoint resource scope as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, + String workspaceName, String endpointName, Context context); + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName); + + /** + * Get all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param skip Continuation token for pagination. + * @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 all the deployments under the workspace scope + * + * Get all the deployments under the workspace scope as paginated response with {@link PagedIterable}. + */ + PagedIterable getInWorkspace(String resourceGroupName, + String workspaceName, EndpointType endpointType, String skip, Context context); + + /** + * Get deployments under endpoint resource by name. + * + * @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 deployments under endpoint resource by name along with {@link Response}. + */ + EndpointDeploymentResourcePropertiesBasicResource getById(String id); + + /** + * Get deployments under endpoint resource by name. + * + * @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 deployments under endpoint resource by name along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete endpoint deployment resource by name. + * + * @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); + + /** + * Delete endpoint deployment resource by name. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EndpointDeploymentResourcePropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new EndpointDeploymentResourcePropertiesBasicResource definition. + */ + EndpointDeploymentResourcePropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java new file mode 100644 index 000000000000..009f1aee5692 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; + +/** + * An immutable client-side representation of EndpointKeys. + */ +public interface EndpointKeys { + /** + * Gets the keys property: Dictionary of Keys for the endpoint. + * + * @return the keys value. + */ + AccountApiKeys keys(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner object. + * + * @return the inner object. + */ + EndpointKeysInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java new file mode 100644 index 000000000000..2ede8c3be79a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The EndpointModelDeprecationProperties model. + */ +@Immutable +public final class EndpointModelDeprecationProperties implements JsonSerializable { + /* + * The datetime of deprecation of the fineTune Model. + */ + private OffsetDateTime fineTune; + + /* + * The datetime of deprecation of the inference Model. + */ + private OffsetDateTime inference; + + /** + * Creates an instance of EndpointModelDeprecationProperties class. + */ + private EndpointModelDeprecationProperties() { + } + + /** + * Get the fineTune property: The datetime of deprecation of the fineTune Model. + * + * @return the fineTune value. + */ + public OffsetDateTime fineTune() { + return this.fineTune; + } + + /** + * Get the inference property: The datetime of deprecation of the inference Model. + * + * @return the inference value. + */ + public OffsetDateTime inference() { + return this.inference; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("fineTune", + this.fineTune == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.fineTune)); + jsonWriter.writeStringField("inference", + this.inference == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.inference)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelDeprecationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelDeprecationProperties 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 EndpointModelDeprecationProperties. + */ + public static EndpointModelDeprecationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelDeprecationProperties deserializedEndpointModelDeprecationProperties + = new EndpointModelDeprecationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fineTune".equals(fieldName)) { + deserializedEndpointModelDeprecationProperties.fineTune = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("inference".equals(fieldName)) { + deserializedEndpointModelDeprecationProperties.inference = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelDeprecationProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java new file mode 100644 index 000000000000..b1c7b5268adf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of EndpointModelProperties. + */ +public interface EndpointModelProperties { + /** + * Gets the capabilities property: The capabilities. + * + * @return the capabilities value. + */ + Map capabilities(); + + /** + * Gets the deprecation property: The deprecation property. + * + * @return the deprecation value. + */ + EndpointModelDeprecationProperties deprecation(); + + /** + * Gets the finetuneCapabilities property: The capabilities for finetune models. + * + * @return the finetuneCapabilities value. + */ + Map finetuneCapabilities(); + + /** + * Gets the format property: Deployment model format. + * + * @return the format value. + */ + String format(); + + /** + * Gets the isDefaultVersion property: If the model is default version. + * + * @return the isDefaultVersion value. + */ + Boolean isDefaultVersion(); + + /** + * Gets the lifecycleStatus property: Model lifecycle status. + * + * @return the lifecycleStatus value. + */ + ModelLifecycleStatus lifecycleStatus(); + + /** + * Gets the maxCapacity property: The max capacity. + * + * @return the maxCapacity value. + */ + Integer maxCapacity(); + + /** + * Gets the name property: Deployment model name. + * + * @return the name value. + */ + String name(); + + /** + * Gets the skus property: The list of Model Sku. + * + * @return the skus value. + */ + List skus(); + + /** + * Gets the systemData property: The systemData property. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the version property: Optional. Deployment model version. If version is not specified, a default version + * will be assigned. The default version is different for different models and might change when there is new + * version available for a model. Default version for a model could be found from list models API. + * + * @return the version value. + */ + String version(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner object. + * + * @return the inner object. + */ + EndpointModelPropertiesInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java new file mode 100644 index 000000000000..b89847ea5762 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 EndpointModelSkuCapacityProperties model. + */ +@Immutable +public final class EndpointModelSkuCapacityProperties implements JsonSerializable { + /* + * The default capacity. + */ + private Integer defaultProperty; + + /* + * The maximum capacity. + */ + private Integer maximum; + + /** + * Creates an instance of EndpointModelSkuCapacityProperties class. + */ + private EndpointModelSkuCapacityProperties() { + } + + /** + * Get the defaultProperty property: The default capacity. + * + * @return the defaultProperty value. + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Get the maximum property: The maximum capacity. + * + * @return the maximum value. + */ + public Integer maximum() { + return this.maximum; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("default", this.defaultProperty); + jsonWriter.writeNumberField("maximum", this.maximum); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuCapacityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuCapacityProperties 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 EndpointModelSkuCapacityProperties. + */ + public static EndpointModelSkuCapacityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuCapacityProperties deserializedEndpointModelSkuCapacityProperties + = new EndpointModelSkuCapacityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("default".equals(fieldName)) { + deserializedEndpointModelSkuCapacityProperties.defaultProperty + = reader.getNullable(JsonReader::getInt); + } else if ("maximum".equals(fieldName)) { + deserializedEndpointModelSkuCapacityProperties.maximum = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuCapacityProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java new file mode 100644 index 000000000000..21e6659e084e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The EndpointModelSkuProperties model. + */ +@Immutable +public final class EndpointModelSkuProperties implements JsonSerializable { + /* + * The capacity property. + */ + private EndpointModelSkuCapacityProperties capacity; + + /* + * The list of ARM id for the connection support this SKU. + */ + private List connectionIds; + + /* + * The datetime of deprecation of the model SKU. + */ + private OffsetDateTime deprecationDate; + + /* + * The name of the model SKU. + */ + private String name; + + /* + * The rateLimits property. + */ + private List rateLimits; + + /* + * The usage name of the model SKU. + */ + private String usageName; + + /** + * Creates an instance of EndpointModelSkuProperties class. + */ + private EndpointModelSkuProperties() { + } + + /** + * Get the capacity property: The capacity property. + * + * @return the capacity value. + */ + public EndpointModelSkuCapacityProperties capacity() { + return this.capacity; + } + + /** + * Get the connectionIds property: The list of ARM id for the connection support this SKU. + * + * @return the connectionIds value. + */ + public List connectionIds() { + return this.connectionIds; + } + + /** + * Get the deprecationDate property: The datetime of deprecation of the model SKU. + * + * @return the deprecationDate value. + */ + public OffsetDateTime deprecationDate() { + return this.deprecationDate; + } + + /** + * Get the name property: The name of the model SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the rateLimits property: The rateLimits property. + * + * @return the rateLimits value. + */ + public List rateLimits() { + return this.rateLimits; + } + + /** + * Get the usageName property: The usage name of the model SKU. + * + * @return the usageName value. + */ + public String usageName() { + return this.usageName; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("capacity", this.capacity); + jsonWriter.writeArrayField("connectionIds", this.connectionIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("deprecationDate", + this.deprecationDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.deprecationDate)); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("rateLimits", this.rateLimits, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("usageName", this.usageName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuProperties 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 EndpointModelSkuProperties. + */ + public static EndpointModelSkuProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuProperties deserializedEndpointModelSkuProperties = new EndpointModelSkuProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacity".equals(fieldName)) { + deserializedEndpointModelSkuProperties.capacity + = EndpointModelSkuCapacityProperties.fromJson(reader); + } else if ("connectionIds".equals(fieldName)) { + List connectionIds = reader.readArray(reader1 -> reader1.getString()); + deserializedEndpointModelSkuProperties.connectionIds = connectionIds; + } else if ("deprecationDate".equals(fieldName)) { + deserializedEndpointModelSkuProperties.deprecationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("name".equals(fieldName)) { + deserializedEndpointModelSkuProperties.name = reader.getString(); + } else if ("rateLimits".equals(fieldName)) { + List rateLimits + = reader.readArray(reader1 -> EndpointModelSkuRateLimitProperties.fromJson(reader1)); + deserializedEndpointModelSkuProperties.rateLimits = rateLimits; + } else if ("usageName".equals(fieldName)) { + deserializedEndpointModelSkuProperties.usageName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java new file mode 100644 index 000000000000..77f864049cff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * The EndpointModelSkuRateLimitProperties model. + */ +@Immutable +public final class EndpointModelSkuRateLimitProperties + implements JsonSerializable { + /* + * The count value of Call Rate Limit. + */ + private Double count; + + /* + * The renewal period in seconds of Call Rate Limit. + */ + private Double renewalPeriod; + + /* + * The call rate limit for the model. + */ + private List rules; + + /** + * Creates an instance of EndpointModelSkuRateLimitProperties class. + */ + private EndpointModelSkuRateLimitProperties() { + } + + /** + * Get the count property: The count value of Call Rate Limit. + * + * @return the count value. + */ + public Double count() { + return this.count; + } + + /** + * Get the renewalPeriod property: The renewal period in seconds of Call Rate Limit. + * + * @return the renewalPeriod value. + */ + public Double renewalPeriod() { + return this.renewalPeriod; + } + + /** + * Get the rules property: The call rate limit for the model. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeNumberField("renewalPeriod", this.renewalPeriod); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuRateLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuRateLimitProperties 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 EndpointModelSkuRateLimitProperties. + */ + public static EndpointModelSkuRateLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuRateLimitProperties deserializedEndpointModelSkuRateLimitProperties + = new EndpointModelSkuRateLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitProperties.count = reader.getNullable(JsonReader::getDouble); + } else if ("renewalPeriod".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitProperties.renewalPeriod + = reader.getNullable(JsonReader::getDouble); + } else if ("rules".equals(fieldName)) { + List rules + = reader.readArray(reader1 -> EndpointModelSkuRateLimitRuleProperties.fromJson(reader1)); + deserializedEndpointModelSkuRateLimitProperties.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuRateLimitProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java new file mode 100644 index 000000000000..9add65a07c6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 EndpointModelSkuRateLimitRulePatternProperties model. + */ +@Immutable +public final class EndpointModelSkuRateLimitRulePatternProperties + implements JsonSerializable { + /* + * The method property. + */ + private String method; + + /* + * The path property. + */ + private String path; + + /** + * Creates an instance of EndpointModelSkuRateLimitRulePatternProperties class. + */ + private EndpointModelSkuRateLimitRulePatternProperties() { + } + + /** + * Get the method property: The method property. + * + * @return the method value. + */ + public String method() { + return this.method; + } + + /** + * Get the path property: The path property. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("method", this.method); + jsonWriter.writeStringField("path", this.path); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuRateLimitRulePatternProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuRateLimitRulePatternProperties 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 EndpointModelSkuRateLimitRulePatternProperties. + */ + public static EndpointModelSkuRateLimitRulePatternProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuRateLimitRulePatternProperties deserializedEndpointModelSkuRateLimitRulePatternProperties + = new EndpointModelSkuRateLimitRulePatternProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("method".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRulePatternProperties.method = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRulePatternProperties.path = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuRateLimitRulePatternProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java new file mode 100644 index 000000000000..de9891fe8d7d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * The EndpointModelSkuRateLimitRuleProperties model. + */ +@Immutable +public final class EndpointModelSkuRateLimitRuleProperties + implements JsonSerializable { + /* + * The count property. + */ + private Double count; + + /* + * If the dynamic throttling is enabled. + */ + private Boolean dynamicThrottlingEnabled; + + /* + * The key property. + */ + private String key; + + /* + * The matchPatterns property. + */ + private List matchPatterns; + + /* + * The minCount property. + */ + private Double minCount; + + /* + * The renewalPeriod property. + */ + private Double renewalPeriod; + + /** + * Creates an instance of EndpointModelSkuRateLimitRuleProperties class. + */ + private EndpointModelSkuRateLimitRuleProperties() { + } + + /** + * Get the count property: The count property. + * + * @return the count value. + */ + public Double count() { + return this.count; + } + + /** + * Get the dynamicThrottlingEnabled property: If the dynamic throttling is enabled. + * + * @return the dynamicThrottlingEnabled value. + */ + public Boolean dynamicThrottlingEnabled() { + return this.dynamicThrottlingEnabled; + } + + /** + * Get the key property: The key property. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Get the matchPatterns property: The matchPatterns property. + * + * @return the matchPatterns value. + */ + public List matchPatterns() { + return this.matchPatterns; + } + + /** + * Get the minCount property: The minCount property. + * + * @return the minCount value. + */ + public Double minCount() { + return this.minCount; + } + + /** + * Get the renewalPeriod property: The renewalPeriod property. + * + * @return the renewalPeriod value. + */ + public Double renewalPeriod() { + return this.renewalPeriod; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("dynamicThrottlingEnabled", this.dynamicThrottlingEnabled); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeArrayField("matchPatterns", this.matchPatterns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("minCount", this.minCount); + jsonWriter.writeNumberField("renewalPeriod", this.renewalPeriod); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuRateLimitRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuRateLimitRuleProperties 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 EndpointModelSkuRateLimitRuleProperties. + */ + public static EndpointModelSkuRateLimitRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuRateLimitRuleProperties deserializedEndpointModelSkuRateLimitRuleProperties + = new EndpointModelSkuRateLimitRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.count + = reader.getNullable(JsonReader::getDouble); + } else if ("dynamicThrottlingEnabled".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.dynamicThrottlingEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("key".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.key = reader.getString(); + } else if ("matchPatterns".equals(fieldName)) { + List matchPatterns + = reader.readArray(reader1 -> EndpointModelSkuRateLimitRulePatternProperties.fromJson(reader1)); + deserializedEndpointModelSkuRateLimitRuleProperties.matchPatterns = matchPatterns; + } else if ("minCount".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.minCount + = reader.getNullable(JsonReader::getDouble); + } else if ("renewalPeriod".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.renewalPeriod + = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuRateLimitRuleProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java new file mode 100644 index 000000000000..b3d26e3997fd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import java.util.List; + +/** + * An immutable client-side representation of EndpointModels. + */ +public interface EndpointModels { + /** + * Gets the value property: The EndpointModelProperties items on this page. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner object. + * + * @return the inner object. + */ + EndpointModelsInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java index 53b86427fa0a..a260dc80005a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,6 +11,15 @@ * An immutable client-side representation of EndpointPropertiesBase. */ public interface EndpointPropertiesBase { + /** + * Gets the authMode property: [Required] The authentication method for invoking the endpoint (data plane + * operation). Use 'Key' for key-based authentication. Use 'AMLToken' for Azure Machine Learning token-based + * authentication. Use 'AADToken' for Microsoft Entra token-based authentication. + * + * @return the authMode value. + */ + EndpointAuthMode authMode(); + /** * Gets the description property: Description of the inference endpoint. * @@ -18,6 +27,14 @@ public interface EndpointPropertiesBase { */ String description(); + /** + * Gets the keys property: EndpointAuthKeys to set initially on an Endpoint. + * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + * + * @return the keys value. + */ + EndpointAuthKeys keys(); + /** * Gets the properties property: Property dictionary. Properties can be added, but not removed or altered. * @@ -39,22 +56,6 @@ public interface EndpointPropertiesBase { */ String swaggerUri(); - /** - * Gets the authMode property: [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine - * Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - * - * @return the authMode value. - */ - EndpointAuthMode authMode(); - - /** - * Gets the keys property: EndpointAuthKeys to set initially on an Endpoint. - * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. - * - * @return the keys value. - */ - EndpointAuthKeys keys(); - /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java index e3b206d2cca1..52077ac5c153 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java new file mode 100644 index 000000000000..6ebdec39acdb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java @@ -0,0 +1,351 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The EndpointResourceProperties model. + */ +@Fluent +public class EndpointResourceProperties implements JsonSerializable { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.fromString("EndpointResourceProperties"); + + /* + * Byo resource id for creating the built-in model service endpoints. + */ + private String associatedResourceId; + + /* + * Deployments info. + */ + private List deployments; + + /* + * Uri of the endpoint. + */ + private String endpointUri; + + /* + * The failure reason if the creation failed. + */ + private String failureReason; + + /* + * Location of the endpoint. + * Since input dto and when parse endpoint resource share the same contract + * this Location field is just for parse the endpoint resource info + * we won't let customer specify the endpoint resource location since we will create it the same location as + * workspace + */ + private String location; + + /* + * Name of the endpoint. + */ + private String name; + + /* + * Read-only provision state status property. + */ + private DefaultResourceProvisioningState provisioningState; + + /* + * Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. + */ + private Boolean shouldCreateAiServicesEndpoint; + + /** + * Creates an instance of EndpointResourceProperties class. + */ + public EndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * Get the associatedResourceId property: Byo resource id for creating the built-in model service endpoints. + * + * @return the associatedResourceId value. + */ + public String associatedResourceId() { + return this.associatedResourceId; + } + + /** + * Set the associatedResourceId property: Byo resource id for creating the built-in model service endpoints. + * + * @param associatedResourceId the associatedResourceId value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + this.associatedResourceId = associatedResourceId; + return this; + } + + /** + * Get the deployments property: Deployments info. + * + * @return the deployments value. + */ + public List deployments() { + return this.deployments; + } + + /** + * Set the deployments property: Deployments info. + * + * @param deployments the deployments value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties + withDeployments(List deployments) { + this.deployments = deployments; + return this; + } + + /** + * Get the endpointUri property: Uri of the endpoint. + * + * @return the endpointUri value. + */ + public String endpointUri() { + return this.endpointUri; + } + + /** + * Set the endpointUri property: Uri of the endpoint. + * + * @param endpointUri the endpointUri value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withEndpointUri(String endpointUri) { + this.endpointUri = endpointUri; + return this; + } + + /** + * Get the failureReason property: The failure reason if the creation failed. + * + * @return the failureReason value. + */ + public String failureReason() { + return this.failureReason; + } + + /** + * Set the failureReason property: The failure reason if the creation failed. + * + * @param failureReason the failureReason value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withFailureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + /** + * Get the location property: Location of the endpoint. + * Since input dto and when parse endpoint resource share the same contract + * this Location field is just for parse the endpoint resource info + * we won't let customer specify the endpoint resource location since we will create it the same location as + * workspace. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Location of the endpoint. + * Since input dto and when parse endpoint resource share the same contract + * this Location field is just for parse the endpoint resource info + * we won't let customer specify the endpoint resource location since we will create it the same location as + * workspace. + * + * @param location the location value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the name property: Name of the endpoint. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the endpoint. + * + * @param name the name value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the provisioningState property: Read-only provision state status property. + * + * @return the provisioningState value. + */ + public DefaultResourceProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: Read-only provision state status property. + * + * @param provisioningState the provisioningState value to set. + * @return the EndpointResourceProperties object itself. + */ + EndpointResourceProperties withProvisioningState(DefaultResourceProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the shouldCreateAiServicesEndpoint property: Whether the proxy (non-byo) endpoint is a regular endpoint or a + * OneKeyV2 AI services account endpoint. + * + * @return the shouldCreateAiServicesEndpoint value. + */ + public Boolean shouldCreateAiServicesEndpoint() { + return this.shouldCreateAiServicesEndpoint; + } + + /** + * Set the shouldCreateAiServicesEndpoint property: Whether the proxy (non-byo) endpoint is a regular endpoint or a + * OneKeyV2 AI services account endpoint. + * + * @param shouldCreateAiServicesEndpoint the shouldCreateAiServicesEndpoint value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + this.shouldCreateAiServicesEndpoint = shouldCreateAiServicesEndpoint; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("associatedResourceId", this.associatedResourceId); + jsonWriter.writeArrayField("deployments", this.deployments, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", this.endpointUri); + jsonWriter.writeStringField("failureReason", this.failureReason); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", this.shouldCreateAiServicesEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointResourceProperties 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 EndpointResourceProperties. + */ + public static EndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("endpointType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Azure.ContentSafety".equals(discriminatorValue)) { + return ContentSafetyEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("managedOnlineEndpoint".equals(discriminatorValue)) { + return ManagedOnlineEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.OpenAI".equals(discriminatorValue)) { + return OpenAIEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("serverlessEndpoint".equals(discriminatorValue)) { + return ServerlessEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.Speech".equals(discriminatorValue)) { + return SpeechEndpointResourceProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static EndpointResourceProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointResourceProperties deserializedEndpointResourceProperties = new EndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedEndpointResourceProperties.endpointType = EndpointType.fromString(reader.getString()); + } else if ("associatedResourceId".equals(fieldName)) { + deserializedEndpointResourceProperties.associatedResourceId = reader.getString(); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedEndpointResourceProperties.deployments = deployments; + } else if ("endpointUri".equals(fieldName)) { + deserializedEndpointResourceProperties.endpointUri = reader.getString(); + } else if ("failureReason".equals(fieldName)) { + deserializedEndpointResourceProperties.failureReason = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedEndpointResourceProperties.location = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointResourceProperties.name = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedEndpointResourceProperties.provisioningState + = DefaultResourceProvisioningState.fromString(reader.getString()); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedEndpointResourceProperties.shouldCreateAiServicesEndpoint + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java new file mode 100644 index 000000000000..c3c94f0832ae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; + +/** + * An immutable client-side representation of EndpointResourcePropertiesBasicResource. + */ +public interface EndpointResourcePropertiesBasicResource { + /** + * 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. + */ + EndpointResourceProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner object. + * + * @return the inner object. + */ + EndpointResourcePropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the EndpointResourcePropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The EndpointResourcePropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the EndpointResourcePropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the EndpointResourcePropertiesBasicResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the EndpointResourcePropertiesBasicResource 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(EndpointResourceProperties properties); + } + + /** + * The stage of the EndpointResourcePropertiesBasicResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + EndpointResourcePropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + EndpointResourcePropertiesBasicResource create(Context context); + } + } + + /** + * Begins update for the EndpointResourcePropertiesBasicResource resource. + * + * @return the stage of resource update. + */ + EndpointResourcePropertiesBasicResource.Update update(); + + /** + * The template for EndpointResourcePropertiesBasicResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + EndpointResourcePropertiesBasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + EndpointResourcePropertiesBasicResource apply(Context context); + } + + /** + * The EndpointResourcePropertiesBasicResource update stages. + */ + interface UpdateStages { + /** + * The stage of the EndpointResourcePropertiesBasicResource 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(EndpointResourceProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + EndpointResourcePropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + EndpointResourcePropertiesBasicResource refresh(Context context); + + /** + * List keys for the endpoint resource. + * + * @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 listKeysWithResponse(Context context); + + /** + * List keys for the endpoint resource. + * + * @throws com.azure.core.management.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. + */ + EndpointKeys listKeys(); + + /** + * Regenerate account keys. + * + * @param body The body 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 regenerateKeysWithResponse(RegenerateServiceAccountKeyContent body, Context context); + + /** + * Regenerate account keys. + * + * @param body The body 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. + */ + AccountApiKeys regenerateKeys(RegenerateServiceAccountKeyContent body); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java index 719f8fc0f2e9..0afd2633b597 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,6 +21,7 @@ public final class EndpointScheduleAction extends ScheduleActionBase { private ScheduleActionType actionType = ScheduleActionType.INVOKE_BATCH_ENDPOINT; /* + * * [Required] Defines Schedule action definition details. * */ @@ -44,7 +44,8 @@ public ScheduleActionType actionType() { } /** - * Get the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. + * Get the endpointInvocationDefinition property: + * [Required] Defines Schedule action definition details. * <see href="TBD" />. * * @return the endpointInvocationDefinition value. @@ -54,7 +55,8 @@ public Object endpointInvocationDefinition() { } /** - * Set the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. + * Set the endpointInvocationDefinition property: + * [Required] Defines Schedule action definition details. * <see href="TBD" />. * * @param endpointInvocationDefinition the endpointInvocationDefinition value to set. @@ -65,23 +67,6 @@ public EndpointScheduleAction withEndpointInvocationDefinition(Object endpointIn return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (endpointInvocationDefinition() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property endpointInvocationDefinition in model EndpointScheduleAction")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndpointScheduleAction.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java deleted file mode 100644 index fd1926ec9f01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointServiceConnectionStatus.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Connection status of the service consumer with the service provider. - */ -public final class EndpointServiceConnectionStatus extends ExpandableStringEnum { - /** - * Static value Approved for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** - * Static value Pending for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** - * Static value Rejected for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Static value Disconnected for EndpointServiceConnectionStatus. - */ - public static final EndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** - * Creates a new instance of EndpointServiceConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointServiceConnectionStatus() { - } - - /** - * Creates or finds a EndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointServiceConnectionStatus. - */ - public static EndpointServiceConnectionStatus fromString(String name) { - return fromString(name, EndpointServiceConnectionStatus.class); - } - - /** - * Gets known EndpointServiceConnectionStatus values. - * - * @return known EndpointServiceConnectionStatus values. - */ - public static Collection values() { - return values(EndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java new file mode 100644 index 000000000000..f9bea6783fda --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of the endpoint. + */ +public final class EndpointType extends ExpandableStringEnum { + /** + * Static value Azure.OpenAI for EndpointType. + */ + public static final EndpointType AZURE_OPEN_AI = fromString("Azure.OpenAI"); + + /** + * Static value Azure.Speech for EndpointType. + */ + public static final EndpointType AZURE_SPEECH = fromString("Azure.Speech"); + + /** + * Static value Azure.ContentSafety for EndpointType. + */ + public static final EndpointType AZURE_CONTENT_SAFETY = fromString("Azure.ContentSafety"); + + /** + * Static value Azure.Llama for EndpointType. + */ + public static final EndpointType AZURE_LLAMA = fromString("Azure.Llama"); + + /** + * Static value managedOnlineEndpoint for EndpointType. + */ + public static final EndpointType MANAGED_ONLINE_ENDPOINT = fromString("managedOnlineEndpoint"); + + /** + * Static value serverlessEndpoint for EndpointType. + */ + public static final EndpointType SERVERLESS_ENDPOINT = fromString("serverlessEndpoint"); + + /** + * 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/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java new file mode 100644 index 000000000000..87b051a60395 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 Endpoints. + */ +public interface Endpoints { + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 endpoint resource + * + * Gets endpoint resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, Context context); + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 endpoint resource + * + * Gets endpoint resource. + */ + EndpointResourcePropertiesBasicResource get(String resourceGroupName, String workspaceName, String endpointName); + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List All the endpoints under this workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointType Endpoint type filter. + * @param includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @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 paged collection of EndpointResourcePropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + EndpointType endpointType, Boolean includeOnlineEndpoints, Boolean includeServerlessEndpoints, + Boolean includeConnections, String skip, String expand, Context context); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 listKeysWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); + + /** + * List keys for the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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. + */ + EndpointKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * Get available models under the endpoint resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 available models under the endpoint resource as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, + String endpointName, Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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 regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + String endpointName, RegenerateServiceAccountKeyContent body, Context context); + + /** + * Regenerate account keys. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param body The body 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. + */ + AccountApiKeys regenerateKeys(String resourceGroupName, String workspaceName, String endpointName, + RegenerateServiceAccountKeyContent body); + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @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 endpoint resource + * + * Gets endpoint resource along with {@link Response}. + */ + EndpointResourcePropertiesBasicResource getById(String id); + + /** + * Get endpoint resource + * + * Gets endpoint resource. + * + * @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 endpoint resource + * + * Gets endpoint resource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new EndpointResourcePropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new EndpointResourcePropertiesBasicResource definition. + */ + EndpointResourcePropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java index d39f9aa8fae8..2ee158fa5db1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java index 9ad476e4ed18..330cdf0512c7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,14 +22,14 @@ public final class EnvironmentContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of EnvironmentContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -84,15 +84,6 @@ public EnvironmentContainerProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public EnvironmentContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -103,13 +94,12 @@ public EnvironmentContainerProperties withProperties(Map propert } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public EnvironmentContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -119,8 +109,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +133,12 @@ public static EnvironmentContainerProperties fromJson(JsonReader jsonReader) thr if ("description".equals(fieldName)) { deserializedEnvironmentContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedEnvironmentContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedEnvironmentContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedEnvironmentContainerProperties .withIsArchived(reader.getNullable(JsonReader::getBoolean)); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java index 029f8f4af446..05ce37550e34 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,32 +13,32 @@ */ public interface EnvironmentContainers { /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ListViewType listViewType, Context context); + EnvironmentContainer get(String resourceGroupName, String workspaceName, String name); /** * Delete container. @@ -67,32 +67,32 @@ PagedIterable list(String resourceGroupName, String worksp void delete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 container. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - EnvironmentContainer get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ListViewType listViewType, Context context); /** * Get container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java index efd0efdcc68e..d51bfd42250a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java index cae88ac393c3..e4c3505dbdd4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,11 +14,13 @@ import java.util.Map; /** - * Environment Variables for the container. + * The EnvironmentVariable model. */ @Fluent public final class EnvironmentVariable implements JsonSerializable { /* + * Type of Environment Variable + * * Type of the Environment Variable. Possible values are: local - For local variable */ private EnvironmentVariableType type; @@ -29,7 +31,7 @@ public final class EnvironmentVariable implements JsonSerializable additionalProperties; @@ -40,7 +42,9 @@ public EnvironmentVariable() { } /** - * Get the type property: Type of the Environment Variable. Possible values are: local - For local variable. + * Get the type property: Type of Environment Variable + * + * Type of the Environment Variable. Possible values are: local - For local variable. * * @return the type value. */ @@ -49,7 +53,9 @@ public EnvironmentVariableType type() { } /** - * Set the type property: Type of the Environment Variable. Possible values are: local - For local variable. + * Set the type property: Type of Environment Variable + * + * Type of the Environment Variable. Possible values are: local - For local variable. * * @param type the type value to set. * @return the EnvironmentVariable object itself. @@ -80,7 +86,7 @@ public EnvironmentVariable withValue(String value) { } /** - * Get the additionalProperties property: Environment Variables for the container. + * Get the additionalProperties property: Additional properties. * * @return the additionalProperties value. */ @@ -89,7 +95,7 @@ public Map additionalProperties() { } /** - * Set the additionalProperties property: Environment Variables for the container. + * Set the additionalProperties property: Additional properties. * * @param additionalProperties the additionalProperties value to set. * @return the EnvironmentVariable object itself. @@ -99,14 +105,6 @@ public EnvironmentVariable withAdditionalProperties(Map addition return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java index 011c36d2c2b4..c2039a3e4980 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Type of Environment Variable - * * Type of the Environment Variable. Possible values are: local - For local variable. */ public final class EnvironmentVariableType extends ExpandableStringEnum { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java index 2e53ec8a821f..09766fc957d7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -87,7 +87,7 @@ interface WithParentResource { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. + * @param name Container name. This is case-sensitive. * @return the next definition stage. */ WithProperties withExistingEnvironment(String resourceGroupName, String workspaceName, String name); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java index 7995f620ea76..0342b4845d13 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,18 +17,14 @@ @Fluent public final class EnvironmentVersionProperties extends AssetBase { /* - * Environment type is either user managed or curated by the Azure ML service - * + * AutoRebuild setting for the derived image */ - private EnvironmentType environmentType; + private AutoRebuildSetting autoRebuild; /* - * Name of the image that will be used for the environment. - * + * Configuration settings for Docker build context. */ - private String image; + private BuildContext build; /* * Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and @@ -40,14 +36,23 @@ public final class EnvironmentVersionProperties extends AssetBase { private String condaFile; /* - * Configuration settings for Docker build context. + * Environment type is either user managed or curated by the Azure ML service + * */ - private BuildContext build; + private EnvironmentType environmentType; /* - * The OS type of the environment. + * Name of the image that will be used for the environment. + * */ - private OperatingSystemType osType; + private String image; + + /* + * Environment image details. + */ + private ImageDetails imageDetails; /* * Defines configuration specific to inference. @@ -55,9 +60,9 @@ public final class EnvironmentVersionProperties extends AssetBase { private InferenceContainerProperties inferenceConfig; /* - * Defines if image needs to be rebuilt based on base image changes. + * The type of operating system. */ - private AutoRebuildSetting autoRebuild; + private OperatingSystemType osType; /* * Provisioning state for the environment version. @@ -76,38 +81,42 @@ public EnvironmentVersionProperties() { } /** - * Get the environmentType property: Environment type is either user managed or curated by the Azure ML service - * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. + * Get the autoRebuild property: AutoRebuild setting for the derived image. * - * @return the environmentType value. + * @return the autoRebuild value. */ - public EnvironmentType environmentType() { - return this.environmentType; + public AutoRebuildSetting autoRebuild() { + return this.autoRebuild; } /** - * Get the image property: Name of the image that will be used for the environment. - * <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" - * />. + * Set the autoRebuild property: AutoRebuild setting for the derived image. * - * @return the image value. + * @param autoRebuild the autoRebuild value to set. + * @return the EnvironmentVersionProperties object itself. */ - public String image() { - return this.image; + public EnvironmentVersionProperties withAutoRebuild(AutoRebuildSetting autoRebuild) { + this.autoRebuild = autoRebuild; + return this; } /** - * Set the image property: Name of the image that will be used for the environment. - * <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" - * />. + * Get the build property: Configuration settings for Docker build context. * - * @param image the image value to set. + * @return the build value. + */ + public BuildContext build() { + return this.build; + } + + /** + * Set the build property: Configuration settings for Docker build context. + * + * @param build the build value to set. * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionProperties withImage(String image) { - this.image = image; + public EnvironmentVersionProperties withBuild(BuildContext build) { + this.build = build; return this; } @@ -140,42 +149,58 @@ public EnvironmentVersionProperties withCondaFile(String condaFile) { } /** - * Get the build property: Configuration settings for Docker build context. + * Get the environmentType property: Environment type is either user managed or curated by the Azure ML service + * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. * - * @return the build value. + * @return the environmentType value. */ - public BuildContext build() { - return this.build; + public EnvironmentType environmentType() { + return this.environmentType; } /** - * Set the build property: Configuration settings for Docker build context. + * Get the image property: Name of the image that will be used for the environment. + * <seealso + * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" + * />. * - * @param build the build value to set. + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: Name of the image that will be used for the environment. + * <seealso + * href="https://docs.microsoft.com/en-us/azure/machine-learning/how-to-deploy-custom-docker-image#use-a-custom-base-image" + * />. + * + * @param image the image value to set. * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionProperties withBuild(BuildContext build) { - this.build = build; + public EnvironmentVersionProperties withImage(String image) { + this.image = image; return this; } /** - * Get the osType property: The OS type of the environment. + * Get the imageDetails property: Environment image details. * - * @return the osType value. + * @return the imageDetails value. */ - public OperatingSystemType osType() { - return this.osType; + public ImageDetails imageDetails() { + return this.imageDetails; } /** - * Set the osType property: The OS type of the environment. + * Set the imageDetails property: Environment image details. * - * @param osType the osType value to set. + * @param imageDetails the imageDetails value to set. * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { - this.osType = osType; + public EnvironmentVersionProperties withImageDetails(ImageDetails imageDetails) { + this.imageDetails = imageDetails; return this; } @@ -200,22 +225,22 @@ public EnvironmentVersionProperties withInferenceConfig(InferenceContainerProper } /** - * Get the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. + * Get the osType property: The type of operating system. * - * @return the autoRebuild value. + * @return the osType value. */ - public AutoRebuildSetting autoRebuild() { - return this.autoRebuild; + public OperatingSystemType osType() { + return this.osType; } /** - * Set the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. + * Set the osType property: The type of operating system. * - * @param autoRebuild the autoRebuild value to set. + * @param osType the osType value to set. * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionProperties withAutoRebuild(AutoRebuildSetting autoRebuild) { - this.autoRebuild = autoRebuild; + public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { + this.osType = osType; return this; } @@ -248,15 +273,6 @@ public EnvironmentVersionProperties withStage(String stage) { return this; } - /** - * {@inheritDoc} - */ - @Override - public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - /** * {@inheritDoc} */ @@ -270,8 +286,8 @@ public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { * {@inheritDoc} */ @Override - public EnvironmentVersionProperties withDescription(String description) { - super.withDescription(description); + public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -279,8 +295,8 @@ public EnvironmentVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public EnvironmentVersionProperties withTags(Map tags) { - super.withTags(tags); + public EnvironmentVersionProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -294,19 +310,12 @@ public EnvironmentVersionProperties withProperties(Map propertie } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (build() != null) { - build().validate(); - } - if (inferenceConfig() != null) { - inferenceConfig().validate(); - } + public EnvironmentVersionProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -316,16 +325,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("condaFile", this.condaFile); + jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeStringField("autoRebuild", this.autoRebuild == null ? null : this.autoRebuild.toString()); jsonWriter.writeJsonField("build", this.build); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("condaFile", this.condaFile); + jsonWriter.writeStringField("image", this.image); + jsonWriter.writeJsonField("imageDetails", this.imageDetails); jsonWriter.writeJsonField("inferenceConfig", this.inferenceConfig); - jsonWriter.writeStringField("autoRebuild", this.autoRebuild == null ? null : this.autoRebuild.toString()); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeStringField("stage", this.stage); return jsonWriter.writeEndObject(); } @@ -347,35 +357,37 @@ public static EnvironmentVersionProperties fromJson(JsonReader jsonReader) throw if ("description".equals(fieldName)) { deserializedEnvironmentVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedEnvironmentVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedEnvironmentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedEnvironmentVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedEnvironmentVersionProperties .withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedEnvironmentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("autoRebuild".equals(fieldName)) { + deserializedEnvironmentVersionProperties.autoRebuild + = AutoRebuildSetting.fromString(reader.getString()); + } else if ("build".equals(fieldName)) { + deserializedEnvironmentVersionProperties.build = BuildContext.fromJson(reader); + } else if ("condaFile".equals(fieldName)) { + deserializedEnvironmentVersionProperties.condaFile = reader.getString(); } else if ("environmentType".equals(fieldName)) { deserializedEnvironmentVersionProperties.environmentType = EnvironmentType.fromString(reader.getString()); } else if ("image".equals(fieldName)) { deserializedEnvironmentVersionProperties.image = reader.getString(); - } else if ("condaFile".equals(fieldName)) { - deserializedEnvironmentVersionProperties.condaFile = reader.getString(); - } else if ("build".equals(fieldName)) { - deserializedEnvironmentVersionProperties.build = BuildContext.fromJson(reader); - } else if ("osType".equals(fieldName)) { - deserializedEnvironmentVersionProperties.osType - = OperatingSystemType.fromString(reader.getString()); + } else if ("imageDetails".equals(fieldName)) { + deserializedEnvironmentVersionProperties.imageDetails = ImageDetails.fromJson(reader); } else if ("inferenceConfig".equals(fieldName)) { deserializedEnvironmentVersionProperties.inferenceConfig = InferenceContainerProperties.fromJson(reader); - } else if ("autoRebuild".equals(fieldName)) { - deserializedEnvironmentVersionProperties.autoRebuild - = AutoRebuildSetting.fromString(reader.getString()); + } else if ("osType".equals(fieldName)) { + deserializedEnvironmentVersionProperties.osType + = OperatingSystemType.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { deserializedEnvironmentVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java index 10592fa81226..14a328bc7236 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,36 +13,34 @@ */ public interface EnvironmentVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, - Integer top, String skip, ListViewType listViewType, Context context); + EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Delete version. @@ -74,42 +72,44 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 version. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String orderBy, + Integer top, String skip, ListViewType listViewType, Context context); /** * Publish version asset into registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -122,8 +122,8 @@ Response getWithResponse(String resourceGroupName, String wo * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java index b1ff0fbc101a..82f479d2d3e8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,19 +14,25 @@ /** * The estimated price info for using a VM of a particular OS type, tier, etc. */ -@Fluent +@Immutable public final class EstimatedVMPrice implements JsonSerializable { /* + * Retail price + * * The price charged for using the VM. */ private double retailPrice; /* + * OS type + * * Operating system type used by the VM. */ private VMPriceOSType osType; /* + * VM tier + * * The type of the VM. */ private VMTier vmTier; @@ -35,11 +40,13 @@ public final class EstimatedVMPrice implements JsonSerializable { /* + * Billing currency + * * Three lettered code specifying the currency of the VM price. Example: USD */ private BillingCurrency billingCurrency; /* + * Unit of time measure + * * The unit of time measurement for the specified VM price. Example: OneHour */ private UnitOfMeasure unitOfMeasure; /* + * List of estimated VM prices. + * * The list of estimated prices for using a VM of a particular OS type, tier, etc. */ private List values; @@ -36,11 +41,13 @@ public final class EstimatedVMPrices implements JsonSerializable values() { return this.values; } - /** - * Set the values property: The list of estimated prices for using a VM of a particular OS type, tier, etc. - * - * @param values the values value to set. - * @return the EstimatedVMPrices object itself. - */ - public EstimatedVMPrices withValues(List values) { - this.values = values; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (billingCurrency() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property billingCurrency in model EstimatedVMPrices")); - } - if (unitOfMeasure() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property unitOfMeasure in model EstimatedVMPrices")); - } - if (values() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property values in model EstimatedVMPrices")); - } else { - values().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EstimatedVMPrices.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java index e1b65bc65d34..284a53c60409 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -16,7 +16,7 @@ public interface ExternalFqdnResponse { * * @return the value value. */ - List value(); + List value(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner object. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java index 74378e4c955d..74fe5d1227da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java index 79b881728221..c7dca2a9336d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -24,15 +23,20 @@ public final class FeatureAttributionDriftMonitoringSignal extends MonitoringSig private MonitoringSignalType signalType = MonitoringSignalType.FEATURE_ATTRIBUTION_DRIFT; /* - * [Required] A list of metrics to calculate and their associated thresholds. + * A dictionary that maps feature names to their respective data types. */ - private FeatureAttributionMetricThreshold metricThreshold; + private Map featureDataTypeOverride; /* * [Required] The settings for computing feature importance. */ private FeatureImportanceSettings featureImportanceSettings; + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + private FeatureAttributionMetricThreshold metricThreshold; + /* * [Required] The data which drift will be calculated for. */ @@ -43,11 +47,6 @@ public final class FeatureAttributionDriftMonitoringSignal extends MonitoringSig */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of FeatureAttributionDriftMonitoringSignal class. */ @@ -65,23 +64,23 @@ public MonitoringSignalType signalType() { } /** - * Get the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @return the metricThreshold value. + * @return the featureDataTypeOverride value. */ - public FeatureAttributionMetricThreshold metricThreshold() { - return this.metricThreshold; + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; } /** - * Set the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @param metricThreshold the metricThreshold value to set. + * @param featureDataTypeOverride the featureDataTypeOverride value to set. * @return the FeatureAttributionDriftMonitoringSignal object itself. */ public FeatureAttributionDriftMonitoringSignal - withMetricThreshold(FeatureAttributionMetricThreshold metricThreshold) { - this.metricThreshold = metricThreshold; + withFeatureDataTypeOverride(Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; return this; } @@ -106,6 +105,27 @@ public FeatureImportanceSettings featureImportanceSettings() { return this; } + /** + * Get the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @return the metricThreshold value. + */ + public FeatureAttributionMetricThreshold metricThreshold() { + return this.metricThreshold; + } + + /** + * Set the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * + * @param metricThreshold the metricThreshold value to set. + * @return the FeatureAttributionDriftMonitoringSignal object itself. + */ + public FeatureAttributionDriftMonitoringSignal + withMetricThreshold(FeatureAttributionMetricThreshold metricThreshold) { + this.metricThreshold = metricThreshold; + return this; + } + /** * Get the productionData property: [Required] The data which drift will be calculated for. * @@ -146,27 +166,6 @@ public FeatureAttributionDriftMonitoringSignal withReferenceData(MonitoringInput return this; } - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the FeatureAttributionDriftMonitoringSignal object itself. - */ - public FeatureAttributionDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - /** * {@inheritDoc} */ @@ -186,46 +185,6 @@ public FeatureAttributionDriftMonitoringSignal withProperties(Map e.validate()); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model FeatureAttributionDriftMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeatureAttributionDriftMonitoringSignal.class); - /** * {@inheritDoc} */ @@ -235,8 +194,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("notificationTypes", notificationTypes(), (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("metricThreshold", this.metricThreshold); jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); + jsonWriter.writeJsonField("metricThreshold", this.metricThreshold); jsonWriter.writeArrayField("productionData", this.productionData, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("referenceData", this.referenceData); @@ -270,12 +229,12 @@ public static FeatureAttributionDriftMonitoringSignal fromJson(JsonReader jsonRe } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeatureAttributionDriftMonitoringSignal.withProperties(properties); - } else if ("metricThreshold".equals(fieldName)) { - deserializedFeatureAttributionDriftMonitoringSignal.metricThreshold - = FeatureAttributionMetricThreshold.fromJson(reader); } else if ("featureImportanceSettings".equals(fieldName)) { deserializedFeatureAttributionDriftMonitoringSignal.featureImportanceSettings = FeatureImportanceSettings.fromJson(reader); + } else if ("metricThreshold".equals(fieldName)) { + deserializedFeatureAttributionDriftMonitoringSignal.metricThreshold + = FeatureAttributionMetricThreshold.fromJson(reader); } else if ("productionData".equals(fieldName)) { List productionData = reader.readArray(reader1 -> MonitoringInputDataBase.fromJson(reader1)); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java index 9dd83c77e755..eecd44df2442 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ */ public final class FeatureAttributionMetric extends ExpandableStringEnum { /** - * Static value NormalizedDiscountedCumulativeGain for FeatureAttributionMetric. + * The Normalized Discounted Cumulative Gain metric. */ public static final FeatureAttributionMetric NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN = fromString("NormalizedDiscountedCumulativeGain"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java index 8df5864f051d..5e0218d7d8e7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,14 +17,14 @@ @Fluent public final class FeatureAttributionMetricThreshold implements JsonSerializable { /* - * The threshold value. If null, a default value will be set depending on the selected metric. + * [Required] The feature attribution metric to calculate. */ - private MonitoringThreshold threshold; + private FeatureAttributionMetric metric; /* - * [Required] The feature attribution metric to calculate. + * The threshold value. If null, a default value will be set depending on the selected metric. */ - private FeatureAttributionMetric metric; + private MonitoringThreshold threshold; /** * Creates an instance of FeatureAttributionMetricThreshold class. @@ -33,28 +32,6 @@ public final class FeatureAttributionMetricThreshold implements JsonSerializable public FeatureAttributionMetricThreshold() { } - /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @return the threshold value. - */ - public MonitoringThreshold threshold() { - return this.threshold; - } - - /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. - * - * @param threshold the threshold value to set. - * @return the FeatureAttributionMetricThreshold object itself. - */ - public FeatureAttributionMetricThreshold withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; - return this; - } - /** * Get the metric property: [Required] The feature attribution metric to calculate. * @@ -76,22 +53,26 @@ public FeatureAttributionMetricThreshold withMetric(FeatureAttributionMetric met } /** - * Validates the instance. + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the threshold value. */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model FeatureAttributionMetricThreshold")); - } + public MonitoringThreshold threshold() { + return this.threshold; } - private static final ClientLogger LOGGER = new ClientLogger(FeatureAttributionMetricThreshold.class); + /** + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. + * + * @param threshold the threshold value to set. + * @return the FeatureAttributionMetricThreshold object itself. + */ + public FeatureAttributionMetricThreshold withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; + return this; + } /** * {@inheritDoc} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java index 4cc26cd06ce4..f21dbc6be69d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java index 59bc744d69e8..f25283705bd9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class FeatureImportanceMode extends ExpandableStringEnum { /** - * Static value Disabled for FeatureImportanceMode. + * Disables computing feature importance within a signal. */ public static final FeatureImportanceMode DISABLED = fromString("Disabled"); /** - * Static value Enabled for FeatureImportanceMode. + * Enables computing feature importance within a signal. */ public static final FeatureImportanceMode ENABLED = fromString("Enabled"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java index 750f7d629b94..280e01feccd7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,6 @@ public FeatureImportanceSettings withTargetColumn(String targetColumn) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java index 34cf1b1ee7bf..f60f21bb68de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class FeatureLags extends ExpandableStringEnum { /** - * Static value None for FeatureLags. + * No feature lags generated. */ public static final FeatureLags NONE = fromString("None"); /** - * Static value Auto for FeatureLags. + * System auto-generates feature lags. */ public static final FeatureLags AUTO = fromString("Auto"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java index c89e04c6d4c3..ef4bd4d89ac1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,42 +14,22 @@ /** * DTO object representing feature. */ -@Fluent +@Immutable public final class FeatureProperties extends ResourceBase { - /* - * Specifies name - */ - private String featureName; - /* * Specifies type */ private FeatureDataType dataType; - /** - * Creates an instance of FeatureProperties class. - */ - public FeatureProperties() { - } - - /** - * Get the featureName property: Specifies name. - * - * @return the featureName value. + /* + * Specifies name */ - public String featureName() { - return this.featureName; - } + private String featureName; /** - * Set the featureName property: Specifies name. - * - * @param featureName the featureName value to set. - * @return the FeatureProperties object itself. + * Creates an instance of FeatureProperties class. */ - public FeatureProperties withFeatureName(String featureName) { - this.featureName = featureName; - return this; + private FeatureProperties() { } /** @@ -62,51 +42,12 @@ public FeatureDataType dataType() { } /** - * Set the dataType property: Specifies type. - * - * @param dataType the dataType value to set. - * @return the FeatureProperties object itself. - */ - public FeatureProperties withDataType(FeatureDataType dataType) { - this.dataType = dataType; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public FeatureProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. + * Get the featureName property: Specifies name. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the featureName value. */ - @Override - public void validate() { - super.validate(); + public String featureName() { + return this.featureName; } /** @@ -116,10 +57,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("featureName", this.featureName); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); + jsonWriter.writeStringField("featureName", this.featureName); return jsonWriter.writeEndObject(); } @@ -140,16 +81,16 @@ public static FeatureProperties fromJson(JsonReader jsonReader) throws IOExcepti if ("description".equals(fieldName)) { deserializedFeatureProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeatureProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeatureProperties.withProperties(properties); - } else if ("featureName".equals(fieldName)) { - deserializedFeatureProperties.featureName = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeatureProperties.withTags(tags); } else if ("dataType".equals(fieldName)) { deserializedFeatureProperties.dataType = FeatureDataType.fromString(reader.getString()); + } else if ("featureName".equals(fieldName)) { + deserializedFeatureProperties.featureName = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java index 4b8130103035..1a71b6e8a8a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ import java.io.IOException; /** - * Settings for feature store type workspace. + * The FeatureStoreSettings model. */ @Fluent public final class FeatureStoreSettings implements JsonSerializable { /* - * Compute runtime config for feature store type workspace. + * The computeRuntime property. */ private ComputeRuntimeDto computeRuntime; @@ -38,7 +38,7 @@ public FeatureStoreSettings() { } /** - * Get the computeRuntime property: Compute runtime config for feature store type workspace. + * Get the computeRuntime property: The computeRuntime property. * * @return the computeRuntime value. */ @@ -47,7 +47,7 @@ public ComputeRuntimeDto computeRuntime() { } /** - * Set the computeRuntime property: Compute runtime config for feature store type workspace. + * Set the computeRuntime property: The computeRuntime property. * * @param computeRuntime the computeRuntime value to set. * @return the FeatureStoreSettings object itself. @@ -97,17 +97,6 @@ public FeatureStoreSettings withOnlineStoreConnectionName(String onlineStoreConn return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeRuntime() != null) { - computeRuntime().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java index 4e6c594b8828..01e1b8a34181 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -64,22 +63,6 @@ public FeatureSubset withFeatures(List features) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (features() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property features in model FeatureSubset")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FeatureSubset.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java index ef1902fa46fa..3c6333a18963 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -20,14 +20,14 @@ @Fluent public final class FeatureWindow implements JsonSerializable { /* - * Specifies the feature window start time + * Specifies the feature window end time */ - private OffsetDateTime featureWindowStart; + private OffsetDateTime featureWindowEnd; /* - * Specifies the feature window end time + * Specifies the feature window start time */ - private OffsetDateTime featureWindowEnd; + private OffsetDateTime featureWindowStart; /** * Creates an instance of FeatureWindow class. @@ -35,26 +35,6 @@ public final class FeatureWindow implements JsonSerializable { public FeatureWindow() { } - /** - * Get the featureWindowStart property: Specifies the feature window start time. - * - * @return the featureWindowStart value. - */ - public OffsetDateTime featureWindowStart() { - return this.featureWindowStart; - } - - /** - * Set the featureWindowStart property: Specifies the feature window start time. - * - * @param featureWindowStart the featureWindowStart value to set. - * @return the FeatureWindow object itself. - */ - public FeatureWindow withFeatureWindowStart(OffsetDateTime featureWindowStart) { - this.featureWindowStart = featureWindowStart; - return this; - } - /** * Get the featureWindowEnd property: Specifies the feature window end time. * @@ -76,11 +56,23 @@ public FeatureWindow withFeatureWindowEnd(OffsetDateTime featureWindowEnd) { } /** - * Validates the instance. + * Get the featureWindowStart property: Specifies the feature window start time. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the featureWindowStart value. */ - public void validate() { + public OffsetDateTime featureWindowStart() { + return this.featureWindowStart; + } + + /** + * Set the featureWindowStart property: Specifies the feature window start time. + * + * @param featureWindowStart the featureWindowStart value to set. + * @return the FeatureWindow object itself. + */ + public FeatureWindow withFeatureWindowStart(OffsetDateTime featureWindowStart) { + this.featureWindowStart = featureWindowStart; + return this; } /** @@ -89,14 +81,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("featureWindowStart", - this.featureWindowStart == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowStart)); jsonWriter.writeStringField("featureWindowEnd", this.featureWindowEnd == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowEnd)); + jsonWriter.writeStringField("featureWindowStart", + this.featureWindowStart == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowStart)); return jsonWriter.writeEndObject(); } @@ -115,12 +107,12 @@ public static FeatureWindow fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("featureWindowStart".equals(fieldName)) { - deserializedFeatureWindow.featureWindowStart = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("featureWindowEnd".equals(fieldName)) { + if ("featureWindowEnd".equals(fieldName)) { deserializedFeatureWindow.featureWindowEnd = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("featureWindowStart".equals(fieldName)) { + deserializedFeatureWindow.featureWindowStart = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java index 1269d823bacf..ef7b80cffcad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,74 +13,74 @@ */ public interface Features { /** - * List Features. + * Get feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + * @return feature along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion); + Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion, String featureName, Context context); /** - * List Features. + * Get feature. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Featureset name. This is case-sensitive. - * @param featuresetVersion Featureset Version identifier. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param featureName feature name. - * @param description Description of the featureset. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize Page size. - * @param context The context to associate with this operation. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param featureName Inference FeatureName name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. + * @return feature. */ - PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String skip, String tags, String featureName, String description, - ListViewType listViewType, Integer pageSize, Context context); + Feature get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, + String featureName); /** - * Get feature. + * List Features. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return feature along with {@link Response}. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String featuresetName, - String featuresetVersion, String featureName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion); /** - * Get feature. + * List Features. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param featuresetName Feature set name. This is case-sensitive. - * @param featuresetVersion Feature set version identifier. This is case-sensitive. - * @param featureName Feature Name. This is case-sensitive. + * @param featuresetName Name of Azure Machine Learning featuresets. + * @param featuresetVersion Inference Version name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param featureName feature name. + * @param description Description of the featureset. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize Page size. + * @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 feature. + * @return a paginated list of Feature entities as paginated response with {@link PagedIterable}. */ - Feature get(String resourceGroupName, String workspaceName, String featuresetName, String featuresetVersion, - String featureName); + PagedIterable list(String resourceGroupName, String workspaceName, String featuresetName, + String featuresetVersion, String skip, String tags, String featureName, String description, + ListViewType listViewType, Integer pageSize, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java index 0ca4d3b601f3..0502c9e70a19 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java index 6ab8fbd3a8b7..ee8f16cd2390 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,14 +22,14 @@ public final class FeaturesetContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of FeaturesetContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -84,15 +84,6 @@ public FeaturesetContainerProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public FeaturesetContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -103,13 +94,12 @@ public FeaturesetContainerProperties withProperties(Map properti } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public FeaturesetContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -119,8 +109,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +133,12 @@ public static FeaturesetContainerProperties fromJson(JsonReader jsonReader) thro if ("description".equals(fieldName)) { deserializedFeaturesetContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturesetContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedFeaturesetContainerProperties .withIsArchived(reader.getNullable(JsonReader::getBoolean)); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java index 7b22836acf16..178132e46be8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,45 +13,38 @@ */ public interface FeaturesetContainers { /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getEntityWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featureset. - * @param description description for the feature set. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @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 paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, String tags, - ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); + FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name); /** * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -63,7 +56,7 @@ PagedIterable list(String resourceGroupName, String workspa * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,32 +66,39 @@ PagedIterable list(String resourceGroupName, String workspa void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. */ - Response getEntityWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featureset. + * @param description description for the feature set. + * @param createdBy createdBy user 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 container. + * @return a paginated list of FeaturesetContainer entities as paginated response with {@link PagedIterable}. */ - FeaturesetContainer getEntity(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, String tags, + ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, + Context context); /** * Get container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java index f4d195f4b2d5..72e4cef8eb77 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public FeaturesetSpecification withPath(String path) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java index 5ee17b1b2555..1953c554b119 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName, name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @return the next definition stage. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java index f8991e62d788..85060c2433e8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -19,9 +19,9 @@ @Fluent public final class FeaturesetVersionBackfillRequest implements JsonSerializable { /* - * Specifies description + * Specified the data availability status that you want to backfill */ - private String displayName; + private List dataAvailabilityStatus; /* * Specifies description @@ -29,14 +29,14 @@ public final class FeaturesetVersionBackfillRequest implements JsonSerializable< private String description; /* - * Specifies the backfill feature window to be materialized + * Specifies description */ - private FeatureWindow featureWindow; + private String displayName; /* - * Specified the data availability status that you want to backfill + * Specifies the backfill feature window to be materialized */ - private List dataAvailabilityStatus; + private FeatureWindow featureWindow; /* * Specify the jobId to retry the failed materialization @@ -44,9 +44,9 @@ public final class FeaturesetVersionBackfillRequest implements JsonSerializable< private String jobId; /* - * Specifies the tags + * Specifies the properties */ - private Map tags; + private Map properties; /* * Specifies the compute resource settings @@ -59,9 +59,9 @@ public final class FeaturesetVersionBackfillRequest implements JsonSerializable< private Map sparkConfiguration; /* - * Specifies the properties + * Specifies the tags */ - private Map properties; + private Map tags; /** * Creates an instance of FeaturesetVersionBackfillRequest class. @@ -70,22 +70,23 @@ public FeaturesetVersionBackfillRequest() { } /** - * Get the displayName property: Specifies description. + * Get the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. * - * @return the displayName value. + * @return the dataAvailabilityStatus value. */ - public String displayName() { - return this.displayName; + public List dataAvailabilityStatus() { + return this.dataAvailabilityStatus; } /** - * Set the displayName property: Specifies description. + * Set the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. * - * @param displayName the displayName value to set. + * @param dataAvailabilityStatus the dataAvailabilityStatus value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withDisplayName(String displayName) { - this.displayName = displayName; + public FeaturesetVersionBackfillRequest + withDataAvailabilityStatus(List dataAvailabilityStatus) { + this.dataAvailabilityStatus = dataAvailabilityStatus; return this; } @@ -110,43 +111,42 @@ public FeaturesetVersionBackfillRequest withDescription(String description) { } /** - * Get the featureWindow property: Specifies the backfill feature window to be materialized. + * Get the displayName property: Specifies description. * - * @return the featureWindow value. + * @return the displayName value. */ - public FeatureWindow featureWindow() { - return this.featureWindow; + public String displayName() { + return this.displayName; } /** - * Set the featureWindow property: Specifies the backfill feature window to be materialized. + * Set the displayName property: Specifies description. * - * @param featureWindow the featureWindow value to set. + * @param displayName the displayName value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withFeatureWindow(FeatureWindow featureWindow) { - this.featureWindow = featureWindow; + public FeaturesetVersionBackfillRequest withDisplayName(String displayName) { + this.displayName = displayName; return this; } /** - * Get the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. + * Get the featureWindow property: Specifies the backfill feature window to be materialized. * - * @return the dataAvailabilityStatus value. + * @return the featureWindow value. */ - public List dataAvailabilityStatus() { - return this.dataAvailabilityStatus; + public FeatureWindow featureWindow() { + return this.featureWindow; } /** - * Set the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. + * Set the featureWindow property: Specifies the backfill feature window to be materialized. * - * @param dataAvailabilityStatus the dataAvailabilityStatus value to set. + * @param featureWindow the featureWindow value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest - withDataAvailabilityStatus(List dataAvailabilityStatus) { - this.dataAvailabilityStatus = dataAvailabilityStatus; + public FeaturesetVersionBackfillRequest withFeatureWindow(FeatureWindow featureWindow) { + this.featureWindow = featureWindow; return this; } @@ -171,22 +171,22 @@ public FeaturesetVersionBackfillRequest withJobId(String jobId) { } /** - * Get the tags property: Specifies the tags. + * Get the properties property: Specifies the properties. * - * @return the tags value. + * @return the properties value. */ - public Map tags() { - return this.tags; + public Map properties() { + return this.properties; } /** - * Set the tags property: Specifies the tags. + * Set the properties property: Specifies the properties. * - * @param tags the tags value to set. + * @param properties the properties value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withTags(Map tags) { - this.tags = tags; + public FeaturesetVersionBackfillRequest withProperties(Map properties) { + this.properties = properties; return this; } @@ -231,56 +231,42 @@ public FeaturesetVersionBackfillRequest withSparkConfiguration(Map properties() { - return this.properties; + public Map tags() { + return this.tags; } /** - * Set the properties property: Specifies the properties. + * Set the tags property: Specifies the tags. * - * @param properties the properties value to set. + * @param tags the tags value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withProperties(Map properties) { - this.properties = properties; + public FeaturesetVersionBackfillRequest withTags(Map tags) { + this.tags = tags; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (featureWindow() != null) { - featureWindow().validate(); - } - if (resource() != null) { - resource().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeJsonField("featureWindow", this.featureWindow); jsonWriter.writeArrayField("dataAvailabilityStatus", this.dataAvailabilityStatus, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeJsonField("featureWindow", this.featureWindow); jsonWriter.writeStringField("jobId", this.jobId); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("resource", this.resource); jsonWriter.writeMapField("sparkConfiguration", this.sparkConfiguration, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -300,30 +286,30 @@ public static FeaturesetVersionBackfillRequest fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("displayName".equals(fieldName)) { - deserializedFeaturesetVersionBackfillRequest.displayName = reader.getString(); + if ("dataAvailabilityStatus".equals(fieldName)) { + List dataAvailabilityStatus + = reader.readArray(reader1 -> DataAvailabilityStatus.fromString(reader1.getString())); + deserializedFeaturesetVersionBackfillRequest.dataAvailabilityStatus = dataAvailabilityStatus; } else if ("description".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.description = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedFeaturesetVersionBackfillRequest.displayName = reader.getString(); } else if ("featureWindow".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.featureWindow = FeatureWindow.fromJson(reader); - } else if ("dataAvailabilityStatus".equals(fieldName)) { - List dataAvailabilityStatus - = reader.readArray(reader1 -> DataAvailabilityStatus.fromString(reader1.getString())); - deserializedFeaturesetVersionBackfillRequest.dataAvailabilityStatus = dataAvailabilityStatus; } else if ("jobId".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.jobId = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillRequest.tags = tags; + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetVersionBackfillRequest.properties = properties; } else if ("resource".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.resource = MaterializationComputeResource.fromJson(reader); } else if ("sparkConfiguration".equals(fieldName)) { Map sparkConfiguration = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturesetVersionBackfillRequest.sparkConfiguration = sparkConfiguration; - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillRequest.properties = properties; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetVersionBackfillRequest.tags = tags; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java index 87510c5b9768..fe1bc7135344 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java index 9925055344c7..da4c75139796 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -18,9 +18,9 @@ @Fluent public final class FeaturesetVersionProperties extends AssetBase { /* - * Specifies the feature spec details + * Specifies list of entities */ - private FeaturesetSpecification specification; + private List entities; /* * Specifies the materialization settings @@ -28,19 +28,19 @@ public final class FeaturesetVersionProperties extends AssetBase { private MaterializationSettings materializationSettings; /* - * Specifies the asset stage + * Provisioning state for the featureset version container. */ - private String stage; + private AssetProvisioningState provisioningState; /* - * Specifies list of entities + * Specifies the feature spec details */ - private List entities; + private FeaturesetSpecification specification; /* - * Provisioning state for the featureset version container. + * Specifies the asset stage */ - private AssetProvisioningState provisioningState; + private String stage; /** * Creates an instance of FeaturesetVersionProperties class. @@ -49,22 +49,22 @@ public FeaturesetVersionProperties() { } /** - * Get the specification property: Specifies the feature spec details. + * Get the entities property: Specifies list of entities. * - * @return the specification value. + * @return the entities value. */ - public FeaturesetSpecification specification() { - return this.specification; + public List entities() { + return this.entities; } /** - * Set the specification property: Specifies the feature spec details. + * Set the entities property: Specifies list of entities. * - * @param specification the specification value to set. + * @param entities the entities value to set. * @return the FeaturesetVersionProperties object itself. */ - public FeaturesetVersionProperties withSpecification(FeaturesetSpecification specification) { - this.specification = specification; + public FeaturesetVersionProperties withEntities(List entities) { + this.entities = entities; return this; } @@ -89,60 +89,51 @@ public FeaturesetVersionProperties withMaterializationSettings(MaterializationSe } /** - * Get the stage property: Specifies the asset stage. - * - * @return the stage value. - */ - public String stage() { - return this.stage; - } - - /** - * Set the stage property: Specifies the asset stage. + * Get the provisioningState property: Provisioning state for the featureset version container. * - * @param stage the stage value to set. - * @return the FeaturesetVersionProperties object itself. + * @return the provisioningState value. */ - public FeaturesetVersionProperties withStage(String stage) { - this.stage = stage; - return this; + public AssetProvisioningState provisioningState() { + return this.provisioningState; } /** - * Get the entities property: Specifies list of entities. + * Get the specification property: Specifies the feature spec details. * - * @return the entities value. + * @return the specification value. */ - public List entities() { - return this.entities; + public FeaturesetSpecification specification() { + return this.specification; } /** - * Set the entities property: Specifies list of entities. + * Set the specification property: Specifies the feature spec details. * - * @param entities the entities value to set. + * @param specification the specification value to set. * @return the FeaturesetVersionProperties object itself. */ - public FeaturesetVersionProperties withEntities(List entities) { - this.entities = entities; + public FeaturesetVersionProperties withSpecification(FeaturesetSpecification specification) { + this.specification = specification; return this; } /** - * Get the provisioningState property: Provisioning state for the featureset version container. + * Get the stage property: Specifies the asset stage. * - * @return the provisioningState value. + * @return the stage value. */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; + public String stage() { + return this.stage; } /** - * {@inheritDoc} + * Set the stage property: Specifies the asset stage. + * + * @param stage the stage value to set. + * @return the FeaturesetVersionProperties object itself. */ - @Override - public FeaturesetVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public FeaturesetVersionProperties withStage(String stage) { + this.stage = stage; return this; } @@ -159,8 +150,8 @@ public FeaturesetVersionProperties withIsAnonymous(Boolean isAnonymous) { * {@inheritDoc} */ @Override - public FeaturesetVersionProperties withDescription(String description) { - super.withDescription(description); + public FeaturesetVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -168,8 +159,8 @@ public FeaturesetVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public FeaturesetVersionProperties withTags(Map tags) { - super.withTags(tags); + public FeaturesetVersionProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -183,19 +174,12 @@ public FeaturesetVersionProperties withProperties(Map properties } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (specification() != null) { - specification().validate(); - } - if (materializationSettings() != null) { - materializationSettings().validate(); - } + public FeaturesetVersionProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -205,14 +189,14 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeJsonField("specification", this.specification); + jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeArrayField("entities", this.entities, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("materializationSettings", this.materializationSettings); + jsonWriter.writeJsonField("specification", this.specification); jsonWriter.writeStringField("stage", this.stage); - jsonWriter.writeArrayField("entities", this.entities, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -233,29 +217,29 @@ public static FeaturesetVersionProperties fromJson(JsonReader jsonReader) throws if ("description".equals(fieldName)) { deserializedFeaturesetVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturesetVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturesetVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedFeaturesetVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("specification".equals(fieldName)) { - deserializedFeaturesetVersionProperties.specification = FeaturesetSpecification.fromJson(reader); - } else if ("materializationSettings".equals(fieldName)) { - deserializedFeaturesetVersionProperties.materializationSettings - = MaterializationSettings.fromJson(reader); - } else if ("stage".equals(fieldName)) { - deserializedFeaturesetVersionProperties.stage = reader.getString(); + } else if ("isArchived".equals(fieldName)) { + deserializedFeaturesetVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("entities".equals(fieldName)) { List entities = reader.readArray(reader1 -> reader1.getString()); deserializedFeaturesetVersionProperties.entities = entities; + } else if ("materializationSettings".equals(fieldName)) { + deserializedFeaturesetVersionProperties.materializationSettings + = MaterializationSettings.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedFeaturesetVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); + } else if ("specification".equals(fieldName)) { + deserializedFeaturesetVersionProperties.specification = FeaturesetSpecification.fromJson(reader); + } else if ("stage".equals(fieldName)) { + deserializedFeaturesetVersionProperties.stage = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java index 6cd4b95f7a0c..18bc241dc2f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,49 +13,40 @@ */ public interface FeaturesetVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Featureset name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featureset version. - * @param version featureset version. - * @param description description for the feature set version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); + FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,7 +59,7 @@ PagedIterable list(String resourceGroupName, String workspace * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param context The context to associate with this operation. @@ -79,40 +70,49 @@ PagedIterable list(String resourceGroupName, String workspace void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featureset version. + * @param version featureset version. + * @param description description for the feature set version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @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 version. + * @return a paginated list of FeaturesetVersion entities as paginated response with {@link PagedIterable}. */ - FeaturesetVersion get(String resourceGroupName, String workspaceName, String name, String version); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage, Context context); /** * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. @@ -128,7 +128,7 @@ FeaturesetVersionBackfillResponse backfill(String resourceGroupName, String work * Backfill. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Feature set version backfill request entity. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java index 4dfbe2c9ee57..04aa6eff0695 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java index b4a3af6e1dfc..87b0e473d034 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,14 +22,14 @@ public final class FeaturestoreEntityContainerProperties extends AssetContainer private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of FeaturestoreEntityContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -84,15 +84,6 @@ public FeaturestoreEntityContainerProperties withDescription(String description) return this; } - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -103,13 +94,12 @@ public FeaturestoreEntityContainerProperties withProperties(Map } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public FeaturestoreEntityContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -119,8 +109,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +133,12 @@ public static FeaturestoreEntityContainerProperties fromJson(JsonReader jsonRead if ("description".equals(fieldName)) { deserializedFeaturestoreEntityContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturestoreEntityContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturestoreEntityContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedFeaturestoreEntityContainerProperties .withIsArchived(reader.getNullable(JsonReader::getBoolean)); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java index a25dc10b4434..8c3b89e25a65 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,47 +13,38 @@ */ public interface FeaturestoreEntityContainers { /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @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 paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getEntityWithResponse(String resourceGroupName, String workspaceName, + String name, Context context); /** - * List featurestore entity containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param name name for the featurestore entity. - * @param description description for the featurestore entity. - * @param createdBy createdBy user name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. * @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 paginated list of FeaturestoreEntityContainer entities as paginated response with - * {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, - Context context); + FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name); /** * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -65,7 +56,7 @@ PagedIterable list(String resourceGroupName, String * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -75,32 +66,41 @@ PagedIterable list(String resourceGroupName, String void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with + * {@link PagedIterable}. */ - Response getEntityWithResponse(String resourceGroupName, String workspaceName, - String name, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List featurestore entity containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param name name for the featurestore entity. + * @param description description for the featurestore entity. + * @param createdBy createdBy user 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 container. + * @return a paginated list of FeaturestoreEntityContainer entities as paginated response with + * {@link PagedIterable}. */ - FeaturestoreEntityContainer getEntity(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + String tags, ListViewType listViewType, Integer pageSize, String name, String description, String createdBy, + Context context); /** * Get container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java index 43e8e959e830..40007633224c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName, name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @return the next definition stage. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java index 95ca53688b24..6a473807b37a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -23,14 +23,14 @@ public final class FeaturestoreEntityVersionProperties extends AssetBase { private List indexColumns; /* - * Specifies the asset stage + * Provisioning state for the featurestore entity version. */ - private String stage; + private AssetProvisioningState provisioningState; /* - * Provisioning state for the featurestore entity version. + * Specifies the asset stage */ - private AssetProvisioningState provisioningState; + private String stage; /** * Creates an instance of FeaturestoreEntityVersionProperties class. @@ -58,6 +58,15 @@ public FeaturestoreEntityVersionProperties withIndexColumns(List in return this; } + /** + * Get the provisioningState property: Provisioning state for the featurestore entity version. + * + * @return the provisioningState value. + */ + public AssetProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the stage property: Specifies the asset stage. * @@ -78,24 +87,6 @@ public FeaturestoreEntityVersionProperties withStage(String stage) { return this; } - /** - * Get the provisioningState property: Provisioning state for the featurestore entity version. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public FeaturestoreEntityVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - /** * {@inheritDoc} */ @@ -109,8 +100,8 @@ public FeaturestoreEntityVersionProperties withIsAnonymous(Boolean isAnonymous) * {@inheritDoc} */ @Override - public FeaturestoreEntityVersionProperties withDescription(String description) { - super.withDescription(description); + public FeaturestoreEntityVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -118,8 +109,8 @@ public FeaturestoreEntityVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public FeaturestoreEntityVersionProperties withTags(Map tags) { - super.withTags(tags); + public FeaturestoreEntityVersionProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -133,16 +124,12 @@ public FeaturestoreEntityVersionProperties withProperties(Map pr } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (indexColumns() != null) { - indexColumns().forEach(e -> e.validate()); - } + public FeaturestoreEntityVersionProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -152,10 +139,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeArrayField("indexColumns", this.indexColumns, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("stage", this.stage); return jsonWriter.writeEndObject(); @@ -179,26 +166,26 @@ public static FeaturestoreEntityVersionProperties fromJson(JsonReader jsonReader if ("description".equals(fieldName)) { deserializedFeaturestoreEntityVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturestoreEntityVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties - .withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturestoreEntityVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedFeaturestoreEntityVersionProperties .withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedFeaturestoreEntityVersionProperties + .withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("indexColumns".equals(fieldName)) { List indexColumns = reader.readArray(reader1 -> IndexColumn.fromJson(reader1)); deserializedFeaturestoreEntityVersionProperties.indexColumns = indexColumns; - } else if ("stage".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties.stage = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedFeaturestoreEntityVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); + } else if ("stage".equals(fieldName)) { + deserializedFeaturestoreEntityVersionProperties.stage = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java index 66b3383d2c86..448729bab8c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,49 +13,40 @@ */ public interface FeaturestoreEntityVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Feature entity name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param pageSize page size. - * @param versionName name for the featurestore entity version. - * @param version featurestore entity version. - * @param description description for the feature entity version. - * @param createdBy createdBy user name. - * @param stage Specifies the featurestore stage. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, - String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, - String description, String createdBy, String stage, Context context); + FeaturestoreEntityVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,7 +59,7 @@ PagedIterable list(String resourceGroupName, String w * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param context The context to associate with this operation. @@ -79,34 +70,43 @@ PagedIterable list(String resourceGroupName, String w void delete(String resourceGroupName, String workspaceName, String name, String version, Context context); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - String version, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Get version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. + * @param pageSize page size. + * @param versionName name for the featurestore entity version. + * @param version featurestore entity version. + * @param description description for the feature entity version. + * @param createdBy createdBy user name. + * @param stage Specifies the featurestore stage. + * @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 version. + * @return a paginated list of FeaturestoreEntityVersion entities as paginated response with {@link PagedIterable}. */ - FeaturestoreEntityVersion get(String resourceGroupName, String workspaceName, String name, String version); + PagedIterable list(String resourceGroupName, String workspaceName, String name, + String skip, String tags, ListViewType listViewType, Integer pageSize, String versionName, String version, + String description, String createdBy, String stage, Context context); /** * Get version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java index d5638921fc09..6ecdd585683e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class FeaturizationMode extends ExpandableStringEnum { /** - * Static value Auto for FeaturizationMode. + * Auto mode, system performs featurization without any custom featurization inputs. */ public static final FeaturizationMode AUTO = fromString("Auto"); /** - * Static value Custom for FeaturizationMode. + * Custom featurization. */ public static final FeaturizationMode CUSTOM = fromString("Custom"); /** - * Static value Off for FeaturizationMode. + * Featurization off. 'Forecasting' task cannot use this value. */ public static final FeaturizationMode OFF = fromString("Off"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java index 9e561ceaaf18..f1412a4fca69 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public FeaturizationSettings withDatasetLanguage(String datasetLanguage) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java new file mode 100644 index 000000000000..1da0cbae08e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.Map; + +/** + * FineTuning Job definition. + */ +@Fluent +public final class FineTuningJob extends JobBaseProperties { + /* + * [Required] Specifies the type of job. + */ + private JobType jobType = JobType.FINE_TUNING; + + /* + * [Required] + */ + private FineTuningVertical fineTuningDetails; + + /* + * [Required] + */ + private Map outputs; + + /* + * Queue settings for the job + */ + private QueueSettings queueSettings; + + /* + * Instance types and other resources for the job + */ + private JobResources resources; + + /** + * Creates an instance of FineTuningJob class. + */ + public FineTuningJob() { + } + + /** + * Get the jobType property: [Required] Specifies the type of job. + * + * @return the jobType value. + */ + @Override + public JobType jobType() { + return this.jobType; + } + + /** + * Get the fineTuningDetails property: [Required]. + * + * @return the fineTuningDetails value. + */ + public FineTuningVertical fineTuningDetails() { + return this.fineTuningDetails; + } + + /** + * Set the fineTuningDetails property: [Required]. + * + * @param fineTuningDetails the fineTuningDetails value to set. + * @return the FineTuningJob object itself. + */ + public FineTuningJob withFineTuningDetails(FineTuningVertical fineTuningDetails) { + this.fineTuningDetails = fineTuningDetails; + return this; + } + + /** + * Get the outputs property: [Required]. + * + * @return the outputs value. + */ + public Map outputs() { + return this.outputs; + } + + /** + * Set the outputs property: [Required]. + * + * @param outputs the outputs value to set. + * @return the FineTuningJob object itself. + */ + public FineTuningJob withOutputs(Map outputs) { + this.outputs = outputs; + return this; + } + + /** + * Get the queueSettings property: Queue settings for the job. + * + * @return the queueSettings value. + */ + public QueueSettings queueSettings() { + return this.queueSettings; + } + + /** + * Set the queueSettings property: Queue settings for the job. + * + * @param queueSettings the queueSettings value to set. + * @return the FineTuningJob object itself. + */ + public FineTuningJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; + return this; + } + + /** + * Get the resources property: Instance types and other resources for the job. + * + * @return the resources value. + */ + public JobResources resources() { + return this.resources; + } + + /** + * Set the resources property: Instance types and other resources for the job. + * + * @param resources the resources value to set. + * @return the FineTuningJob object itself. + */ + public FineTuningJob withResources(JobResources resources) { + this.resources = resources; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withComputeId(String computeId) { + super.withComputeId(computeId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withDisplayName(String displayName) { + super.withDisplayName(displayName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public FineTuningJob withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeStringField("experimentName", experimentName()); + jsonWriter.writeJsonField("identity", identity()); + jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("fineTuningDetails", this.fineTuningDetails); + jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeJsonField("queueSettings", this.queueSettings); + jsonWriter.writeJsonField("resources", this.resources); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FineTuningJob from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FineTuningJob 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 FineTuningJob. + */ + public static FineTuningJob fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FineTuningJob deserializedFineTuningJob = new FineTuningJob(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedFineTuningJob.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedFineTuningJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFineTuningJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedFineTuningJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedFineTuningJob.withComputeId(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedFineTuningJob.withDisplayName(reader.getString()); + } else if ("experimentName".equals(fieldName)) { + deserializedFineTuningJob.withExperimentName(reader.getString()); + } else if ("identity".equals(fieldName)) { + deserializedFineTuningJob.withIdentity(IdentityConfiguration.fromJson(reader)); + } else if ("isArchived".equals(fieldName)) { + deserializedFineTuningJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("notificationSetting".equals(fieldName)) { + deserializedFineTuningJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedFineTuningJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedFineTuningJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedFineTuningJob.withStatus(JobStatus.fromString(reader.getString())); + } else if ("fineTuningDetails".equals(fieldName)) { + deserializedFineTuningJob.fineTuningDetails = FineTuningVertical.fromJson(reader); + } else if ("outputs".equals(fieldName)) { + Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); + deserializedFineTuningJob.outputs = outputs; + } else if ("jobType".equals(fieldName)) { + deserializedFineTuningJob.jobType = JobType.fromString(reader.getString()); + } else if ("queueSettings".equals(fieldName)) { + deserializedFineTuningJob.queueSettings = QueueSettings.fromJson(reader); + } else if ("resources".equals(fieldName)) { + deserializedFineTuningJob.resources = JobResources.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFineTuningJob; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java new file mode 100644 index 000000000000..4867fd1a7c77 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for FineTuningTaskType. + */ +public final class FineTuningTaskType extends ExpandableStringEnum { + /** + * Static value ChatCompletion for FineTuningTaskType. + */ + public static final FineTuningTaskType CHAT_COMPLETION = fromString("ChatCompletion"); + + /** + * Static value TextCompletion for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_COMPLETION = fromString("TextCompletion"); + + /** + * Static value TextClassification for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_CLASSIFICATION = fromString("TextClassification"); + + /** + * Static value QuestionAnswering for FineTuningTaskType. + */ + public static final FineTuningTaskType QUESTION_ANSWERING = fromString("QuestionAnswering"); + + /** + * Static value TextSummarization for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_SUMMARIZATION = fromString("TextSummarization"); + + /** + * Static value TokenClassification for FineTuningTaskType. + */ + public static final FineTuningTaskType TOKEN_CLASSIFICATION = fromString("TokenClassification"); + + /** + * Static value TextTranslation for FineTuningTaskType. + */ + public static final FineTuningTaskType TEXT_TRANSLATION = fromString("TextTranslation"); + + /** + * Static value ImageClassification for FineTuningTaskType. + */ + public static final FineTuningTaskType IMAGE_CLASSIFICATION = fromString("ImageClassification"); + + /** + * Static value ImageInstanceSegmentation for FineTuningTaskType. + */ + public static final FineTuningTaskType IMAGE_INSTANCE_SEGMENTATION = fromString("ImageInstanceSegmentation"); + + /** + * Static value ImageObjectDetection for FineTuningTaskType. + */ + public static final FineTuningTaskType IMAGE_OBJECT_DETECTION = fromString("ImageObjectDetection"); + + /** + * Static value VideoMultiObjectTracking for FineTuningTaskType. + */ + public static final FineTuningTaskType VIDEO_MULTI_OBJECT_TRACKING = fromString("VideoMultiObjectTracking"); + + /** + * Creates a new instance of FineTuningTaskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FineTuningTaskType() { + } + + /** + * Creates or finds a FineTuningTaskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding FineTuningTaskType. + */ + public static FineTuningTaskType fromString(String name) { + return fromString(name, FineTuningTaskType.class); + } + + /** + * Gets known FineTuningTaskType values. + * + * @return known FineTuningTaskType values. + */ + public static Collection values() { + return values(FineTuningTaskType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java new file mode 100644 index 000000000000..653aa9d5244c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 FineTuningVertical model. + */ +@Fluent +public class FineTuningVertical implements JsonSerializable { + /* + * [Required] Enum to determine the type of fine tuning. + */ + private ModelProvider modelProvider = ModelProvider.fromString("FineTuningVertical"); + + /* + * [Required] Input model for fine tuning. + */ + private JobInput model; + + /* + * [Required] Fine tuning task type. + */ + private FineTuningTaskType taskType; + + /* + * [Required] Training data for fine tuning. + */ + private JobInput trainingData; + + /* + * Validation data for fine tuning. + */ + private JobInput validationData; + + /** + * Creates an instance of FineTuningVertical class. + */ + public FineTuningVertical() { + } + + /** + * Get the modelProvider property: [Required] Enum to determine the type of fine tuning. + * + * @return the modelProvider value. + */ + public ModelProvider modelProvider() { + return this.modelProvider; + } + + /** + * Get the model property: [Required] Input model for fine tuning. + * + * @return the model value. + */ + public JobInput model() { + return this.model; + } + + /** + * Set the model property: [Required] Input model for fine tuning. + * + * @param model the model value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withModel(JobInput model) { + this.model = model; + return this; + } + + /** + * Get the taskType property: [Required] Fine tuning task type. + * + * @return the taskType value. + */ + public FineTuningTaskType taskType() { + return this.taskType; + } + + /** + * Set the taskType property: [Required] Fine tuning task type. + * + * @param taskType the taskType value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withTaskType(FineTuningTaskType taskType) { + this.taskType = taskType; + return this; + } + + /** + * Get the trainingData property: [Required] Training data for fine tuning. + * + * @return the trainingData value. + */ + public JobInput trainingData() { + return this.trainingData; + } + + /** + * Set the trainingData property: [Required] Training data for fine tuning. + * + * @param trainingData the trainingData value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withTrainingData(JobInput trainingData) { + this.trainingData = trainingData; + return this; + } + + /** + * Get the validationData property: Validation data for fine tuning. + * + * @return the validationData value. + */ + public JobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data for fine tuning. + * + * @param validationData the validationData value to set. + * @return the FineTuningVertical object itself. + */ + public FineTuningVertical withValidationData(JobInput validationData) { + this.validationData = validationData; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); + jsonWriter.writeJsonField("trainingData", this.trainingData); + jsonWriter.writeStringField("modelProvider", this.modelProvider == null ? null : this.modelProvider.toString()); + jsonWriter.writeJsonField("validationData", this.validationData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FineTuningVertical from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FineTuningVertical 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 FineTuningVertical. + */ + public static FineTuningVertical fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("modelProvider".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AzureOpenAI".equals(discriminatorValue)) { + return AzureOpenAiFineTuning.fromJson(readerToUse.reset()); + } else if ("Custom".equals(discriminatorValue)) { + return CustomModelFineTuning.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static FineTuningVertical fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FineTuningVertical deserializedFineTuningVertical = new FineTuningVertical(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedFineTuningVertical.model = JobInput.fromJson(reader); + } else if ("taskType".equals(fieldName)) { + deserializedFineTuningVertical.taskType = FineTuningTaskType.fromString(reader.getString()); + } else if ("trainingData".equals(fieldName)) { + deserializedFineTuningVertical.trainingData = JobInput.fromJson(reader); + } else if ("modelProvider".equals(fieldName)) { + deserializedFineTuningVertical.modelProvider = ModelProvider.fromString(reader.getString()); + } else if ("validationData".equals(fieldName)) { + deserializedFineTuningVertical.validationData = JobInput.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFineTuningVertical; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FinetuningDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FinetuningDetails.java new file mode 100644 index 000000000000..c33bba5df5a9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FinetuningDetails.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.Map; + +/** + * The FinetuningDetails model. + */ +@Fluent +public final class FinetuningDetails implements JsonSerializable { + /* + * Finetuning Hyperparameters + */ + private Map hyperParameters; + + /* + * [Required] Student model for fine tuning. + */ + private JobInput studentModel; + + /** + * Creates an instance of FinetuningDetails class. + */ + public FinetuningDetails() { + } + + /** + * Get the hyperParameters property: Finetuning Hyperparameters. + * + * @return the hyperParameters value. + */ + public Map hyperParameters() { + return this.hyperParameters; + } + + /** + * Set the hyperParameters property: Finetuning Hyperparameters. + * + * @param hyperParameters the hyperParameters value to set. + * @return the FinetuningDetails object itself. + */ + public FinetuningDetails withHyperParameters(Map hyperParameters) { + this.hyperParameters = hyperParameters; + return this; + } + + /** + * Get the studentModel property: [Required] Student model for fine tuning. + * + * @return the studentModel value. + */ + public JobInput studentModel() { + return this.studentModel; + } + + /** + * Set the studentModel property: [Required] Student model for fine tuning. + * + * @param studentModel the studentModel value to set. + * @return the FinetuningDetails object itself. + */ + public FinetuningDetails withStudentModel(JobInput studentModel) { + this.studentModel = studentModel; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("studentModel", this.studentModel); + jsonWriter.writeMapField("hyperParameters", this.hyperParameters, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FinetuningDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FinetuningDetails 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 FinetuningDetails. + */ + public static FinetuningDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FinetuningDetails deserializedFinetuningDetails = new FinetuningDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("studentModel".equals(fieldName)) { + deserializedFinetuningDetails.studentModel = JobInput.fromJson(reader); + } else if ("hyperParameters".equals(fieldName)) { + Map hyperParameters = reader.readMap(reader1 -> reader1.getString()); + deserializedFinetuningDetails.hyperParameters = hyperParameters; + } else { + reader.skipChildren(); + } + } + + return deserializedFinetuningDetails; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java new file mode 100644 index 000000000000..1284f83b0c9a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Firewall Sku used for FQDN Rules. + */ +public final class FirewallSku extends ExpandableStringEnum { + /** + * Static value Standard for FirewallSku. + */ + public static final FirewallSku STANDARD = fromString("Standard"); + + /** + * Static value Basic for FirewallSku. + */ + public static final FirewallSku BASIC = fromString("Basic"); + + /** + * Creates a new instance of FirewallSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FirewallSku() { + } + + /** + * Creates or finds a FirewallSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding FirewallSku. + */ + public static FirewallSku fromString(String name) { + return fromString(name, FirewallSku.class); + } + + /** + * Gets known FirewallSku values. + * + * @return known FirewallSku values. + */ + public static Collection values() { + return values(FirewallSku.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java index a15fec20a97e..bf2d165565e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -41,8 +41,8 @@ public MonitoringInputDataType inputDataType() { * {@inheritDoc} */ @Override - public FixedInputData withDataContext(String dataContext) { - super.withDataContext(dataContext); + public FixedInputData withColumns(Map columns) { + super.withColumns(columns); return this; } @@ -50,8 +50,8 @@ public FixedInputData withDataContext(String dataContext) { * {@inheritDoc} */ @Override - public FixedInputData withJobInputType(JobInputType jobInputType) { - super.withJobInputType(jobInputType); + public FixedInputData withDataContext(String dataContext) { + super.withDataContext(dataContext); return this; } @@ -59,8 +59,8 @@ public FixedInputData withJobInputType(JobInputType jobInputType) { * {@inheritDoc} */ @Override - public FixedInputData withUri(String uri) { - super.withUri(uri); + public FixedInputData withJobInputType(JobInputType jobInputType) { + super.withJobInputType(jobInputType); return this; } @@ -68,21 +68,11 @@ public FixedInputData withUri(String uri) { * {@inheritDoc} */ @Override - public FixedInputData withColumns(Map columns) { - super.withColumns(columns); + public FixedInputData withUri(String uri) { + super.withUri(uri); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -91,8 +81,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); return jsonWriter.writeEndObject(); } @@ -117,11 +107,11 @@ public static FixedInputData fromJson(JsonReader jsonReader) throws IOException deserializedFixedInputData.withJobInputType(JobInputType.fromString(reader.getString())); } else if ("uri".equals(fieldName)) { deserializedFixedInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedFixedInputData.withDataContext(reader.getString()); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedFixedInputData.withColumns(columns); + } else if ("dataContext".equals(fieldName)) { + deserializedFixedInputData.withDataContext(reader.getString()); } else if ("inputDataType".equals(fieldName)) { deserializedFixedInputData.inputDataType = MonitoringInputDataType.fromString(reader.getString()); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java index 1da887f6d253..4ffadcfe8083 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -48,14 +48,6 @@ public FlavorData withData(Map data) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java index d648c8be3c2e..7506835933c5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public ForecastHorizonMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java index 593850044112..c6e35d14dcf8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class ForecastHorizonMode extends ExpandableStringEnum { /** - * Static value Auto for ForecastHorizonMode. + * Forecast horizon to be determined automatically. */ public static final ForecastHorizonMode AUTO = fromString("Auto"); /** - * Static value Custom for ForecastHorizonMode. + * Use the custom forecast horizon. */ public static final ForecastHorizonMode CUSTOM = fromString("Custom"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java index df9177f37632..0e5ea04aaf3c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,19 +22,14 @@ public final class Forecasting extends AutoMLVertical { private TaskType taskType = TaskType.FORECASTING; /* - * Primary metric for forecasting task. - */ - private ForecastingPrimaryMetrics primaryMetric; - - /* - * Forecasting task specific inputs. + * Columns to use for CVSplit data. */ - private ForecastingSettings forecastingSettings; + private List cvSplitColumnNames; /* - * Inputs for training phase for an AutoML Job. + * Featurization inputs needed for AutoML job. */ - private ForecastingTrainingSettings trainingSettings; + private TableVerticalFeaturizationSettings featurizationSettings; /* * Execution constraints for AutoMLJob. @@ -48,26 +43,22 @@ public final class Forecasting extends AutoMLVertical { private NCrossValidations nCrossValidations; /* - * Columns to use for CVSplit data. + * Test data input. */ - private List cvSplitColumnNames; + private MLTableJobInput testData; /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. + * The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. */ - private String weightColumnName; + private Double testDataSize; /* * Validation data inputs. */ private MLTableJobInput validationData; - /* - * Test data input. - */ - private MLTableJobInput testData; - /* * The fraction of training dataset that needs to be set aside for validation purpose. * Values between (0.0 , 1.0) @@ -76,16 +67,25 @@ public final class Forecasting extends AutoMLVertical { private Double validationDataSize; /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the + * data to be weighted up or down. */ - private Double testDataSize; + private String weightColumnName; /* - * Featurization inputs needed for AutoML job. + * Forecasting task specific inputs. */ - private TableVerticalFeaturizationSettings featurizationSettings; + private ForecastingSettings forecastingSettings; + + /* + * Primary metrics for Forecasting task. + */ + private ForecastingPrimaryMetrics primaryMetric; + + /* + * Inputs for training phase for an AutoML Job. + */ + private ForecastingTrainingSettings trainingSettings; /** * Creates an instance of Forecasting class. @@ -104,62 +104,42 @@ public TaskType taskType() { } /** - * Get the primaryMetric property: Primary metric for forecasting task. - * - * @return the primaryMetric value. - */ - public ForecastingPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for forecasting task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Forecasting object itself. - */ - public Forecasting withPrimaryMetric(ForecastingPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the forecastingSettings property: Forecasting task specific inputs. + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @return the forecastingSettings value. + * @return the cvSplitColumnNames value. */ - public ForecastingSettings forecastingSettings() { - return this.forecastingSettings; + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; } /** - * Set the forecastingSettings property: Forecasting task specific inputs. + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @param forecastingSettings the forecastingSettings value to set. + * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Forecasting object itself. */ - public Forecasting withForecastingSettings(ForecastingSettings forecastingSettings) { - this.forecastingSettings = forecastingSettings; + public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the trainingSettings value. + * @return the featurizationSettings value. */ - public ForecastingTrainingSettings trainingSettings() { - return this.trainingSettings; + public TableVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param trainingSettings the trainingSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the Forecasting object itself. */ - public Forecasting withTrainingSettings(ForecastingTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + public Forecasting withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } @@ -206,44 +186,46 @@ public Forecasting withNCrossValidations(NCrossValidations nCrossValidations) { } /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * Get the testData property: Test data input. * - * @return the cvSplitColumnNames value. + * @return the testData value. */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; + public MLTableJobInput testData() { + return this.testData; } /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * Set the testData property: Test data input. * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @param testData the testData value to set. * @return the Forecasting object itself. */ - public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; + public Forecasting withTestData(MLTableJobInput testData) { + this.testData = testData; return this; } /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. + * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. * - * @return the weightColumnName value. + * @return the testDataSize value. */ - public String weightColumnName() { - return this.weightColumnName; + public Double testDataSize() { + return this.testDataSize; } /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. + * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. * - * @param weightColumnName the weightColumnName value to set. + * @param testDataSize the testDataSize value to set. * @return the Forecasting object itself. */ - public Forecasting withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; + public Forecasting withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; return this; } @@ -267,26 +249,6 @@ public Forecasting withValidationData(MLTableJobInput validationData) { return this; } - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation * purpose. @@ -314,55 +276,84 @@ public Forecasting withValidationDataSize(Double validationDataSize) { } /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column + * as an input, causing rows in the data to be weighted up or down. * - * @return the testDataSize value. + * @return the weightColumnName value. */ - public Double testDataSize() { - return this.testDataSize; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column + * as an input, causing rows in the data to be weighted up or down. * - * @param testDataSize the testDataSize value to set. + * @param weightColumnName the weightColumnName value to set. * @return the Forecasting object itself. */ - public Forecasting withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; + public Forecasting withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the forecastingSettings property: Forecasting task specific inputs. * - * @return the featurizationSettings value. + * @return the forecastingSettings value. */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public ForecastingSettings forecastingSettings() { + return this.forecastingSettings; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the forecastingSettings property: Forecasting task specific inputs. * - * @param featurizationSettings the featurizationSettings value to set. + * @param forecastingSettings the forecastingSettings value to set. * @return the Forecasting object itself. */ - public Forecasting withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public Forecasting withForecastingSettings(ForecastingSettings forecastingSettings) { + this.forecastingSettings = forecastingSettings; return this; } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metrics for Forecasting task. + * + * @return the primaryMetric value. */ - @Override - public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); + public ForecastingPrimaryMetrics primaryMetric() { + return this.primaryMetric; + } + + /** + * Set the primaryMetric property: Primary metrics for Forecasting task. + * + * @param primaryMetric the primaryMetric value to set. + * @return the Forecasting object itself. + */ + public Forecasting withPrimaryMetric(ForecastingPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; + return this; + } + + /** + * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * + * @return the trainingSettings value. + */ + public ForecastingTrainingSettings trainingSettings() { + return this.trainingSettings; + } + + /** + * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * + * @param trainingSettings the trainingSettings value to set. + * @return the Forecasting object itself. + */ + public Forecasting withTrainingSettings(ForecastingTrainingSettings trainingSettings) { + this.trainingSettings = trainingSettings; return this; } @@ -370,8 +361,8 @@ public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public Forecasting withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -385,34 +376,12 @@ public Forecasting withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (forecastingSettings() != null) { - forecastingSettings().validate(); - } - if (trainingSettings() != null) { - trainingSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } + public Forecasting withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } /** @@ -425,19 +394,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("forecastingSettings", this.forecastingSettings); - jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); + jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("weightColumnName", this.weightColumnName); + jsonWriter.writeJsonField("forecastingSettings", this.forecastingSettings); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); + jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); return jsonWriter.writeEndObject(); } @@ -465,31 +434,31 @@ public static Forecasting fromJson(JsonReader jsonReader) throws IOException { deserializedForecasting.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedForecasting.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedForecasting.primaryMetric = ForecastingPrimaryMetrics.fromString(reader.getString()); - } else if ("forecastingSettings".equals(fieldName)) { - deserializedForecasting.forecastingSettings = ForecastingSettings.fromJson(reader); - } else if ("trainingSettings".equals(fieldName)) { - deserializedForecasting.trainingSettings = ForecastingTrainingSettings.fromJson(reader); + } else if ("cvSplitColumnNames".equals(fieldName)) { + List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedForecasting.cvSplitColumnNames = cvSplitColumnNames; + } else if ("featurizationSettings".equals(fieldName)) { + deserializedForecasting.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); } else if ("limitSettings".equals(fieldName)) { deserializedForecasting.limitSettings = TableVerticalLimitSettings.fromJson(reader); } else if ("nCrossValidations".equals(fieldName)) { deserializedForecasting.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedForecasting.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedForecasting.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedForecasting.validationData = MLTableJobInput.fromJson(reader); } else if ("testData".equals(fieldName)) { deserializedForecasting.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedForecasting.validationDataSize = reader.getNullable(JsonReader::getDouble); } else if ("testDataSize".equals(fieldName)) { deserializedForecasting.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedForecasting.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedForecasting.validationData = MLTableJobInput.fromJson(reader); + } else if ("validationDataSize".equals(fieldName)) { + deserializedForecasting.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("weightColumnName".equals(fieldName)) { + deserializedForecasting.weightColumnName = reader.getString(); + } else if ("forecastingSettings".equals(fieldName)) { + deserializedForecasting.forecastingSettings = ForecastingSettings.fromJson(reader); + } else if ("primaryMetric".equals(fieldName)) { + deserializedForecasting.primaryMetric = ForecastingPrimaryMetrics.fromString(reader.getString()); + } else if ("trainingSettings".equals(fieldName)) { + deserializedForecasting.trainingSettings = ForecastingTrainingSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java index 35d93cbc2f82..8a7d9d558971 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,97 +12,124 @@ */ public final class ForecastingModels extends ExpandableStringEnum { /** - * Static value AutoArima for ForecastingModels. + * Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to + * interpret the data and make future predictions. + * This model aims to explain data by using time series data on its past values and uses linear regression to make + * predictions. */ public static final ForecastingModels AUTO_ARIMA = fromString("AutoArima"); /** - * Static value Prophet for ForecastingModels. + * Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are + * fit with yearly, weekly, and daily seasonality, plus holiday effects. + * It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet + * is robust to missing data and shifts in the trend, and typically handles outliers well. */ public static final ForecastingModels PROPHET = fromString("Prophet"); /** - * Static value Naive for ForecastingModels. + * The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in + * the training data. */ public static final ForecastingModels NAIVE = fromString("Naive"); /** - * Static value SeasonalNaive for ForecastingModels. + * The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for + * each time-series in the training data. */ public static final ForecastingModels SEASONAL_NAIVE = fromString("SeasonalNaive"); /** - * Static value Average for ForecastingModels. + * The Average forecasting model makes predictions by carrying forward the average of the target values for each + * time-series in the training data. */ public static final ForecastingModels AVERAGE = fromString("Average"); /** - * Static value SeasonalAverage for ForecastingModels. + * The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest + * season of data for each time-series in the training data. */ public static final ForecastingModels SEASONAL_AVERAGE = fromString("SeasonalAverage"); /** - * Static value ExponentialSmoothing for ForecastingModels. + * Exponential smoothing is a time series forecasting method for univariate data that can be extended to support + * data with a systematic trend or seasonal component. */ public static final ForecastingModels EXPONENTIAL_SMOOTHING = fromString("ExponentialSmoothing"); /** - * Static value Arimax for ForecastingModels. + * An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple + * regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. + * This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of + * data pattern, i.e., level/trend /seasonality/cyclicity. */ public static final ForecastingModels ARIMAX = fromString("Arimax"); /** - * Static value TCNForecaster for ForecastingModels. + * TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro. */ public static final ForecastingModels TCNFORECASTER = fromString("TCNForecaster"); /** - * Static value ElasticNet for ForecastingModels. + * Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically + * the L1 and L2 penalty functions. */ public static final ForecastingModels ELASTIC_NET = fromString("ElasticNet"); /** - * Static value GradientBoosting for ForecastingModels. + * The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting + * algorithm process works on this theory of execution. */ public static final ForecastingModels GRADIENT_BOOSTING = fromString("GradientBoosting"); /** - * Static value DecisionTree for ForecastingModels. + * Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. + * The goal is to create a model that predicts the value of a target variable by learning simple decision rules + * inferred from the data features. */ public static final ForecastingModels DECISION_TREE = fromString("DecisionTree"); /** - * Static value KNN for ForecastingModels. + * K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + * which further means that the new data point will be assigned a value based on how closely it matches the points + * in the training set. */ public static final ForecastingModels KNN = fromString("KNN"); /** - * Static value LassoLars for ForecastingModels. + * Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as + * regularizer. */ public static final ForecastingModels LASSO_LARS = fromString("LassoLars"); /** - * Static value SGD for ForecastingModels. + * SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + * to find the model parameters that correspond to the best fit between predicted and actual outputs. + * It's an inexact but powerful technique. */ public static final ForecastingModels SGD = fromString("SGD"); /** - * Static value RandomForest for ForecastingModels. + * Random forest is a supervised learning algorithm. + * The "forest" it builds, is an ensemble of decision trees, usually trained with the "bagging" method. + * The general idea of the bagging method is that a combination of learning models increases the overall result. */ public static final ForecastingModels RANDOM_FOREST = fromString("RandomForest"); /** - * Static value ExtremeRandomTrees for ForecastingModels. + * Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. + * It is related to the widely used random forest algorithm. */ public static final ForecastingModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); /** - * Static value LightGBM for ForecastingModels. + * LightGBM is a gradient boosting framework that uses tree based learning algorithms. */ public static final ForecastingModels LIGHT_GBM = fromString("LightGBM"); /** - * Static value XGBoostRegressor for ForecastingModels. + * XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of + * base learners. */ public static final ForecastingModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java index 97883cd1a561..c886a6ff80a4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,23 +12,25 @@ */ public final class ForecastingPrimaryMetrics extends ExpandableStringEnum { /** - * Static value SpearmanCorrelation for ForecastingPrimaryMetrics. + * The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation. */ public static final ForecastingPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); /** - * Static value NormalizedRootMeanSquaredError for ForecastingPrimaryMetrics. + * The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different + * scales. */ public static final ForecastingPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR = fromString("NormalizedRootMeanSquaredError"); /** - * Static value R2Score for ForecastingPrimaryMetrics. + * The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. */ public static final ForecastingPrimaryMetrics R2SCORE = fromString("R2Score"); /** - * Static value NormalizedMeanAbsoluteError for ForecastingPrimaryMetrics. + * The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of + * (time) series with different scales. */ public static final ForecastingPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR = fromString("NormalizedMeanAbsoluteError"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java index f074478e59fc..0775506ba371 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -24,44 +24,28 @@ public final class ForecastingSettings implements JsonSerializable timeSeriesIdColumnNames; - /* * When forecasting, this parameter represents the period with which the forecast is desired, for example daily, * weekly, yearly, etc. The forecast frequency is dataset frequency by default. */ private String frequency; - /* - * Flag for generating lags for the numeric features with 'auto' or null. - */ - private FeatureLags featureLags; - /* * Set time series seasonality as an integer multiple of the series frequency. * If seasonality is set to 'auto', it will be inferred. @@ -74,23 +58,37 @@ public final class ForecastingSettings implements JsonSerializable timeSeriesIdColumnNames; + + /* + * Configure STL Decomposition of the time-series target column. + */ + private UseStl useStl; /** * Creates an instance of ForecastingSettings class. @@ -121,66 +119,46 @@ public ForecastingSettings withCountryOrRegionForHolidays(String countryOrRegion } /** - * Get the timeColumnName property: The name of the time column. This parameter is required when forecasting to - * specify the datetime column in the input data used for building the time series and inferring its frequency. - * - * @return the timeColumnName value. - */ - public String timeColumnName() { - return this.timeColumnName; - } - - /** - * Set the timeColumnName property: The name of the time column. This parameter is required when forecasting to - * specify the datetime column in the input data used for building the time series and inferring its frequency. - * - * @param timeColumnName the timeColumnName value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTimeColumnName(String timeColumnName) { - this.timeColumnName = timeColumnName; - return this; - } - - /** - * Get the targetLags property: The number of past periods to lag from the target column. + * Get the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For + * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be + * three days apart. * - * @return the targetLags value. + * @return the cvStepSize value. */ - public TargetLags targetLags() { - return this.targetLags; + public Integer cvStepSize() { + return this.cvStepSize; } /** - * Set the targetLags property: The number of past periods to lag from the target column. + * Set the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For + * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be + * three days apart. * - * @param targetLags the targetLags value to set. + * @param cvStepSize the cvStepSize value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withTargetLags(TargetLags targetLags) { - this.targetLags = targetLags; + public ForecastingSettings withCvStepSize(Integer cvStepSize) { + this.cvStepSize = cvStepSize; return this; } /** - * Get the targetRollingWindowSize property: The number of past periods used to create a rolling window average of - * the target column. + * Get the featureLags property: Flag for generating lags for the numeric features. * - * @return the targetRollingWindowSize value. + * @return the featureLags value. */ - public TargetRollingWindowSize targetRollingWindowSize() { - return this.targetRollingWindowSize; + public FeatureLags featureLags() { + return this.featureLags; } /** - * Set the targetRollingWindowSize property: The number of past periods used to create a rolling window average of - * the target column. + * Set the featureLags property: Flag for generating lags for the numeric features. * - * @param targetRollingWindowSize the targetRollingWindowSize value to set. + * @param featureLags the featureLags value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withTargetRollingWindowSize(TargetRollingWindowSize targetRollingWindowSize) { - this.targetRollingWindowSize = targetRollingWindowSize; + public ForecastingSettings withFeatureLags(FeatureLags featureLags) { + this.featureLags = featureLags; return this; } @@ -204,32 +182,6 @@ public ForecastingSettings withForecastHorizon(ForecastHorizon forecastHorizon) return this; } - /** - * Get the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to - * create multiple series. - * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type - * forecasting. - * - * @return the timeSeriesIdColumnNames value. - */ - public List timeSeriesIdColumnNames() { - return this.timeSeriesIdColumnNames; - } - - /** - * Set the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to - * create multiple series. - * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type - * forecasting. - * - * @param timeSeriesIdColumnNames the timeSeriesIdColumnNames value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTimeSeriesIdColumnNames(List timeSeriesIdColumnNames) { - this.timeSeriesIdColumnNames = timeSeriesIdColumnNames; - return this; - } - /** * Get the frequency property: When forecasting, this parameter represents the period with which the forecast is * desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default. @@ -252,26 +204,6 @@ public ForecastingSettings withFrequency(String frequency) { return this; } - /** - * Get the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. - * - * @return the featureLags value. - */ - public FeatureLags featureLags() { - return this.featureLags; - } - - /** - * Set the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. - * - * @param featureLags the featureLags value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withFeatureLags(FeatureLags featureLags) { - this.featureLags = featureLags; - return this; - } - /** * Get the seasonality property: Set time series seasonality as an integer multiple of the series frequency. * If seasonality is set to 'auto', it will be inferred. @@ -316,93 +248,133 @@ public ShortSeriesHandlingConfiguration shortSeriesHandlingConfig() { } /** - * Get the useStl property: Configure STL Decomposition of the time-series target column. + * Get the targetAggregateFunction property: Target aggregate function. * - * @return the useStl value. + * @return the targetAggregateFunction value. */ - public UseStl useStl() { - return this.useStl; + public TargetAggregationFunction targetAggregateFunction() { + return this.targetAggregateFunction; } /** - * Set the useStl property: Configure STL Decomposition of the time-series target column. + * Set the targetAggregateFunction property: Target aggregate function. * - * @param useStl the useStl value to set. + * @param targetAggregateFunction the targetAggregateFunction value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withUseStl(UseStl useStl) { - this.useStl = useStl; + public ForecastingSettings withTargetAggregateFunction(TargetAggregationFunction targetAggregateFunction) { + this.targetAggregateFunction = targetAggregateFunction; return this; } /** - * Get the targetAggregateFunction property: The function to be used to aggregate the time series target column to - * conform to a user specified frequency. - * If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. - * The possible target aggregation functions are: "sum", "max", "min" and "mean". + * Get the targetLags property: The number of past periods to lag from the target column. * - * @return the targetAggregateFunction value. + * @return the targetLags value. */ - public TargetAggregationFunction targetAggregateFunction() { - return this.targetAggregateFunction; + public TargetLags targetLags() { + return this.targetLags; } /** - * Set the targetAggregateFunction property: The function to be used to aggregate the time series target column to - * conform to a user specified frequency. - * If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. - * The possible target aggregation functions are: "sum", "max", "min" and "mean". + * Set the targetLags property: The number of past periods to lag from the target column. * - * @param targetAggregateFunction the targetAggregateFunction value to set. + * @param targetLags the targetLags value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withTargetAggregateFunction(TargetAggregationFunction targetAggregateFunction) { - this.targetAggregateFunction = targetAggregateFunction; + public ForecastingSettings withTargetLags(TargetLags targetLags) { + this.targetLags = targetLags; return this; } /** - * Get the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For - * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be - * three days apart. + * Get the targetRollingWindowSize property: The number of past periods used to create a rolling window average of + * the target column. * - * @return the cvStepSize value. + * @return the targetRollingWindowSize value. */ - public Integer cvStepSize() { - return this.cvStepSize; + public TargetRollingWindowSize targetRollingWindowSize() { + return this.targetRollingWindowSize; } /** - * Set the cvStepSize property: Number of periods between the origin time of one CV fold and the next fold. For - * example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be - * three days apart. + * Set the targetRollingWindowSize property: The number of past periods used to create a rolling window average of + * the target column. * - * @param cvStepSize the cvStepSize value to set. + * @param targetRollingWindowSize the targetRollingWindowSize value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withCvStepSize(Integer cvStepSize) { - this.cvStepSize = cvStepSize; + public ForecastingSettings withTargetRollingWindowSize(TargetRollingWindowSize targetRollingWindowSize) { + this.targetRollingWindowSize = targetRollingWindowSize; + return this; + } + + /** + * Get the timeColumnName property: The name of the time column. This parameter is required when forecasting to + * specify the datetime column in the input data used for building the time series and inferring its frequency. + * + * @return the timeColumnName value. + */ + public String timeColumnName() { + return this.timeColumnName; + } + + /** + * Set the timeColumnName property: The name of the time column. This parameter is required when forecasting to + * specify the datetime column in the input data used for building the time series and inferring its frequency. + * + * @param timeColumnName the timeColumnName value to set. + * @return the ForecastingSettings object itself. + */ + public ForecastingSettings withTimeColumnName(String timeColumnName) { + this.timeColumnName = timeColumnName; return this; } /** - * Validates the instance. + * Get the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to + * create multiple series. + * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type + * forecasting. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetLags() != null) { - targetLags().validate(); - } - if (targetRollingWindowSize() != null) { - targetRollingWindowSize().validate(); - } - if (forecastHorizon() != null) { - forecastHorizon().validate(); - } - if (seasonality() != null) { - seasonality().validate(); - } + * @return the timeSeriesIdColumnNames value. + */ + public List timeSeriesIdColumnNames() { + return this.timeSeriesIdColumnNames; + } + + /** + * Set the timeSeriesIdColumnNames property: The names of columns used to group a timeseries. It can be used to + * create multiple series. + * If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type + * forecasting. + * + * @param timeSeriesIdColumnNames the timeSeriesIdColumnNames value to set. + * @return the ForecastingSettings object itself. + */ + public ForecastingSettings withTimeSeriesIdColumnNames(List timeSeriesIdColumnNames) { + this.timeSeriesIdColumnNames = timeSeriesIdColumnNames; + return this; + } + + /** + * Get the useStl property: Configure STL Decomposition of the time-series target column. + * + * @return the useStl value. + */ + public UseStl useStl() { + return this.useStl; + } + + /** + * Set the useStl property: Configure STL Decomposition of the time-series target column. + * + * @param useStl the useStl value to set. + * @return the ForecastingSettings object itself. + */ + public ForecastingSettings withUseStl(UseStl useStl) { + this.useStl = useStl; + return this; } /** @@ -412,21 +384,21 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("countryOrRegionForHolidays", this.countryOrRegionForHolidays); - jsonWriter.writeStringField("timeColumnName", this.timeColumnName); - jsonWriter.writeJsonField("targetLags", this.targetLags); - jsonWriter.writeJsonField("targetRollingWindowSize", this.targetRollingWindowSize); + jsonWriter.writeNumberField("cvStepSize", this.cvStepSize); + jsonWriter.writeStringField("featureLags", this.featureLags == null ? null : this.featureLags.toString()); jsonWriter.writeJsonField("forecastHorizon", this.forecastHorizon); - jsonWriter.writeArrayField("timeSeriesIdColumnNames", this.timeSeriesIdColumnNames, - (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("frequency", this.frequency); - jsonWriter.writeStringField("featureLags", this.featureLags == null ? null : this.featureLags.toString()); jsonWriter.writeJsonField("seasonality", this.seasonality); jsonWriter.writeStringField("shortSeriesHandlingConfig", this.shortSeriesHandlingConfig == null ? null : this.shortSeriesHandlingConfig.toString()); - jsonWriter.writeStringField("useStl", this.useStl == null ? null : this.useStl.toString()); jsonWriter.writeStringField("targetAggregateFunction", this.targetAggregateFunction == null ? null : this.targetAggregateFunction.toString()); - jsonWriter.writeNumberField("cvStepSize", this.cvStepSize); + jsonWriter.writeJsonField("targetLags", this.targetLags); + jsonWriter.writeJsonField("targetRollingWindowSize", this.targetRollingWindowSize); + jsonWriter.writeStringField("timeColumnName", this.timeColumnName); + jsonWriter.writeArrayField("timeSeriesIdColumnNames", this.timeSeriesIdColumnNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("useStl", this.useStl == null ? null : this.useStl.toString()); return jsonWriter.writeEndObject(); } @@ -447,33 +419,33 @@ public static ForecastingSettings fromJson(JsonReader jsonReader) throws IOExcep if ("countryOrRegionForHolidays".equals(fieldName)) { deserializedForecastingSettings.countryOrRegionForHolidays = reader.getString(); - } else if ("timeColumnName".equals(fieldName)) { - deserializedForecastingSettings.timeColumnName = reader.getString(); - } else if ("targetLags".equals(fieldName)) { - deserializedForecastingSettings.targetLags = TargetLags.fromJson(reader); - } else if ("targetRollingWindowSize".equals(fieldName)) { - deserializedForecastingSettings.targetRollingWindowSize = TargetRollingWindowSize.fromJson(reader); + } else if ("cvStepSize".equals(fieldName)) { + deserializedForecastingSettings.cvStepSize = reader.getNullable(JsonReader::getInt); + } else if ("featureLags".equals(fieldName)) { + deserializedForecastingSettings.featureLags = FeatureLags.fromString(reader.getString()); } else if ("forecastHorizon".equals(fieldName)) { deserializedForecastingSettings.forecastHorizon = ForecastHorizon.fromJson(reader); - } else if ("timeSeriesIdColumnNames".equals(fieldName)) { - List timeSeriesIdColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedForecastingSettings.timeSeriesIdColumnNames = timeSeriesIdColumnNames; } else if ("frequency".equals(fieldName)) { deserializedForecastingSettings.frequency = reader.getString(); - } else if ("featureLags".equals(fieldName)) { - deserializedForecastingSettings.featureLags = FeatureLags.fromString(reader.getString()); } else if ("seasonality".equals(fieldName)) { deserializedForecastingSettings.seasonality = Seasonality.fromJson(reader); } else if ("shortSeriesHandlingConfig".equals(fieldName)) { deserializedForecastingSettings.shortSeriesHandlingConfig = ShortSeriesHandlingConfiguration.fromString(reader.getString()); - } else if ("useStl".equals(fieldName)) { - deserializedForecastingSettings.useStl = UseStl.fromString(reader.getString()); } else if ("targetAggregateFunction".equals(fieldName)) { deserializedForecastingSettings.targetAggregateFunction = TargetAggregationFunction.fromString(reader.getString()); - } else if ("cvStepSize".equals(fieldName)) { - deserializedForecastingSettings.cvStepSize = reader.getNullable(JsonReader::getInt); + } else if ("targetLags".equals(fieldName)) { + deserializedForecastingSettings.targetLags = TargetLags.fromJson(reader); + } else if ("targetRollingWindowSize".equals(fieldName)) { + deserializedForecastingSettings.targetRollingWindowSize = TargetRollingWindowSize.fromJson(reader); + } else if ("timeColumnName".equals(fieldName)) { + deserializedForecastingSettings.timeColumnName = reader.getString(); + } else if ("timeSeriesIdColumnNames".equals(fieldName)) { + List timeSeriesIdColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedForecastingSettings.timeSeriesIdColumnNames = timeSeriesIdColumnNames; + } else if ("useStl".equals(fieldName)) { + deserializedForecastingSettings.useStl = UseStl.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java index a554a0386243..ee68006a3b5a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -80,8 +80,8 @@ public List blockedTrainingAlgorithms() { * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); + public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + super.withEnableDnnTraining(enableDnnTraining); return this; } @@ -89,8 +89,8 @@ public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enable * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); + public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + super.withEnableModelExplainability(enableModelExplainability); return this; } @@ -98,8 +98,8 @@ public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettin * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); + public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); return this; } @@ -107,8 +107,8 @@ public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEn * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); + public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { + super.withEnableStackEnsemble(enableStackEnsemble); return this; } @@ -116,8 +116,8 @@ public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnse * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); + public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { + super.withEnableVoteEnsemble(enableVoteEnsemble); return this; } @@ -125,8 +125,8 @@ public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ens * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); + public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { + super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); return this; } @@ -134,35 +134,25 @@ public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableM * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); + public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + super.withStackEnsembleSettings(stackEnsembleSettings); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); jsonWriter.writeBooleanField("enableOnnxCompatibleModels", enableOnnxCompatibleModels()); - jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeBooleanField("enableStackEnsemble", enableStackEnsemble()); jsonWriter.writeBooleanField("enableVoteEnsemble", enableVoteEnsemble()); jsonWriter.writeStringField("ensembleModelDownloadTimeout", CoreUtils.durationToStringWithDays(ensembleModelDownloadTimeout())); - jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); - jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeArrayField("allowedTrainingAlgorithms", this.allowedTrainingAlgorithms, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, @@ -185,12 +175,15 @@ public static ForecastingTrainingSettings fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { deserializedForecastingTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { + .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableModelExplainability".equals(fieldName)) { deserializedForecastingTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); + .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { + deserializedForecastingTrainingSettings + .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedForecastingTrainingSettings .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); @@ -200,12 +193,9 @@ public static ForecastingTrainingSettings fromJson(JsonReader jsonReader) throws } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedForecastingTrainingSettings.withEnsembleModelDownloadTimeout( reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { + } else if ("stackEnsembleSettings".equals(fieldName)) { deserializedForecastingTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); } else if ("allowedTrainingAlgorithms".equals(fieldName)) { List allowedTrainingAlgorithms = reader.readArray(reader1 -> ForecastingModels.fromString(reader1.getString())); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java index 317381821842..d375c3d48157 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The FqdnEndpoint model. */ -@Fluent +@Immutable public final class FqdnEndpoint implements JsonSerializable { /* * The domainName property. @@ -30,7 +30,7 @@ public final class FqdnEndpoint implements JsonSerializable { /** * Creates an instance of FqdnEndpoint class. */ - public FqdnEndpoint() { + private FqdnEndpoint() { } /** @@ -42,17 +42,6 @@ public String domainName() { return this.domainName; } - /** - * Set the domainName property: The domainName property. - * - * @param domainName the domainName value to set. - * @return the FqdnEndpoint object itself. - */ - public FqdnEndpoint withDomainName(String domainName) { - this.domainName = domainName; - return this; - } - /** * Get the endpointDetails property: The endpointDetails property. * @@ -62,28 +51,6 @@ public List endpointDetails() { return this.endpointDetails; } - /** - * Set the endpointDetails property: The endpointDetails property. - * - * @param endpointDetails the endpointDetails value to set. - * @return the FqdnEndpoint object itself. - */ - public FqdnEndpoint withEndpointDetails(List endpointDetails) { - this.endpointDetails = endpointDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpointDetails() != null) { - endpointDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java index 34a7e4e60ee7..68fa556f7472 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The FqdnEndpointDetail model. */ -@Fluent +@Immutable public final class FqdnEndpointDetail implements JsonSerializable { /* * The port property. @@ -24,7 +24,7 @@ public final class FqdnEndpointDetail implements JsonSerializable { /* - * The properties property. + * The category property. */ - private FqdnEndpointsProperties properties; + private String category; - /** - * Creates an instance of FqdnEndpoints class. + /* + * The endpoints property. */ - public FqdnEndpoints() { - } + private List endpoints; /** - * Get the properties property: The properties property. - * - * @return the properties value. + * Creates an instance of FqdnEndpoints class. */ - public FqdnEndpointsProperties properties() { - return this.properties; + private FqdnEndpoints() { } /** - * Set the properties property: The properties property. + * Get the category property: The category property. * - * @param properties the properties value to set. - * @return the FqdnEndpoints object itself. + * @return the category value. */ - public FqdnEndpoints withProperties(FqdnEndpointsProperties properties) { - this.properties = properties; - return this; + public String category() { + return this.category; } /** - * Validates the instance. + * Get the endpoints property: The endpoints property. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the endpoints value. */ - public void validate() { - if (properties() != null) { - properties().validate(); - } + public List endpoints() { + return this.endpoints; } /** @@ -64,7 +57,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("category", this.category); + jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -83,8 +77,11 @@ public static FqdnEndpoints fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("properties".equals(fieldName)) { - deserializedFqdnEndpoints.properties = FqdnEndpointsProperties.fromJson(reader); + if ("category".equals(fieldName)) { + deserializedFqdnEndpoints.category = reader.getString(); + } else if ("endpoints".equals(fieldName)) { + List endpoints = reader.readArray(reader1 -> FqdnEndpoint.fromJson(reader1)); + deserializedFqdnEndpoints.endpoints = endpoints; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java deleted file mode 100644 index 481775542a4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 FqdnEndpointsProperties model. - */ -@Fluent -public final class FqdnEndpointsProperties implements JsonSerializable { - /* - * The category property. - */ - private String category; - - /* - * The endpoints property. - */ - private List endpoints; - - /** - * Creates an instance of FqdnEndpointsProperties class. - */ - public FqdnEndpointsProperties() { - } - - /** - * Get the category property: The category property. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: The category property. - * - * @param category the category value to set. - * @return the FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withCategory(String category) { - this.category = category; - 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 FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withEndpoints(List endpoints) { - this.endpoints = endpoints; - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", this.category); - jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FqdnEndpointsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FqdnEndpointsProperties 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 FqdnEndpointsProperties. - */ - public static FqdnEndpointsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FqdnEndpointsProperties deserializedFqdnEndpointsProperties = new FqdnEndpointsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedFqdnEndpointsProperties.category = reader.getString(); - } else if ("endpoints".equals(fieldName)) { - List endpoints = reader.readArray(reader1 -> FqdnEndpoint.fromJson(reader1)); - deserializedFqdnEndpointsProperties.endpoints = endpoints; - } else { - reader.skipChildren(); - } - } - - return deserializedFqdnEndpointsProperties; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java new file mode 100644 index 000000000000..ff1e407fbdff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Property bag for FQDN endpoints result. + */ +@Immutable +public final class FqdnEndpointsPropertyBag implements JsonSerializable { + /* + * The properties property. + */ + private FqdnEndpoints properties; + + /** + * Creates an instance of FqdnEndpointsPropertyBag class. + */ + private FqdnEndpointsPropertyBag() { + } + + /** + * Get the properties property: The properties property. + * + * @return the properties value. + */ + public FqdnEndpoints properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FqdnEndpointsPropertyBag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FqdnEndpointsPropertyBag 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 FqdnEndpointsPropertyBag. + */ + public static FqdnEndpointsPropertyBag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FqdnEndpointsPropertyBag deserializedFqdnEndpointsPropertyBag = new FqdnEndpointsPropertyBag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedFqdnEndpointsPropertyBag.properties = FqdnEndpoints.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFqdnEndpointsPropertyBag; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java index ab1445fcb8dc..72b137f572f7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * FQDN Outbound Rule for the managed network of a machine learning workspace. @@ -79,16 +80,6 @@ public FqdnOutboundRule withStatus(RuleStatus status) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -121,6 +112,11 @@ public static FqdnOutboundRule fromJson(JsonReader jsonReader) throws IOExceptio deserializedFqdnOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); } else if ("status".equals(fieldName)) { deserializedFqdnOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); + } else if ("errorInformation".equals(fieldName)) { + deserializedFqdnOutboundRule.withErrorInformation(reader.getString()); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedFqdnOutboundRule.withParentRuleNames(parentRuleNames); } else if ("type".equals(fieldName)) { deserializedFqdnOutboundRule.type = RuleType.fromString(reader.getString()); } else if ("destination".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java index 5d2ffe5cb7ef..a4b1970ea812 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The GetBlobReferenceForConsumptionDto model. */ -@Fluent +@Immutable public final class GetBlobReferenceForConsumptionDto implements JsonSerializable { /* * Blob uri, example: https://blob.windows.core.net/Container/Path @@ -22,19 +22,19 @@ public final class GetBlobReferenceForConsumptionDto implements JsonSerializable private String blobUri; /* - * The ARM id of the storage account + * Credential info to access storage account */ - private String storageAccountArmId; + private DataReferenceCredential credential; /* - * Credential info to access storage account + * The ARM id of the storage account */ - private DataReferenceCredential credential; + private String storageAccountArmId; /** * Creates an instance of GetBlobReferenceForConsumptionDto class. */ - public GetBlobReferenceForConsumptionDto() { + private GetBlobReferenceForConsumptionDto() { } /** @@ -46,37 +46,6 @@ public String blobUri() { return this.blobUri; } - /** - * Set the blobUri property: Blob uri, example: https://blob.windows.core.net/Container/Path. - * - * @param blobUri the blobUri value to set. - * @return the GetBlobReferenceForConsumptionDto object itself. - */ - public GetBlobReferenceForConsumptionDto withBlobUri(String blobUri) { - this.blobUri = blobUri; - return this; - } - - /** - * Get the storageAccountArmId property: The ARM id of the storage account. - * - * @return the storageAccountArmId value. - */ - public String storageAccountArmId() { - return this.storageAccountArmId; - } - - /** - * Set the storageAccountArmId property: The ARM id of the storage account. - * - * @param storageAccountArmId the storageAccountArmId value to set. - * @return the GetBlobReferenceForConsumptionDto object itself. - */ - public GetBlobReferenceForConsumptionDto withStorageAccountArmId(String storageAccountArmId) { - this.storageAccountArmId = storageAccountArmId; - return this; - } - /** * Get the credential property: Credential info to access storage account. * @@ -87,25 +56,12 @@ public DataReferenceCredential credential() { } /** - * Set the credential property: Credential info to access storage account. - * - * @param credential the credential value to set. - * @return the GetBlobReferenceForConsumptionDto object itself. - */ - public GetBlobReferenceForConsumptionDto withCredential(DataReferenceCredential credential) { - this.credential = credential; - return this; - } - - /** - * Validates the instance. + * Get the storageAccountArmId property: The ARM id of the storage account. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the storageAccountArmId value. */ - public void validate() { - if (credential() != null) { - credential().validate(); - } + public String storageAccountArmId() { + return this.storageAccountArmId; } /** @@ -115,8 +71,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("blobUri", this.blobUri); - jsonWriter.writeStringField("storageAccountArmId", this.storageAccountArmId); jsonWriter.writeJsonField("credential", this.credential); + jsonWriter.writeStringField("storageAccountArmId", this.storageAccountArmId); return jsonWriter.writeEndObject(); } @@ -138,10 +94,10 @@ public static GetBlobReferenceForConsumptionDto fromJson(JsonReader jsonReader) if ("blobUri".equals(fieldName)) { deserializedGetBlobReferenceForConsumptionDto.blobUri = reader.getString(); - } else if ("storageAccountArmId".equals(fieldName)) { - deserializedGetBlobReferenceForConsumptionDto.storageAccountArmId = reader.getString(); } else if ("credential".equals(fieldName)) { deserializedGetBlobReferenceForConsumptionDto.credential = DataReferenceCredential.fromJson(reader); + } else if ("storageAccountArmId".equals(fieldName)) { + deserializedGetBlobReferenceForConsumptionDto.storageAccountArmId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java index 7733de40102a..2198be845c6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,6 @@ public GetBlobReferenceSasRequestDto withBlobUri(String blobUri) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java index 5f490f3cec94..9d68b45b3b2f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java index 91b2ac925a4e..8ada3d225ef9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java index 16f0f5beaf4c..20d8685ce28b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -37,16 +37,6 @@ public SamplingAlgorithmType samplingAlgorithmType() { return this.samplingAlgorithmType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java new file mode 100644 index 000000000000..6937119b21d9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Environment configuration options. + */ +@Fluent +public final class GroupEnvironmentConfiguration implements JsonSerializable { + /* + * ARM resource ID of the environment specification for the inference pool. + */ + private String environmentId; + + /* + * Environment variables configuration for the inference pool. + */ + private List environmentVariables; + + /* + * Liveness probe monitors the health of the container regularly. + */ + private ProbeSettings livenessProbe; + + /* + * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as + * liveness probe. + */ + private ProbeSettings readinessProbe; + + /* + * This verifies whether the application within a container is started. Startup probes run before any other probe, + * and, unless it finishes successfully, disables other probes. + */ + private ProbeSettings startupProbe; + + /** + * Creates an instance of GroupEnvironmentConfiguration class. + */ + public GroupEnvironmentConfiguration() { + } + + /** + * Get the environmentId property: ARM resource ID of the environment specification for the inference pool. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: ARM resource ID of the environment specification for the inference pool. + * + * @param environmentId the environmentId value to set. + * @return the GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables configuration for the inference pool. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables configuration for the inference pool. + * + * @param environmentVariables the environmentVariables value to set. + * @return the GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withEnvironmentVariables(List environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the livenessProbe property: Liveness probe monitors the health of the container regularly. + * + * @return the livenessProbe value. + */ + public ProbeSettings livenessProbe() { + return this.livenessProbe; + } + + /** + * Set the livenessProbe property: Liveness probe monitors the health of the container regularly. + * + * @param livenessProbe the livenessProbe value to set. + * @return the GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withLivenessProbe(ProbeSettings livenessProbe) { + this.livenessProbe = livenessProbe; + return this; + } + + /** + * Get the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The + * properties and defaults are the same as liveness probe. + * + * @return the readinessProbe value. + */ + public ProbeSettings readinessProbe() { + return this.readinessProbe; + } + + /** + * Set the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The + * properties and defaults are the same as liveness probe. + * + * @param readinessProbe the readinessProbe value to set. + * @return the GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withReadinessProbe(ProbeSettings readinessProbe) { + this.readinessProbe = readinessProbe; + return this; + } + + /** + * Get the startupProbe property: This verifies whether the application within a container is started. Startup + * probes run before any other probe, and, unless it finishes successfully, disables other probes. + * + * @return the startupProbe value. + */ + public ProbeSettings startupProbe() { + return this.startupProbe; + } + + /** + * Set the startupProbe property: This verifies whether the application within a container is started. Startup + * probes run before any other probe, and, unless it finishes successfully, disables other probes. + * + * @param startupProbe the startupProbe value to set. + * @return the GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withStartupProbe(ProbeSettings startupProbe) { + this.startupProbe = startupProbe; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("environmentId", this.environmentId); + jsonWriter.writeArrayField("environmentVariables", this.environmentVariables, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); + jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); + jsonWriter.writeJsonField("startupProbe", this.startupProbe); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupEnvironmentConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupEnvironmentConfiguration 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 GroupEnvironmentConfiguration. + */ + public static GroupEnvironmentConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GroupEnvironmentConfiguration deserializedGroupEnvironmentConfiguration + = new GroupEnvironmentConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("environmentId".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.environmentId = reader.getString(); + } else if ("environmentVariables".equals(fieldName)) { + List environmentVariables + = reader.readArray(reader1 -> StringStringKeyValuePair.fromJson(reader1)); + deserializedGroupEnvironmentConfiguration.environmentVariables = environmentVariables; + } else if ("livenessProbe".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.livenessProbe = ProbeSettings.fromJson(reader); + } else if ("readinessProbe".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.readinessProbe = ProbeSettings.fromJson(reader); + } else if ("startupProbe".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.startupProbe = ProbeSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGroupEnvironmentConfiguration; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java new file mode 100644 index 000000000000..a5571811096e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Model configuration options. + */ +@Fluent +public final class GroupModelConfiguration implements JsonSerializable { + /* + * The URI path to the model. + */ + private String modelId; + + /** + * Creates an instance of GroupModelConfiguration class. + */ + public GroupModelConfiguration() { + } + + /** + * Get the modelId property: The URI path to the model. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: The URI path to the model. + * + * @param modelId the modelId value to set. + * @return the GroupModelConfiguration object itself. + */ + public GroupModelConfiguration withModelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("modelId", this.modelId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupModelConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupModelConfiguration 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 GroupModelConfiguration. + */ + public static GroupModelConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GroupModelConfiguration deserializedGroupModelConfiguration = new GroupModelConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("modelId".equals(fieldName)) { + deserializedGroupModelConfiguration.modelId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGroupModelConfiguration; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java new file mode 100644 index 000000000000..cf4770f1ea42 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; + +/** + * An immutable client-side representation of GroupStatus. + */ +public interface GroupStatus { + /** + * Gets the actualCapacityInfo property: Gets or sets the actual capacity info for the group. + * + * @return the actualCapacityInfo value. + */ + ActualCapacityInfo actualCapacityInfo(); + + /** + * Gets the endpointCount property: Gets or sets the actual number of endpoints in the group. + * + * @return the endpointCount value. + */ + Integer endpointCount(); + + /** + * Gets the requestedCapacity property: Gets or sets the request number of instances for the group. + * + * @return the requestedCapacity value. + */ + Integer requestedCapacity(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner object. + * + * @return the inner object. + */ + GroupStatusInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java index e757fd131a47..62a3d2e63a53 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -25,36 +24,10 @@ public final class HDInsight extends Compute { private ComputeType computeType = ComputeType.HDINSIGHT; /* - * HDInsight compute properties + * The properties property. */ private HDInsightProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of HDInsight class. */ @@ -72,7 +45,7 @@ public ComputeType computeType() { } /** - * Get the properties property: HDInsight compute properties. + * Get the properties property: The properties property. * * @return the properties value. */ @@ -81,7 +54,7 @@ public HDInsightProperties properties() { } /** - * Set the properties property: HDInsight compute properties. + * Set the properties property: The properties property. * * @param properties the properties value to set. * @return the HDInsight object itself. @@ -91,58 +64,6 @@ public HDInsight withProperties(HDInsightProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,23 @@ public static HDInsight fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedHDInsight.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedHDInsight.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedHDInsight.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedHDInsight.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedHDInsight.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedHDInsight.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedHDInsight.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedHDInsight.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedHDInsight.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedHDInsight.provisioningErrors = provisioningErrors; + deserializedHDInsight.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedHDInsight.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedHDInsight.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedHDInsight.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java index be00bc1a95eb..49391a0ad9b0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -97,17 +97,6 @@ public HDInsightProperties withAdministratorAccount(VirtualMachineSshCredentials return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java deleted file mode 100644 index 08811ff2412a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 HDInsightSchema model. - */ -@Fluent -public class HDInsightSchema implements JsonSerializable { - /* - * HDInsight compute properties - */ - private HDInsightProperties properties; - - /** - * Creates an instance of HDInsightSchema class. - */ - public HDInsightSchema() { - } - - /** - * Get the properties property: HDInsight compute properties. - * - * @return the properties value. - */ - public HDInsightProperties properties() { - return this.properties; - } - - /** - * Set the properties property: HDInsight compute properties. - * - * @param properties the properties value to set. - * @return the HDInsightSchema object itself. - */ - public HDInsightSchema withProperties(HDInsightProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HDInsightSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HDInsightSchema 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 HDInsightSchema. - */ - public static HDInsightSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HDInsightSchema deserializedHDInsightSchema = new HDInsightSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedHDInsightSchema.properties = HDInsightProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHDInsightSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IPRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IPRule.java new file mode 100644 index 000000000000..f60b630dc28f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IPRule.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Contains an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all + * addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + */ +@Fluent +public final class IPRule implements JsonSerializable { + /* + * An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all + * addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + */ + private String value; + + /** + * Creates an instance of IPRule class. + */ + public IPRule() { + } + + /** + * Get the value property: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or + * '124.56.78.0/24' (all addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or + * '124.56.78.0/24' (all addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + * + * @param value the value value to set. + * @return the IPRule object itself. + */ + public IPRule withValue(String value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IPRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IPRule 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 IPRule. + */ + public static IPRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IPRule deserializedIPRule = new IPRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedIPRule.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIPRule; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java index 2e462d48e528..d693a9baf363 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,22 +61,6 @@ public IdAssetReference withAssetId(String assetId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (assetId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property assetId in model IdAssetReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdAssetReference.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java index 213450120e9a..3a7fde22f275 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public IdentityConfigurationType identityType() { return this.identityType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java index c30c98880e0a..e1010e586124 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java index 005ee944ae13..11260763d14c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ import java.io.IOException; /** - * Identity that will be used to access key vault for encryption at rest. + * Identity object used for encryption. */ @Fluent public final class IdentityForCmk implements JsonSerializable { /* - * The ArmId of the user assigned identity that will be used to access the customer managed key vault + * UserAssignedIdentity to be used to fetch the encryption key from keyVault */ private String userAssignedIdentity; @@ -28,8 +28,7 @@ public IdentityForCmk() { } /** - * Get the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. + * Get the userAssignedIdentity property: UserAssignedIdentity to be used to fetch the encryption key from keyVault. * * @return the userAssignedIdentity value. */ @@ -38,8 +37,7 @@ public String userAssignedIdentity() { } /** - * Set the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. + * Set the userAssignedIdentity property: UserAssignedIdentity to be used to fetch the encryption key from keyVault. * * @param userAssignedIdentity the userAssignedIdentity value to set. * @return the IdentityForCmk object itself. @@ -49,14 +47,6 @@ public IdentityForCmk withUserAssignedIdentity(String userAssignedIdentity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java new file mode 100644 index 000000000000..514ad57689f3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Stops compute instance after user defined period of inactivity. + */ +@Fluent +public final class IdleShutdownSetting implements JsonSerializable { + /* + * Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + */ + private String idleTimeBeforeShutdown; + + /** + * Creates an instance of IdleShutdownSetting class. + */ + public IdleShutdownSetting() { + } + + /** + * Get the idleTimeBeforeShutdown property: Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @return the idleTimeBeforeShutdown value. + */ + public String idleTimeBeforeShutdown() { + return this.idleTimeBeforeShutdown; + } + + /** + * Set the idleTimeBeforeShutdown property: Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + * + * @param idleTimeBeforeShutdown the idleTimeBeforeShutdown value to set. + * @return the IdleShutdownSetting object itself. + */ + public IdleShutdownSetting withIdleTimeBeforeShutdown(String idleTimeBeforeShutdown) { + this.idleTimeBeforeShutdown = idleTimeBeforeShutdown; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("idleTimeBeforeShutdown", this.idleTimeBeforeShutdown); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdleShutdownSetting from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdleShutdownSetting 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 IdleShutdownSetting. + */ + public static IdleShutdownSetting fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdleShutdownSetting deserializedIdleShutdownSetting = new IdleShutdownSetting(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("idleTimeBeforeShutdown".equals(fieldName)) { + deserializedIdleShutdownSetting.idleTimeBeforeShutdown = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdleShutdownSetting; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java index f47808eb5974..6e25869ed1cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,22 +14,30 @@ import java.util.Map; /** - * Describes the Image Specifications. + * The Image model. */ @Fluent public final class Image implements JsonSerializable { /* - * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + * Type of the image + * + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images + * (custom and curated) */ private ImageType type; /* - * Image reference + * Image reference URL if type is docker. Environment name if type is azureml */ private String reference; /* - * Describes the Image Specifications + * Version of image being used. If latest then skip this field + */ + private String version; + + /* + * Additional properties */ private Map additionalProperties; @@ -40,8 +48,10 @@ public Image() { } /** - * Get the type property: Type of the image. Possible values are: docker - For docker images. azureml - For AzureML - * images. + * Get the type property: Type of the image + * + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images + * (custom and curated). * * @return the type value. */ @@ -50,8 +60,10 @@ public ImageType type() { } /** - * Set the type property: Type of the image. Possible values are: docker - For docker images. azureml - For AzureML - * images. + * Set the type property: Type of the image + * + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images + * (custom and curated). * * @param type the type value to set. * @return the Image object itself. @@ -62,7 +74,7 @@ public Image withType(ImageType type) { } /** - * Get the reference property: Image reference. + * Get the reference property: Image reference URL if type is docker. Environment name if type is azureml. * * @return the reference value. */ @@ -71,7 +83,7 @@ public String reference() { } /** - * Set the reference property: Image reference. + * Set the reference property: Image reference URL if type is docker. Environment name if type is azureml. * * @param reference the reference value to set. * @return the Image object itself. @@ -82,7 +94,27 @@ public Image withReference(String reference) { } /** - * Get the additionalProperties property: Describes the Image Specifications. + * Get the version property: Version of image being used. If latest then skip this field. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of image being used. If latest then skip this field. + * + * @param version the version value to set. + * @return the Image object itself. + */ + public Image withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the additionalProperties property: Additional properties. * * @return the additionalProperties value. */ @@ -91,7 +123,7 @@ public Map additionalProperties() { } /** - * Set the additionalProperties property: Describes the Image Specifications. + * Set the additionalProperties property: Additional properties. * * @param additionalProperties the additionalProperties value to set. * @return the Image object itself. @@ -101,14 +133,6 @@ public Image withAdditionalProperties(Map additionalProperties) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -117,6 +141,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("reference", this.reference); + jsonWriter.writeStringField("version", this.version); if (additionalProperties != null) { for (Map.Entry additionalProperty : additionalProperties.entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -145,6 +170,8 @@ public static Image fromJson(JsonReader jsonReader) throws IOException { deserializedImage.type = ImageType.fromString(reader.getString()); } else if ("reference".equals(fieldName)) { deserializedImage.reference = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedImage.version = reader.getString(); } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java index fddff7e1c2c5..d0208b7794af 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,11 +22,6 @@ public final class ImageClassification extends AutoMLVertical { */ private TaskType taskType = TaskType.IMAGE_CLASSIFICATION; - /* - * Primary metric to optimize for this task. - */ - private ClassificationPrimaryMetrics primaryMetric; - /* * Settings used for training the model. */ @@ -60,6 +54,11 @@ public final class ImageClassification extends AutoMLVertical { */ private Double validationDataSize; + /* + * Primary metrics for classification tasks. + */ + private ClassificationPrimaryMetrics primaryMetric; + /** * Creates an instance of ImageClassification class. */ @@ -76,26 +75,6 @@ public TaskType taskType() { return this.taskType; } - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - /** * Get the modelSettings property: Settings used for training the model. * @@ -225,11 +204,22 @@ public ImageClassification withValidationDataSize(Double validationDataSize) { } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metrics for classification tasks. + * + * @return the primaryMetric value. */ - @Override - public ImageClassification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); + public ClassificationPrimaryMetrics primaryMetric() { + return this.primaryMetric; + } + + /** + * Set the primaryMetric property: Primary metrics for classification tasks. + * + * @param primaryMetric the primaryMetric value to set. + * @return the ImageClassification object itself. + */ + public ImageClassification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; return this; } @@ -237,8 +227,8 @@ public ImageClassification withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public ImageClassification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageClassification withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -252,36 +242,14 @@ public ImageClassification withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassification")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } + public ImageClassification withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(ImageClassification.class); - /** * {@inheritDoc} */ @@ -293,12 +261,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("modelSettings", this.modelSettings); jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); jsonWriter.writeJsonField("validationData", this.validationData); jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); return jsonWriter.writeEndObject(); } @@ -328,9 +296,6 @@ public static ImageClassification fromJson(JsonReader jsonReader) throws IOExcep deserializedImageClassification.limitSettings = ImageLimitSettings.fromJson(reader); } else if ("taskType".equals(fieldName)) { deserializedImageClassification.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageClassification.primaryMetric - = ClassificationPrimaryMetrics.fromString(reader.getString()); } else if ("modelSettings".equals(fieldName)) { deserializedImageClassification.modelSettings = ImageModelSettingsClassification.fromJson(reader); } else if ("searchSpace".equals(fieldName)) { @@ -343,6 +308,9 @@ public static ImageClassification fromJson(JsonReader jsonReader) throws IOExcep deserializedImageClassification.validationData = MLTableJobInput.fromJson(reader); } else if ("validationDataSize".equals(fieldName)) { deserializedImageClassification.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("primaryMetric".equals(fieldName)) { + deserializedImageClassification.primaryMetric + = ClassificationPrimaryMetrics.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java deleted file mode 100644 index 84339846a46f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 ImageClassificationBase model. - */ -@Fluent -public class ImageClassificationBase extends ImageVertical { - /* - * Settings used for training the model. - */ - private ImageModelSettingsClassification modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /** - * Creates an instance of ImageClassificationBase class. - */ - public ImageClassificationBase() { - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsClassification modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageClassificationBase object itself. - */ - public ImageClassificationBase withModelSettings(ImageModelSettingsClassification modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageClassificationBase object itself. - */ - public ImageClassificationBase withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withLimitSettings(ImageLimitSettings limitSettings) { - super.withLimitSettings(limitSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withSweepSettings(ImageSweepSettings sweepSettings) { - super.withSweepSettings(sweepSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withValidationData(MLTableJobInput validationData) { - super.withValidationData(validationData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageClassificationBase withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", limitSettings()); - jsonWriter.writeJsonField("sweepSettings", sweepSettings()); - jsonWriter.writeJsonField("validationData", validationData()); - jsonWriter.writeNumberField("validationDataSize", validationDataSize()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageClassificationBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageClassificationBase 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 ImageClassificationBase. - */ - public static ImageClassificationBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageClassificationBase deserializedImageClassificationBase = new ImageClassificationBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedImageClassificationBase.withLimitSettings(ImageLimitSettings.fromJson(reader)); - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageClassificationBase.withSweepSettings(ImageSweepSettings.fromJson(reader)); - } else if ("validationData".equals(fieldName)) { - deserializedImageClassificationBase.withValidationData(MLTableJobInput.fromJson(reader)); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageClassificationBase - .withValidationDataSize(reader.getNullable(JsonReader::getDouble)); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageClassificationBase.modelSettings - = ImageModelSettingsClassification.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsClassification.fromJson(reader1)); - deserializedImageClassificationBase.searchSpace = searchSpace; - } else { - reader.skipChildren(); - } - } - - return deserializedImageClassificationBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java index b0f14d55141c..b11a0d2d20c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,11 +22,6 @@ public final class ImageClassificationMultilabel extends AutoMLVertical { */ private TaskType taskType = TaskType.IMAGE_CLASSIFICATION_MULTILABEL; - /* - * Primary metric to optimize for this task. - */ - private ClassificationMultilabelPrimaryMetrics primaryMetric; - /* * Settings used for training the model. */ @@ -60,6 +54,11 @@ public final class ImageClassificationMultilabel extends AutoMLVertical { */ private Double validationDataSize; + /* + * Primary metrics for classification multilabel tasks. + */ + private ClassificationMultilabelPrimaryMetrics primaryMetric; + /** * Creates an instance of ImageClassificationMultilabel class. */ @@ -76,26 +75,6 @@ public TaskType taskType() { return this.taskType; } - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ClassificationMultilabelPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withPrimaryMetric(ClassificationMultilabelPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - /** * Get the modelSettings property: Settings used for training the model. * @@ -226,11 +205,22 @@ public ImageClassificationMultilabel withValidationDataSize(Double validationDat } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metrics for classification multilabel tasks. + * + * @return the primaryMetric value. */ - @Override - public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); + public ClassificationMultilabelPrimaryMetrics primaryMetric() { + return this.primaryMetric; + } + + /** + * Set the primaryMetric property: Primary metrics for classification multilabel tasks. + * + * @param primaryMetric the primaryMetric value to set. + * @return the ImageClassificationMultilabel object itself. + */ + public ImageClassificationMultilabel withPrimaryMetric(ClassificationMultilabelPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; return this; } @@ -238,8 +228,8 @@ public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) * {@inheritDoc} */ @Override - public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -253,36 +243,14 @@ public ImageClassificationMultilabel withTargetColumnName(String targetColumnNam } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassificationMultilabel")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } + public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(ImageClassificationMultilabel.class); - /** * {@inheritDoc} */ @@ -294,12 +262,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("modelSettings", this.modelSettings); jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); jsonWriter.writeJsonField("validationData", this.validationData); jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); return jsonWriter.writeEndObject(); } @@ -331,9 +299,6 @@ public static ImageClassificationMultilabel fromJson(JsonReader jsonReader) thro deserializedImageClassificationMultilabel.limitSettings = ImageLimitSettings.fromJson(reader); } else if ("taskType".equals(fieldName)) { deserializedImageClassificationMultilabel.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageClassificationMultilabel.primaryMetric - = ClassificationMultilabelPrimaryMetrics.fromString(reader.getString()); } else if ("modelSettings".equals(fieldName)) { deserializedImageClassificationMultilabel.modelSettings = ImageModelSettingsClassification.fromJson(reader); @@ -348,6 +313,9 @@ public static ImageClassificationMultilabel fromJson(JsonReader jsonReader) thro } else if ("validationDataSize".equals(fieldName)) { deserializedImageClassificationMultilabel.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("primaryMetric".equals(fieldName)) { + deserializedImageClassificationMultilabel.primaryMetric + = ClassificationMultilabelPrimaryMetrics.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java new file mode 100644 index 000000000000..eb5050995324 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ImageDetails model. + */ +@Fluent +public final class ImageDetails implements JsonSerializable { + /* + * Indicates if image exists + */ + private Boolean exists; + + /* + * Container image details + */ + private ImageInfo image; + + /* + * Vulnerability findings details + */ + private VulnerabilityFindings vulnerabilityFindings; + + /** + * Creates an instance of ImageDetails class. + */ + public ImageDetails() { + } + + /** + * Get the exists property: Indicates if image exists. + * + * @return the exists value. + */ + public Boolean exists() { + return this.exists; + } + + /** + * Set the exists property: Indicates if image exists. + * + * @param exists the exists value to set. + * @return the ImageDetails object itself. + */ + public ImageDetails withExists(Boolean exists) { + this.exists = exists; + return this; + } + + /** + * Get the image property: Container image details. + * + * @return the image value. + */ + public ImageInfo image() { + return this.image; + } + + /** + * Set the image property: Container image details. + * + * @param image the image value to set. + * @return the ImageDetails object itself. + */ + public ImageDetails withImage(ImageInfo image) { + this.image = image; + return this; + } + + /** + * Get the vulnerabilityFindings property: Vulnerability findings details. + * + * @return the vulnerabilityFindings value. + */ + public VulnerabilityFindings vulnerabilityFindings() { + return this.vulnerabilityFindings; + } + + /** + * Set the vulnerabilityFindings property: Vulnerability findings details. + * + * @param vulnerabilityFindings the vulnerabilityFindings value to set. + * @return the ImageDetails object itself. + */ + public ImageDetails withVulnerabilityFindings(VulnerabilityFindings vulnerabilityFindings) { + this.vulnerabilityFindings = vulnerabilityFindings; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("exists", this.exists); + jsonWriter.writeJsonField("image", this.image); + jsonWriter.writeJsonField("vulnerabilityFindings", this.vulnerabilityFindings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImageDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImageDetails 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 ImageDetails. + */ + public static ImageDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImageDetails deserializedImageDetails = new ImageDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exists".equals(fieldName)) { + deserializedImageDetails.exists = reader.getNullable(JsonReader::getBoolean); + } else if ("image".equals(fieldName)) { + deserializedImageDetails.image = ImageInfo.fromJson(reader); + } else if ("vulnerabilityFindings".equals(fieldName)) { + deserializedImageDetails.vulnerabilityFindings = VulnerabilityFindings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImageDetails; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java new file mode 100644 index 000000000000..3c2be2ed54f4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ImageInfo model. + */ +@Fluent +public final class ImageInfo implements JsonSerializable { + /* + * Image digest + */ + private String digest; + + /* + * Container registry host name + */ + private String hostname; + + /* + * Repository name + */ + private String repository; + + /* + * Image tag + */ + private String tag; + + /** + * Creates an instance of ImageInfo class. + */ + public ImageInfo() { + } + + /** + * Get the digest property: Image digest. + * + * @return the digest value. + */ + public String digest() { + return this.digest; + } + + /** + * Set the digest property: Image digest. + * + * @param digest the digest value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withDigest(String digest) { + this.digest = digest; + return this; + } + + /** + * Get the hostname property: Container registry host name. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: Container registry host name. + * + * @param hostname the hostname value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the repository property: Repository name. + * + * @return the repository value. + */ + public String repository() { + return this.repository; + } + + /** + * Set the repository property: Repository name. + * + * @param repository the repository value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withRepository(String repository) { + this.repository = repository; + return this; + } + + /** + * Get the tag property: Image tag. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Set the tag property: Image tag. + * + * @param tag the tag value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withTag(String tag) { + this.tag = tag; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("digest", this.digest); + jsonWriter.writeStringField("hostname", this.hostname); + jsonWriter.writeStringField("repository", this.repository); + jsonWriter.writeStringField("tag", this.tag); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImageInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImageInfo 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 ImageInfo. + */ + public static ImageInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImageInfo deserializedImageInfo = new ImageInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("digest".equals(fieldName)) { + deserializedImageInfo.digest = reader.getString(); + } else if ("hostname".equals(fieldName)) { + deserializedImageInfo.hostname = reader.getString(); + } else if ("repository".equals(fieldName)) { + deserializedImageInfo.repository = reader.getString(); + } else if ("tag".equals(fieldName)) { + deserializedImageInfo.tag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImageInfo; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java index d393255a2ea1..824d26209d3e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,11 +22,6 @@ public final class ImageInstanceSegmentation extends AutoMLVertical { */ private TaskType taskType = TaskType.IMAGE_INSTANCE_SEGMENTATION; - /* - * Primary metric to optimize for this task. - */ - private InstanceSegmentationPrimaryMetrics primaryMetric; - /* * Settings used for training the model. */ @@ -60,6 +54,11 @@ public final class ImageInstanceSegmentation extends AutoMLVertical { */ private Double validationDataSize; + /* + * Primary metrics for InstanceSegmentation tasks. + */ + private InstanceSegmentationPrimaryMetrics primaryMetric; + /** * Creates an instance of ImageInstanceSegmentation class. */ @@ -76,26 +75,6 @@ public TaskType taskType() { return this.taskType; } - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public InstanceSegmentationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withPrimaryMetric(InstanceSegmentationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - /** * Get the modelSettings property: Settings used for training the model. * @@ -225,11 +204,22 @@ public ImageInstanceSegmentation withValidationDataSize(Double validationDataSiz } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metrics for InstanceSegmentation tasks. + * + * @return the primaryMetric value. */ - @Override - public ImageInstanceSegmentation withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); + public InstanceSegmentationPrimaryMetrics primaryMetric() { + return this.primaryMetric; + } + + /** + * Set the primaryMetric property: Primary metrics for InstanceSegmentation tasks. + * + * @param primaryMetric the primaryMetric value to set. + * @return the ImageInstanceSegmentation object itself. + */ + public ImageInstanceSegmentation withPrimaryMetric(InstanceSegmentationPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; return this; } @@ -237,8 +227,8 @@ public ImageInstanceSegmentation withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public ImageInstanceSegmentation withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageInstanceSegmentation withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -252,36 +242,14 @@ public ImageInstanceSegmentation withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageInstanceSegmentation")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } + public ImageInstanceSegmentation withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(ImageInstanceSegmentation.class); - /** * {@inheritDoc} */ @@ -293,12 +261,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("modelSettings", this.modelSettings); jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); jsonWriter.writeJsonField("validationData", this.validationData); jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); return jsonWriter.writeEndObject(); } @@ -328,9 +296,6 @@ public static ImageInstanceSegmentation fromJson(JsonReader jsonReader) throws I deserializedImageInstanceSegmentation.limitSettings = ImageLimitSettings.fromJson(reader); } else if ("taskType".equals(fieldName)) { deserializedImageInstanceSegmentation.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageInstanceSegmentation.primaryMetric - = InstanceSegmentationPrimaryMetrics.fromString(reader.getString()); } else if ("modelSettings".equals(fieldName)) { deserializedImageInstanceSegmentation.modelSettings = ImageModelSettingsObjectDetection.fromJson(reader); @@ -345,6 +310,9 @@ public static ImageInstanceSegmentation fromJson(JsonReader jsonReader) throws I } else if ("validationDataSize".equals(fieldName)) { deserializedImageInstanceSegmentation.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("primaryMetric".equals(fieldName)) { + deserializedImageInstanceSegmentation.primaryMetric + = InstanceSegmentationPrimaryMetrics.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java index b003370fed91..408c12abf1c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -18,6 +18,11 @@ */ @Fluent public final class ImageLimitSettings implements JsonSerializable { + /* + * Maximum number of concurrent AutoML iterations. + */ + private Integer maxConcurrentTrials; + /* * Maximum number of AutoML iterations. */ @@ -28,17 +33,32 @@ public final class ImageLimitSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedImageLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java index 751e4968480d..9c3745bce4e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Returns metadata about the operating system image for this compute instance. */ -@Fluent +@Immutable public final class ImageMetadata implements JsonSerializable { /* * Specifies the current operating system image version this compute instance is running on. @@ -31,10 +31,15 @@ public final class ImageMetadata implements JsonSerializable { */ private Boolean isLatestOsImageVersion; + /* + * Metadata about the os patching. + */ + private OsPatchingStatus osPatchingStatus; + /** * Creates an instance of ImageMetadata class. */ - public ImageMetadata() { + private ImageMetadata() { } /** @@ -47,18 +52,6 @@ public String currentImageVersion() { return this.currentImageVersion; } - /** - * Set the currentImageVersion property: Specifies the current operating system image version this compute instance - * is running on. - * - * @param currentImageVersion the currentImageVersion value to set. - * @return the ImageMetadata object itself. - */ - public ImageMetadata withCurrentImageVersion(String currentImageVersion) { - this.currentImageVersion = currentImageVersion; - return this; - } - /** * Get the latestImageVersion property: Specifies the latest available operating system image version. * @@ -68,17 +61,6 @@ public String latestImageVersion() { return this.latestImageVersion; } - /** - * Set the latestImageVersion property: Specifies the latest available operating system image version. - * - * @param latestImageVersion the latestImageVersion value to set. - * @return the ImageMetadata object itself. - */ - public ImageMetadata withLatestImageVersion(String latestImageVersion) { - this.latestImageVersion = latestImageVersion; - return this; - } - /** * Get the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest * operating system image. @@ -90,23 +72,12 @@ public Boolean isLatestOsImageVersion() { } /** - * Set the isLatestOsImageVersion property: Specifies whether this compute instance is running on the latest - * operating system image. - * - * @param isLatestOsImageVersion the isLatestOsImageVersion value to set. - * @return the ImageMetadata object itself. - */ - public ImageMetadata withIsLatestOsImageVersion(Boolean isLatestOsImageVersion) { - this.isLatestOsImageVersion = isLatestOsImageVersion; - return this; - } - - /** - * Validates the instance. + * Get the osPatchingStatus property: Metadata about the os patching. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the osPatchingStatus value. */ - public void validate() { + public OsPatchingStatus osPatchingStatus() { + return this.osPatchingStatus; } /** @@ -142,6 +113,8 @@ public static ImageMetadata fromJson(JsonReader jsonReader) throws IOException { deserializedImageMetadata.latestImageVersion = reader.getString(); } else if ("isLatestOsImageVersion".equals(fieldName)) { deserializedImageMetadata.isLatestOsImageVersion = reader.getNullable(JsonReader::getBoolean); + } else if ("osPatchingStatus".equals(fieldName)) { + deserializedImageMetadata.osPatchingStatus = OsPatchingStatus.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java index 4963e43c01e7..c27e8aa4b72f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,14 @@ public class ImageModelDistributionSettings implements JsonSerializable { /* - * Enable AMSGrad when optimizer is 'adam' or 'adamw'. + * Settings for advanced scenarios. */ - private Boolean amsGradient; + private String advancedSettings; /* - * Settings for advanced scenarios. + * Enable AMSGrad when optimizer is 'adam' or 'adamw'. */ - private String advancedSettings; + private Boolean amsGradient; /* * Settings for using Augmentations. @@ -36,12 +36,12 @@ public class ImageModelSettings implements JsonSerializable /* * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. */ - private Float beta1; + private Double beta1; /* * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. */ - private Float beta2; + private Double beta2; /* * Frequency to store model checkpoints. Must be a positive integer. @@ -49,14 +49,14 @@ public class ImageModelSettings implements JsonSerializable private Integer checkpointFrequency; /* - * The id of a previous run that has a pretrained checkpoint for incremental training. + * The pretrained checkpoint model for incremental training. */ - private String checkpointRunId; + private MLFlowModelJobInput checkpointModel; /* - * The pretrained checkpoint model for incremental training. + * The id of a previous run that has a pretrained checkpoint for incremental training. */ - private MLFlowModelJobInput checkpointModel; + private String checkpointRunId; /* * Whether to use distributed training. @@ -81,14 +81,14 @@ public class ImageModelSettings implements JsonSerializable private Integer earlyStoppingPatience; /* - * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + * Enable normalization when exporting ONNX model. */ - private Integer evaluationFrequency; + private Boolean enableOnnxNormalization; /* - * Enable normalization when exporting ONNX model. + * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. */ - private Boolean enableOnnxNormalization; + private Integer evaluationFrequency; /* * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without @@ -108,10 +108,10 @@ public class ImageModelSettings implements JsonSerializable /* * Initial learning rate. Must be a float in the range [0, 1]. */ - private Float learningRate; + private Double learningRate; /* - * Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + * Learning rate scheduler enum. */ private LearningRateScheduler learningRateScheduler; @@ -125,7 +125,7 @@ public class ImageModelSettings implements JsonSerializable /* * Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. */ - private Float momentum; + private Double momentum; /* * Enable nesterov when optimizer is 'sgd'. @@ -143,7 +143,7 @@ public class ImageModelSettings implements JsonSerializable private Integer numberOfWorkers; /* - * Type of optimizer. + * Stochastic optimizer for image models. */ private StochasticOptimizer optimizer; @@ -155,7 +155,7 @@ public class ImageModelSettings implements JsonSerializable /* * Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. */ - private Float stepLRGamma; + private Double stepLRGamma; /* * Value of step size when learning rate scheduler is 'step'. Must be a positive integer. @@ -175,7 +175,7 @@ public class ImageModelSettings implements JsonSerializable /* * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. */ - private Float warmupCosineLRCycles; + private Double warmupCosineLRCycles; /* * Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. @@ -185,7 +185,7 @@ public class ImageModelSettings implements JsonSerializable /* * Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. */ - private Float weightDecay; + private Double weightDecay; /** * Creates an instance of ImageModelSettings class. @@ -194,42 +194,42 @@ public ImageModelSettings() { } /** - * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + * Get the advancedSettings property: Settings for advanced scenarios. * - * @return the amsGradient value. + * @return the advancedSettings value. */ - public Boolean amsGradient() { - return this.amsGradient; + public String advancedSettings() { + return this.advancedSettings; } /** - * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + * Set the advancedSettings property: Settings for advanced scenarios. * - * @param amsGradient the amsGradient value to set. + * @param advancedSettings the advancedSettings value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withAmsGradient(Boolean amsGradient) { - this.amsGradient = amsGradient; + public ImageModelSettings withAdvancedSettings(String advancedSettings) { + this.advancedSettings = advancedSettings; return this; } /** - * Get the advancedSettings property: Settings for advanced scenarios. + * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. * - * @return the advancedSettings value. + * @return the amsGradient value. */ - public String advancedSettings() { - return this.advancedSettings; + public Boolean amsGradient() { + return this.amsGradient; } /** - * Set the advancedSettings property: Settings for advanced scenarios. + * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. * - * @param advancedSettings the advancedSettings value to set. + * @param amsGradient the amsGradient value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withAdvancedSettings(String advancedSettings) { - this.advancedSettings = advancedSettings; + public ImageModelSettings withAmsGradient(Boolean amsGradient) { + this.amsGradient = amsGradient; return this; } @@ -259,7 +259,7 @@ public ImageModelSettings withAugmentations(String augmentations) { * * @return the beta1 value. */ - public Float beta1() { + public Double beta1() { return this.beta1; } @@ -270,7 +270,7 @@ public Float beta1() { * @param beta1 the beta1 value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withBeta1(Float beta1) { + public ImageModelSettings withBeta1(Double beta1) { this.beta1 = beta1; return this; } @@ -281,7 +281,7 @@ public ImageModelSettings withBeta1(Float beta1) { * * @return the beta2 value. */ - public Float beta2() { + public Double beta2() { return this.beta2; } @@ -292,7 +292,7 @@ public Float beta2() { * @param beta2 the beta2 value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withBeta2(Float beta2) { + public ImageModelSettings withBeta2(Double beta2) { this.beta2 = beta2; return this; } @@ -318,44 +318,44 @@ public ImageModelSettings withCheckpointFrequency(Integer checkpointFrequency) { } /** - * Get the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental - * training. + * Get the checkpointModel property: The pretrained checkpoint model for incremental training. * - * @return the checkpointRunId value. + * @return the checkpointModel value. */ - public String checkpointRunId() { - return this.checkpointRunId; + public MLFlowModelJobInput checkpointModel() { + return this.checkpointModel; } /** - * Set the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental - * training. + * Set the checkpointModel property: The pretrained checkpoint model for incremental training. * - * @param checkpointRunId the checkpointRunId value to set. + * @param checkpointModel the checkpointModel value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withCheckpointRunId(String checkpointRunId) { - this.checkpointRunId = checkpointRunId; + public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointModel) { + this.checkpointModel = checkpointModel; return this; } /** - * Get the checkpointModel property: The pretrained checkpoint model for incremental training. + * Get the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental + * training. * - * @return the checkpointModel value. + * @return the checkpointRunId value. */ - public MLFlowModelJobInput checkpointModel() { - return this.checkpointModel; + public String checkpointRunId() { + return this.checkpointRunId; } /** - * Set the checkpointModel property: The pretrained checkpoint model for incremental training. + * Set the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental + * training. * - * @param checkpointModel the checkpointModel value to set. + * @param checkpointRunId the checkpointRunId value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointModel) { - this.checkpointModel = checkpointModel; + public ImageModelSettings withCheckpointRunId(String checkpointRunId) { + this.checkpointRunId = checkpointRunId; return this; } @@ -448,44 +448,44 @@ public ImageModelSettings withEarlyStoppingPatience(Integer earlyStoppingPatienc } /** - * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. + * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. * - * @return the evaluationFrequency value. + * @return the enableOnnxNormalization value. */ - public Integer evaluationFrequency() { - return this.evaluationFrequency; + public Boolean enableOnnxNormalization() { + return this.enableOnnxNormalization; } /** - * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. + * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. * - * @param evaluationFrequency the evaluationFrequency value to set. + * @param enableOnnxNormalization the enableOnnxNormalization value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withEvaluationFrequency(Integer evaluationFrequency) { - this.evaluationFrequency = evaluationFrequency; + public ImageModelSettings withEnableOnnxNormalization(Boolean enableOnnxNormalization) { + this.enableOnnxNormalization = enableOnnxNormalization; return this; } /** - * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. + * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a + * positive integer. * - * @return the enableOnnxNormalization value. + * @return the evaluationFrequency value. */ - public Boolean enableOnnxNormalization() { - return this.enableOnnxNormalization; + public Integer evaluationFrequency() { + return this.evaluationFrequency; } /** - * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. + * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a + * positive integer. * - * @param enableOnnxNormalization the enableOnnxNormalization value to set. + * @param evaluationFrequency the evaluationFrequency value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - this.enableOnnxNormalization = enableOnnxNormalization; + public ImageModelSettings withEvaluationFrequency(Integer evaluationFrequency) { + this.evaluationFrequency = evaluationFrequency; return this; } @@ -546,7 +546,7 @@ public ImageModelSettings withLayersToFreeze(Integer layersToFreeze) { * * @return the learningRate value. */ - public Float learningRate() { + public Double learningRate() { return this.learningRate; } @@ -556,13 +556,13 @@ public Float learningRate() { * @param learningRate the learningRate value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withLearningRate(Float learningRate) { + public ImageModelSettings withLearningRate(Double learningRate) { this.learningRate = learningRate; return this; } /** - * Get the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + * Get the learningRateScheduler property: Learning rate scheduler enum. * * @return the learningRateScheduler value. */ @@ -571,7 +571,7 @@ public LearningRateScheduler learningRateScheduler() { } /** - * Set the learningRateScheduler property: Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + * Set the learningRateScheduler property: Learning rate scheduler enum. * * @param learningRateScheduler the learningRateScheduler value to set. * @return the ImageModelSettings object itself. @@ -610,7 +610,7 @@ public ImageModelSettings withModelName(String modelName) { * * @return the momentum value. */ - public Float momentum() { + public Double momentum() { return this.momentum; } @@ -620,7 +620,7 @@ public Float momentum() { * @param momentum the momentum value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withMomentum(Float momentum) { + public ImageModelSettings withMomentum(Double momentum) { this.momentum = momentum; return this; } @@ -686,7 +686,7 @@ public ImageModelSettings withNumberOfWorkers(Integer numberOfWorkers) { } /** - * Get the optimizer property: Type of optimizer. + * Get the optimizer property: Stochastic optimizer for image models. * * @return the optimizer value. */ @@ -695,7 +695,7 @@ public StochasticOptimizer optimizer() { } /** - * Set the optimizer property: Type of optimizer. + * Set the optimizer property: Stochastic optimizer for image models. * * @param optimizer the optimizer value to set. * @return the ImageModelSettings object itself. @@ -731,7 +731,7 @@ public ImageModelSettings withRandomSeed(Integer randomSeed) { * * @return the stepLRGamma value. */ - public Float stepLRGamma() { + public Double stepLRGamma() { return this.stepLRGamma; } @@ -742,7 +742,7 @@ public Float stepLRGamma() { * @param stepLRGamma the stepLRGamma value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withStepLRGamma(Float stepLRGamma) { + public ImageModelSettings withStepLRGamma(Double stepLRGamma) { this.stepLRGamma = stepLRGamma; return this; } @@ -815,7 +815,7 @@ public ImageModelSettings withValidationBatchSize(Integer validationBatchSize) { * * @return the warmupCosineLRCycles value. */ - public Float warmupCosineLRCycles() { + public Double warmupCosineLRCycles() { return this.warmupCosineLRCycles; } @@ -826,7 +826,7 @@ public Float warmupCosineLRCycles() { * @param warmupCosineLRCycles the warmupCosineLRCycles value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withWarmupCosineLRCycles(Float warmupCosineLRCycles) { + public ImageModelSettings withWarmupCosineLRCycles(Double warmupCosineLRCycles) { this.warmupCosineLRCycles = warmupCosineLRCycles; return this; } @@ -859,7 +859,7 @@ public ImageModelSettings withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRW * * @return the weightDecay value. */ - public Float weightDecay() { + public Double weightDecay() { return this.weightDecay; } @@ -870,42 +870,31 @@ public Float weightDecay() { * @param weightDecay the weightDecay value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withWeightDecay(Float weightDecay) { + public ImageModelSettings withWeightDecay(Double weightDecay) { this.weightDecay = weightDecay; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (checkpointModel() != null) { - checkpointModel().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", this.amsGradient); jsonWriter.writeStringField("advancedSettings", this.advancedSettings); + jsonWriter.writeBooleanField("amsGradient", this.amsGradient); jsonWriter.writeStringField("augmentations", this.augmentations); jsonWriter.writeNumberField("beta1", this.beta1); jsonWriter.writeNumberField("beta2", this.beta2); jsonWriter.writeNumberField("checkpointFrequency", this.checkpointFrequency); - jsonWriter.writeStringField("checkpointRunId", this.checkpointRunId); jsonWriter.writeJsonField("checkpointModel", this.checkpointModel); + jsonWriter.writeStringField("checkpointRunId", this.checkpointRunId); jsonWriter.writeBooleanField("distributed", this.distributed); jsonWriter.writeBooleanField("earlyStopping", this.earlyStopping); jsonWriter.writeNumberField("earlyStoppingDelay", this.earlyStoppingDelay); jsonWriter.writeNumberField("earlyStoppingPatience", this.earlyStoppingPatience); - jsonWriter.writeNumberField("evaluationFrequency", this.evaluationFrequency); jsonWriter.writeBooleanField("enableOnnxNormalization", this.enableOnnxNormalization); + jsonWriter.writeNumberField("evaluationFrequency", this.evaluationFrequency); jsonWriter.writeNumberField("gradientAccumulationStep", this.gradientAccumulationStep); jsonWriter.writeNumberField("layersToFreeze", this.layersToFreeze); jsonWriter.writeNumberField("learningRate", this.learningRate); @@ -943,22 +932,22 @@ public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("amsGradient".equals(fieldName)) { - deserializedImageModelSettings.amsGradient = reader.getNullable(JsonReader::getBoolean); - } else if ("advancedSettings".equals(fieldName)) { + if ("advancedSettings".equals(fieldName)) { deserializedImageModelSettings.advancedSettings = reader.getString(); + } else if ("amsGradient".equals(fieldName)) { + deserializedImageModelSettings.amsGradient = reader.getNullable(JsonReader::getBoolean); } else if ("augmentations".equals(fieldName)) { deserializedImageModelSettings.augmentations = reader.getString(); } else if ("beta1".equals(fieldName)) { - deserializedImageModelSettings.beta1 = reader.getNullable(JsonReader::getFloat); + deserializedImageModelSettings.beta1 = reader.getNullable(JsonReader::getDouble); } else if ("beta2".equals(fieldName)) { - deserializedImageModelSettings.beta2 = reader.getNullable(JsonReader::getFloat); + deserializedImageModelSettings.beta2 = reader.getNullable(JsonReader::getDouble); } else if ("checkpointFrequency".equals(fieldName)) { deserializedImageModelSettings.checkpointFrequency = reader.getNullable(JsonReader::getInt); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettings.checkpointRunId = reader.getString(); } else if ("checkpointModel".equals(fieldName)) { deserializedImageModelSettings.checkpointModel = MLFlowModelJobInput.fromJson(reader); + } else if ("checkpointRunId".equals(fieldName)) { + deserializedImageModelSettings.checkpointRunId = reader.getString(); } else if ("distributed".equals(fieldName)) { deserializedImageModelSettings.distributed = reader.getNullable(JsonReader::getBoolean); } else if ("earlyStopping".equals(fieldName)) { @@ -967,23 +956,23 @@ public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOExcept deserializedImageModelSettings.earlyStoppingDelay = reader.getNullable(JsonReader::getInt); } else if ("earlyStoppingPatience".equals(fieldName)) { deserializedImageModelSettings.earlyStoppingPatience = reader.getNullable(JsonReader::getInt); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettings.evaluationFrequency = reader.getNullable(JsonReader::getInt); } else if ("enableOnnxNormalization".equals(fieldName)) { deserializedImageModelSettings.enableOnnxNormalization = reader.getNullable(JsonReader::getBoolean); + } else if ("evaluationFrequency".equals(fieldName)) { + deserializedImageModelSettings.evaluationFrequency = reader.getNullable(JsonReader::getInt); } else if ("gradientAccumulationStep".equals(fieldName)) { deserializedImageModelSettings.gradientAccumulationStep = reader.getNullable(JsonReader::getInt); } else if ("layersToFreeze".equals(fieldName)) { deserializedImageModelSettings.layersToFreeze = reader.getNullable(JsonReader::getInt); } else if ("learningRate".equals(fieldName)) { - deserializedImageModelSettings.learningRate = reader.getNullable(JsonReader::getFloat); + deserializedImageModelSettings.learningRate = reader.getNullable(JsonReader::getDouble); } else if ("learningRateScheduler".equals(fieldName)) { deserializedImageModelSettings.learningRateScheduler = LearningRateScheduler.fromString(reader.getString()); } else if ("modelName".equals(fieldName)) { deserializedImageModelSettings.modelName = reader.getString(); } else if ("momentum".equals(fieldName)) { - deserializedImageModelSettings.momentum = reader.getNullable(JsonReader::getFloat); + deserializedImageModelSettings.momentum = reader.getNullable(JsonReader::getDouble); } else if ("nesterov".equals(fieldName)) { deserializedImageModelSettings.nesterov = reader.getNullable(JsonReader::getBoolean); } else if ("numberOfEpochs".equals(fieldName)) { @@ -995,7 +984,7 @@ public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOExcept } else if ("randomSeed".equals(fieldName)) { deserializedImageModelSettings.randomSeed = reader.getNullable(JsonReader::getInt); } else if ("stepLRGamma".equals(fieldName)) { - deserializedImageModelSettings.stepLRGamma = reader.getNullable(JsonReader::getFloat); + deserializedImageModelSettings.stepLRGamma = reader.getNullable(JsonReader::getDouble); } else if ("stepLRStepSize".equals(fieldName)) { deserializedImageModelSettings.stepLRStepSize = reader.getNullable(JsonReader::getInt); } else if ("trainingBatchSize".equals(fieldName)) { @@ -1003,11 +992,11 @@ public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOExcept } else if ("validationBatchSize".equals(fieldName)) { deserializedImageModelSettings.validationBatchSize = reader.getNullable(JsonReader::getInt); } else if ("warmupCosineLRCycles".equals(fieldName)) { - deserializedImageModelSettings.warmupCosineLRCycles = reader.getNullable(JsonReader::getFloat); + deserializedImageModelSettings.warmupCosineLRCycles = reader.getNullable(JsonReader::getDouble); } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { deserializedImageModelSettings.warmupCosineLRWarmupEpochs = reader.getNullable(JsonReader::getInt); } else if ("weightDecay".equals(fieldName)) { - deserializedImageModelSettings.weightDecay = reader.getNullable(JsonReader::getFloat); + deserializedImageModelSettings.weightDecay = reader.getNullable(JsonReader::getDouble); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java index 3869388e983e..97c165503c0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -136,8 +136,8 @@ public ImageModelSettingsClassification withWeightedLoss(Integer weightedLoss) { * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); + public ImageModelSettingsClassification withAdvancedSettings(String advancedSettings) { + super.withAdvancedSettings(advancedSettings); return this; } @@ -145,8 +145,8 @@ public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); + public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { + super.withAmsGradient(amsGradient); return this; } @@ -163,7 +163,7 @@ public ImageModelSettingsClassification withAugmentations(String augmentations) * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withBeta1(Float beta1) { + public ImageModelSettingsClassification withBeta1(Double beta1) { super.withBeta1(beta1); return this; } @@ -172,7 +172,7 @@ public ImageModelSettingsClassification withBeta1(Float beta1) { * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withBeta2(Float beta2) { + public ImageModelSettingsClassification withBeta2(Double beta2) { super.withBeta2(beta2); return this; } @@ -190,8 +190,8 @@ public ImageModelSettingsClassification withCheckpointFrequency(Integer checkpoi * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withCheckpointRunId(String checkpointRunId) { - super.withCheckpointRunId(checkpointRunId); + public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { + super.withCheckpointModel(checkpointModel); return this; } @@ -199,8 +199,8 @@ public ImageModelSettingsClassification withCheckpointRunId(String checkpointRun * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); + public ImageModelSettingsClassification withCheckpointRunId(String checkpointRunId) { + super.withCheckpointRunId(checkpointRunId); return this; } @@ -244,8 +244,8 @@ public ImageModelSettingsClassification withEarlyStoppingPatience(Integer earlyS * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); + public ImageModelSettingsClassification withEnableOnnxNormalization(Boolean enableOnnxNormalization) { + super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } @@ -253,8 +253,8 @@ public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluati * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); + public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluationFrequency) { + super.withEvaluationFrequency(evaluationFrequency); return this; } @@ -280,7 +280,7 @@ public ImageModelSettingsClassification withLayersToFreeze(Integer layersToFreez * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withLearningRate(Float learningRate) { + public ImageModelSettingsClassification withLearningRate(Double learningRate) { super.withLearningRate(learningRate); return this; } @@ -307,7 +307,7 @@ public ImageModelSettingsClassification withModelName(String modelName) { * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withMomentum(Float momentum) { + public ImageModelSettingsClassification withMomentum(Double momentum) { super.withMomentum(momentum); return this; } @@ -361,7 +361,7 @@ public ImageModelSettingsClassification withRandomSeed(Integer randomSeed) { * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withStepLRGamma(Float stepLRGamma) { + public ImageModelSettingsClassification withStepLRGamma(Double stepLRGamma) { super.withStepLRGamma(stepLRGamma); return this; } @@ -397,7 +397,7 @@ public ImageModelSettingsClassification withValidationBatchSize(Integer validati * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withWarmupCosineLRCycles(Float warmupCosineLRCycles) { + public ImageModelSettingsClassification withWarmupCosineLRCycles(Double warmupCosineLRCycles) { super.withWarmupCosineLRCycles(warmupCosineLRCycles); return this; } @@ -415,41 +415,31 @@ public ImageModelSettingsClassification withWarmupCosineLRWarmupEpochs(Integer w * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withWeightDecay(Float weightDecay) { + public ImageModelSettingsClassification withWeightDecay(Double weightDecay) { super.withWeightDecay(weightDecay); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("advancedSettings", advancedSettings()); + jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("augmentations", augmentations()); jsonWriter.writeNumberField("beta1", beta1()); jsonWriter.writeNumberField("beta2", beta2()); jsonWriter.writeNumberField("checkpointFrequency", checkpointFrequency()); - jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeJsonField("checkpointModel", checkpointModel()); + jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeBooleanField("distributed", distributed()); jsonWriter.writeBooleanField("earlyStopping", earlyStopping()); jsonWriter.writeNumberField("earlyStoppingDelay", earlyStoppingDelay()); jsonWriter.writeNumberField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeBooleanField("enableOnnxNormalization", enableOnnxNormalization()); + jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeNumberField("gradientAccumulationStep", gradientAccumulationStep()); jsonWriter.writeNumberField("layersToFreeze", layersToFreeze()); jsonWriter.writeNumberField("learningRate", learningRate()); @@ -492,25 +482,25 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("amsGradient".equals(fieldName)) { + if ("advancedSettings".equals(fieldName)) { + deserializedImageModelSettingsClassification.withAdvancedSettings(reader.getString()); + } else if ("amsGradient".equals(fieldName)) { deserializedImageModelSettingsClassification .withAmsGradient(reader.getNullable(JsonReader::getBoolean)); - } else if ("advancedSettings".equals(fieldName)) { - deserializedImageModelSettingsClassification.withAdvancedSettings(reader.getString()); } else if ("augmentations".equals(fieldName)) { deserializedImageModelSettingsClassification.withAugmentations(reader.getString()); } else if ("beta1".equals(fieldName)) { - deserializedImageModelSettingsClassification.withBeta1(reader.getNullable(JsonReader::getFloat)); + deserializedImageModelSettingsClassification.withBeta1(reader.getNullable(JsonReader::getDouble)); } else if ("beta2".equals(fieldName)) { - deserializedImageModelSettingsClassification.withBeta2(reader.getNullable(JsonReader::getFloat)); + deserializedImageModelSettingsClassification.withBeta2(reader.getNullable(JsonReader::getDouble)); } else if ("checkpointFrequency".equals(fieldName)) { deserializedImageModelSettingsClassification .withCheckpointFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettingsClassification.withCheckpointRunId(reader.getString()); } else if ("checkpointModel".equals(fieldName)) { deserializedImageModelSettingsClassification .withCheckpointModel(MLFlowModelJobInput.fromJson(reader)); + } else if ("checkpointRunId".equals(fieldName)) { + deserializedImageModelSettingsClassification.withCheckpointRunId(reader.getString()); } else if ("distributed".equals(fieldName)) { deserializedImageModelSettingsClassification .withDistributed(reader.getNullable(JsonReader::getBoolean)); @@ -523,12 +513,12 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t } else if ("earlyStoppingPatience".equals(fieldName)) { deserializedImageModelSettingsClassification .withEarlyStoppingPatience(reader.getNullable(JsonReader::getInt)); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("enableOnnxNormalization".equals(fieldName)) { deserializedImageModelSettingsClassification .withEnableOnnxNormalization(reader.getNullable(JsonReader::getBoolean)); + } else if ("evaluationFrequency".equals(fieldName)) { + deserializedImageModelSettingsClassification + .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("gradientAccumulationStep".equals(fieldName)) { deserializedImageModelSettingsClassification .withGradientAccumulationStep(reader.getNullable(JsonReader::getInt)); @@ -537,14 +527,15 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t .withLayersToFreeze(reader.getNullable(JsonReader::getInt)); } else if ("learningRate".equals(fieldName)) { deserializedImageModelSettingsClassification - .withLearningRate(reader.getNullable(JsonReader::getFloat)); + .withLearningRate(reader.getNullable(JsonReader::getDouble)); } else if ("learningRateScheduler".equals(fieldName)) { deserializedImageModelSettingsClassification .withLearningRateScheduler(LearningRateScheduler.fromString(reader.getString())); } else if ("modelName".equals(fieldName)) { deserializedImageModelSettingsClassification.withModelName(reader.getString()); } else if ("momentum".equals(fieldName)) { - deserializedImageModelSettingsClassification.withMomentum(reader.getNullable(JsonReader::getFloat)); + deserializedImageModelSettingsClassification + .withMomentum(reader.getNullable(JsonReader::getDouble)); } else if ("nesterov".equals(fieldName)) { deserializedImageModelSettingsClassification .withNesterov(reader.getNullable(JsonReader::getBoolean)); @@ -561,7 +552,7 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t deserializedImageModelSettingsClassification.withRandomSeed(reader.getNullable(JsonReader::getInt)); } else if ("stepLRGamma".equals(fieldName)) { deserializedImageModelSettingsClassification - .withStepLRGamma(reader.getNullable(JsonReader::getFloat)); + .withStepLRGamma(reader.getNullable(JsonReader::getDouble)); } else if ("stepLRStepSize".equals(fieldName)) { deserializedImageModelSettingsClassification .withStepLRStepSize(reader.getNullable(JsonReader::getInt)); @@ -573,13 +564,13 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t .withValidationBatchSize(reader.getNullable(JsonReader::getInt)); } else if ("warmupCosineLRCycles".equals(fieldName)) { deserializedImageModelSettingsClassification - .withWarmupCosineLRCycles(reader.getNullable(JsonReader::getFloat)); + .withWarmupCosineLRCycles(reader.getNullable(JsonReader::getDouble)); } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { deserializedImageModelSettingsClassification .withWarmupCosineLRWarmupEpochs(reader.getNullable(JsonReader::getInt)); } else if ("weightDecay".equals(fieldName)) { deserializedImageModelSettingsClassification - .withWeightDecay(reader.getNullable(JsonReader::getFloat)); + .withWeightDecay(reader.getNullable(JsonReader::getDouble)); } else if ("trainingCropSize".equals(fieldName)) { deserializedImageModelSettingsClassification.trainingCropSize = reader.getNullable(JsonReader::getInt); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java index 6ff6a94d99ca..a16ab42bf664 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -27,7 +27,7 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings * During inference, only return proposals with a classification score greater than * BoxScoreThreshold. Must be a float in the range[0, 1]. */ - private Float boxScoreThreshold; + private Double boxScoreThreshold; /* * Image size for train and validation. Must be a positive integer. @@ -51,9 +51,7 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings private Integer minSize; /* - * Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. + * Image model size. */ private ModelSize modelSize; @@ -67,7 +65,7 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings /* * IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. */ - private Float nmsIouThreshold; + private Double nmsIouThreshold; /* * The grid size to use for tiling each image. Note: TileGridSize must not be @@ -80,22 +78,22 @@ public final class ImageModelSettingsObjectDetection extends ImageModelSettings * Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). * Note: This settings is not supported for the 'yolov5' algorithm. */ - private Float tileOverlapRatio; + private Double tileOverlapRatio; /* * The IOU threshold to use to perform NMS while merging predictions from tiles and image. * Used in validation/ inference. Must be float in the range [0, 1]. * Note: This settings is not supported for the 'yolov5' algorithm. */ - private Float tilePredictionsNmsThreshold; + private Double tilePredictionsNmsThreshold; /* * IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. */ - private Float validationIouThreshold; + private Double validationIouThreshold; /* - * Metric computation method to use for validation metrics. + * Metric computation method to use for validation metrics in image tasks. */ private ValidationMetricType validationMetricType; @@ -136,7 +134,7 @@ public ImageModelSettingsObjectDetection withBoxDetectionsPerImage(Integer boxDe * * @return the boxScoreThreshold value. */ - public Float boxScoreThreshold() { + public Double boxScoreThreshold() { return this.boxScoreThreshold; } @@ -148,7 +146,7 @@ public Float boxScoreThreshold() { * @param boxScoreThreshold the boxScoreThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ - public ImageModelSettingsObjectDetection withBoxScoreThreshold(Float boxScoreThreshold) { + public ImageModelSettingsObjectDetection withBoxScoreThreshold(Double boxScoreThreshold) { this.boxScoreThreshold = boxScoreThreshold; return this; } @@ -226,9 +224,7 @@ public ImageModelSettingsObjectDetection withMinSize(Integer minSize) { } /** - * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. + * Get the modelSize property: Image model size. * * @return the modelSize value. */ @@ -237,9 +233,7 @@ public ModelSize modelSize() { } /** - * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. - * Note: training run may get into CUDA OOM if the model size is too big. - * Note: This settings is only supported for the 'yolov5' algorithm. + * Set the modelSize property: Image model size. * * @param modelSize the modelSize value to set. * @return the ImageModelSettingsObjectDetection object itself. @@ -279,7 +273,7 @@ public ImageModelSettingsObjectDetection withMultiScale(Boolean multiScale) { * * @return the nmsIouThreshold value. */ - public Float nmsIouThreshold() { + public Double nmsIouThreshold() { return this.nmsIouThreshold; } @@ -290,7 +284,7 @@ public Float nmsIouThreshold() { * @param nmsIouThreshold the nmsIouThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ - public ImageModelSettingsObjectDetection withNmsIouThreshold(Float nmsIouThreshold) { + public ImageModelSettingsObjectDetection withNmsIouThreshold(Double nmsIouThreshold) { this.nmsIouThreshold = nmsIouThreshold; return this; } @@ -326,7 +320,7 @@ public ImageModelSettingsObjectDetection withTileGridSize(String tileGridSize) { * * @return the tileOverlapRatio value. */ - public Float tileOverlapRatio() { + public Double tileOverlapRatio() { return this.tileOverlapRatio; } @@ -338,7 +332,7 @@ public Float tileOverlapRatio() { * @param tileOverlapRatio the tileOverlapRatio value to set. * @return the ImageModelSettingsObjectDetection object itself. */ - public ImageModelSettingsObjectDetection withTileOverlapRatio(Float tileOverlapRatio) { + public ImageModelSettingsObjectDetection withTileOverlapRatio(Double tileOverlapRatio) { this.tileOverlapRatio = tileOverlapRatio; return this; } @@ -351,7 +345,7 @@ public ImageModelSettingsObjectDetection withTileOverlapRatio(Float tileOverlapR * * @return the tilePredictionsNmsThreshold value. */ - public Float tilePredictionsNmsThreshold() { + public Double tilePredictionsNmsThreshold() { return this.tilePredictionsNmsThreshold; } @@ -364,7 +358,7 @@ public Float tilePredictionsNmsThreshold() { * @param tilePredictionsNmsThreshold the tilePredictionsNmsThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ - public ImageModelSettingsObjectDetection withTilePredictionsNmsThreshold(Float tilePredictionsNmsThreshold) { + public ImageModelSettingsObjectDetection withTilePredictionsNmsThreshold(Double tilePredictionsNmsThreshold) { this.tilePredictionsNmsThreshold = tilePredictionsNmsThreshold; return this; } @@ -375,7 +369,7 @@ public ImageModelSettingsObjectDetection withTilePredictionsNmsThreshold(Float t * * @return the validationIouThreshold value. */ - public Float validationIouThreshold() { + public Double validationIouThreshold() { return this.validationIouThreshold; } @@ -386,13 +380,13 @@ public Float validationIouThreshold() { * @param validationIouThreshold the validationIouThreshold value to set. * @return the ImageModelSettingsObjectDetection object itself. */ - public ImageModelSettingsObjectDetection withValidationIouThreshold(Float validationIouThreshold) { + public ImageModelSettingsObjectDetection withValidationIouThreshold(Double validationIouThreshold) { this.validationIouThreshold = validationIouThreshold; return this; } /** - * Get the validationMetricType property: Metric computation method to use for validation metrics. + * Get the validationMetricType property: Metric computation method to use for validation metrics in image tasks. * * @return the validationMetricType value. */ @@ -401,7 +395,7 @@ public ValidationMetricType validationMetricType() { } /** - * Set the validationMetricType property: Metric computation method to use for validation metrics. + * Set the validationMetricType property: Metric computation method to use for validation metrics in image tasks. * * @param validationMetricType the validationMetricType value to set. * @return the ImageModelSettingsObjectDetection object itself. @@ -415,8 +409,8 @@ public ImageModelSettingsObjectDetection withValidationMetricType(ValidationMetr * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); + public ImageModelSettingsObjectDetection withAdvancedSettings(String advancedSettings) { + super.withAdvancedSettings(advancedSettings); return this; } @@ -424,8 +418,8 @@ public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); + public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { + super.withAmsGradient(amsGradient); return this; } @@ -442,7 +436,7 @@ public ImageModelSettingsObjectDetection withAugmentations(String augmentations) * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withBeta1(Float beta1) { + public ImageModelSettingsObjectDetection withBeta1(Double beta1) { super.withBeta1(beta1); return this; } @@ -451,7 +445,7 @@ public ImageModelSettingsObjectDetection withBeta1(Float beta1) { * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withBeta2(Float beta2) { + public ImageModelSettingsObjectDetection withBeta2(Double beta2) { super.withBeta2(beta2); return this; } @@ -469,8 +463,8 @@ public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpo * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRunId) { - super.withCheckpointRunId(checkpointRunId); + public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { + super.withCheckpointModel(checkpointModel); return this; } @@ -478,8 +472,8 @@ public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRu * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); + public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRunId) { + super.withCheckpointRunId(checkpointRunId); return this; } @@ -523,8 +517,8 @@ public ImageModelSettingsObjectDetection withEarlyStoppingPatience(Integer early * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); + public ImageModelSettingsObjectDetection withEnableOnnxNormalization(Boolean enableOnnxNormalization) { + super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } @@ -532,8 +526,8 @@ public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluat * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); + public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluationFrequency) { + super.withEvaluationFrequency(evaluationFrequency); return this; } @@ -559,7 +553,7 @@ public ImageModelSettingsObjectDetection withLayersToFreeze(Integer layersToFree * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withLearningRate(Float learningRate) { + public ImageModelSettingsObjectDetection withLearningRate(Double learningRate) { super.withLearningRate(learningRate); return this; } @@ -586,7 +580,7 @@ public ImageModelSettingsObjectDetection withModelName(String modelName) { * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withMomentum(Float momentum) { + public ImageModelSettingsObjectDetection withMomentum(Double momentum) { super.withMomentum(momentum); return this; } @@ -640,7 +634,7 @@ public ImageModelSettingsObjectDetection withRandomSeed(Integer randomSeed) { * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withStepLRGamma(Float stepLRGamma) { + public ImageModelSettingsObjectDetection withStepLRGamma(Double stepLRGamma) { super.withStepLRGamma(stepLRGamma); return this; } @@ -676,7 +670,7 @@ public ImageModelSettingsObjectDetection withValidationBatchSize(Integer validat * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withWarmupCosineLRCycles(Float warmupCosineLRCycles) { + public ImageModelSettingsObjectDetection withWarmupCosineLRCycles(Double warmupCosineLRCycles) { super.withWarmupCosineLRCycles(warmupCosineLRCycles); return this; } @@ -694,41 +688,31 @@ public ImageModelSettingsObjectDetection withWarmupCosineLRWarmupEpochs(Integer * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withWeightDecay(Float weightDecay) { + public ImageModelSettingsObjectDetection withWeightDecay(Double weightDecay) { super.withWeightDecay(weightDecay); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("advancedSettings", advancedSettings()); + jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("augmentations", augmentations()); jsonWriter.writeNumberField("beta1", beta1()); jsonWriter.writeNumberField("beta2", beta2()); jsonWriter.writeNumberField("checkpointFrequency", checkpointFrequency()); - jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeJsonField("checkpointModel", checkpointModel()); + jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeBooleanField("distributed", distributed()); jsonWriter.writeBooleanField("earlyStopping", earlyStopping()); jsonWriter.writeNumberField("earlyStoppingDelay", earlyStoppingDelay()); jsonWriter.writeNumberField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeBooleanField("enableOnnxNormalization", enableOnnxNormalization()); + jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeNumberField("gradientAccumulationStep", gradientAccumulationStep()); jsonWriter.writeNumberField("layersToFreeze", layersToFreeze()); jsonWriter.writeNumberField("learningRate", learningRate()); @@ -781,25 +765,25 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("amsGradient".equals(fieldName)) { + if ("advancedSettings".equals(fieldName)) { + deserializedImageModelSettingsObjectDetection.withAdvancedSettings(reader.getString()); + } else if ("amsGradient".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withAmsGradient(reader.getNullable(JsonReader::getBoolean)); - } else if ("advancedSettings".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withAdvancedSettings(reader.getString()); } else if ("augmentations".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.withAugmentations(reader.getString()); } else if ("beta1".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withBeta1(reader.getNullable(JsonReader::getFloat)); + deserializedImageModelSettingsObjectDetection.withBeta1(reader.getNullable(JsonReader::getDouble)); } else if ("beta2".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withBeta2(reader.getNullable(JsonReader::getFloat)); + deserializedImageModelSettingsObjectDetection.withBeta2(reader.getNullable(JsonReader::getDouble)); } else if ("checkpointFrequency".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withCheckpointFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withCheckpointRunId(reader.getString()); } else if ("checkpointModel".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withCheckpointModel(MLFlowModelJobInput.fromJson(reader)); + } else if ("checkpointRunId".equals(fieldName)) { + deserializedImageModelSettingsObjectDetection.withCheckpointRunId(reader.getString()); } else if ("distributed".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withDistributed(reader.getNullable(JsonReader::getBoolean)); @@ -812,12 +796,12 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) } else if ("earlyStoppingPatience".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withEarlyStoppingPatience(reader.getNullable(JsonReader::getInt)); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("enableOnnxNormalization".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withEnableOnnxNormalization(reader.getNullable(JsonReader::getBoolean)); + } else if ("evaluationFrequency".equals(fieldName)) { + deserializedImageModelSettingsObjectDetection + .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("gradientAccumulationStep".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withGradientAccumulationStep(reader.getNullable(JsonReader::getInt)); @@ -826,7 +810,7 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) .withLayersToFreeze(reader.getNullable(JsonReader::getInt)); } else if ("learningRate".equals(fieldName)) { deserializedImageModelSettingsObjectDetection - .withLearningRate(reader.getNullable(JsonReader::getFloat)); + .withLearningRate(reader.getNullable(JsonReader::getDouble)); } else if ("learningRateScheduler".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withLearningRateScheduler(LearningRateScheduler.fromString(reader.getString())); @@ -834,7 +818,7 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) deserializedImageModelSettingsObjectDetection.withModelName(reader.getString()); } else if ("momentum".equals(fieldName)) { deserializedImageModelSettingsObjectDetection - .withMomentum(reader.getNullable(JsonReader::getFloat)); + .withMomentum(reader.getNullable(JsonReader::getDouble)); } else if ("nesterov".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withNesterov(reader.getNullable(JsonReader::getBoolean)); @@ -852,7 +836,7 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) .withRandomSeed(reader.getNullable(JsonReader::getInt)); } else if ("stepLRGamma".equals(fieldName)) { deserializedImageModelSettingsObjectDetection - .withStepLRGamma(reader.getNullable(JsonReader::getFloat)); + .withStepLRGamma(reader.getNullable(JsonReader::getDouble)); } else if ("stepLRStepSize".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withStepLRStepSize(reader.getNullable(JsonReader::getInt)); @@ -864,19 +848,19 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) .withValidationBatchSize(reader.getNullable(JsonReader::getInt)); } else if ("warmupCosineLRCycles".equals(fieldName)) { deserializedImageModelSettingsObjectDetection - .withWarmupCosineLRCycles(reader.getNullable(JsonReader::getFloat)); + .withWarmupCosineLRCycles(reader.getNullable(JsonReader::getDouble)); } else if ("warmupCosineLRWarmupEpochs".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withWarmupCosineLRWarmupEpochs(reader.getNullable(JsonReader::getInt)); } else if ("weightDecay".equals(fieldName)) { deserializedImageModelSettingsObjectDetection - .withWeightDecay(reader.getNullable(JsonReader::getFloat)); + .withWeightDecay(reader.getNullable(JsonReader::getDouble)); } else if ("boxDetectionsPerImage".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.boxDetectionsPerImage = reader.getNullable(JsonReader::getInt); } else if ("boxScoreThreshold".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.boxScoreThreshold - = reader.getNullable(JsonReader::getFloat); + = reader.getNullable(JsonReader::getDouble); } else if ("imageSize".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.imageSize = reader.getNullable(JsonReader::getInt); } else if ("maxSize".equals(fieldName)) { @@ -890,18 +874,18 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) = reader.getNullable(JsonReader::getBoolean); } else if ("nmsIouThreshold".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.nmsIouThreshold - = reader.getNullable(JsonReader::getFloat); + = reader.getNullable(JsonReader::getDouble); } else if ("tileGridSize".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.tileGridSize = reader.getString(); } else if ("tileOverlapRatio".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.tileOverlapRatio - = reader.getNullable(JsonReader::getFloat); + = reader.getNullable(JsonReader::getDouble); } else if ("tilePredictionsNmsThreshold".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.tilePredictionsNmsThreshold - = reader.getNullable(JsonReader::getFloat); + = reader.getNullable(JsonReader::getDouble); } else if ("validationIouThreshold".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.validationIouThreshold - = reader.getNullable(JsonReader::getFloat); + = reader.getNullable(JsonReader::getDouble); } else if ("validationMetricType".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.validationMetricType = ValidationMetricType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java index 99f1efb1404a..bb9a9972ec01 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,11 +22,6 @@ public final class ImageObjectDetection extends AutoMLVertical { */ private TaskType taskType = TaskType.IMAGE_OBJECT_DETECTION; - /* - * Primary metric to optimize for this task. - */ - private ObjectDetectionPrimaryMetrics primaryMetric; - /* * Settings used for training the model. */ @@ -60,6 +54,11 @@ public final class ImageObjectDetection extends AutoMLVertical { */ private Double validationDataSize; + /* + * Primary metrics for Image ObjectDetection task. + */ + private ObjectDetectionPrimaryMetrics primaryMetric; + /** * Creates an instance of ImageObjectDetection class. */ @@ -76,26 +75,6 @@ public TaskType taskType() { return this.taskType; } - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ObjectDetectionPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withPrimaryMetric(ObjectDetectionPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - /** * Get the modelSettings property: Settings used for training the model. * @@ -225,11 +204,22 @@ public ImageObjectDetection withValidationDataSize(Double validationDataSize) { } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metrics for Image ObjectDetection task. + * + * @return the primaryMetric value. */ - @Override - public ImageObjectDetection withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); + public ObjectDetectionPrimaryMetrics primaryMetric() { + return this.primaryMetric; + } + + /** + * Set the primaryMetric property: Primary metrics for Image ObjectDetection task. + * + * @param primaryMetric the primaryMetric value to set. + * @return the ImageObjectDetection object itself. + */ + public ImageObjectDetection withPrimaryMetric(ObjectDetectionPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; return this; } @@ -237,8 +227,8 @@ public ImageObjectDetection withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public ImageObjectDetection withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageObjectDetection withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -252,36 +242,14 @@ public ImageObjectDetection withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property limitSettings in model ImageObjectDetection")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } + public ImageObjectDetection withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(ImageObjectDetection.class); - /** * {@inheritDoc} */ @@ -293,12 +261,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("modelSettings", this.modelSettings); jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); jsonWriter.writeJsonField("validationData", this.validationData); jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); return jsonWriter.writeEndObject(); } @@ -328,9 +296,6 @@ public static ImageObjectDetection fromJson(JsonReader jsonReader) throws IOExce deserializedImageObjectDetection.limitSettings = ImageLimitSettings.fromJson(reader); } else if ("taskType".equals(fieldName)) { deserializedImageObjectDetection.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedImageObjectDetection.primaryMetric - = ObjectDetectionPrimaryMetrics.fromString(reader.getString()); } else if ("modelSettings".equals(fieldName)) { deserializedImageObjectDetection.modelSettings = ImageModelSettingsObjectDetection.fromJson(reader); } else if ("searchSpace".equals(fieldName)) { @@ -343,6 +308,9 @@ public static ImageObjectDetection fromJson(JsonReader jsonReader) throws IOExce deserializedImageObjectDetection.validationData = MLTableJobInput.fromJson(reader); } else if ("validationDataSize".equals(fieldName)) { deserializedImageObjectDetection.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("primaryMetric".equals(fieldName)) { + deserializedImageObjectDetection.primaryMetric + = ObjectDetectionPrimaryMetrics.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java deleted file mode 100644 index 23d39931454c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 ImageObjectDetectionBase model. - */ -@Fluent -public class ImageObjectDetectionBase extends ImageVertical { - /* - * Settings used for training the model. - */ - private ImageModelSettingsObjectDetection modelSettings; - - /* - * Search space for sampling different combinations of models and their hyperparameters. - */ - private List searchSpace; - - /** - * Creates an instance of ImageObjectDetectionBase class. - */ - public ImageObjectDetectionBase() { - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsObjectDetection modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageObjectDetectionBase object itself. - */ - public ImageObjectDetectionBase withModelSettings(ImageModelSettingsObjectDetection modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageObjectDetectionBase object itself. - */ - public ImageObjectDetectionBase withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withLimitSettings(ImageLimitSettings limitSettings) { - super.withLimitSettings(limitSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withSweepSettings(ImageSweepSettings sweepSettings) { - super.withSweepSettings(sweepSettings); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withValidationData(MLTableJobInput validationData) { - super.withValidationData(validationData); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ImageObjectDetectionBase withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", limitSettings()); - jsonWriter.writeJsonField("sweepSettings", sweepSettings()); - jsonWriter.writeJsonField("validationData", validationData()); - jsonWriter.writeNumberField("validationDataSize", validationDataSize()); - jsonWriter.writeJsonField("modelSettings", this.modelSettings); - jsonWriter.writeArrayField("searchSpace", this.searchSpace, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageObjectDetectionBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageObjectDetectionBase 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 ImageObjectDetectionBase. - */ - public static ImageObjectDetectionBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageObjectDetectionBase deserializedImageObjectDetectionBase = new ImageObjectDetectionBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedImageObjectDetectionBase.withLimitSettings(ImageLimitSettings.fromJson(reader)); - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageObjectDetectionBase.withSweepSettings(ImageSweepSettings.fromJson(reader)); - } else if ("validationData".equals(fieldName)) { - deserializedImageObjectDetectionBase.withValidationData(MLTableJobInput.fromJson(reader)); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageObjectDetectionBase - .withValidationDataSize(reader.getNullable(JsonReader::getDouble)); - } else if ("modelSettings".equals(fieldName)) { - deserializedImageObjectDetectionBase.modelSettings - = ImageModelSettingsObjectDetection.fromJson(reader); - } else if ("searchSpace".equals(fieldName)) { - List searchSpace - = reader.readArray(reader1 -> ImageModelDistributionSettingsObjectDetection.fromJson(reader1)); - deserializedImageObjectDetectionBase.searchSpace = searchSpace; - } else { - reader.skipChildren(); - } - } - - return deserializedImageObjectDetectionBase; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java index cbe5ebe1e801..1f3de2fb24b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,14 +17,14 @@ @Fluent public final class ImageSweepSettings implements JsonSerializable { /* - * [Required] Type of the hyperparameter sampling algorithms. + * Type of early termination policy. */ - private SamplingAlgorithmType samplingAlgorithm; + private EarlyTerminationPolicy earlyTermination; /* - * Type of early termination policy. + * [Required] Type of the hyperparameter sampling algorithms. */ - private EarlyTerminationPolicy earlyTermination; + private SamplingAlgorithmType samplingAlgorithm; /** * Creates an instance of ImageSweepSettings class. @@ -33,26 +32,6 @@ public final class ImageSweepSettings implements JsonSerializable { /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java deleted file mode 100644 index baa6f77c2128..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - -/** - * Abstract class for AutoML tasks that train image (computer vision) models - - * such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance - * Segmentation. - */ -@Fluent -public class ImageVertical implements JsonSerializable { - /* - * [Required] Limit settings for the AutoML job. - */ - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - private ImageSweepSettings sweepSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /** - * Creates an instance of ImageVertical class. - */ - public ImageVertical() { - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (limitSettings() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property limitSettings in model ImageVertical")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageVertical.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("sweepSettings", this.sweepSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ImageVertical from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ImageVertical 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 ImageVertical. - */ - public static ImageVertical fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ImageVertical deserializedImageVertical = new ImageVertical(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedImageVertical.limitSettings = ImageLimitSettings.fromJson(reader); - } else if ("sweepSettings".equals(fieldName)) { - deserializedImageVertical.sweepSettings = ImageSweepSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedImageVertical.validationData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedImageVertical.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - - return deserializedImageVertical; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java index 48f9ec428282..4ff2f96706ff 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,14 +17,14 @@ @Fluent public final class IndexColumn implements JsonSerializable { /* - * Specifies the data type + * Specifies the column name */ - private FeatureDataType dataType; + private String columnName; /* - * Specifies the column name + * Specifies the data type */ - private String columnName; + private FeatureDataType dataType; /** * Creates an instance of IndexColumn class. @@ -32,26 +32,6 @@ public final class IndexColumn implements JsonSerializable { public IndexColumn() { } - /** - * Get the dataType property: Specifies the data type. - * - * @return the dataType value. - */ - public FeatureDataType dataType() { - return this.dataType; - } - - /** - * Set the dataType property: Specifies the data type. - * - * @param dataType the dataType value to set. - * @return the IndexColumn object itself. - */ - public IndexColumn withDataType(FeatureDataType dataType) { - this.dataType = dataType; - return this; - } - /** * Get the columnName property: Specifies the column name. * @@ -73,11 +53,23 @@ public IndexColumn withColumnName(String columnName) { } /** - * Validates the instance. + * Get the dataType property: Specifies the data type. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the dataType value. */ - public void validate() { + public FeatureDataType dataType() { + return this.dataType; + } + + /** + * Set the dataType property: Specifies the data type. + * + * @param dataType the dataType value to set. + * @return the IndexColumn object itself. + */ + public IndexColumn withDataType(FeatureDataType dataType) { + this.dataType = dataType; + return this; } /** @@ -86,8 +78,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); jsonWriter.writeStringField("columnName", this.columnName); + jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); } @@ -106,10 +98,10 @@ public static IndexColumn fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataType".equals(fieldName)) { - deserializedIndexColumn.dataType = FeatureDataType.fromString(reader.getString()); - } else if ("columnName".equals(fieldName)) { + if ("columnName".equals(fieldName)) { deserializedIndexColumn.columnName = reader.getString(); + } else if ("dataType".equals(fieldName)) { + deserializedIndexColumn.dataType = FeatureDataType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java index ab6d72994f68..fb0d93b13351 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -31,6 +31,11 @@ public final class InferenceContainerProperties implements JsonSerializable tags(); + + /** + * Gets the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + InferenceEndpointProperties properties(); + + /** + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + Sku sku(); + + /** + * 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 name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner object. + * + * @return the inner object. + */ + InferenceEndpointInner innerModel(); + + /** + * The entirety of the InferenceEndpoint definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The InferenceEndpoint definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the InferenceEndpoint definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the InferenceEndpoint 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. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the InferenceEndpoint definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @return the next definition stage. + */ + WithProperties withExistingInferencePool(String resourceGroupName, String workspaceName, String poolName); + } + + /** + * The stage of the InferenceEndpoint definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(InferenceEndpointProperties properties); + } + + /** + * The stage of the InferenceEndpoint 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.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { + /** + * Executes the create request. + * + * @return the created resource. + */ + InferenceEndpoint create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InferenceEndpoint create(Context context); + } + + /** + * The stage of the InferenceEndpoint 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 InferenceEndpoint definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the InferenceEndpoint definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. + * + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the InferenceEndpoint definition allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + } + + /** + * Begins update for the InferenceEndpoint resource. + * + * @return the stage of resource update. + */ + InferenceEndpoint.Update update(); + + /** + * The template for InferenceEndpoint update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithIdentity, + UpdateStages.WithKind, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InferenceEndpoint apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InferenceEndpoint apply(Context context); + } + + /** + * The InferenceEndpoint update stages. + */ + interface UpdateStages { + /** + * The stage of the InferenceEndpoint update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the InferenceEndpoint update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + Update withProperties(InferenceEndpointProperties properties); + } + + /** + * The stage of the InferenceEndpoint update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the InferenceEndpoint update allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. + * + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. + * @return the next definition stage. + */ + Update withKind(String kind); + } + + /** + * The stage of the InferenceEndpoint update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + Update withSku(Sku sku); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InferenceEndpoint refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InferenceEndpoint refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java new file mode 100644 index 000000000000..ea514420c7b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * InferenceEndpoint configuration. + */ +@Fluent +public final class InferenceEndpointProperties extends PropertiesBase { + /* + * [Required] Authentication mode for the endpoint. + */ + private AuthMode authMode; + + /* + * Endpoint URI for the inference endpoint. + */ + private String endpointUri; + + /* + * [Required] Group within the same pool with which this endpoint needs to be associated with. + */ + private String groupName; + + /* + * Provisioning state for the endpoint. + */ + private PoolProvisioningState provisioningState; + + /* + * RequestConfiguration for endpoint. + */ + private RequestConfiguration requestConfiguration; + + /** + * Creates an instance of InferenceEndpointProperties class. + */ + public InferenceEndpointProperties() { + } + + /** + * Get the authMode property: [Required] Authentication mode for the endpoint. + * + * @return the authMode value. + */ + public AuthMode authMode() { + return this.authMode; + } + + /** + * Set the authMode property: [Required] Authentication mode for the endpoint. + * + * @param authMode the authMode value to set. + * @return the InferenceEndpointProperties object itself. + */ + public InferenceEndpointProperties withAuthMode(AuthMode authMode) { + this.authMode = authMode; + return this; + } + + /** + * Get the endpointUri property: Endpoint URI for the inference endpoint. + * + * @return the endpointUri value. + */ + public String endpointUri() { + return this.endpointUri; + } + + /** + * Get the groupName property: [Required] Group within the same pool with which this endpoint needs to be associated + * with. + * + * @return the groupName value. + */ + public String groupName() { + return this.groupName; + } + + /** + * Set the groupName property: [Required] Group within the same pool with which this endpoint needs to be associated + * with. + * + * @param groupName the groupName value to set. + * @return the InferenceEndpointProperties object itself. + */ + public InferenceEndpointProperties withGroupName(String groupName) { + this.groupName = groupName; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the endpoint. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the requestConfiguration property: RequestConfiguration for endpoint. + * + * @return the requestConfiguration value. + */ + public RequestConfiguration requestConfiguration() { + return this.requestConfiguration; + } + + /** + * Set the requestConfiguration property: RequestConfiguration for endpoint. + * + * @param requestConfiguration the requestConfiguration value to set. + * @return the InferenceEndpointProperties object itself. + */ + public InferenceEndpointProperties withRequestConfiguration(RequestConfiguration requestConfiguration) { + this.requestConfiguration = requestConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointProperties withProperties(List properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeArrayField("properties", properties(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); + jsonWriter.writeStringField("groupName", this.groupName); + jsonWriter.writeJsonField("requestConfiguration", this.requestConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceEndpointProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceEndpointProperties 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 InferenceEndpointProperties. + */ + public static InferenceEndpointProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceEndpointProperties deserializedInferenceEndpointProperties = new InferenceEndpointProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedInferenceEndpointProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringStringKeyValuePair.fromJson(reader1)); + deserializedInferenceEndpointProperties.withProperties(properties); + } else if ("authMode".equals(fieldName)) { + deserializedInferenceEndpointProperties.authMode = AuthMode.fromString(reader.getString()); + } else if ("groupName".equals(fieldName)) { + deserializedInferenceEndpointProperties.groupName = reader.getString(); + } else if ("endpointUri".equals(fieldName)) { + deserializedInferenceEndpointProperties.endpointUri = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedInferenceEndpointProperties.provisioningState + = PoolProvisioningState.fromString(reader.getString()); + } else if ("requestConfiguration".equals(fieldName)) { + deserializedInferenceEndpointProperties.requestConfiguration + = RequestConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceEndpointProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java new file mode 100644 index 000000000000..6002cd6ac89e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.Map; + +/** + * Resource collection API of InferenceEndpoints. + */ +public interface InferenceEndpoints { + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint 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 inferenceEndpoint along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String endpointName, Context context); + + /** + * Get InferenceEndpoint. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceEndpoint. + */ + InferenceEndpoint get(String resourceGroupName, String workspaceName, String poolName, String endpointName); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Map body); + + /** + * Update InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param body Online Endpoint entity to apply during 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 inferenceEndpoint is a preview-only resource. + */ + InferenceEndpoint update(String resourceGroupName, String workspaceName, String poolName, String endpointName, + Map body, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param endpointName Inference Endpoint name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String poolName, String endpointName, Context context); + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Endpoints. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceEndpoint to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceEndpoint entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, + Integer count, String skip, String tags, String properties, OrderString orderBy, Context context); + + /** + * Get InferenceEndpoint. + * + * @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 inferenceEndpoint along with {@link Response}. + */ + InferenceEndpoint getById(String id); + + /** + * Get InferenceEndpoint. + * + * @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 inferenceEndpoint along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @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); + + /** + * Delete InferenceEndpoint (asynchronous). + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new InferenceEndpoint resource. + * + * @param name resource name. + * @return the first stage of the new InferenceEndpoint definition. + */ + InferenceEndpoint.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java new file mode 100644 index 000000000000..165dd89b03d7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java @@ -0,0 +1,353 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import java.util.Map; + +/** + * An immutable client-side representation of InferenceGroup. + */ +public interface InferenceGroup { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + InferenceGroupProperties properties(); + + /** + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + Sku sku(); + + /** + * 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 name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner object. + * + * @return the inner object. + */ + InferenceGroupInner innerModel(); + + /** + * The entirety of the InferenceGroup definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The InferenceGroup definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the InferenceGroup definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the InferenceGroup 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. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the InferenceGroup definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, poolName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @return the next definition stage. + */ + WithProperties withExistingInferencePool(String resourceGroupName, String workspaceName, String poolName); + } + + /** + * The stage of the InferenceGroup definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(InferenceGroupProperties properties); + } + + /** + * The stage of the InferenceGroup 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.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { + /** + * Executes the create request. + * + * @return the created resource. + */ + InferenceGroup create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InferenceGroup create(Context context); + } + + /** + * The stage of the InferenceGroup 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 InferenceGroup definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the InferenceGroup definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. + * + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the InferenceGroup definition allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + } + + /** + * Begins update for the InferenceGroup resource. + * + * @return the stage of resource update. + */ + InferenceGroup.Update update(); + + /** + * The template for InferenceGroup update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InferenceGroup apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InferenceGroup apply(Context context); + } + + /** + * The InferenceGroup update stages. + */ + interface UpdateStages { + /** + * The stage of the InferenceGroup update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the InferenceGroup update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + Update withSku(PartialSku sku); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InferenceGroup refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InferenceGroup refresh(Context context); + + /** + * Retrieve inference group status. + * + * @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 getStatusWithResponse(Context context); + + /** + * Retrieve inference group status. + * + * @throws com.azure.core.management.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. + */ + GroupStatus getStatus(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java new file mode 100644 index 000000000000..5646ae2dd971 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Inference group configuration. + */ +@Fluent +public final class InferenceGroupProperties extends PropertiesBase { + /* + * Gets or sets environment configuration for the inference group. Used if PoolType=ScaleUnit. + */ + private GroupEnvironmentConfiguration environmentConfiguration; + + /* + * Gets or sets model configuration for the inference group. Used if PoolType=ScaleUnit. + */ + private GroupModelConfiguration modelConfiguration; + + /* + * Gets or sets compute instance type. + */ + private String nodeSkuType; + + /* + * Provisioning state for the inference group. + */ + private PoolProvisioningState provisioningState; + + /* + * Gets or sets Scale Unit size. + */ + private Integer scaleUnitSize; + + /** + * Creates an instance of InferenceGroupProperties class. + */ + public InferenceGroupProperties() { + } + + /** + * Get the environmentConfiguration property: Gets or sets environment configuration for the inference group. Used + * if PoolType=ScaleUnit. + * + * @return the environmentConfiguration value. + */ + public GroupEnvironmentConfiguration environmentConfiguration() { + return this.environmentConfiguration; + } + + /** + * Set the environmentConfiguration property: Gets or sets environment configuration for the inference group. Used + * if PoolType=ScaleUnit. + * + * @param environmentConfiguration the environmentConfiguration value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties + withEnvironmentConfiguration(GroupEnvironmentConfiguration environmentConfiguration) { + this.environmentConfiguration = environmentConfiguration; + return this; + } + + /** + * Get the modelConfiguration property: Gets or sets model configuration for the inference group. Used if + * PoolType=ScaleUnit. + * + * @return the modelConfiguration value. + */ + public GroupModelConfiguration modelConfiguration() { + return this.modelConfiguration; + } + + /** + * Set the modelConfiguration property: Gets or sets model configuration for the inference group. Used if + * PoolType=ScaleUnit. + * + * @param modelConfiguration the modelConfiguration value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withModelConfiguration(GroupModelConfiguration modelConfiguration) { + this.modelConfiguration = modelConfiguration; + return this; + } + + /** + * Get the nodeSkuType property: Gets or sets compute instance type. + * + * @return the nodeSkuType value. + */ + public String nodeSkuType() { + return this.nodeSkuType; + } + + /** + * Set the nodeSkuType property: Gets or sets compute instance type. + * + * @param nodeSkuType the nodeSkuType value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withNodeSkuType(String nodeSkuType) { + this.nodeSkuType = nodeSkuType; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the inference group. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scaleUnitSize property: Gets or sets Scale Unit size. + * + * @return the scaleUnitSize value. + */ + public Integer scaleUnitSize() { + return this.scaleUnitSize; + } + + /** + * Set the scaleUnitSize property: Gets or sets Scale Unit size. + * + * @param scaleUnitSize the scaleUnitSize value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withScaleUnitSize(Integer scaleUnitSize) { + this.scaleUnitSize = scaleUnitSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupProperties withProperties(List properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeArrayField("properties", properties(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("environmentConfiguration", this.environmentConfiguration); + jsonWriter.writeJsonField("modelConfiguration", this.modelConfiguration); + jsonWriter.writeStringField("nodeSkuType", this.nodeSkuType); + jsonWriter.writeNumberField("scaleUnitSize", this.scaleUnitSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceGroupProperties 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 InferenceGroupProperties. + */ + public static InferenceGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceGroupProperties deserializedInferenceGroupProperties = new InferenceGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedInferenceGroupProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringStringKeyValuePair.fromJson(reader1)); + deserializedInferenceGroupProperties.withProperties(properties); + } else if ("environmentConfiguration".equals(fieldName)) { + deserializedInferenceGroupProperties.environmentConfiguration + = GroupEnvironmentConfiguration.fromJson(reader); + } else if ("modelConfiguration".equals(fieldName)) { + deserializedInferenceGroupProperties.modelConfiguration = GroupModelConfiguration.fromJson(reader); + } else if ("nodeSkuType".equals(fieldName)) { + deserializedInferenceGroupProperties.nodeSkuType = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedInferenceGroupProperties.provisioningState + = PoolProvisioningState.fromString(reader.getString()); + } else if ("scaleUnitSize".equals(fieldName)) { + deserializedInferenceGroupProperties.scaleUnitSize = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceGroupProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java new file mode 100644 index 000000000000..57ded4fd4fb2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 InferenceGroups. + */ +public interface InferenceGroups { + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Get InferenceGroup. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return inferenceGroup. + */ + InferenceGroup get(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * Delete InferenceGroup (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String poolName, String groupName, Context context); + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName); + + /** + * List Inference Groups. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param count Number of InferenceGroup to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferenceGroup entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, String poolName, Integer count, + String skip, String tags, String properties, OrderString orderBy, Context context); + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 contract returning to user the delta models along with {@link Response}. + */ + Response getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context); + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 contract returning to user the delta models. + */ + DeltaModelStatusResponse getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelStatusRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 paginated list of String entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelBaseRequest. + * @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 paginated list of String entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest body); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param body DeltaModelModifyRequest. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest body, Context context); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response getStatusWithResponse(String resourceGroupName, String workspaceName, String poolName, + String groupName, Context context); + + /** + * Retrieve inference group status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + GroupStatus getStatus(String resourceGroupName, String workspaceName, String poolName, String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName); + + /** + * List Inference Group Skus. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param poolName Pool name. + * @param groupName Inference Group name. + * @param count Number of Skus to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @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 paginated list of SkuResource entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listSkus(String resourceGroupName, String workspaceName, String poolName, + String groupName, Integer count, String skip, Context context); + + /** + * Get InferenceGroup. + * + * @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 inferenceGroup along with {@link Response}. + */ + InferenceGroup getById(String id); + + /** + * Get InferenceGroup. + * + * @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 inferenceGroup along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete InferenceGroup (asynchronous). + * + * @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); + + /** + * Delete InferenceGroup (asynchronous). + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new InferenceGroup resource. + * + * @param name resource name. + * @return the first stage of the new InferenceGroup definition. + */ + InferenceGroup.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java new file mode 100644 index 000000000000..cf85c4d97832 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import java.util.Map; + +/** + * An immutable client-side representation of InferencePool. + */ +public interface InferencePool { + /** + * 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: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + InferencePoolProperties properties(); + + /** + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sku property: Sku details required for ARM contract for Autoscaling. + * + * @return the sku value. + */ + Sku sku(); + + /** + * 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 name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner object. + * + * @return the inner object. + */ + InferencePoolInner innerModel(); + + /** + * The entirety of the InferencePool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The InferencePool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the InferencePool definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the InferencePool 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. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the InferencePool definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @return the next definition stage. + */ + WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the InferencePool definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: [Required] Additional attributes of the entity.. + * + * @param properties [Required] Additional attributes of the entity. + * @return the next definition stage. + */ + WithCreate withProperties(InferencePoolProperties properties); + } + + /** + * The stage of the InferencePool 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.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { + /** + * Executes the create request. + * + * @return the created resource. + */ + InferencePool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + InferencePool create(Context context); + } + + /** + * The stage of the InferencePool 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 InferencePool definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the InferencePool definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. + * + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + + /** + * The stage of the InferencePool definition allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + WithCreate withSku(Sku sku); + } + } + + /** + * Begins update for the InferencePool resource. + * + * @return the stage of resource update. + */ + InferencePool.Update update(); + + /** + * The template for InferencePool update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { + /** + * Executes the update request. + * + * @return the updated resource. + */ + InferencePool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + InferencePool apply(Context context); + } + + /** + * The InferencePool update stages. + */ + interface UpdateStages { + /** + * The stage of the InferencePool update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the InferencePool update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). + * + * @param identity Managed service identity (system assigned and/or user assigned identities). + * @return the next definition stage. + */ + Update withIdentity(PartialManagedServiceIdentity identity); + } + + /** + * The stage of the InferencePool update allowing to specify sku. + */ + interface WithSku { + /** + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * + * @param sku Sku details required for ARM contract for Autoscaling. + * @return the next definition stage. + */ + Update withSku(PartialSku sku); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + InferencePool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + InferencePool refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java new file mode 100644 index 000000000000..43f176625b6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Inference pool configuration. + */ +@Fluent +public final class InferencePoolProperties extends PropertiesBase { + /* + * Provisioning state for the pool. + */ + private PoolProvisioningState provisioningState; + + /* + * Gets or sets ScaleUnitConfiguration for the inference pool. Used if PoolType=ScaleUnit. + */ + private ScaleUnitConfiguration scaleUnitConfiguration; + + /** + * Creates an instance of InferencePoolProperties class. + */ + public InferencePoolProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the pool. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scaleUnitConfiguration property: Gets or sets ScaleUnitConfiguration for the inference pool. Used if + * PoolType=ScaleUnit. + * + * @return the scaleUnitConfiguration value. + */ + public ScaleUnitConfiguration scaleUnitConfiguration() { + return this.scaleUnitConfiguration; + } + + /** + * Set the scaleUnitConfiguration property: Gets or sets ScaleUnitConfiguration for the inference pool. Used if + * PoolType=ScaleUnit. + * + * @param scaleUnitConfiguration the scaleUnitConfiguration value to set. + * @return the InferencePoolProperties object itself. + */ + public InferencePoolProperties withScaleUnitConfiguration(ScaleUnitConfiguration scaleUnitConfiguration) { + this.scaleUnitConfiguration = scaleUnitConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolProperties withProperties(List properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeArrayField("properties", properties(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("scaleUnitConfiguration", this.scaleUnitConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferencePoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferencePoolProperties 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 InferencePoolProperties. + */ + public static InferencePoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferencePoolProperties deserializedInferencePoolProperties = new InferencePoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedInferencePoolProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringStringKeyValuePair.fromJson(reader1)); + deserializedInferencePoolProperties.withProperties(properties); + } else if ("provisioningState".equals(fieldName)) { + deserializedInferencePoolProperties.provisioningState + = PoolProvisioningState.fromString(reader.getString()); + } else if ("scaleUnitConfiguration".equals(fieldName)) { + deserializedInferencePoolProperties.scaleUnitConfiguration + = ScaleUnitConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferencePoolProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java new file mode 100644 index 000000000000..882bab825981 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 InferencePools. + */ +public interface InferencePools { + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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 inferencePool along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String inferencePoolName, + Context context); + + /** + * Get InferencePool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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 inferencePool. + */ + InferencePool get(String resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @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 resourceGroupName, String workspaceName, String inferencePoolName); + + /** + * Delete InferencePool (asynchronous). + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param inferencePoolName Name of InferencePool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String inferencePoolName, Context context); + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of InferencePool entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List InferencePools. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param count Number of inferencePools to be retrieved in a page of results. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 paginated list of InferencePool entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, Integer count, String skip, + String tags, String properties, OrderString orderBy, Context context); + + /** + * Get InferencePool. + * + * @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 inferencePool along with {@link Response}. + */ + InferencePool getById(String id); + + /** + * Get InferencePool. + * + * @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 inferencePool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete InferencePool (asynchronous). + * + * @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); + + /** + * Delete InferencePool (asynchronous). + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new InferencePool resource. + * + * @param name resource name. + * @return the first stage of the new InferencePool definition. + */ + InferencePool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java index 28d59aaf93c1..823f009d45f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java index 0244c94f50bc..859bb831091f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,8 @@ */ public final class InstanceSegmentationPrimaryMetrics extends ExpandableStringEnum { /** - * Static value MeanAveragePrecision for InstanceSegmentationPrimaryMetrics. + * Mean Average Precision (MAP) is the average of AP (Average Precision). + * AP is calculated for each class and averaged to get the MAP. */ public static final InstanceSegmentationPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java index 4ec3f90e2563..c4e576eb6ac2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -73,17 +73,6 @@ public InstanceTypeSchema withResources(InstanceTypeSchemaResources resources) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resources() != null) { - resources().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java index 153fc9dec1f2..7aa2b54f149d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -73,14 +73,6 @@ public InstanceTypeSchemaResources withLimits(Map limits) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java index 05222c9696fe..3ea2c28bfcef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java index 41f545757bf5..5345d8a69b55 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java index 4ef82aaabab8..da839e6b4f1f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,30 +22,30 @@ public class JobBaseProperties extends ResourceBase { private JobType jobType = JobType.fromString("JobBaseProperties"); /* - * Display name of job. + * ARM resource ID of the component resource. */ - private String displayName; + private String componentId; /* - * Status of the job. + * ARM resource ID of the compute resource. */ - private JobStatus status; + private String computeId; /* - * The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + * Display name of job. */ - private String experimentName; + private String displayName; /* - * List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. */ - private Map services; + private String experimentName; /* - * ARM resource ID of the compute resource. + * Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + * Defaults to AmlToken if null. */ - private String computeId; + private IdentityConfiguration identity; /* * Is the asset archived? @@ -53,20 +53,26 @@ public class JobBaseProperties extends ResourceBase { private Boolean isArchived; /* - * Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - * Defaults to AmlToken if null. + * Notification setting for the job */ - private IdentityConfiguration identity; + private NotificationSetting notificationSetting; /* - * ARM resource ID of the component resource. + * Parent job name. */ - private String componentId; + private String parentJobName; /* - * Notification setting for the job + * + * List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. */ - private NotificationSetting notificationSetting; + private Map services; + + /* + * Status of the job. + */ + private JobStatus status; /** * Creates an instance of JobBaseProperties class. @@ -84,106 +90,108 @@ public JobType jobType() { } /** - * Get the displayName property: Display name of job. + * Get the componentId property: ARM resource ID of the component resource. * - * @return the displayName value. + * @return the componentId value. */ - public String displayName() { - return this.displayName; + public String componentId() { + return this.componentId; } /** - * Set the displayName property: Display name of job. + * Set the componentId property: ARM resource ID of the component resource. * - * @param displayName the displayName value to set. + * @param componentId the componentId value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withDisplayName(String displayName) { - this.displayName = displayName; + public JobBaseProperties withComponentId(String componentId) { + this.componentId = componentId; return this; } /** - * Get the status property: Status of the job. + * Get the computeId property: ARM resource ID of the compute resource. * - * @return the status value. + * @return the computeId value. */ - public JobStatus status() { - return this.status; + public String computeId() { + return this.computeId; } /** - * Set the status property: Status of the job. + * Set the computeId property: ARM resource ID of the compute resource. * - * @param status the status value to set. + * @param computeId the computeId value to set. * @return the JobBaseProperties object itself. */ - JobBaseProperties withStatus(JobStatus status) { - this.status = status; + public JobBaseProperties withComputeId(String computeId) { + this.computeId = computeId; return this; } /** - * Get the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in - * the "Default" experiment. + * Get the displayName property: Display name of job. * - * @return the experimentName value. + * @return the displayName value. */ - public String experimentName() { - return this.experimentName; + public String displayName() { + return this.displayName; } /** - * Set the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in - * the "Default" experiment. + * Set the displayName property: Display name of job. * - * @param experimentName the experimentName value to set. + * @param displayName the displayName value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withExperimentName(String experimentName) { - this.experimentName = experimentName; + public JobBaseProperties withDisplayName(String displayName) { + this.displayName = displayName; return this; } /** - * Get the services property: List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * Get the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in + * the "Default" experiment. * - * @return the services value. + * @return the experimentName value. */ - public Map services() { - return this.services; + public String experimentName() { + return this.experimentName; } /** - * Set the services property: List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * Set the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in + * the "Default" experiment. * - * @param services the services value to set. + * @param experimentName the experimentName value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withServices(Map services) { - this.services = services; + public JobBaseProperties withExperimentName(String experimentName) { + this.experimentName = experimentName; return this; } /** - * Get the computeId property: ARM resource ID of the compute resource. + * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, + * UserIdentity or null. + * Defaults to AmlToken if null. * - * @return the computeId value. + * @return the identity value. */ - public String computeId() { - return this.computeId; + public IdentityConfiguration identity() { + return this.identity; } /** - * Set the computeId property: ARM resource ID of the compute resource. + * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, + * UserIdentity or null. + * Defaults to AmlToken if null. * - * @param computeId the computeId value to set. + * @param identity the identity value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withComputeId(String computeId) { - this.computeId = computeId; + public JobBaseProperties withIdentity(IdentityConfiguration identity) { + this.identity = identity; return this; } @@ -208,75 +216,86 @@ public JobBaseProperties withIsArchived(Boolean isArchived) { } /** - * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. - * Defaults to AmlToken if null. + * Get the notificationSetting property: Notification setting for the job. * - * @return the identity value. + * @return the notificationSetting value. */ - public IdentityConfiguration identity() { - return this.identity; + public NotificationSetting notificationSetting() { + return this.notificationSetting; } /** - * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. - * Defaults to AmlToken if null. + * Set the notificationSetting property: Notification setting for the job. * - * @param identity the identity value to set. + * @param notificationSetting the notificationSetting value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withIdentity(IdentityConfiguration identity) { - this.identity = identity; + public JobBaseProperties withNotificationSetting(NotificationSetting notificationSetting) { + this.notificationSetting = notificationSetting; return this; } /** - * Get the componentId property: ARM resource ID of the component resource. + * Get the parentJobName property: Parent job name. * - * @return the componentId value. + * @return the parentJobName value. */ - public String componentId() { - return this.componentId; + public String parentJobName() { + return this.parentJobName; } /** - * Set the componentId property: ARM resource ID of the component resource. + * Set the parentJobName property: Parent job name. * - * @param componentId the componentId value to set. + * @param parentJobName the parentJobName value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withComponentId(String componentId) { - this.componentId = componentId; + public JobBaseProperties withParentJobName(String parentJobName) { + this.parentJobName = parentJobName; return this; } /** - * Get the notificationSetting property: Notification setting for the job. + * Get the services property: + * List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. * - * @return the notificationSetting value. + * @return the services value. */ - public NotificationSetting notificationSetting() { - return this.notificationSetting; + public Map services() { + return this.services; } /** - * Set the notificationSetting property: Notification setting for the job. + * Set the services property: + * List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. * - * @param notificationSetting the notificationSetting value to set. + * @param services the services value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withNotificationSetting(NotificationSetting notificationSetting) { - this.notificationSetting = notificationSetting; + public JobBaseProperties withServices(Map services) { + this.services = services; return this; } /** - * {@inheritDoc} + * Get the status property: Status of the job. + * + * @return the status value. */ - @Override - public JobBaseProperties withDescription(String description) { - super.withDescription(description); + public JobStatus status() { + return this.status; + } + + /** + * Set the status property: Status of the job. + * + * @param status the status value to set. + * @return the JobBaseProperties object itself. + */ + JobBaseProperties withStatus(JobStatus status) { + this.status = status; return this; } @@ -284,8 +303,8 @@ public JobBaseProperties withDescription(String description) { * {@inheritDoc} */ @Override - public JobBaseProperties withTags(Map tags) { - super.withTags(tags); + public JobBaseProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -299,26 +318,12 @@ public JobBaseProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (services() != null) { - services().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (identity() != null) { - identity().validate(); - } - if (notificationSetting() != null) { - notificationSetting().validate(); - } + public JobBaseProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -328,17 +333,18 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeStringField("componentId", this.componentId); + jsonWriter.writeStringField("computeId", this.computeId); jsonWriter.writeStringField("displayName", this.displayName); jsonWriter.writeStringField("experimentName", this.experimentName); - jsonWriter.writeMapField("services", this.services, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", this.computeId); - jsonWriter.writeBooleanField("isArchived", this.isArchived); jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("componentId", this.componentId); + jsonWriter.writeBooleanField("isArchived", this.isArchived); jsonWriter.writeJsonField("notificationSetting", this.notificationSetting); + jsonWriter.writeStringField("parentJobName", this.parentJobName); + jsonWriter.writeMapField("services", this.services, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -370,6 +376,10 @@ public static JobBaseProperties fromJson(JsonReader jsonReader) throws IOExcepti return AutoMLJob.fromJson(readerToUse.reset()); } else if ("Command".equals(discriminatorValue)) { return CommandJob.fromJson(readerToUse.reset()); + } else if ("Distillation".equals(discriminatorValue)) { + return DistillationJob.fromJson(readerToUse.reset()); + } else if ("FineTuning".equals(discriminatorValue)) { + return FineTuningJob.fromJson(readerToUse.reset()); } else if ("Pipeline".equals(discriminatorValue)) { return PipelineJob.fromJson(readerToUse.reset()); } else if ("Spark".equals(discriminatorValue)) { @@ -392,33 +402,35 @@ static JobBaseProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throw if ("description".equals(fieldName)) { deserializedJobBaseProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedJobBaseProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedJobBaseProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedJobBaseProperties.withTags(tags); } else if ("jobType".equals(fieldName)) { deserializedJobBaseProperties.jobType = JobType.fromString(reader.getString()); + } else if ("componentId".equals(fieldName)) { + deserializedJobBaseProperties.componentId = reader.getString(); + } else if ("computeId".equals(fieldName)) { + deserializedJobBaseProperties.computeId = reader.getString(); } else if ("displayName".equals(fieldName)) { deserializedJobBaseProperties.displayName = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedJobBaseProperties.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedJobBaseProperties.experimentName = reader.getString(); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedJobBaseProperties.services = services; - } else if ("computeId".equals(fieldName)) { - deserializedJobBaseProperties.computeId = reader.getString(); - } else if ("isArchived".equals(fieldName)) { - deserializedJobBaseProperties.isArchived = reader.getNullable(JsonReader::getBoolean); } else if ("identity".equals(fieldName)) { deserializedJobBaseProperties.identity = IdentityConfiguration.fromJson(reader); - } else if ("componentId".equals(fieldName)) { - deserializedJobBaseProperties.componentId = reader.getString(); + } else if ("isArchived".equals(fieldName)) { + deserializedJobBaseProperties.isArchived = reader.getNullable(JsonReader::getBoolean); } else if ("notificationSetting".equals(fieldName)) { deserializedJobBaseProperties.notificationSetting = NotificationSetting.fromJson(reader); + } else if ("parentJobName".equals(fieldName)) { + deserializedJobBaseProperties.parentJobName = reader.getString(); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedJobBaseProperties.services = services; + } else if ("status".equals(fieldName)) { + deserializedJobBaseProperties.status = JobStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java index 88f0cbd589de..cf6e290fb4f6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,14 +61,6 @@ public JobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java index 313bd4569147..e64a85be603a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java index cb22815a974f..3fc184236b61 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -66,14 +66,6 @@ public JobLimits withTimeout(Duration timeout) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -109,10 +101,10 @@ public static JobLimits fromJson(JsonReader jsonReader) throws IOException { } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Command".equals(discriminatorValue)) { - return CommandJobLimits.fromJson(readerToUse.reset()); - } else if ("Sweep".equals(discriminatorValue)) { + if ("Sweep".equals(discriminatorValue)) { return SweepJobLimits.fromJson(readerToUse.reset()); + } else if ("Command".equals(discriminatorValue)) { + return CommandJobLimits.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java index 701ae070452d..48e972bad512 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java index 95004ccd7696..25bc2c0d307e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,14 +61,6 @@ public JobOutput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java index 711b28b17355..06bfd1659d1b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java index 3786fa96eb3b..fa00377bab6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -16,46 +17,28 @@ */ @Fluent public final class JobResourceConfiguration extends ResourceConfiguration { - /* - * Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number - * as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). - */ - private String shmSize; - /* * Extra arguments to pass to the Docker run command. This would override any parameters that have already been set * by the system, or in this section. This parameter is only supported for Azure ML compute types. */ private String dockerArgs; - /** - * Creates an instance of JobResourceConfiguration class. + /* + * Extra arguments to pass to the Docker run command, as a collection. This would override any parameters that have + * already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. */ - public JobResourceConfiguration() { - } + private List dockerArgsList; - /** - * Get the shmSize property: Size of the docker container's shared memory block. This should be in the format of - * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), - * m(megabytes), or g(gigabytes). - * - * @return the shmSize value. + /* + * Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number + * as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). */ - public String shmSize() { - return this.shmSize; - } + private String shmSize; /** - * Set the shmSize property: Size of the docker container's shared memory block. This should be in the format of - * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), - * m(megabytes), or g(gigabytes). - * - * @param shmSize the shmSize value to set. - * @return the JobResourceConfiguration object itself. + * Creates an instance of JobResourceConfiguration class. */ - public JobResourceConfiguration withShmSize(String shmSize) { - this.shmSize = shmSize; - return this; + public JobResourceConfiguration() { } /** @@ -82,6 +65,54 @@ public JobResourceConfiguration withDockerArgs(String dockerArgs) { return this; } + /** + * Get the dockerArgsList property: Extra arguments to pass to the Docker run command, as a collection. This would + * override any parameters that have already been set by the system, or in this section. This parameter is only + * supported for Azure ML compute types. + * + * @return the dockerArgsList value. + */ + public List dockerArgsList() { + return this.dockerArgsList; + } + + /** + * Set the dockerArgsList property: Extra arguments to pass to the Docker run command, as a collection. This would + * override any parameters that have already been set by the system, or in this section. This parameter is only + * supported for Azure ML compute types. + * + * @param dockerArgsList the dockerArgsList value to set. + * @return the JobResourceConfiguration object itself. + */ + public JobResourceConfiguration withDockerArgsList(List dockerArgsList) { + this.dockerArgsList = dockerArgsList; + return this; + } + + /** + * Get the shmSize property: Size of the docker container's shared memory block. This should be in the format of + * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), + * m(megabytes), or g(gigabytes). + * + * @return the shmSize value. + */ + public String shmSize() { + return this.shmSize; + } + + /** + * Set the shmSize property: Size of the docker container's shared memory block. This should be in the format of + * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), + * m(megabytes), or g(gigabytes). + * + * @param shmSize the shmSize value to set. + * @return the JobResourceConfiguration object itself. + */ + public JobResourceConfiguration withShmSize(String shmSize) { + this.shmSize = shmSize; + return this; + } + /** * {@inheritDoc} */ @@ -109,16 +140,6 @@ public JobResourceConfiguration withProperties(Map properties) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -128,8 +149,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("instanceCount", instanceCount()); jsonWriter.writeStringField("instanceType", instanceType()); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeStringField("shmSize", this.shmSize); jsonWriter.writeStringField("dockerArgs", this.dockerArgs); + jsonWriter.writeArrayField("dockerArgsList", this.dockerArgsList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("shmSize", this.shmSize); return jsonWriter.writeEndObject(); } @@ -155,10 +178,13 @@ public static JobResourceConfiguration fromJson(JsonReader jsonReader) throws IO } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.readUntyped()); deserializedJobResourceConfiguration.withProperties(properties); - } else if ("shmSize".equals(fieldName)) { - deserializedJobResourceConfiguration.shmSize = reader.getString(); } else if ("dockerArgs".equals(fieldName)) { deserializedJobResourceConfiguration.dockerArgs = reader.getString(); + } else if ("dockerArgsList".equals(fieldName)) { + List dockerArgsList = reader.readArray(reader1 -> reader1.getString()); + deserializedJobResourceConfiguration.dockerArgsList = dockerArgsList; + } else if ("shmSize".equals(fieldName)) { + deserializedJobResourceConfiguration.shmSize = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java new file mode 100644 index 000000000000..98a9af4ad798 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 JobResources model. + */ +@Fluent +public final class JobResources implements JsonSerializable { + /* + * List of instance types to choose from. + */ + private List instanceTypes; + + /** + * Creates an instance of JobResources class. + */ + public JobResources() { + } + + /** + * Get the instanceTypes property: List of instance types to choose from. + * + * @return the instanceTypes value. + */ + public List instanceTypes() { + return this.instanceTypes; + } + + /** + * Set the instanceTypes property: List of instance types to choose from. + * + * @param instanceTypes the instanceTypes value to set. + * @return the JobResources object itself. + */ + public JobResources withInstanceTypes(List instanceTypes) { + this.instanceTypes = instanceTypes; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("instanceTypes", this.instanceTypes, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobResources from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobResources 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 JobResources. + */ + public static JobResources fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobResources deserializedJobResources = new JobResources(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("instanceTypes".equals(fieldName)) { + List instanceTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedJobResources.instanceTypes = instanceTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedJobResources; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java index 9fb78f3743d1..db78bcde2877 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,25 +61,6 @@ public JobScheduleAction withJobDefinition(JobBaseProperties jobDefinition) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (jobDefinition() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property jobDefinition in model JobScheduleAction")); - } else { - jobDefinition().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobScheduleAction.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java index e6374f1e1458..3e3c18bd4334 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -18,29 +18,30 @@ @Fluent public final class JobService implements JsonSerializable { /* - * Endpoint type. + * Url for endpoint. */ - private String jobServiceType; + private String endpoint; /* - * Port for endpoint. + * Any error in the service. */ - private Integer port; + private String errorMessage; /* - * Url for endpoint. + * Endpoint type. */ - private String endpoint; + private String jobServiceType; /* - * Status of endpoint. + * Nodes that user would like to start the service on. + * If Nodes is not set or set to null, the service will only be started on leader node. */ - private String status; + private Nodes nodes; /* - * Any error in the service. + * Port for endpoint. */ - private String errorMessage; + private Integer port; /* * Additional properties to set on the endpoint. @@ -48,10 +49,9 @@ public final class JobService implements JsonSerializable { private Map properties; /* - * Nodes that user would like to start the service on. - * If Nodes is not set or set to null, the service will only be started on leader node. + * Status of endpoint. */ - private Nodes nodes; + private String status; /** * Creates an instance of JobService class. @@ -60,81 +60,94 @@ public JobService() { } /** - * Get the jobServiceType property: Endpoint type. + * Get the endpoint property: Url for endpoint. * - * @return the jobServiceType value. + * @return the endpoint value. */ - public String jobServiceType() { - return this.jobServiceType; + public String endpoint() { + return this.endpoint; } /** - * Set the jobServiceType property: Endpoint type. + * Set the endpoint property: Url for endpoint. * - * @param jobServiceType the jobServiceType value to set. + * @param endpoint the endpoint value to set. * @return the JobService object itself. */ - public JobService withJobServiceType(String jobServiceType) { - this.jobServiceType = jobServiceType; + public JobService withEndpoint(String endpoint) { + this.endpoint = endpoint; return this; } /** - * Get the port property: Port for endpoint. + * Get the errorMessage property: Any error in the service. * - * @return the port value. + * @return the errorMessage value. */ - public Integer port() { - return this.port; + public String errorMessage() { + return this.errorMessage; } /** - * Set the port property: Port for endpoint. + * Get the jobServiceType property: Endpoint type. * - * @param port the port value to set. + * @return the jobServiceType value. + */ + public String jobServiceType() { + return this.jobServiceType; + } + + /** + * Set the jobServiceType property: Endpoint type. + * + * @param jobServiceType the jobServiceType value to set. * @return the JobService object itself. */ - public JobService withPort(Integer port) { - this.port = port; + public JobService withJobServiceType(String jobServiceType) { + this.jobServiceType = jobServiceType; return this; } /** - * Get the endpoint property: Url for endpoint. + * Get the nodes property: Nodes that user would like to start the service on. + * If Nodes is not set or set to null, the service will only be started on leader node. * - * @return the endpoint value. + * @return the nodes value. */ - public String endpoint() { - return this.endpoint; + public Nodes nodes() { + return this.nodes; } /** - * Set the endpoint property: Url for endpoint. + * Set the nodes property: Nodes that user would like to start the service on. + * If Nodes is not set or set to null, the service will only be started on leader node. * - * @param endpoint the endpoint value to set. + * @param nodes the nodes value to set. * @return the JobService object itself. */ - public JobService withEndpoint(String endpoint) { - this.endpoint = endpoint; + public JobService withNodes(Nodes nodes) { + this.nodes = nodes; return this; } /** - * Get the status property: Status of endpoint. + * Get the port property: Port for endpoint. * - * @return the status value. + * @return the port value. */ - public String status() { - return this.status; + public Integer port() { + return this.port; } /** - * Get the errorMessage property: Any error in the service. + * Set the port property: Port for endpoint. * - * @return the errorMessage value. + * @param port the port value to set. + * @return the JobService object itself. */ - public String errorMessage() { - return this.errorMessage; + public JobService withPort(Integer port) { + this.port = port; + return this; } /** @@ -158,36 +171,12 @@ public JobService withProperties(Map properties) { } /** - * Get the nodes property: Nodes that user would like to start the service on. - * If Nodes is not set or set to null, the service will only be started on leader node. - * - * @return the nodes value. - */ - public Nodes nodes() { - return this.nodes; - } - - /** - * Set the nodes property: Nodes that user would like to start the service on. - * If Nodes is not set or set to null, the service will only be started on leader node. - * - * @param nodes the nodes value to set. - * @return the JobService object itself. - */ - public JobService withNodes(Nodes nodes) { - this.nodes = nodes; - return this; - } - - /** - * Validates the instance. + * Get the status property: Status of endpoint. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the status value. */ - public void validate() { - if (nodes() != null) { - nodes().validate(); - } + public String status() { + return this.status; } /** @@ -196,11 +185,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeStringField("jobServiceType", this.jobServiceType); + jsonWriter.writeJsonField("nodes", this.nodes); jsonWriter.writeNumberField("port", this.port); - jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("nodes", this.nodes); return jsonWriter.writeEndObject(); } @@ -219,21 +208,21 @@ public static JobService fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("jobServiceType".equals(fieldName)) { - deserializedJobService.jobServiceType = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedJobService.port = reader.getNullable(JsonReader::getInt); - } else if ("endpoint".equals(fieldName)) { + if ("endpoint".equals(fieldName)) { deserializedJobService.endpoint = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedJobService.status = reader.getString(); } else if ("errorMessage".equals(fieldName)) { deserializedJobService.errorMessage = reader.getString(); + } else if ("jobServiceType".equals(fieldName)) { + deserializedJobService.jobServiceType = reader.getString(); + } else if ("nodes".equals(fieldName)) { + deserializedJobService.nodes = Nodes.fromJson(reader); + } else if ("port".equals(fieldName)) { + deserializedJobService.port = reader.getNullable(JsonReader::getInt); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedJobService.properties = properties; - } else if ("nodes".equals(fieldName)) { - deserializedJobService.nodes = Nodes.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedJobService.status = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java index 9a2a2d5a618e..01041d1f7631 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,72 +12,77 @@ */ public final class JobStatus extends ExpandableStringEnum { /** - * Static value NotStarted for JobStatus. + * Run hasn't started yet. */ public static final JobStatus NOT_STARTED = fromString("NotStarted"); /** - * Static value Starting for JobStatus. + * Run has started. The user has a run ID. */ public static final JobStatus STARTING = fromString("Starting"); /** - * Static value Provisioning for JobStatus. + * (Not used currently) It will be used if ES is creating the compute target. */ public static final JobStatus PROVISIONING = fromString("Provisioning"); /** - * Static value Preparing for JobStatus. + * The run environment is being prepared. */ public static final JobStatus PREPARING = fromString("Preparing"); /** - * Static value Queued for JobStatus. + * The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for + * all required nodes to be ready. */ public static final JobStatus QUEUED = fromString("Queued"); /** - * Static value Running for JobStatus. + * The job started to run in the compute target. */ public static final JobStatus RUNNING = fromString("Running"); /** - * Static value Finalizing for JobStatus. + * Job is completed in the target. It is in output collection state now. */ public static final JobStatus FINALIZING = fromString("Finalizing"); /** - * Static value CancelRequested for JobStatus. + * Cancellation has been requested for the job. */ public static final JobStatus CANCEL_REQUESTED = fromString("CancelRequested"); /** - * Static value Completed for JobStatus. + * Job completed successfully. This reflects that both the job itself and output collection states completed + * successfully. */ public static final JobStatus COMPLETED = fromString("Completed"); /** - * Static value Failed for JobStatus. + * Job failed. */ public static final JobStatus FAILED = fromString("Failed"); /** - * Static value Canceled for JobStatus. + * Following cancellation request, the job is now successfully canceled. */ public static final JobStatus CANCELED = fromString("Canceled"); /** - * Static value NotResponding for JobStatus. + * When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to + * NotResponding state. + * NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to + * any of the previous states. */ public static final JobStatus NOT_RESPONDING = fromString("NotResponding"); /** - * Static value Paused for JobStatus. + * The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. */ public static final JobStatus PAUSED = fromString("Paused"); /** - * Static value Unknown for JobStatus. + * Default job status if not mapped to all other statuses. */ public static final JobStatus UNKNOWN = fromString("Unknown"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java index a4ea9676a29f..f216d375f8d0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java index 9a7e0d5b6ae6..df1f5a6a075d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,6 +36,16 @@ public final class JobType extends ExpandableStringEnum { */ public static final JobType SPARK = fromString("Spark"); + /** + * Static value FineTuning for JobType. + */ + public static final JobType FINE_TUNING = fromString("FineTuning"); + + /** + * Static value Distillation for JobType. + */ + public static final JobType DISTILLATION = fromString("Distillation"); + /** * Creates a new instance of JobType value. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java index bc5f3be5a755..86dfc39ec8dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,42 +13,37 @@ */ public interface Jobs { /** - * Lists Jobs in the workspace. + * Gets a Job by name/id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. + * @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 paginated list of JobBase entities as paginated response with {@link PagedIterable}. + * @return a Job by name/id along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); /** - * Lists Jobs in the workspace. + * Gets a Job by name/id. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param properties Comma-separated list of user property names (and optionally values). Example: - * prop1,prop2=value2. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param id The name and identifier for the Job. This is case-sensitive. * @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 paginated list of JobBase entities as paginated response with {@link PagedIterable}. + * @return a Job by name/id. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, String tag, - ListViewType listViewType, String properties, Context context); + JobBase get(String resourceGroupName, String workspaceName, String id); /** * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,7 +55,7 @@ PagedIterable list(String resourceGroupName, String workspaceName, Stri * Deletes a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,37 +65,42 @@ PagedIterable list(String resourceGroupName, String workspaceName, Stri void delete(String resourceGroupName, String workspaceName, String id, Context context); /** - * Gets a Job by name/id. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. + * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets a Job by name/id. + * Lists Jobs in the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param jobType Type of job to be returned. + * @param tag Jobs returned will have this tag key. + * @param listViewType View type for including/excluding (for example) archived entities. + * @param properties Comma-separated list of user property names (and optionally values). Example: + * prop1,prop2=value2. + * @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 Job by name/id. + * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. */ - JobBase get(String resourceGroupName, String workspaceName, String id); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, String jobType, String tag, + ListViewType listViewType, String properties, Context context); /** * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,7 +112,7 @@ PagedIterable list(String resourceGroupName, String workspaceName, Stri * Cancels a Job (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param id The name and identifier for the Job. This is case-sensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java new file mode 100644 index 000000000000..93c1a5247eb1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Jupyter kernel configuration. + */ +@Fluent +public final class JupyterKernelConfig implements JsonSerializable { + /* + * Argument to the the runtime + */ + private List argv; + + /* + * Display name of the kernel + */ + private String displayName; + + /* + * Language of the kernel [Example value: python] + */ + private String language; + + /** + * Creates an instance of JupyterKernelConfig class. + */ + public JupyterKernelConfig() { + } + + /** + * Get the argv property: Argument to the the runtime. + * + * @return the argv value. + */ + public List argv() { + return this.argv; + } + + /** + * Set the argv property: Argument to the the runtime. + * + * @param argv the argv value to set. + * @return the JupyterKernelConfig object itself. + */ + public JupyterKernelConfig withArgv(List argv) { + this.argv = argv; + return this; + } + + /** + * Get the displayName property: Display name of the kernel. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of the kernel. + * + * @param displayName the displayName value to set. + * @return the JupyterKernelConfig object itself. + */ + public JupyterKernelConfig withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the language property: Language of the kernel [Example value: python]. + * + * @return the language value. + */ + public String language() { + return this.language; + } + + /** + * Set the language property: Language of the kernel [Example value: python]. + * + * @param language the language value to set. + * @return the JupyterKernelConfig object itself. + */ + public JupyterKernelConfig withLanguage(String language) { + this.language = language; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("argv", this.argv, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("language", this.language); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JupyterKernelConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JupyterKernelConfig 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 JupyterKernelConfig. + */ + public static JupyterKernelConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JupyterKernelConfig deserializedJupyterKernelConfig = new JupyterKernelConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("argv".equals(fieldName)) { + List argv = reader.readArray(reader1 -> reader1.getString()); + deserializedJupyterKernelConfig.argv = argv; + } else if ("displayName".equals(fieldName)) { + deserializedJupyterKernelConfig.displayName = reader.getString(); + } else if ("language".equals(fieldName)) { + deserializedJupyterKernelConfig.language = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJupyterKernelConfig; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java index 6e0cf938e18d..d15ef978b7ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java new file mode 100644 index 000000000000..69040196cce0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Customer Key vault properties. + */ +@Fluent +public final class KeyVaultProperties implements JsonSerializable { + /* + * Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities + */ + private String identityClientId; + + /* + * KeyVault key identifier to encrypt the data + */ + private String keyIdentifier; + + /* + * KeyVault Arm Id that contains the data encryption key + */ + private String keyVaultArmId; + + /** + * Creates an instance of KeyVaultProperties class. + */ + public KeyVaultProperties() { + } + + /** + * Get the identityClientId property: Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities. + * + * @return the identityClientId value. + */ + public String identityClientId() { + return this.identityClientId; + } + + /** + * Set the identityClientId property: Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities. + * + * @param identityClientId the identityClientId value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withIdentityClientId(String identityClientId) { + this.identityClientId = identityClientId; + return this; + } + + /** + * Get the keyIdentifier property: KeyVault key identifier to encrypt the data. + * + * @return the keyIdentifier value. + */ + public String keyIdentifier() { + return this.keyIdentifier; + } + + /** + * Set the keyIdentifier property: KeyVault key identifier to encrypt the data. + * + * @param keyIdentifier the keyIdentifier value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyIdentifier(String keyIdentifier) { + this.keyIdentifier = keyIdentifier; + return this; + } + + /** + * Get the keyVaultArmId property: KeyVault Arm Id that contains the data encryption key. + * + * @return the keyVaultArmId value. + */ + public String keyVaultArmId() { + return this.keyVaultArmId; + } + + /** + * Set the keyVaultArmId property: KeyVault Arm Id that contains the data encryption key. + * + * @param keyVaultArmId the keyVaultArmId value to set. + * @return the KeyVaultProperties object itself. + */ + public KeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { + this.keyVaultArmId = keyVaultArmId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); + jsonWriter.writeStringField("keyVaultArmId", this.keyVaultArmId); + jsonWriter.writeStringField("identityClientId", this.identityClientId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of KeyVaultProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of KeyVaultProperties 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 KeyVaultProperties. + */ + public static KeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + KeyVaultProperties deserializedKeyVaultProperties = new KeyVaultProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyIdentifier".equals(fieldName)) { + deserializedKeyVaultProperties.keyIdentifier = reader.getString(); + } else if ("keyVaultArmId".equals(fieldName)) { + deserializedKeyVaultProperties.keyVaultArmId = reader.getString(); + } else if ("identityClientId".equals(fieldName)) { + deserializedKeyVaultProperties.identityClientId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedKeyVaultProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java index d28ca97e56c6..e1a6a6ec7d2d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class Kubernetes extends Compute { */ private KubernetesProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of Kubernetes class. */ @@ -91,58 +64,6 @@ public Kubernetes withProperties(KubernetesProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public Kubernetes withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,23 @@ public static Kubernetes fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedKubernetes.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedKubernetes.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedKubernetes.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedKubernetes.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedKubernetes.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedKubernetes.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedKubernetes.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedKubernetes.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedKubernetes.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedKubernetes.provisioningErrors = provisioningErrors; + deserializedKubernetes.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedKubernetes.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedKubernetes.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedKubernetes.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java index 747afb926be8..ae32a01f4aa8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -26,11 +26,6 @@ public final class KubernetesOnlineDeployment extends OnlineDeploymentProperties */ private ContainerResourceRequirements containerResourceRequirements; - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - /** * Creates an instance of KubernetesOnlineDeployment class. */ @@ -68,22 +63,12 @@ public ContainerResourceRequirements containerResourceRequirements() { return this; } - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - @Override - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); + public KubernetesOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); return this; } @@ -91,8 +76,8 @@ public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSet * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); + public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) { + super.withDataCollector(dataCollector); return this; } @@ -100,8 +85,9 @@ public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requ * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); + public KubernetesOnlineDeployment + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { + super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); return this; } @@ -109,8 +95,8 @@ public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); + public KubernetesOnlineDeployment withInstanceType(String instanceType) { + super.withInstanceType(instanceType); return this; } @@ -127,8 +113,8 @@ public KubernetesOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); + public KubernetesOnlineDeployment withModel(String model) { + super.withModel(model); return this; } @@ -136,8 +122,8 @@ public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProb * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); + public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { + super.withModelMountPath(modelMountPath); return this; } @@ -145,8 +131,8 @@ public KubernetesOnlineDeployment withInstanceType(String instanceType) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withModel(String model) { - super.withModel(model); + public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { + super.withReadinessProbe(readinessProbe); return this; } @@ -154,9 +140,8 @@ public KubernetesOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); + public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); return this; } @@ -164,8 +149,8 @@ public KubernetesOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) { - super.withDataCollector(dataCollector); + public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); return this; } @@ -173,8 +158,8 @@ public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withDescription(String description) { - super.withDescription(description); + public KubernetesOnlineDeployment withStartupProbe(ProbeSettings startupProbe) { + super.withStartupProbe(startupProbe); return this; } @@ -182,8 +167,8 @@ public KubernetesOnlineDeployment withDescription(String description) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withProperties(Map properties) { - super.withProperties(properties); + public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -191,8 +176,8 @@ public KubernetesOnlineDeployment withProperties(Map properties) * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public KubernetesOnlineDeployment withDescription(String description) { + super.withDescription(description); return this; } @@ -215,16 +200,12 @@ public KubernetesOnlineDeployment withEnvironmentVariables(Map e } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } + public KubernetesOnlineDeployment withProperties(Map properties) { + super.withProperties(properties); + return this; } /** @@ -233,23 +214,24 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("scaleSettings", scaleSettings()); - jsonWriter.writeJsonField("requestSettings", requestSettings()); - jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("appInsightsEnabled", appInsightsEnabled()); - jsonWriter.writeJsonField("livenessProbe", livenessProbe()); - jsonWriter.writeJsonField("readinessProbe", readinessProbe()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeStringField("model", model()); + jsonWriter.writeJsonField("dataCollector", dataCollector()); jsonWriter.writeStringField("egressPublicNetworkAccess", egressPublicNetworkAccess() == null ? null : egressPublicNetworkAccess().toString()); - jsonWriter.writeJsonField("dataCollector", dataCollector()); + jsonWriter.writeStringField("instanceType", instanceType()); + jsonWriter.writeJsonField("livenessProbe", livenessProbe()); + jsonWriter.writeStringField("model", model()); + jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeJsonField("readinessProbe", readinessProbe()); + jsonWriter.writeJsonField("requestSettings", requestSettings()); + jsonWriter.writeJsonField("scaleSettings", scaleSettings()); + jsonWriter.writeJsonField("startupProbe", startupProbe()); jsonWriter.writeStringField("endpointComputeType", this.endpointComputeType == null ? null : this.endpointComputeType.toString()); jsonWriter.writeJsonField("containerResourceRequirements", this.containerResourceRequirements); @@ -271,43 +253,45 @@ public static KubernetesOnlineDeployment fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedKubernetesOnlineDeployment.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedKubernetesOnlineDeployment.withEnvironmentVariables(environmentVariables); - } else if ("scaleSettings".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); - } else if ("requestSettings".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); - } else if ("modelMountPath".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedKubernetesOnlineDeployment.withProperties(properties); } else if ("appInsightsEnabled".equals(fieldName)) { deserializedKubernetesOnlineDeployment .withAppInsightsEnabled(reader.getNullable(JsonReader::getBoolean)); - } else if ("livenessProbe".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); - } else if ("readinessProbe".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); + } else if ("dataCollector".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + } else if ("egressPublicNetworkAccess".equals(fieldName)) { + deserializedKubernetesOnlineDeployment + .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); } else if ("instanceType".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withInstanceType(reader.getString()); + } else if ("livenessProbe".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); } else if ("model".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withModel(reader.getString()); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { + } else if ("modelMountPath".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { deserializedKubernetesOnlineDeployment - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); - } else if ("dataCollector".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + .withProvisioningState(DeploymentProvisioningState.fromString(reader.getString())); + } else if ("readinessProbe".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); + } else if ("requestSettings".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); + } else if ("scaleSettings".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); + } else if ("startupProbe".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withStartupProbe(ProbeSettings.fromJson(reader)); } else if ("endpointComputeType".equals(fieldName)) { deserializedKubernetesOnlineDeployment.endpointComputeType = EndpointComputeType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java index 55437affe3b8..b9b385d4b881 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -223,21 +223,6 @@ public KubernetesProperties withInstanceTypes(Map in return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (instanceTypes() != null) { - instanceTypes().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java deleted file mode 100644 index 1466829889c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - -/** - * Kubernetes Compute Schema. - */ -@Fluent -public class KubernetesSchema implements JsonSerializable { - /* - * Properties of Kubernetes - */ - private KubernetesProperties properties; - - /** - * Creates an instance of KubernetesSchema class. - */ - public KubernetesSchema() { - } - - /** - * Get the properties property: Properties of Kubernetes. - * - * @return the properties value. - */ - public KubernetesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Kubernetes. - * - * @param properties the properties value to set. - * @return the KubernetesSchema object itself. - */ - public KubernetesSchema withProperties(KubernetesProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KubernetesSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KubernetesSchema 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 KubernetesSchema. - */ - public static KubernetesSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KubernetesSchema deserializedKubernetesSchema = new KubernetesSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedKubernetesSchema.properties = KubernetesProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedKubernetesSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelGeneration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelGeneration.java new file mode 100644 index 000000000000..69917a6c008a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LabelGeneration.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 LabelGeneration model. + */ +@Fluent +public final class LabelGeneration extends DataGenerationVertical { + /* + * [Required] Enum to determine the type of Data Generation. + */ + private DataGenerationType dataGenerationType = DataGenerationType.LABEL_GENERATION; + + /* + * Training data for fine tuning. + */ + private JobInput trainingData; + + /* + * Validation data for fine tuning. + */ + private JobInput validationData; + + /** + * Creates an instance of LabelGeneration class. + */ + public LabelGeneration() { + } + + /** + * Get the dataGenerationType property: [Required] Enum to determine the type of Data Generation. + * + * @return the dataGenerationType value. + */ + @Override + public DataGenerationType dataGenerationType() { + return this.dataGenerationType; + } + + /** + * Get the trainingData property: Training data for fine tuning. + * + * @return the trainingData value. + */ + public JobInput trainingData() { + return this.trainingData; + } + + /** + * Set the trainingData property: Training data for fine tuning. + * + * @param trainingData the trainingData value to set. + * @return the LabelGeneration object itself. + */ + public LabelGeneration withTrainingData(JobInput trainingData) { + this.trainingData = trainingData; + return this; + } + + /** + * Get the validationData property: Validation data for fine tuning. + * + * @return the validationData value. + */ + public JobInput validationData() { + return this.validationData; + } + + /** + * Set the validationData property: Validation data for fine tuning. + * + * @param validationData the validationData value to set. + * @return the LabelGeneration object itself. + */ + public LabelGeneration withValidationData(JobInput validationData) { + this.validationData = validationData; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelGeneration withDataGenerationTaskType(DataGenerationTaskType dataGenerationTaskType) { + super.withDataGenerationTaskType(dataGenerationTaskType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelGeneration withPromptSettings(PromptSettings promptSettings) { + super.withPromptSettings(promptSettings); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelGeneration withTeacherModelEndpoint(TeacherModelEndpoint teacherModelEndpoint) { + super.withTeacherModelEndpoint(teacherModelEndpoint); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public LabelGeneration withTeacherModelSettings(TeacherModelSettings teacherModelSettings) { + super.withTeacherModelSettings(teacherModelSettings); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("dataGenerationTaskType", + dataGenerationTaskType() == null ? null : dataGenerationTaskType().toString()); + jsonWriter.writeJsonField("teacherModelEndpoint", teacherModelEndpoint()); + jsonWriter.writeJsonField("promptSettings", promptSettings()); + jsonWriter.writeJsonField("teacherModelSettings", teacherModelSettings()); + jsonWriter.writeStringField("dataGenerationType", + this.dataGenerationType == null ? null : this.dataGenerationType.toString()); + jsonWriter.writeJsonField("trainingData", this.trainingData); + jsonWriter.writeJsonField("validationData", this.validationData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of LabelGeneration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of LabelGeneration 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 LabelGeneration. + */ + public static LabelGeneration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + LabelGeneration deserializedLabelGeneration = new LabelGeneration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("dataGenerationTaskType".equals(fieldName)) { + deserializedLabelGeneration + .withDataGenerationTaskType(DataGenerationTaskType.fromString(reader.getString())); + } else if ("teacherModelEndpoint".equals(fieldName)) { + deserializedLabelGeneration.withTeacherModelEndpoint(TeacherModelEndpoint.fromJson(reader)); + } else if ("promptSettings".equals(fieldName)) { + deserializedLabelGeneration.withPromptSettings(PromptSettings.fromJson(reader)); + } else if ("teacherModelSettings".equals(fieldName)) { + deserializedLabelGeneration.withTeacherModelSettings(TeacherModelSettings.fromJson(reader)); + } else if ("dataGenerationType".equals(fieldName)) { + deserializedLabelGeneration.dataGenerationType = DataGenerationType.fromString(reader.getString()); + } else if ("trainingData".equals(fieldName)) { + deserializedLabelGeneration.trainingData = JobInput.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedLabelGeneration.validationData = JobInput.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedLabelGeneration; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java index 3d32d196877c..d42b49640c9e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -45,16 +45,6 @@ public LakeHouseArtifact withArtifactName(String artifactName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java index ddd62a953a6a..1cf551c83861 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class LearningRateScheduler extends ExpandableStringEnum { /** - * Static value None for LearningRateScheduler. + * No learning rate scheduler selected. */ public static final LearningRateScheduler NONE = fromString("None"); /** - * Static value WarmupCosine for LearningRateScheduler. + * Cosine Annealing With Warmup. */ public static final LearningRateScheduler WARMUP_COSINE = fromString("WarmupCosine"); /** - * Static value Step for LearningRateScheduler. + * Step learning rate scheduler. */ public static final LearningRateScheduler STEP = fromString("Step"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java index 5c1b85f07b18..018a05155262 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,14 +11,14 @@ */ public interface ListNotebookKeysResult { /** - * Gets the primaryAccessKey property: The primaryAccessKey property. + * Gets the primaryAccessKey property: The primary access key of the Notebook. * * @return the primaryAccessKey value. */ String primaryAccessKey(); /** - * Gets the secondaryAccessKey property: The secondaryAccessKey property. + * Gets the secondaryAccessKey property: The secondary access key of the Notebook. * * @return the secondaryAccessKey value. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java index e730c56ef0d4..172cf2450b8a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,7 @@ */ public interface ListStorageAccountKeysResult { /** - * Gets the userStorageKey property: The userStorageKey property. + * Gets the userStorageKey property: The access key of the storage. * * @return the userStorageKey value. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java index 2ca4088002d8..cbb27af33901 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java index f66447f27bbf..dcdeaece4598 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,21 +11,7 @@ */ public interface ListWorkspaceKeysResult { /** - * Gets the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - String userStorageKey(); - - /** - * Gets the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. - */ - String userStorageResourceId(); - - /** - * Gets the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. + * Gets the appInsightsInstrumentationKey property: The access key of the workspace app insights. * * @return the appInsightsInstrumentationKey value. */ @@ -45,6 +31,20 @@ public interface ListWorkspaceKeysResult { */ ListNotebookKeysResult notebookAccessKeys(); + /** + * Gets the userStorageResourceId property: The arm Id key of the workspace storage. + * + * @return the userStorageResourceId value. + */ + String userStorageResourceId(); + + /** + * Gets the userStorageKey property: The access key of the workspace storage. + * + * @return the userStorageKey value. + */ + String userStorageKey(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java index f1deadd6f7c1..9244ad6d14aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -71,22 +70,6 @@ public LiteralJobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model LiteralJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LiteralJobInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java index badce22c4f01..84d428cf5157 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java index 2e95e895cf83..cb24f9d05e81 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,32 +12,32 @@ */ public final class LogVerbosity extends ExpandableStringEnum { /** - * Static value NotSet for LogVerbosity. + * No logs emitted. */ public static final LogVerbosity NOT_SET = fromString("NotSet"); /** - * Static value Debug for LogVerbosity. + * Debug and above log statements logged. */ public static final LogVerbosity DEBUG = fromString("Debug"); /** - * Static value Info for LogVerbosity. + * Info and above log statements logged. */ public static final LogVerbosity INFO = fromString("Info"); /** - * Static value Warning for LogVerbosity. + * Warning and above log statements logged. */ public static final LogVerbosity WARNING = fromString("Warning"); /** - * Static value Error for LogVerbosity. + * Error and above log statements logged. */ public static final LogVerbosity ERROR = fromString("Error"); /** - * Static value Critical for LogVerbosity. + * Only critical statements logged. */ public static final LogVerbosity CRITICAL = fromString("Critical"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java index cd49028d2ff7..bca6f49fd59b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,14 +21,14 @@ public final class MLFlowModelJobInput extends JobInput { private JobInputType jobInputType = JobInputType.MLFLOW_MODEL; /* - * [Required] Input Asset URI. + * Enum to determine the input data delivery mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of MLFlowModelJobInput class. @@ -48,42 +47,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Enum to determine the input data delivery mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Enum to determine the input data delivery mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the MLFlowModelJobInput object itself. */ - public MLFlowModelJobInput withUri(String uri) { - this.uri = uri; + public MLFlowModelJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the MLFlowModelJobInput object itself. */ - public MLFlowModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public MLFlowModelJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -96,22 +95,6 @@ public MLFlowModelJobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model MLFlowModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLFlowModelJobInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java index 3a50f2938818..215c8ba91b0b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,15 +21,20 @@ public final class MLFlowModelJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.MLFLOW_MODEL; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* - * Output Asset Delivery Mode. + * Output data delivery mode enums. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of MLFlowModelJobOutput class. */ @@ -47,27 +52,27 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the MLFlowModelJobOutput object itself. */ - public MLFlowModelJobOutput withUri(String uri) { - this.uri = uri; + public MLFlowModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } /** - * Get the mode property: Output Asset Delivery Mode. + * Get the mode property: Output data delivery mode enums. * * @return the mode value. */ @@ -76,7 +81,7 @@ public OutputDeliveryMode mode() { } /** - * Set the mode property: Output Asset Delivery Mode. + * Set the mode property: Output data delivery mode enums. * * @param mode the mode value to set. * @return the MLFlowModelJobOutput object itself. @@ -87,22 +92,32 @@ public MLFlowModelJobOutput withMode(OutputDeliveryMode mode) { } /** - * {@inheritDoc} + * Get the uri property: Output Asset URI. + * + * @return the uri value. */ - @Override - public MLFlowModelJobOutput withDescription(String description) { - super.withDescription(description); - return this; + public String uri() { + return this.uri; } /** - * Validates the instance. + * Set the uri property: Output Asset URI. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param uri the uri value to set. + * @return the MLFlowModelJobOutput object itself. + */ + public MLFlowModelJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public MLFlowModelJobOutput withDescription(String description) { + super.withDescription(description); + return this; } /** @@ -113,8 +128,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +153,12 @@ public static MLFlowModelJobOutput fromJson(JsonReader jsonReader) throws IOExce deserializedMLFlowModelJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedMLFlowModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLFlowModelJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedMLFlowModelJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedMLFlowModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedMLFlowModelJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java index 3701ebc2a3dc..1455212b121f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,15 +72,6 @@ public MLTableData withDataUri(String dataUri) { return this; } - /** - * {@inheritDoc} - */ - @Override - public MLTableData withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - /** * {@inheritDoc} */ @@ -94,8 +85,8 @@ public MLTableData withIsAnonymous(Boolean isAnonymous) { * {@inheritDoc} */ @Override - public MLTableData withDescription(String description) { - super.withDescription(description); + public MLTableData withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -103,8 +94,8 @@ public MLTableData withDescription(String description) { * {@inheritDoc} */ @Override - public MLTableData withTags(Map tags) { - super.withTags(tags); + public MLTableData withDescription(String description) { + super.withDescription(description); return this; } @@ -118,13 +109,12 @@ public MLTableData withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public MLTableData withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -135,10 +125,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("dataUri", dataUri()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); jsonWriter.writeArrayField("referencedUris", this.referencedUris, (writer, element) -> writer.writeString(element)); @@ -165,16 +155,16 @@ public static MLTableData fromJson(JsonReader jsonReader) throws IOException { deserializedMLTableData.withDataUri(reader.getString()); } else if ("description".equals(fieldName)) { deserializedMLTableData.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedMLTableData.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedMLTableData.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedMLTableData.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMLTableData.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedMLTableData.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedMLTableData.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataType".equals(fieldName)) { deserializedMLTableData.dataType = DataType.fromString(reader.getString()); } else if ("referencedUris".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java index 404a4a1adb18..8e2febf51402 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,14 +21,14 @@ public final class MLTableJobInput extends JobInput { private JobInputType jobInputType = JobInputType.MLTABLE; /* - * [Required] Input Asset URI. + * Enum to determine the input data delivery mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of MLTableJobInput class. @@ -48,42 +47,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Enum to determine the input data delivery mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Enum to determine the input data delivery mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the MLTableJobInput object itself. */ - public MLTableJobInput withUri(String uri) { - this.uri = uri; + public MLTableJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the MLTableJobInput object itself. */ - public MLTableJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public MLTableJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -96,22 +95,6 @@ public MLTableJobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model MLTableJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLTableJobInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java index 3d3313ef481d..f627d366b67a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,15 +21,20 @@ public final class MLTableJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.MLTABLE; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* - * Output Asset Delivery Mode. + * Output data delivery mode enums. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of MLTableJobOutput class. */ @@ -47,27 +52,27 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the MLTableJobOutput object itself. */ - public MLTableJobOutput withUri(String uri) { - this.uri = uri; + public MLTableJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } /** - * Get the mode property: Output Asset Delivery Mode. + * Get the mode property: Output data delivery mode enums. * * @return the mode value. */ @@ -76,7 +81,7 @@ public OutputDeliveryMode mode() { } /** - * Set the mode property: Output Asset Delivery Mode. + * Set the mode property: Output data delivery mode enums. * * @param mode the mode value to set. * @return the MLTableJobOutput object itself. @@ -87,22 +92,32 @@ public MLTableJobOutput withMode(OutputDeliveryMode mode) { } /** - * {@inheritDoc} + * Get the uri property: Output Asset URI. + * + * @return the uri value. */ - @Override - public MLTableJobOutput withDescription(String description) { - super.withDescription(description); - return this; + public String uri() { + return this.uri; } /** - * Validates the instance. + * Set the uri property: Output Asset URI. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param uri the uri value to set. + * @return the MLTableJobOutput object itself. + */ + public MLTableJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public MLTableJobOutput withDescription(String description) { + super.withDescription(description); + return this; } /** @@ -113,8 +128,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +153,12 @@ public static MLTableJobOutput fromJson(JsonReader jsonReader) throws IOExceptio deserializedMLTableJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedMLTableJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLTableJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedMLTableJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedMLTableJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedMLTableJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java index dc253a8faae2..567b6f958369 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -62,19 +62,6 @@ public ManagedComputeIdentity withIdentity(ManagedServiceIdentity identity) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java index 6bff81da5778..16e3af7dbf58 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -9,8 +9,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Objects; -import java.util.UUID; /** * Managed identity configuration. @@ -25,12 +23,12 @@ public final class ManagedIdentity extends IdentityConfiguration { /* * Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. */ - private UUID clientId; + private String clientId; /* * Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. */ - private UUID objectId; + private String objectId; /* * Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. @@ -59,7 +57,7 @@ public IdentityConfigurationType identityType() { * * @return the clientId value. */ - public UUID clientId() { + public String clientId() { return this.clientId; } @@ -70,7 +68,7 @@ public UUID clientId() { * @param clientId the clientId value to set. * @return the ManagedIdentity object itself. */ - public ManagedIdentity withClientId(UUID clientId) { + public ManagedIdentity withClientId(String clientId) { this.clientId = clientId; return this; } @@ -81,7 +79,7 @@ public ManagedIdentity withClientId(UUID clientId) { * * @return the objectId value. */ - public UUID objectId() { + public String objectId() { return this.objectId; } @@ -92,7 +90,7 @@ public UUID objectId() { * @param objectId the objectId value to set. * @return the ManagedIdentity object itself. */ - public ManagedIdentity withObjectId(UUID objectId) { + public ManagedIdentity withObjectId(String objectId) { this.objectId = objectId; return this; } @@ -119,16 +117,6 @@ public ManagedIdentity withResourceId(String resourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -136,8 +124,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("identityType", this.identityType == null ? null : this.identityType.toString()); - jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); - jsonWriter.writeStringField("objectId", Objects.toString(this.objectId, null)); + jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeStringField("objectId", this.objectId); jsonWriter.writeStringField("resourceId", this.resourceId); return jsonWriter.writeEndObject(); } @@ -160,11 +148,9 @@ public static ManagedIdentity fromJson(JsonReader jsonReader) throws IOException if ("identityType".equals(fieldName)) { deserializedManagedIdentity.identityType = IdentityConfigurationType.fromString(reader.getString()); } else if ("clientId".equals(fieldName)) { - deserializedManagedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedIdentity.clientId = reader.getString(); } else if ("objectId".equals(fieldName)) { - deserializedManagedIdentity.objectId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedIdentity.objectId = reader.getString(); } else if ("resourceId".equals(fieldName)) { deserializedManagedIdentity.resourceId = reader.getString(); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java index 5023b0d28125..65a2148b6571 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,16 +30,6 @@ public final class ManagedIdentityAuthTypeWorkspaceConnectionProperties extends */ private WorkspaceConnectionManagedIdentity credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,20 @@ public WorkspaceConnectionManagedIdentity credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -128,8 +107,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Bo * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -137,8 +116,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String ta * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -146,8 +125,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withMetadata(Map sharedUserList) { - super.withSharedUserList(sharedUserList); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +134,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withSharedUserList(L * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -164,22 +143,19 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValue(String val * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public ManagedIdentityAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -189,15 +165,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -224,30 +202,36 @@ public static ManagedIdentityAuthTypeWorkspaceConnectionProperties fromJson(Json deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java index 0727fbe15ade..dcb63eeafcf8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Credential for user managed identity. */ -@Fluent +@Immutable public final class ManagedIdentityCredential extends DataReferenceCredential { /* * [Required] Credential type used to authentication with storage. @@ -25,11 +25,6 @@ public final class ManagedIdentityCredential extends DataReferenceCredential { */ private String managedIdentityType; - /* - * Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. - */ - private String userManagedIdentityResourceId; - /* * ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. */ @@ -40,6 +35,11 @@ public final class ManagedIdentityCredential extends DataReferenceCredential { */ private String userManagedIdentityPrincipalId; + /* + * Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. + */ + private String userManagedIdentityResourceId; + /* * TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. */ @@ -48,7 +48,7 @@ public final class ManagedIdentityCredential extends DataReferenceCredential { /** * Creates an instance of ManagedIdentityCredential class. */ - public ManagedIdentityCredential() { + private ManagedIdentityCredential() { } /** @@ -70,39 +70,6 @@ public String managedIdentityType() { return this.managedIdentityType; } - /** - * Set the managedIdentityType property: ManagedIdentityCredential identity type. - * - * @param managedIdentityType the managedIdentityType value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withManagedIdentityType(String managedIdentityType) { - this.managedIdentityType = managedIdentityType; - return this; - } - - /** - * Get the userManagedIdentityResourceId property: Full arm scope for the Id. For ManagedIdentityType = - * SystemManaged, this field is null. - * - * @return the userManagedIdentityResourceId value. - */ - public String userManagedIdentityResourceId() { - return this.userManagedIdentityResourceId; - } - - /** - * Set the userManagedIdentityResourceId property: Full arm scope for the Id. For ManagedIdentityType = - * SystemManaged, this field is null. - * - * @param userManagedIdentityResourceId the userManagedIdentityResourceId value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withUserManagedIdentityResourceId(String userManagedIdentityResourceId) { - this.userManagedIdentityResourceId = userManagedIdentityResourceId; - return this; - } - /** * Get the userManagedIdentityClientId property: ClientId for the UAMI. For ManagedIdentityType = SystemManaged, * this field is null. @@ -113,18 +80,6 @@ public String userManagedIdentityClientId() { return this.userManagedIdentityClientId; } - /** - * Set the userManagedIdentityClientId property: ClientId for the UAMI. For ManagedIdentityType = SystemManaged, - * this field is null. - * - * @param userManagedIdentityClientId the userManagedIdentityClientId value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withUserManagedIdentityClientId(String userManagedIdentityClientId) { - this.userManagedIdentityClientId = userManagedIdentityClientId; - return this; - } - /** * Get the userManagedIdentityPrincipalId property: PrincipalId for the UAMI. For ManagedIdentityType = * SystemManaged, this field is null. @@ -136,15 +91,13 @@ public String userManagedIdentityPrincipalId() { } /** - * Set the userManagedIdentityPrincipalId property: PrincipalId for the UAMI. For ManagedIdentityType = + * Get the userManagedIdentityResourceId property: Full arm scope for the Id. For ManagedIdentityType = * SystemManaged, this field is null. * - * @param userManagedIdentityPrincipalId the userManagedIdentityPrincipalId value to set. - * @return the ManagedIdentityCredential object itself. + * @return the userManagedIdentityResourceId value. */ - public ManagedIdentityCredential withUserManagedIdentityPrincipalId(String userManagedIdentityPrincipalId) { - this.userManagedIdentityPrincipalId = userManagedIdentityPrincipalId; - return this; + public String userManagedIdentityResourceId() { + return this.userManagedIdentityResourceId; } /** @@ -157,28 +110,6 @@ public String userManagedIdentityTenantId() { return this.userManagedIdentityTenantId; } - /** - * Set the userManagedIdentityTenantId property: TenantId for the UAMI. For ManagedIdentityType = SystemManaged, - * this field is null. - * - * @param userManagedIdentityTenantId the userManagedIdentityTenantId value to set. - * @return the ManagedIdentityCredential object itself. - */ - public ManagedIdentityCredential withUserManagedIdentityTenantId(String userManagedIdentityTenantId) { - this.userManagedIdentityTenantId = userManagedIdentityTenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -188,9 +119,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("credentialType", this.credentialType == null ? null : this.credentialType.toString()); jsonWriter.writeStringField("managedIdentityType", this.managedIdentityType); - jsonWriter.writeStringField("userManagedIdentityResourceId", this.userManagedIdentityResourceId); jsonWriter.writeStringField("userManagedIdentityClientId", this.userManagedIdentityClientId); jsonWriter.writeStringField("userManagedIdentityPrincipalId", this.userManagedIdentityPrincipalId); + jsonWriter.writeStringField("userManagedIdentityResourceId", this.userManagedIdentityResourceId); jsonWriter.writeStringField("userManagedIdentityTenantId", this.userManagedIdentityTenantId); return jsonWriter.writeEndObject(); } @@ -215,12 +146,12 @@ public static ManagedIdentityCredential fromJson(JsonReader jsonReader) throws I = DataReferenceCredentialType.fromString(reader.getString()); } else if ("managedIdentityType".equals(fieldName)) { deserializedManagedIdentityCredential.managedIdentityType = reader.getString(); - } else if ("userManagedIdentityResourceId".equals(fieldName)) { - deserializedManagedIdentityCredential.userManagedIdentityResourceId = reader.getString(); } else if ("userManagedIdentityClientId".equals(fieldName)) { deserializedManagedIdentityCredential.userManagedIdentityClientId = reader.getString(); } else if ("userManagedIdentityPrincipalId".equals(fieldName)) { deserializedManagedIdentityCredential.userManagedIdentityPrincipalId = reader.getString(); + } else if ("userManagedIdentityResourceId".equals(fieldName)) { + deserializedManagedIdentityCredential.userManagedIdentityResourceId = reader.getString(); } else if ("userManagedIdentityTenantId".equals(fieldName)) { deserializedManagedIdentityCredential.userManagedIdentityTenantId = reader.getString(); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkKind.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkKind.java new file mode 100644 index 000000000000..7e2cbd9e2ca8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkKind.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The Kind of the managed network. Users can switch from V1 to V2 for granular access controls, but cannot switch back + * to V1 once V2 is enabled. + */ +public final class ManagedNetworkKind extends ExpandableStringEnum { + /** + * Static value V1 for ManagedNetworkKind. + */ + public static final ManagedNetworkKind V1 = fromString("V1"); + + /** + * Static value V2 for ManagedNetworkKind. + */ + public static final ManagedNetworkKind V2 = fromString("V2"); + + /** + * Creates a new instance of ManagedNetworkKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedNetworkKind() { + } + + /** + * Creates or finds a ManagedNetworkKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedNetworkKind. + */ + public static ManagedNetworkKind fromString(String name) { + return fromString(name, ManagedNetworkKind.class); + } + + /** + * Gets known ManagedNetworkKind values. + * + * @return known ManagedNetworkKind values. + */ + public static Collection values() { + return values(ManagedNetworkKind.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java index 387a88418856..ea3ad8d31c45 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public ManagedNetworkProvisionOptions withIncludeSpark(Boolean includeSpark) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java index 0a0f25111177..a3a0e3a657a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisioningState.java new file mode 100644 index 000000000000..744fdc24af39 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ManagedNetworkProvisioningState. + */ +public final class ManagedNetworkProvisioningState extends ExpandableStringEnum { + /** + * Static value Deferred for ManagedNetworkProvisioningState. + */ + public static final ManagedNetworkProvisioningState DEFERRED = fromString("Deferred"); + + /** + * Static value Updating for ManagedNetworkProvisioningState. + */ + public static final ManagedNetworkProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Succeeded for ManagedNetworkProvisioningState. + */ + public static final ManagedNetworkProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ManagedNetworkProvisioningState. + */ + public static final ManagedNetworkProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Deleting for ManagedNetworkProvisioningState. + */ + public static final ManagedNetworkProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Deleted for ManagedNetworkProvisioningState. + */ + public static final ManagedNetworkProvisioningState DELETED = fromString("Deleted"); + + /** + * Creates a new instance of ManagedNetworkProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedNetworkProvisioningState() { + } + + /** + * Creates or finds a ManagedNetworkProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedNetworkProvisioningState. + */ + public static ManagedNetworkProvisioningState fromString(String name) { + return fromString(name, ManagedNetworkProvisioningState.class); + } + + /** + * Gets known ManagedNetworkProvisioningState values. + * + * @return known ManagedNetworkProvisioningState values. + */ + public static Collection values() { + return values(ManagedNetworkProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java index ec0e9d831858..9f1753a6b3f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,7 +14,7 @@ public interface ManagedNetworkProvisions { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -26,7 +26,7 @@ public interface ManagedNetworkProvisions { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param body Managed Network Provisioning Options for a machine learning workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java index 52447f06592b..700b58244b9a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,6 +11,14 @@ * An immutable client-side representation of ManagedNetworkSettings. */ public interface ManagedNetworkSettings { + /** + * Gets the enableNetworkMonitor property: A flag to indicate if monitoring needs to be enabled for the managed + * network. + * + * @return the enableNetworkMonitor value. + */ + Boolean enableNetworkMonitor(); + /** * Gets the isolationMode property: Isolation mode for the managed network of a machine learning workspace. * @@ -39,6 +47,28 @@ public interface ManagedNetworkSettings { */ ManagedNetworkProvisionStatus status(); + /** + * Gets the firewallSku property: Firewall Sku used for FQDN Rules. + * + * @return the firewallSku value. + */ + FirewallSku firewallSku(); + + /** + * Gets the managedNetworkKind property: The Kind of the managed network. Users can switch from V1 to V2 for + * granular access controls, but cannot switch back to V1 once V2 is enabled. + * + * @return the managedNetworkKind value. + */ + ManagedNetworkKind managedNetworkKind(); + + /** + * Gets the firewallPublicIpAddress property: Public IP address assigned to the Azure Firewall. + * + * @return the firewallPublicIpAddress value. + */ + String firewallPublicIpAddress(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsBasicResource.java new file mode 100644 index 000000000000..ec40edf52abe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsBasicResource.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; + +/** + * An immutable client-side representation of ManagedNetworkSettingsBasicResource. + */ +public interface ManagedNetworkSettingsBasicResource { + /** + * 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: Managed Network settings for a machine learning workspace. + * + * @return the properties value. + */ + ManagedNetworkSettings 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.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner + * object. + * + * @return the inner object. + */ + ManagedNetworkSettingsBasicResourceInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsEx.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsEx.java new file mode 100644 index 000000000000..a8923cd1ec56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsEx.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The ManagedNetworkSettingsEx model. + */ +@Fluent +public final class ManagedNetworkSettingsEx extends ManagedNetworkSettingsInner { + /* + * The changeableIsolationModes property. + */ + private List changeableIsolationModes; + + /* + * Public IP address assigned to the Azure Firewall. + */ + private String firewallPublicIpAddress; + + /* + * The networkId property. + */ + private String networkId; + + /** + * Creates an instance of ManagedNetworkSettingsEx class. + */ + public ManagedNetworkSettingsEx() { + } + + /** + * Get the changeableIsolationModes property: The changeableIsolationModes property. + * + * @return the changeableIsolationModes value. + */ + public List changeableIsolationModes() { + return this.changeableIsolationModes; + } + + /** + * Get the firewallPublicIpAddress property: Public IP address assigned to the Azure Firewall. + * + * @return the firewallPublicIpAddress value. + */ + @Override + public String firewallPublicIpAddress() { + return this.firewallPublicIpAddress; + } + + /** + * Get the networkId property: The networkId property. + * + * @return the networkId value. + */ + @Override + public String networkId() { + return this.networkId; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNetworkSettingsEx withEnableNetworkMonitor(Boolean enableNetworkMonitor) { + super.withEnableNetworkMonitor(enableNetworkMonitor); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNetworkSettingsEx withIsolationMode(IsolationMode isolationMode) { + super.withIsolationMode(isolationMode); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNetworkSettingsEx withOutboundRules(Map outboundRules) { + super.withOutboundRules(outboundRules); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNetworkSettingsEx withStatus(ManagedNetworkProvisionStatusInner status) { + super.withStatus(status); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNetworkSettingsEx withFirewallSku(FirewallSku firewallSku) { + super.withFirewallSku(firewallSku); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedNetworkSettingsEx withManagedNetworkKind(ManagedNetworkKind managedNetworkKind) { + super.withManagedNetworkKind(managedNetworkKind); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableNetworkMonitor", enableNetworkMonitor()); + jsonWriter.writeStringField("isolationMode", isolationMode() == null ? null : isolationMode().toString()); + jsonWriter.writeMapField("outboundRules", outboundRules(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("status", status()); + jsonWriter.writeStringField("firewallSku", firewallSku() == null ? null : firewallSku().toString()); + jsonWriter.writeStringField("managedNetworkKind", + managedNetworkKind() == null ? null : managedNetworkKind().toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedNetworkSettingsEx from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNetworkSettingsEx 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 ManagedNetworkSettingsEx. + */ + public static ManagedNetworkSettingsEx fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedNetworkSettingsEx deserializedManagedNetworkSettingsEx = new ManagedNetworkSettingsEx(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableNetworkMonitor".equals(fieldName)) { + deserializedManagedNetworkSettingsEx + .withEnableNetworkMonitor(reader.getNullable(JsonReader::getBoolean)); + } else if ("isolationMode".equals(fieldName)) { + deserializedManagedNetworkSettingsEx + .withIsolationMode(IsolationMode.fromString(reader.getString())); + } else if ("networkId".equals(fieldName)) { + deserializedManagedNetworkSettingsEx.networkId = reader.getString(); + } else if ("outboundRules".equals(fieldName)) { + Map outboundRules = reader.readMap(reader1 -> OutboundRule.fromJson(reader1)); + deserializedManagedNetworkSettingsEx.withOutboundRules(outboundRules); + } else if ("status".equals(fieldName)) { + deserializedManagedNetworkSettingsEx + .withStatus(ManagedNetworkProvisionStatusInner.fromJson(reader)); + } else if ("firewallSku".equals(fieldName)) { + deserializedManagedNetworkSettingsEx.withFirewallSku(FirewallSku.fromString(reader.getString())); + } else if ("managedNetworkKind".equals(fieldName)) { + deserializedManagedNetworkSettingsEx + .withManagedNetworkKind(ManagedNetworkKind.fromString(reader.getString())); + } else if ("firewallPublicIpAddress".equals(fieldName)) { + deserializedManagedNetworkSettingsEx.firewallPublicIpAddress = reader.getString(); + } else if ("changeableIsolationModes".equals(fieldName)) { + List changeableIsolationModes + = reader.readArray(reader1 -> IsolationMode.fromString(reader1.getString())); + deserializedManagedNetworkSettingsEx.changeableIsolationModes = changeableIsolationModes; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNetworkSettingsEx; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsOperations.java new file mode 100644 index 000000000000..9f4477a5060a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsOperations.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ManagedNetworkSettingsOperations. + */ +public interface ManagedNetworkSettingsOperations { + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, + String workspaceName, String managedNetworkName, Context context); + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + */ + ManagedNetworkSettingsPropertiesBasicResource get(String resourceGroupName, String workspaceName, + String managedNetworkName); + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ManagedNetworkSettingsPropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName); + + /** + * List the managed network settings for a machine learning workspace. + * + * List API for managed network settings of a machine learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace 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 paged collection of ManagedNetworkSettingsPropertiesBasicResource items as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + Context context); + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @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 managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace along with {@link Response}. + */ + ManagedNetworkSettingsPropertiesBasicResource getById(String id); + + /** + * Get the managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace. + * + * @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 managed network settings for a machine learning workspace. + * + * Get API for managed network settings of a machine learning workspace along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new ManagedNetworkSettingsPropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new ManagedNetworkSettingsPropertiesBasicResource definition. + */ + ManagedNetworkSettingsPropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsProperties.java new file mode 100644 index 000000000000..063e58a25c63 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsProperties.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 properties of the managed network settings of a machine learning workspace. + */ +@Fluent +public final class ManagedNetworkSettingsProperties implements JsonSerializable { + /* + * Managed Network settings for a machine learning workspace. + */ + private ManagedNetworkSettingsEx managedNetwork; + + /* + * The current deployment state of the managed network resource. The provisioningState is to indicate states for + * resource provisioning. + */ + private ManagedNetworkProvisioningState provisioningState; + + /** + * Creates an instance of ManagedNetworkSettingsProperties class. + */ + public ManagedNetworkSettingsProperties() { + } + + /** + * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. + */ + public ManagedNetworkSettingsEx managedNetwork() { + return this.managedNetwork; + } + + /** + * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @param managedNetwork the managedNetwork value to set. + * @return the ManagedNetworkSettingsProperties object itself. + */ + public ManagedNetworkSettingsProperties withManagedNetwork(ManagedNetworkSettingsEx managedNetwork) { + this.managedNetwork = managedNetwork; + return this; + } + + /** + * Get the provisioningState property: The current deployment state of the managed network resource. The + * provisioningState is to indicate states for resource provisioning. + * + * @return the provisioningState value. + */ + public ManagedNetworkProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedNetworkSettingsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedNetworkSettingsProperties 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 ManagedNetworkSettingsProperties. + */ + public static ManagedNetworkSettingsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedNetworkSettingsProperties deserializedManagedNetworkSettingsProperties + = new ManagedNetworkSettingsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("managedNetwork".equals(fieldName)) { + deserializedManagedNetworkSettingsProperties.managedNetwork + = ManagedNetworkSettingsEx.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedNetworkSettingsProperties.provisioningState + = ManagedNetworkProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedNetworkSettingsProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsPropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsPropertiesBasicResource.java new file mode 100644 index 000000000000..11924ca52cfa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsPropertiesBasicResource.java @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner; + +/** + * An immutable client-side representation of ManagedNetworkSettingsPropertiesBasicResource. + */ +public interface ManagedNetworkSettingsPropertiesBasicResource { + /** + * 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 of the managed network settings of a machine learning workspace. + * + * @return the properties value. + */ + ManagedNetworkSettingsProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner + * com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner + * object. + * + * @return the inner object. + */ + ManagedNetworkSettingsPropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the ManagedNetworkSettingsPropertiesBasicResource definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The ManagedNetworkSettingsPropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the ManagedNetworkSettingsPropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the ManagedNetworkSettingsPropertiesBasicResource definition allowing to specify parent + * resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @return the next definition stage. + */ + WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); + } + + /** + * The stage of the ManagedNetworkSettingsPropertiesBasicResource 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. + */ + ManagedNetworkSettingsPropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ManagedNetworkSettingsPropertiesBasicResource create(Context context); + } + + /** + * The stage of the ManagedNetworkSettingsPropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the managed network settings of a machine learning + * workspace.. + * + * @param properties The properties of the managed network settings of a machine learning workspace. + * @return the next definition stage. + */ + WithCreate withProperties(ManagedNetworkSettingsProperties properties); + } + } + + /** + * Begins update for the ManagedNetworkSettingsPropertiesBasicResource resource. + * + * @return the stage of resource update. + */ + ManagedNetworkSettingsPropertiesBasicResource.Update update(); + + /** + * The template for ManagedNetworkSettingsPropertiesBasicResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ManagedNetworkSettingsPropertiesBasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ManagedNetworkSettingsPropertiesBasicResource apply(Context context); + } + + /** + * The ManagedNetworkSettingsPropertiesBasicResource update stages. + */ + interface UpdateStages { + /** + * The stage of the ManagedNetworkSettingsPropertiesBasicResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties of the managed network settings of a machine learning + * workspace.. + * + * @param properties The properties of the managed network settings of a machine learning workspace. + * @return the next definition stage. + */ + Update withProperties(ManagedNetworkSettingsProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ManagedNetworkSettingsPropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ManagedNetworkSettingsPropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java index 56d61089d4ca..d617d9c7cae7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,37 +13,38 @@ */ public interface ManagedNetworkSettingsRules { /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. + * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String ruleName, + Context context); /** - * Lists the managed network outbound rules for a machine learning workspace. + * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of outbound rules for the managed network of a machine learning workspace as paginated response with - * {@link PagedIterable}. + * @return an outbound rule from the managed network of a machine learning workspace. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName); /** * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,7 +56,7 @@ public interface ManagedNetworkSettingsRules { * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param ruleName Name of the workspace managed network outbound rule. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,32 +66,29 @@ public interface ManagedNetworkSettingsRules { void delete(String resourceGroupName, String workspaceName, String ruleName, Context context); /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an outbound rule from the managed network of a machine learning workspace along with {@link Response}. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String ruleName, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets an outbound rule from the managed network of a machine learning workspace. + * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param ruleName Name of the workspace managed network outbound rule. + * @param workspaceName Azure Machine Learning Workspace 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 an outbound rule from the managed network of a machine learning workspace. + * @return paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. */ - OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String ruleName); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** * Gets an outbound rule from the managed network of a machine learning workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java index ed7ff73885ae..5f2732a8a5de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java index 12e1a1d0e4a7..05aedb9bb5bd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,11 +21,6 @@ public final class ManagedOnlineDeployment extends OnlineDeploymentProperties { */ private EndpointComputeType endpointComputeType = EndpointComputeType.MANAGED; - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - /** * Creates an instance of ManagedOnlineDeployment class. */ @@ -42,22 +37,12 @@ public EndpointComputeType endpointComputeType() { return this.endpointComputeType; } - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - @Override - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); + public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); return this; } @@ -65,8 +50,8 @@ public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettin * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); + public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { + super.withDataCollector(dataCollector); return this; } @@ -74,8 +59,9 @@ public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings request * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); + public ManagedOnlineDeployment + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { + super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); return this; } @@ -83,8 +69,8 @@ public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); + public ManagedOnlineDeployment withInstanceType(String instanceType) { + super.withInstanceType(instanceType); return this; } @@ -101,8 +87,8 @@ public ManagedOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); + public ManagedOnlineDeployment withModel(String model) { + super.withModel(model); return this; } @@ -110,8 +96,8 @@ public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); + public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { + super.withModelMountPath(modelMountPath); return this; } @@ -119,8 +105,8 @@ public ManagedOnlineDeployment withInstanceType(String instanceType) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withModel(String model) { - super.withModel(model); + public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { + super.withReadinessProbe(readinessProbe); return this; } @@ -128,9 +114,8 @@ public ManagedOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); + public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); return this; } @@ -138,8 +123,8 @@ public ManagedOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { - super.withDataCollector(dataCollector); + public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); return this; } @@ -147,8 +132,8 @@ public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withDescription(String description) { - super.withDescription(description); + public ManagedOnlineDeployment withStartupProbe(ProbeSettings startupProbe) { + super.withStartupProbe(startupProbe); return this; } @@ -156,8 +141,8 @@ public ManagedOnlineDeployment withDescription(String description) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withProperties(Map properties) { - super.withProperties(properties); + public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -165,8 +150,8 @@ public ManagedOnlineDeployment withProperties(Map properties) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public ManagedOnlineDeployment withDescription(String description) { + super.withDescription(description); return this; } @@ -189,13 +174,12 @@ public ManagedOnlineDeployment withEnvironmentVariables(Map envi } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public ManagedOnlineDeployment withProperties(Map properties) { + super.withProperties(properties); + return this; } /** @@ -204,23 +188,24 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("scaleSettings", scaleSettings()); - jsonWriter.writeJsonField("requestSettings", requestSettings()); - jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("appInsightsEnabled", appInsightsEnabled()); - jsonWriter.writeJsonField("livenessProbe", livenessProbe()); - jsonWriter.writeJsonField("readinessProbe", readinessProbe()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeStringField("model", model()); + jsonWriter.writeJsonField("dataCollector", dataCollector()); jsonWriter.writeStringField("egressPublicNetworkAccess", egressPublicNetworkAccess() == null ? null : egressPublicNetworkAccess().toString()); - jsonWriter.writeJsonField("dataCollector", dataCollector()); + jsonWriter.writeStringField("instanceType", instanceType()); + jsonWriter.writeJsonField("livenessProbe", livenessProbe()); + jsonWriter.writeStringField("model", model()); + jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeJsonField("readinessProbe", readinessProbe()); + jsonWriter.writeJsonField("requestSettings", requestSettings()); + jsonWriter.writeJsonField("scaleSettings", scaleSettings()); + jsonWriter.writeJsonField("startupProbe", startupProbe()); jsonWriter.writeStringField("endpointComputeType", this.endpointComputeType == null ? null : this.endpointComputeType.toString()); return jsonWriter.writeEndObject(); @@ -241,43 +226,45 @@ public static ManagedOnlineDeployment fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedManagedOnlineDeployment.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedOnlineDeployment.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedManagedOnlineDeployment.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedManagedOnlineDeployment.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedManagedOnlineDeployment.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedManagedOnlineDeployment.withEnvironmentVariables(environmentVariables); - } else if ("scaleSettings".equals(fieldName)) { - deserializedManagedOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); - } else if ("requestSettings".equals(fieldName)) { - deserializedManagedOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); - } else if ("modelMountPath".equals(fieldName)) { - deserializedManagedOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedOnlineDeployment.withProperties(properties); } else if ("appInsightsEnabled".equals(fieldName)) { deserializedManagedOnlineDeployment .withAppInsightsEnabled(reader.getNullable(JsonReader::getBoolean)); - } else if ("livenessProbe".equals(fieldName)) { - deserializedManagedOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); - } else if ("readinessProbe".equals(fieldName)) { - deserializedManagedOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedOnlineDeployment.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); + } else if ("dataCollector".equals(fieldName)) { + deserializedManagedOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + } else if ("egressPublicNetworkAccess".equals(fieldName)) { + deserializedManagedOnlineDeployment + .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); } else if ("instanceType".equals(fieldName)) { deserializedManagedOnlineDeployment.withInstanceType(reader.getString()); + } else if ("livenessProbe".equals(fieldName)) { + deserializedManagedOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); } else if ("model".equals(fieldName)) { deserializedManagedOnlineDeployment.withModel(reader.getString()); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { + } else if ("modelMountPath".equals(fieldName)) { + deserializedManagedOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { deserializedManagedOnlineDeployment - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); - } else if ("dataCollector".equals(fieldName)) { - deserializedManagedOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + .withProvisioningState(DeploymentProvisioningState.fromString(reader.getString())); + } else if ("readinessProbe".equals(fieldName)) { + deserializedManagedOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); + } else if ("requestSettings".equals(fieldName)) { + deserializedManagedOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); + } else if ("scaleSettings".equals(fieldName)) { + deserializedManagedOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); + } else if ("startupProbe".equals(fieldName)) { + deserializedManagedOnlineDeployment.withStartupProbe(ProbeSettings.fromJson(reader)); } else if ("endpointComputeType".equals(fieldName)) { deserializedManagedOnlineDeployment.endpointComputeType = EndpointComputeType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java new file mode 100644 index 000000000000..75f0a784e0ba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ManagedOnlineEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class ManagedOnlineEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "managedOnlineEndpoint"; + + /* + * Enum to determine endpoint compute type. + */ + private EndpointComputeType endpointComputeType; + + /* + * The model property. + */ + private String model; + + /** + * Creates an instance of ManagedOnlineEndpointDeploymentResourceProperties class. + */ + public ManagedOnlineEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the endpointComputeType property: Enum to determine endpoint compute type. + * + * @return the endpointComputeType value. + */ + public EndpointComputeType endpointComputeType() { + return this.endpointComputeType; + } + + /** + * Set the endpointComputeType property: Enum to determine endpoint compute type. + * + * @param endpointComputeType the endpointComputeType value to set. + * @return the ManagedOnlineEndpointDeploymentResourceProperties object itself. + */ + public ManagedOnlineEndpointDeploymentResourceProperties + withEndpointComputeType(EndpointComputeType endpointComputeType) { + this.endpointComputeType = endpointComputeType; + return this; + } + + /** + * Get the model property: The model property. + * + * @return the model value. + */ + public String model() { + return this.model; + } + + /** + * Set the model property: The model property. + * + * @param model the model value to set. + * @return the ManagedOnlineEndpointDeploymentResourceProperties object itself. + */ + public ManagedOnlineEndpointDeploymentResourceProperties withModel(String model) { + this.model = model; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("endpointComputeType", + this.endpointComputeType == null ? null : this.endpointComputeType.toString()); + jsonWriter.writeStringField("model", this.model); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedOnlineEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedOnlineEndpointDeploymentResourceProperties 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 ManagedOnlineEndpointDeploymentResourceProperties. + */ + public static ManagedOnlineEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedOnlineEndpointDeploymentResourceProperties deserializedManagedOnlineEndpointDeploymentResourceProperties + = new ManagedOnlineEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("type".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("endpointComputeType".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.endpointComputeType + = EndpointComputeType.fromString(reader.getString()); + } else if ("model".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.model = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedOnlineEndpointDeploymentResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java new file mode 100644 index 000000000000..f65c13b49662 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The ManagedOnlineEndpointResourceProperties model. + */ +@Fluent +public final class ManagedOnlineEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.MANAGED_ONLINE_ENDPOINT; + + /* + * Enum to determine endpoint authentication mode. + */ + private EndpointAuthMode authMode; + + /* + * The compute property. + */ + private String compute; + + /* + * The description property. + */ + private String description; + + /* + * The mirrorTraffic property. + */ + private Map mirrorTraffic; + + /* + * The scoringUri property. + */ + private String scoringUri; + + /* + * The traffic property. + */ + private Map traffic; + + /** + * Creates an instance of ManagedOnlineEndpointResourceProperties class. + */ + public ManagedOnlineEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * Get the authMode property: Enum to determine endpoint authentication mode. + * + * @return the authMode value. + */ + public EndpointAuthMode authMode() { + return this.authMode; + } + + /** + * Set the authMode property: Enum to determine endpoint authentication mode. + * + * @param authMode the authMode value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withAuthMode(EndpointAuthMode authMode) { + this.authMode = authMode; + return this; + } + + /** + * Get the compute property: The compute property. + * + * @return the compute value. + */ + public String compute() { + return this.compute; + } + + /** + * Set the compute property: The compute property. + * + * @param compute the compute value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withCompute(String compute) { + this.compute = compute; + return this; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description property. + * + * @param description the description value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the mirrorTraffic property: The mirrorTraffic property. + * + * @return the mirrorTraffic value. + */ + public Map mirrorTraffic() { + return this.mirrorTraffic; + } + + /** + * Set the mirrorTraffic property: The mirrorTraffic property. + * + * @param mirrorTraffic the mirrorTraffic value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withMirrorTraffic(Map mirrorTraffic) { + this.mirrorTraffic = mirrorTraffic; + return this; + } + + /** + * Get the scoringUri property: The scoringUri property. + * + * @return the scoringUri value. + */ + public String scoringUri() { + return this.scoringUri; + } + + /** + * Set the scoringUri property: The scoringUri property. + * + * @param scoringUri the scoringUri value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withScoringUri(String scoringUri) { + this.scoringUri = scoringUri; + return this; + } + + /** + * Get the traffic property: The traffic property. + * + * @return the traffic value. + */ + public Map traffic() { + return this.traffic; + } + + /** + * Set the traffic property: The traffic property. + * + * @param traffic the traffic value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withTraffic(Map traffic) { + this.traffic = traffic; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties + withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); + jsonWriter.writeStringField("compute", this.compute); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeMapField("mirrorTraffic", this.mirrorTraffic, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeStringField("scoringUri", this.scoringUri); + jsonWriter.writeMapField("traffic", this.traffic, (writer, element) -> writer.writeInt(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedOnlineEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedOnlineEndpointResourceProperties 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 ManagedOnlineEndpointResourceProperties. + */ + public static ManagedOnlineEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedOnlineEndpointResourceProperties deserializedManagedOnlineEndpointResourceProperties + = new ManagedOnlineEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedManagedOnlineEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("authMode".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.authMode + = EndpointAuthMode.fromString(reader.getString()); + } else if ("compute".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.compute = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.description = reader.getString(); + } else if ("mirrorTraffic".equals(fieldName)) { + Map mirrorTraffic = reader.readMap(reader1 -> reader1.getInt()); + deserializedManagedOnlineEndpointResourceProperties.mirrorTraffic = mirrorTraffic; + } else if ("scoringUri".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.scoringUri = reader.getString(); + } else if ("traffic".equals(fieldName)) { + Map traffic = reader.readMap(reader1 -> reader1.getInt()); + deserializedManagedOnlineEndpointResourceProperties.traffic = traffic; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedOnlineEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java new file mode 100644 index 000000000000..ae3fb28f7194 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ManagedPERequirement. + */ +public final class ManagedPERequirement extends ExpandableStringEnum { + /** + * Static value Required for ManagedPERequirement. + */ + public static final ManagedPERequirement REQUIRED = fromString("Required"); + + /** + * Static value NotRequired for ManagedPERequirement. + */ + public static final ManagedPERequirement NOT_REQUIRED = fromString("NotRequired"); + + /** + * Static value NotApplicable for ManagedPERequirement. + */ + public static final ManagedPERequirement NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of ManagedPERequirement value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedPERequirement() { + } + + /** + * Creates or finds a ManagedPERequirement from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedPERequirement. + */ + public static ManagedPERequirement fromString(String name) { + return fromString(name, ManagedPERequirement.class); + } + + /** + * Gets known ManagedPERequirement values. + * + * @return known ManagedPERequirement values. + */ + public static Collection values() { + return values(ManagedPERequirement.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java new file mode 100644 index 000000000000..c9c795f5ffda --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ManagedPEStatus. + */ +public final class ManagedPEStatus extends ExpandableStringEnum { + /** + * Static value Inactive for ManagedPEStatus. + */ + public static final ManagedPEStatus INACTIVE = fromString("Inactive"); + + /** + * Static value Active for ManagedPEStatus. + */ + public static final ManagedPEStatus ACTIVE = fromString("Active"); + + /** + * Static value NotApplicable for ManagedPEStatus. + */ + public static final ManagedPEStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of ManagedPEStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedPEStatus() { + } + + /** + * Creates or finds a ManagedPEStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedPEStatus. + */ + public static ManagedPEStatus fromString(String name) { + return fromString(name, ManagedPEStatus.class); + } + + /** + * Gets known ManagedPEStatus values. + * + * @return known ManagedPEStatus values. + */ + public static Collection values() { + return values(ManagedPEStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java new file mode 100644 index 000000000000..99be0d1d5a89 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Details for managed resource group assigned identities. + */ +@Fluent +public final class ManagedResourceGroupAssignedIdentities + implements JsonSerializable { + /* + * Identity principal Id + */ + private String principalId; + + /** + * Creates an instance of ManagedResourceGroupAssignedIdentities class. + */ + public ManagedResourceGroupAssignedIdentities() { + } + + /** + * Get the principalId property: Identity principal Id. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Set the principalId property: Identity principal Id. + * + * @param principalId the principalId value to set. + * @return the ManagedResourceGroupAssignedIdentities object itself. + */ + public ManagedResourceGroupAssignedIdentities withPrincipalId(String principalId) { + this.principalId = principalId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("principalId", this.principalId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedResourceGroupAssignedIdentities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedResourceGroupAssignedIdentities 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 ManagedResourceGroupAssignedIdentities. + */ + public static ManagedResourceGroupAssignedIdentities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedResourceGroupAssignedIdentities deserializedManagedResourceGroupAssignedIdentities + = new ManagedResourceGroupAssignedIdentities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedManagedResourceGroupAssignedIdentities.principalId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedResourceGroupAssignedIdentities; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java new file mode 100644 index 000000000000..bcb508e1b6ae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 resource group settings. + */ +@Fluent +public final class ManagedResourceGroupSettings implements JsonSerializable { + /* + * List of assigned identities for the managed resource group + */ + private List assignedIdentities; + + /** + * Creates an instance of ManagedResourceGroupSettings class. + */ + public ManagedResourceGroupSettings() { + } + + /** + * Get the assignedIdentities property: List of assigned identities for the managed resource group. + * + * @return the assignedIdentities value. + */ + public List assignedIdentities() { + return this.assignedIdentities; + } + + /** + * Set the assignedIdentities property: List of assigned identities for the managed resource group. + * + * @param assignedIdentities the assignedIdentities value to set. + * @return the ManagedResourceGroupSettings object itself. + */ + public ManagedResourceGroupSettings + withAssignedIdentities(List assignedIdentities) { + this.assignedIdentities = assignedIdentities; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("assignedIdentities", this.assignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedResourceGroupSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedResourceGroupSettings 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 ManagedResourceGroupSettings. + */ + public static ManagedResourceGroupSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedResourceGroupSettings deserializedManagedResourceGroupSettings = new ManagedResourceGroupSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("assignedIdentities".equals(fieldName)) { + List assignedIdentities + = reader.readArray(reader1 -> ManagedResourceGroupAssignedIdentities.fromJson(reader1)); + deserializedManagedResourceGroupSettings.assignedIdentities = assignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedResourceGroupSettings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java index 28cfe427d69f..28bba2a82d52 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.Map; -import java.util.UUID; /** * Managed service identity (system assigned and/or user assigned identities). @@ -23,24 +21,21 @@ public class ManagedServiceIdentity implements JsonSerializable userAssignedIdentities; @@ -56,7 +51,7 @@ public ManagedServiceIdentity() { * * @return the principalId value. */ - public UUID principalId() { + public String principalId() { return this.principalId; } @@ -67,7 +62,7 @@ public UUID principalId() { * @param principalId the principalId value to set. * @return the ManagedServiceIdentity object itself. */ - ManagedServiceIdentity withPrincipalId(UUID principalId) { + ManagedServiceIdentity withPrincipalId(String principalId) { this.principalId = principalId; return this; } @@ -78,7 +73,7 @@ ManagedServiceIdentity withPrincipalId(UUID principalId) { * * @return the tenantId value. */ - public UUID tenantId() { + public String tenantId() { return this.tenantId; } @@ -89,14 +84,13 @@ public UUID tenantId() { * @param tenantId the tenantId value to set. * @return the ManagedServiceIdentity object itself. */ - ManagedServiceIdentity withTenantId(UUID tenantId) { + ManagedServiceIdentity withTenantId(String tenantId) { this.tenantId = tenantId; return this; } /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Get the type property: The type of managed identity assigned to this resource. * * @return the type value. */ @@ -105,8 +99,7 @@ public ManagedServiceIdentityType type() { } /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). + * Set the type property: The type of managed identity assigned to this resource. * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. @@ -117,10 +110,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { } /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Get the userAssignedIdentities property: The identities assigned to this resource by the user. * * @return the userAssignedIdentities value. */ @@ -129,10 +119,7 @@ public Map userAssignedIdentities() { } /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * Set the userAssignedIdentities property: The identities assigned to this resource by the user. * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. @@ -142,27 +129,6 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); - /** * {@inheritDoc} */ @@ -194,11 +160,9 @@ public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOEx if ("type".equals(fieldName)) { deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedManagedServiceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java index d848e98fabe1..5dfbe2867559 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,22 +12,22 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = fromString("SystemAssigned,UserAssigned"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java index 2b53cae773b4..10e6ccffed11 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -16,11 +16,6 @@ */ @Immutable public final class MarketplacePlan implements JsonSerializable { - /* - * The identifying name of the Publisher of the Marketplace Plan. - */ - private String publisherId; - /* * The identifying name of the Offer of the Marketplace Plan. */ @@ -31,19 +26,15 @@ public final class MarketplacePlan implements JsonSerializable */ private String planId; - /** - * Creates an instance of MarketplacePlan class. + /* + * The identifying name of the Publisher of the Marketplace Plan. */ - public MarketplacePlan() { - } + private String publisherId; /** - * Get the publisherId property: The identifying name of the Publisher of the Marketplace Plan. - * - * @return the publisherId value. + * Creates an instance of MarketplacePlan class. */ - public String publisherId() { - return this.publisherId; + private MarketplacePlan() { } /** @@ -65,11 +56,12 @@ public String planId() { } /** - * Validates the instance. + * Get the publisherId property: The identifying name of the Publisher of the Marketplace Plan. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the publisherId value. */ - public void validate() { + public String publisherId() { + return this.publisherId; } /** @@ -96,12 +88,12 @@ public static MarketplacePlan fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("publisherId".equals(fieldName)) { - deserializedMarketplacePlan.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { + if ("offerId".equals(fieldName)) { deserializedMarketplacePlan.offerId = reader.getString(); } else if ("planId".equals(fieldName)) { deserializedMarketplacePlan.planId = reader.getString(); + } else if ("publisherId".equals(fieldName)) { + deserializedMarketplacePlan.publisherId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java index 6ce854789abe..cbb760cc4495 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java index 99bc5ab04a03..7b3a87722f35 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -17,11 +16,6 @@ */ @Fluent public final class MarketplaceSubscriptionProperties implements JsonSerializable { - /* - * [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - */ - private String modelId; - /* * Marketplace Plan associated with the Marketplace Subscription. */ @@ -32,6 +26,11 @@ public final class MarketplaceSubscriptionProperties implements JsonSerializable */ private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; + /* + * [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + */ + private String modelId; + /* * Provisioning State of the Marketplace Subscription. */ @@ -43,26 +42,6 @@ public final class MarketplaceSubscriptionProperties implements JsonSerializable public MarketplaceSubscriptionProperties() { } - /** - * Get the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - * - * @return the modelId value. - */ - public String modelId() { - return this.modelId; - } - - /** - * Set the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - * - * @param modelId the modelId value to set. - * @return the MarketplaceSubscriptionProperties object itself. - */ - public MarketplaceSubscriptionProperties withModelId(String modelId) { - this.modelId = modelId; - return this; - } - /** * Get the marketplacePlan property: Marketplace Plan associated with the Marketplace Subscription. * @@ -82,31 +61,33 @@ public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { } /** - * Get the provisioningState property: Provisioning State of the Marketplace Subscription. + * Get the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. * - * @return the provisioningState value. + * @return the modelId value. */ - public MarketplaceSubscriptionProvisioningState provisioningState() { - return this.provisioningState; + public String modelId() { + return this.modelId; } /** - * Validates the instance. + * Set the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param modelId the modelId value to set. + * @return the MarketplaceSubscriptionProperties object itself. */ - public void validate() { - if (modelId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property modelId in model MarketplaceSubscriptionProperties")); - } - if (marketplacePlan() != null) { - marketplacePlan().validate(); - } + public MarketplaceSubscriptionProperties withModelId(String modelId) { + this.modelId = modelId; + return this; } - private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSubscriptionProperties.class); + /** + * Get the provisioningState property: Provisioning State of the Marketplace Subscription. + * + * @return the provisioningState value. + */ + public MarketplaceSubscriptionProvisioningState provisioningState() { + return this.provisioningState; + } /** * {@inheritDoc} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java index 02e4f541478d..4e2403a3c601 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,27 +13,27 @@ public final class MarketplaceSubscriptionProvisioningState extends ExpandableStringEnum { /** - * Static value Creating for MarketplaceSubscriptionProvisioningState. + * MarketplaceSubscription is being created. */ public static final MarketplaceSubscriptionProvisioningState CREATING = fromString("Creating"); /** - * Static value Deleting for MarketplaceSubscriptionProvisioningState. + * MarketplaceSubscription is being deleted. */ public static final MarketplaceSubscriptionProvisioningState DELETING = fromString("Deleting"); /** - * Static value Succeeded for MarketplaceSubscriptionProvisioningState. + * MarketplaceSubscription is successfully provisioned. */ public static final MarketplaceSubscriptionProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for MarketplaceSubscriptionProvisioningState. + * MarketplaceSubscription provisioning failed. */ public static final MarketplaceSubscriptionProvisioningState FAILED = fromString("Failed"); /** - * Static value Updating for MarketplaceSubscriptionProvisioningState. + * MarketplaceSubscription is being updated. */ public static final MarketplaceSubscriptionProvisioningState UPDATING = fromString("Updating"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java index b4b81c8b3875..179cf3efe614 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,21 @@ */ public final class MarketplaceSubscriptionStatus extends ExpandableStringEnum { /** - * Static value Subscribed for MarketplaceSubscriptionStatus. + * The customer can now use the Marketplace Subscription's + * model and will be billed. */ public static final MarketplaceSubscriptionStatus SUBSCRIBED = fromString("Subscribed"); /** - * Static value Suspended for MarketplaceSubscriptionStatus. + * The customer could not be billed for the Marketplace Subscription. + * The customer will not be able to access the model. */ public static final MarketplaceSubscriptionStatus SUSPENDED = fromString("Suspended"); /** - * Static value Unsubscribed for MarketplaceSubscriptionStatus. + * Marketplace Subscriptions reach this state in response to an explicit customer or CSP action. + * A Marketplace Subscription can also be canceled implicitly, as a result of nonpayment of dues, + * after being in the Suspended state for some time. */ public static final MarketplaceSubscriptionStatus UNSUBSCRIBED = fromString("Unsubscribed"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java index ef3e61d60773..0eee565f19a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,38 +13,39 @@ */ public interface MarketplaceSubscriptions { /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); + MarketplaceSubscription get(String resourceGroupName, String workspaceName, String name); /** * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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. @@ -55,8 +56,8 @@ PagedIterable list(String resourceGroupName, String wor * Delete Marketplace Subscription (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Marketplace Subscription name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Container 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. @@ -65,32 +66,31 @@ PagedIterable list(String resourceGroupName, String wor void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 container. + * @return a paginated list of MarketplaceSubscription entities as paginated response with {@link PagedIterable}. */ - MarketplaceSubscription get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); /** * Get container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java index 3ef07ac06f9d..37146eb9802a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public MaterializationComputeResource withInstanceType(String instanceType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java index bf2062a00f75..4a3ed67e7886 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,16 +17,6 @@ */ @Fluent public final class MaterializationSettings implements JsonSerializable { - /* - * Specifies the stores to which materialization should happen - */ - private MaterializationStoreType storeType; - - /* - * Specifies the schedule details - */ - private RecurrenceTrigger schedule; - /* * Specifies the notification details */ @@ -38,54 +28,24 @@ public final class MaterializationSettings implements JsonSerializable sparkConfiguration; - - /** - * Creates an instance of MaterializationSettings class. - */ - public MaterializationSettings() { - } - - /** - * Get the storeType property: Specifies the stores to which materialization should happen. - * - * @return the storeType value. + * Specifies the schedule details */ - public MaterializationStoreType storeType() { - return this.storeType; - } + private RecurrenceTrigger schedule; - /** - * Set the storeType property: Specifies the stores to which materialization should happen. - * - * @param storeType the storeType value to set. - * @return the MaterializationSettings object itself. + /* + * Specifies the spark compute settings */ - public MaterializationSettings withStoreType(MaterializationStoreType storeType) { - this.storeType = storeType; - return this; - } + private Map sparkConfiguration; - /** - * Get the schedule property: Specifies the schedule details. - * - * @return the schedule value. + /* + * Specifies the stores to which materialization should happen */ - public RecurrenceTrigger schedule() { - return this.schedule; - } + private MaterializationStoreType storeType; /** - * Set the schedule property: Specifies the schedule details. - * - * @param schedule the schedule value to set. - * @return the MaterializationSettings object itself. + * Creates an instance of MaterializationSettings class. */ - public MaterializationSettings withSchedule(RecurrenceTrigger schedule) { - this.schedule = schedule; - return this; + public MaterializationSettings() { } /** @@ -128,6 +88,26 @@ public MaterializationSettings withResource(MaterializationComputeResource resou return this; } + /** + * Get the schedule property: Specifies the schedule details. + * + * @return the schedule value. + */ + public RecurrenceTrigger schedule() { + return this.schedule; + } + + /** + * Set the schedule property: Specifies the schedule details. + * + * @param schedule the schedule value to set. + * @return the MaterializationSettings object itself. + */ + public MaterializationSettings withSchedule(RecurrenceTrigger schedule) { + this.schedule = schedule; + return this; + } + /** * Get the sparkConfiguration property: Specifies the spark compute settings. * @@ -149,20 +129,23 @@ public MaterializationSettings withSparkConfiguration(Map sparkC } /** - * Validates the instance. + * Get the storeType property: Specifies the stores to which materialization should happen. + * + * @return the storeType value. + */ + public MaterializationStoreType storeType() { + return this.storeType; + } + + /** + * Set the storeType property: Specifies the stores to which materialization should happen. * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schedule() != null) { - schedule().validate(); - } - if (notification() != null) { - notification().validate(); - } - if (resource() != null) { - resource().validate(); - } + * @param storeType the storeType value to set. + * @return the MaterializationSettings object itself. + */ + public MaterializationSettings withStoreType(MaterializationStoreType storeType) { + this.storeType = storeType; + return this; } /** @@ -171,12 +154,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storeType", this.storeType == null ? null : this.storeType.toString()); - jsonWriter.writeJsonField("schedule", this.schedule); jsonWriter.writeJsonField("notification", this.notification); jsonWriter.writeJsonField("resource", this.resource); + jsonWriter.writeJsonField("schedule", this.schedule); jsonWriter.writeMapField("sparkConfiguration", this.sparkConfiguration, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("storeType", this.storeType == null ? null : this.storeType.toString()); return jsonWriter.writeEndObject(); } @@ -195,18 +178,18 @@ public static MaterializationSettings fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("storeType".equals(fieldName)) { - deserializedMaterializationSettings.storeType - = MaterializationStoreType.fromString(reader.getString()); - } else if ("schedule".equals(fieldName)) { - deserializedMaterializationSettings.schedule = RecurrenceTrigger.fromJson(reader); - } else if ("notification".equals(fieldName)) { + if ("notification".equals(fieldName)) { deserializedMaterializationSettings.notification = NotificationSetting.fromJson(reader); } else if ("resource".equals(fieldName)) { deserializedMaterializationSettings.resource = MaterializationComputeResource.fromJson(reader); + } else if ("schedule".equals(fieldName)) { + deserializedMaterializationSettings.schedule = RecurrenceTrigger.fromJson(reader); } else if ("sparkConfiguration".equals(fieldName)) { Map sparkConfiguration = reader.readMap(reader1 -> reader1.getString()); deserializedMaterializationSettings.sparkConfiguration = sparkConfiguration; + } else if ("storeType".equals(fieldName)) { + deserializedMaterializationSettings.storeType + = MaterializationStoreType.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java index 43f7debbfb3e..26be1f4128ed 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java index dc27f903d2f3..f84b737610c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,15 +36,6 @@ public EarlyTerminationPolicyType policyType() { return this.policyType; } - /** - * {@inheritDoc} - */ - @Override - public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - /** * {@inheritDoc} */ @@ -55,13 +46,12 @@ public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); + return this; } /** @@ -70,8 +60,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); + jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); return jsonWriter.writeEndObject(); } @@ -91,10 +81,10 @@ public static MedianStoppingPolicy fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("evaluationInterval".equals(fieldName)) { - deserializedMedianStoppingPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { + if ("delayEvaluation".equals(fieldName)) { deserializedMedianStoppingPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); + } else if ("evaluationInterval".equals(fieldName)) { + deserializedMedianStoppingPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); } else if ("policyType".equals(fieldName)) { deserializedMedianStoppingPolicy.policyType = EarlyTerminationPolicyType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java new file mode 100644 index 000000000000..92f3e299f345 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Indicates whether mlflow autologger is enabled for notebooks. + */ +public final class MlflowAutologger extends ExpandableStringEnum { + /** + * Static value Enabled for MlflowAutologger. + */ + public static final MlflowAutologger ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for MlflowAutologger. + */ + public static final MlflowAutologger DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of MlflowAutologger value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MlflowAutologger() { + } + + /** + * Creates or finds a MlflowAutologger from its string representation. + * + * @param name a name to look for. + * @return the corresponding MlflowAutologger. + */ + public static MlflowAutologger fromString(String name) { + return fromString(name, MlflowAutologger.class); + } + + /** + * Gets known MlflowAutologger values. + * + * @return known MlflowAutologger values. + */ + public static Collection values() { + return values(MlflowAutologger.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java index 2684f3c46669..d538806f2cef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java index bdaf4f96244c..6a85285f5d6b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,14 +22,14 @@ public final class ModelContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of ModelContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -84,15 +84,6 @@ public ModelContainerProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ModelContainerProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -103,13 +94,12 @@ public ModelContainerProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public ModelContainerProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -119,8 +109,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -142,12 +132,12 @@ public static ModelContainerProperties fromJson(JsonReader jsonReader) throws IO if ("description".equals(fieldName)) { deserializedModelContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedModelContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedModelContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedModelContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedModelContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java index 2a2c4808ac0f..e3f228f13f68 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,33 +13,32 @@ */ public interface ModelContainers { /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. + * @param name Container name. This is case-sensitive. + * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, - ListViewType listViewType, Context context); + ModelContainer get(String resourceGroupName, String workspaceName, String name); /** * Delete container. @@ -68,32 +67,33 @@ PagedIterable list(String resourceGroupName, String workspaceNam void delete(String resourceGroupName, String workspaceName, String name); /** - * Get container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @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 container along with {@link Response}. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param count Maximum number of results to return. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 container. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - ModelContainer get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, Integer count, + ListViewType listViewType, Context context); /** * Get container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java new file mode 100644 index 000000000000..ee9092ca4669 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Model lifecycle status. + */ +public final class ModelLifecycleStatus extends ExpandableStringEnum { + /** + * Static value GenerallyAvailable for ModelLifecycleStatus. + */ + public static final ModelLifecycleStatus GENERALLY_AVAILABLE = fromString("GenerallyAvailable"); + + /** + * Static value Preview for ModelLifecycleStatus. + */ + public static final ModelLifecycleStatus PREVIEW = fromString("Preview"); + + /** + * Creates a new instance of ModelLifecycleStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ModelLifecycleStatus() { + } + + /** + * Creates or finds a ModelLifecycleStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ModelLifecycleStatus. + */ + public static ModelLifecycleStatus fromString(String name) { + return fromString(name, ModelLifecycleStatus.class); + } + + /** + * Gets known ModelLifecycleStatus values. + * + * @return known ModelLifecycleStatus values. + */ + public static Collection values() { + return values(ModelLifecycleStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java new file mode 100644 index 000000000000..2ccb886bcf58 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum to determine the type of fine tuning. + */ +public final class ModelProvider extends ExpandableStringEnum { + /** + * Fine tuning using Azure Open AI model. + */ + public static final ModelProvider AZURE_OPEN_AI = fromString("AzureOpenAI"); + + /** + * Fine tuning using custom model. + */ + public static final ModelProvider CUSTOM = fromString("Custom"); + + /** + * Creates a new instance of ModelProvider value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ModelProvider() { + } + + /** + * Creates or finds a ModelProvider from its string representation. + * + * @param name a name to look for. + * @return the corresponding ModelProvider. + */ + public static ModelProvider fromString(String name) { + return fromString(name, ModelProvider.class); + } + + /** + * Gets known ModelProvider values. + * + * @return known ModelProvider values. + */ + public static Collection values() { + return values(ModelProvider.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java index c0dcb4fd0a3d..625da25ca882 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public ModelSettings withModelId(String modelId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java index c32502aa8bd1..8d108c72aa96 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,27 +12,27 @@ */ public final class ModelSize extends ExpandableStringEnum { /** - * Static value None for ModelSize. + * No value selected. */ public static final ModelSize NONE = fromString("None"); /** - * Static value Small for ModelSize. + * Small size. */ public static final ModelSize SMALL = fromString("Small"); /** - * Static value Medium for ModelSize. + * Medium size. */ public static final ModelSize MEDIUM = fromString("Medium"); /** - * Static value Large for ModelSize. + * Large size. */ public static final ModelSize LARGE = fromString("Large"); /** - * Static value ExtraLarge for ModelSize. + * Extra large size. */ public static final ModelSize EXTRA_LARGE = fromString("ExtraLarge"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java index 47f7534e2ebf..ca05803ca6db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java index f3e6e5d0e2f1..4f97770597df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java index 2c7b58910191..93499df32af3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -21,6 +22,11 @@ public final class ModelVersionProperties extends AssetBase { */ private Map flavors; + /* + * Name of the training job which produced this model + */ + private String jobName; + /* * The storage format for this entity. Used for NCD. */ @@ -31,11 +37,6 @@ public final class ModelVersionProperties extends AssetBase { */ private String modelUri; - /* - * Name of the training job which produced this model - */ - private String jobName; - /* * Provisioning state for the model version. */ @@ -46,6 +47,11 @@ public final class ModelVersionProperties extends AssetBase { */ private String stage; + /* + * Array of dataset references + */ + private List datasets; + /** * Creates an instance of ModelVersionProperties class. */ @@ -72,6 +78,26 @@ public ModelVersionProperties withFlavors(Map flavors) { return this; } + /** + * Get the jobName property: Name of the training job which produced this model. + * + * @return the jobName value. + */ + public String jobName() { + return this.jobName; + } + + /** + * Set the jobName property: Name of the training job which produced this model. + * + * @param jobName the jobName value to set. + * @return the ModelVersionProperties object itself. + */ + public ModelVersionProperties withJobName(String jobName) { + this.jobName = jobName; + return this; + } + /** * Get the modelType property: The storage format for this entity. Used for NCD. * @@ -112,26 +138,6 @@ public ModelVersionProperties withModelUri(String modelUri) { return this; } - /** - * Get the jobName property: Name of the training job which produced this model. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Set the jobName property: Name of the training job which produced this model. - * - * @param jobName the jobName value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withJobName(String jobName) { - this.jobName = jobName; - return this; - } - /** * Get the provisioningState property: Provisioning state for the model version. * @@ -162,11 +168,22 @@ public ModelVersionProperties withStage(String stage) { } /** - * {@inheritDoc} + * Get the datasets property: Array of dataset references. + * + * @return the datasets value. */ - @Override - public ModelVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public List datasets() { + return this.datasets; + } + + /** + * Set the datasets property: Array of dataset references. + * + * @param datasets the datasets value to set. + * @return the ModelVersionProperties object itself. + */ + public ModelVersionProperties withDatasets(List datasets) { + this.datasets = datasets; return this; } @@ -183,8 +200,8 @@ public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { * {@inheritDoc} */ @Override - public ModelVersionProperties withDescription(String description) { - super.withDescription(description); + public ModelVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -192,8 +209,8 @@ public ModelVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public ModelVersionProperties withTags(Map tags) { - super.withTags(tags); + public ModelVersionProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -207,20 +224,12 @@ public ModelVersionProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (flavors() != null) { - flavors().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } + public ModelVersionProperties withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -230,15 +239,16 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeMapField("flavors", this.flavors, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("jobName", this.jobName); jsonWriter.writeStringField("modelType", this.modelType); jsonWriter.writeStringField("modelUri", this.modelUri); - jsonWriter.writeStringField("jobName", this.jobName); jsonWriter.writeStringField("stage", this.stage); + jsonWriter.writeArrayField("datasets", this.datasets, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -259,30 +269,33 @@ public static ModelVersionProperties fromJson(JsonReader jsonReader) throws IOEx if ("description".equals(fieldName)) { deserializedModelVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedModelVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedModelVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedModelVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedModelVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedModelVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedModelVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("flavors".equals(fieldName)) { Map flavors = reader.readMap(reader1 -> FlavorData.fromJson(reader1)); deserializedModelVersionProperties.flavors = flavors; + } else if ("jobName".equals(fieldName)) { + deserializedModelVersionProperties.jobName = reader.getString(); } else if ("modelType".equals(fieldName)) { deserializedModelVersionProperties.modelType = reader.getString(); } else if ("modelUri".equals(fieldName)) { deserializedModelVersionProperties.modelUri = reader.getString(); - } else if ("jobName".equals(fieldName)) { - deserializedModelVersionProperties.jobName = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedModelVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); } else if ("stage".equals(fieldName)) { deserializedModelVersionProperties.stage = reader.getString(); + } else if ("datasets".equals(fieldName)) { + List datasets = reader.readArray(reader1 -> DatasetReference.fromJson(reader1)); + deserializedModelVersionProperties.datasets = datasets; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java index 6c6324ae18b0..de59062c8473 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,43 +13,34 @@ */ public interface ModelVersions { /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, String version, + Context context); /** - * List model versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, - String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, - String feed, ListViewType listViewType, Context context); + ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); /** * Delete version. @@ -81,42 +72,51 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String name, String version); /** - * Get version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, String version, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String name); /** - * Get version. + * List model versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param version Model version. + * @param description Model description. + * @param offset Number of initial results to skip. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param feed Name of the feed. + * @param listViewType View type for including/excluding (for example) archived entities. + * @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 version. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); + PagedIterable list(String resourceGroupName, String workspaceName, String name, String skip, + String orderBy, Integer top, String version, String description, Integer offset, String tags, String properties, + String feed, ListViewType listViewType, Context context); /** * Publish version asset into registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -129,8 +129,8 @@ Response getWithResponse(String resourceGroupName, String workspac * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. + * @param name Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. * @param body Destination registry info. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java index bbf1d37b8c20..f15b26f2b9c6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public MonitorComputeType computeType() { return this.computeType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java index 2f4cdfb68eb1..e0fd8b8d664c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -38,14 +38,6 @@ public MonitorComputeIdentityType computeIdentityType() { return this.computeIdentityType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java index c13556b09de5..3ed8b481d540 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class MonitorComputeIdentityType extends ExpandableStringEnum { /** - * Static value AmlToken for MonitorComputeIdentityType. + * Authenticates through user's AML token. */ public static final MonitorComputeIdentityType AML_TOKEN = fromString("AmlToken"); /** - * Static value ManagedIdentity for MonitorComputeIdentityType. + * Authenticates through a user-provided managed identity. */ public static final MonitorComputeIdentityType MANAGED_IDENTITY = fromString("ManagedIdentity"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java index 262241787ec4..8ad4fa5c066e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ */ public final class MonitorComputeType extends ExpandableStringEnum { /** - * Static value ServerlessSpark for MonitorComputeType. + * Serverless Spark compute. */ public static final MonitorComputeType SERVERLESS_SPARK = fromString("ServerlessSpark"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java index cf097a552e4b..0a32161d393a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,24 +18,24 @@ @Fluent public final class MonitorDefinition implements JsonSerializable { /* - * The entities targeted by the monitor. + * The monitor's notification settings. */ - private MonitoringTarget monitoringTarget; + private MonitorNotificationSettings alertNotificationSettings; /* - * [Required] The signals to monitor. + * [Required] The ARM resource ID of the compute resource to run the monitoring job on. */ - private Map signals; + private MonitorComputeConfigurationBase computeConfiguration; /* - * [Required] The ARM resource ID of the compute resource to run the monitoring job on. + * The entities targeted by the monitor. */ - private MonitorComputeConfigurationBase computeConfiguration; + private MonitoringTarget monitoringTarget; /* - * The monitor's notification settings. + * [Required] The signals to monitor. */ - private MonitorNotificationSettings alertNotificationSettings; + private Map signals; /** * Creates an instance of MonitorDefinition class. @@ -45,42 +44,22 @@ public MonitorDefinition() { } /** - * Get the monitoringTarget property: The entities targeted by the monitor. - * - * @return the monitoringTarget value. - */ - public MonitoringTarget monitoringTarget() { - return this.monitoringTarget; - } - - /** - * Set the monitoringTarget property: The entities targeted by the monitor. - * - * @param monitoringTarget the monitoringTarget value to set. - * @return the MonitorDefinition object itself. - */ - public MonitorDefinition withMonitoringTarget(MonitoringTarget monitoringTarget) { - this.monitoringTarget = monitoringTarget; - return this; - } - - /** - * Get the signals property: [Required] The signals to monitor. + * Get the alertNotificationSettings property: The monitor's notification settings. * - * @return the signals value. + * @return the alertNotificationSettings value. */ - public Map signals() { - return this.signals; + public MonitorNotificationSettings alertNotificationSettings() { + return this.alertNotificationSettings; } /** - * Set the signals property: [Required] The signals to monitor. + * Set the alertNotificationSettings property: The monitor's notification settings. * - * @param signals the signals value to set. + * @param alertNotificationSettings the alertNotificationSettings value to set. * @return the MonitorDefinition object itself. */ - public MonitorDefinition withSignals(Map signals) { - this.signals = signals; + public MonitorDefinition withAlertNotificationSettings(MonitorNotificationSettings alertNotificationSettings) { + this.alertNotificationSettings = alertNotificationSettings; return this; } @@ -107,57 +86,44 @@ public MonitorDefinition withComputeConfiguration(MonitorComputeConfigurationBas } /** - * Get the alertNotificationSettings property: The monitor's notification settings. + * Get the monitoringTarget property: The entities targeted by the monitor. * - * @return the alertNotificationSettings value. + * @return the monitoringTarget value. */ - public MonitorNotificationSettings alertNotificationSettings() { - return this.alertNotificationSettings; + public MonitoringTarget monitoringTarget() { + return this.monitoringTarget; } /** - * Set the alertNotificationSettings property: The monitor's notification settings. + * Set the monitoringTarget property: The entities targeted by the monitor. * - * @param alertNotificationSettings the alertNotificationSettings value to set. + * @param monitoringTarget the monitoringTarget value to set. * @return the MonitorDefinition object itself. */ - public MonitorDefinition withAlertNotificationSettings(MonitorNotificationSettings alertNotificationSettings) { - this.alertNotificationSettings = alertNotificationSettings; + public MonitorDefinition withMonitoringTarget(MonitoringTarget monitoringTarget) { + this.monitoringTarget = monitoringTarget; return this; } /** - * Validates the instance. + * Get the signals property: [Required] The signals to monitor. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the signals value. */ - public void validate() { - if (monitoringTarget() != null) { - monitoringTarget().validate(); - } - if (signals() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property signals in model MonitorDefinition")); - } else { - signals().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (computeConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property computeConfiguration in model MonitorDefinition")); - } else { - computeConfiguration().validate(); - } - if (alertNotificationSettings() != null) { - alertNotificationSettings().validate(); - } + public Map signals() { + return this.signals; } - private static final ClientLogger LOGGER = new ClientLogger(MonitorDefinition.class); + /** + * Set the signals property: [Required] The signals to monitor. + * + * @param signals the signals value to set. + * @return the MonitorDefinition object itself. + */ + public MonitorDefinition withSignals(Map signals) { + this.signals = signals; + return this; + } /** * {@inheritDoc} @@ -165,10 +131,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("signals", this.signals, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("computeConfiguration", this.computeConfiguration); - jsonWriter.writeJsonField("monitoringTarget", this.monitoringTarget); + jsonWriter.writeMapField("signals", this.signals, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("alertNotificationSettings", this.alertNotificationSettings); + jsonWriter.writeJsonField("monitoringTarget", this.monitoringTarget); return jsonWriter.writeEndObject(); } @@ -188,18 +154,18 @@ public static MonitorDefinition fromJson(JsonReader jsonReader) throws IOExcepti String fieldName = reader.getFieldName(); reader.nextToken(); - if ("signals".equals(fieldName)) { + if ("computeConfiguration".equals(fieldName)) { + deserializedMonitorDefinition.computeConfiguration + = MonitorComputeConfigurationBase.fromJson(reader); + } else if ("signals".equals(fieldName)) { Map signals = reader.readMap(reader1 -> MonitoringSignalBase.fromJson(reader1)); deserializedMonitorDefinition.signals = signals; - } else if ("computeConfiguration".equals(fieldName)) { - deserializedMonitorDefinition.computeConfiguration - = MonitorComputeConfigurationBase.fromJson(reader); - } else if ("monitoringTarget".equals(fieldName)) { - deserializedMonitorDefinition.monitoringTarget = MonitoringTarget.fromJson(reader); } else if ("alertNotificationSettings".equals(fieldName)) { deserializedMonitorDefinition.alertNotificationSettings = MonitorNotificationSettings.fromJson(reader); + } else if ("monitoringTarget".equals(fieldName)) { + deserializedMonitorDefinition.monitoringTarget = MonitoringTarget.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java index b9ae80c6d2b6..7326eb11e9f9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -48,14 +48,6 @@ public MonitorEmailNotificationSettings withEmails(List emails) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java index 07d6891a9888..3e487154852a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -48,17 +48,6 @@ public MonitorEmailNotificationSettings emailNotificationSettings() { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (emailNotificationSettings() != null) { - emailNotificationSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java index 84973c652506..25b4bb643f80 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -114,35 +113,6 @@ public MonitorServerlessSparkCompute withRuntimeVersion(String runtimeVersion) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (computeIdentity() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property computeIdentity in model MonitorServerlessSparkCompute")); - } else { - computeIdentity().validate(); - } - if (instanceType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property instanceType in model MonitorServerlessSparkCompute")); - } - if (runtimeVersion() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property runtimeVersion in model MonitorServerlessSparkCompute")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MonitorServerlessSparkCompute.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java index a3ded87dc7d2..a18c94a2bf18 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class MonitoringFeatureDataType extends ExpandableStringEnum { /** - * Static value Numerical for MonitoringFeatureDataType. + * Used for features of numerical data type. */ public static final MonitoringFeatureDataType NUMERICAL = fromString("Numerical"); /** - * Static value Categorical for MonitoringFeatureDataType. + * Used for features of categorical data type. */ public static final MonitoringFeatureDataType CATEGORICAL = fromString("Categorical"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java index e4d0e269413a..1ac5d0895f80 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -38,14 +38,6 @@ public MonitoringFeatureFilterType filterType() { return this.filterType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java index 15011a097b47..b4c4f0eb71a6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class MonitoringFeatureFilterType extends ExpandableStringEnum { /** - * Static value AllFeatures for MonitoringFeatureFilterType. + * Includes all features. */ public static final MonitoringFeatureFilterType ALL_FEATURES = fromString("AllFeatures"); /** - * Static value TopNByAttribution for MonitoringFeatureFilterType. + * Only includes the top contributing features, measured by feature attribution. */ public static final MonitoringFeatureFilterType TOP_NBY_ATTRIBUTION = fromString("TopNByAttribution"); /** - * Static value FeatureSubset for MonitoringFeatureFilterType. + * Includes a user-defined subset of features. */ public static final MonitoringFeatureFilterType FEATURE_SUBSET = fromString("FeatureSubset"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java index 7a432a4c085c..73fd72432920 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,6 +22,11 @@ public class MonitoringInputDataBase implements JsonSerializable columns; + /* * The context metadata of the data source. */ @@ -38,11 +42,6 @@ public class MonitoringInputDataBase implements JsonSerializable columns; - /** * Creates an instance of MonitoringInputDataBase class. */ @@ -58,6 +57,26 @@ public MonitoringInputDataType inputDataType() { return this.inputDataType; } + /** + * Get the columns property: Mapping of column names to special uses. + * + * @return the columns value. + */ + public Map columns() { + return this.columns; + } + + /** + * Set the columns property: Mapping of column names to special uses. + * + * @param columns the columns value to set. + * @return the MonitoringInputDataBase object itself. + */ + public MonitoringInputDataBase withColumns(Map columns) { + this.columns = columns; + return this; + } + /** * Get the dataContext property: The context metadata of the data source. * @@ -118,45 +137,6 @@ public MonitoringInputDataBase withUri(String uri) { return this; } - /** - * Get the columns property: Mapping of column names to special uses. - * - * @return the columns value. - */ - public Map columns() { - return this.columns; - } - - /** - * Set the columns property: Mapping of column names to special uses. - * - * @param columns the columns value to set. - * @return the MonitoringInputDataBase object itself. - */ - public MonitoringInputDataBase withColumns(Map columns) { - this.columns = columns; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (jobInputType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property jobInputType in model MonitoringInputDataBase")); - } - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model MonitoringInputDataBase")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MonitoringInputDataBase.class); - /** * {@inheritDoc} */ @@ -166,8 +146,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); jsonWriter.writeStringField("uri", this.uri); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); - jsonWriter.writeStringField("dataContext", this.dataContext); jsonWriter.writeMapField("columns", this.columns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("dataContext", this.dataContext); return jsonWriter.writeEndObject(); } @@ -223,11 +203,11 @@ static MonitoringInputDataBase fromJsonKnownDiscriminator(JsonReader jsonReader) } else if ("inputDataType".equals(fieldName)) { deserializedMonitoringInputDataBase.inputDataType = MonitoringInputDataType.fromString(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedMonitoringInputDataBase.dataContext = reader.getString(); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedMonitoringInputDataBase.columns = columns; + } else if ("dataContext".equals(fieldName)) { + deserializedMonitoringInputDataBase.dataContext = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java index 9e27f332f8b4..c99503b92762 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class MonitoringInputDataType extends ExpandableStringEnum { /** - * Static value Static for MonitoringInputDataType. + * An input data with a fixed window size. */ public static final MonitoringInputDataType STATIC = fromString("Static"); /** - * Static value Rolling for MonitoringInputDataType. + * An input data which rolls relatively to the monitor's current run time. */ public static final MonitoringInputDataType ROLLING = fromString("Rolling"); /** - * Static value Fixed for MonitoringInputDataType. + * An input data with tabular format which doesn't require preprocessing. */ public static final MonitoringInputDataType FIXED = fromString("Fixed"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java index d6b6b8fa7e01..a7e24ec90e3e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ */ public final class MonitoringNotificationType extends ExpandableStringEnum { /** - * Static value AmlNotification for MonitoringNotificationType. + * Enables email notifications through AML notifications. */ public static final MonitoringNotificationType AML_NOTIFICATION = fromString("AmlNotification"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java index 769095444e51..0d8add24dbcd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -88,14 +88,6 @@ public MonitoringSignalBase withProperties(Map properties) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java index bce3846d43f9..4976234d7ac5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,27 +12,28 @@ */ public final class MonitoringSignalType extends ExpandableStringEnum { /** - * Static value DataDrift for MonitoringSignalType. + * Tracks model input data distribution change, comparing against training data or past production data. */ public static final MonitoringSignalType DATA_DRIFT = fromString("DataDrift"); /** - * Static value PredictionDrift for MonitoringSignalType. + * Tracks prediction result data distribution change, comparing against validation/test label data or past + * production data. */ public static final MonitoringSignalType PREDICTION_DRIFT = fromString("PredictionDrift"); /** - * Static value DataQuality for MonitoringSignalType. + * Tracks model input data integrity. */ public static final MonitoringSignalType DATA_QUALITY = fromString("DataQuality"); /** - * Static value FeatureAttributionDrift for MonitoringSignalType. + * Tracks feature importance change in production, comparing against feature importance at training time. */ public static final MonitoringSignalType FEATURE_ATTRIBUTION_DRIFT = fromString("FeatureAttributionDrift"); /** - * Static value Custom for MonitoringSignalType. + * Tracks a custom signal provided by users. */ public static final MonitoringSignalType CUSTOM = fromString("Custom"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java index e3b8d2c058cf..589a56673c14 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,14 +17,14 @@ @Fluent public final class MonitoringTarget implements JsonSerializable { /* - * Reference to the model asset targeted by this monitor. + * Reference to the deployment asset targeted by this monitor. */ - private String modelId; + private String deploymentId; /* - * Reference to the deployment asset targeted by this monitor. + * Reference to the model asset targeted by this monitor. */ - private String deploymentId; + private String modelId; /* * [Required] The machine learning task type of the monitored model. @@ -39,42 +38,42 @@ public MonitoringTarget() { } /** - * Get the modelId property: Reference to the model asset targeted by this monitor. + * Get the deploymentId property: Reference to the deployment asset targeted by this monitor. * - * @return the modelId value. + * @return the deploymentId value. */ - public String modelId() { - return this.modelId; + public String deploymentId() { + return this.deploymentId; } /** - * Set the modelId property: Reference to the model asset targeted by this monitor. + * Set the deploymentId property: Reference to the deployment asset targeted by this monitor. * - * @param modelId the modelId value to set. + * @param deploymentId the deploymentId value to set. * @return the MonitoringTarget object itself. */ - public MonitoringTarget withModelId(String modelId) { - this.modelId = modelId; + public MonitoringTarget withDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; return this; } /** - * Get the deploymentId property: Reference to the deployment asset targeted by this monitor. + * Get the modelId property: Reference to the model asset targeted by this monitor. * - * @return the deploymentId value. + * @return the modelId value. */ - public String deploymentId() { - return this.deploymentId; + public String modelId() { + return this.modelId; } /** - * Set the deploymentId property: Reference to the deployment asset targeted by this monitor. + * Set the modelId property: Reference to the model asset targeted by this monitor. * - * @param deploymentId the deploymentId value to set. + * @param modelId the modelId value to set. * @return the MonitoringTarget object itself. */ - public MonitoringTarget withDeploymentId(String deploymentId) { - this.deploymentId = deploymentId; + public MonitoringTarget withModelId(String modelId) { + this.modelId = modelId; return this; } @@ -98,20 +97,6 @@ public MonitoringTarget withTaskType(ModelTaskType taskType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (taskType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property taskType in model MonitoringTarget")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MonitoringTarget.class); - /** * {@inheritDoc} */ @@ -119,8 +104,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("modelId", this.modelId); jsonWriter.writeStringField("deploymentId", this.deploymentId); + jsonWriter.writeStringField("modelId", this.modelId); return jsonWriter.writeEndObject(); } @@ -142,10 +127,10 @@ public static MonitoringTarget fromJson(JsonReader jsonReader) throws IOExceptio if ("taskType".equals(fieldName)) { deserializedMonitoringTarget.taskType = ModelTaskType.fromString(reader.getString()); - } else if ("modelId".equals(fieldName)) { - deserializedMonitoringTarget.modelId = reader.getString(); } else if ("deploymentId".equals(fieldName)) { deserializedMonitoringTarget.deploymentId = reader.getString(); + } else if ("modelId".equals(fieldName)) { + deserializedMonitoringTarget.modelId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java index 184b5ea74ded..1d69d7304424 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public MonitoringThreshold withValue(Double value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java index 6942678af7e8..eebecbc45a9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java new file mode 100644 index 000000000000..d83b30c542a8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Mount Mode. + */ +public final class MountMode extends ExpandableStringEnum { + /** + * Static value ReadOnly for MountMode. + */ + public static final MountMode READ_ONLY = fromString("ReadOnly"); + + /** + * Static value ReadWrite for MountMode. + */ + public static final MountMode READ_WRITE = fromString("ReadWrite"); + + /** + * Creates a new instance of MountMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MountMode() { + } + + /** + * Creates or finds a MountMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding MountMode. + */ + public static MountMode fromString(String name) { + return fromString(name, MountMode.class); + } + + /** + * Gets known MountMode values. + * + * @return known MountMode values. + */ + public static Collection values() { + return values(MountMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java index fbdabad2aa98..6cf1e7962ce6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java index 4819ae9be889..f42dfe8323b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,16 +61,6 @@ public Mpi withProcessCountPerInstance(Integer processCountPerInstance) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java index 7c85af83bfa9..02d72af4d971 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public NCrossValidationsMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java index f7b8e5fdc09d..aef6ec08f7d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class NCrossValidationsMode extends ExpandableStringEnum { /** - * Static value Auto for NCrossValidationsMode. + * Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task. */ public static final NCrossValidationsMode AUTO = fromString("Auto"); /** - * Static value Custom for NCrossValidationsMode. + * Use custom N-Cross validations value. */ public static final NCrossValidationsMode CUSTOM = fromString("Custom"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java index da852cefa0a9..cf27f4a112da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java new file mode 100644 index 000000000000..8a5baa5ec5d0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 NetworkAcls model. + */ +@Fluent +public final class NetworkAcls implements JsonSerializable { + /* + * The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the + * bypass property has been evaluated. + */ + private DefaultActionType defaultAction; + + /* + * Rules governing the accessibility of a resource from a specific ip address or ip range. + */ + private List ipRules; + + /** + * Creates an instance of NetworkAcls class. + */ + public NetworkAcls() { + } + + /** + * Get the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match. + * This is only used after the bypass property has been evaluated. + * + * @return the defaultAction value. + */ + public DefaultActionType defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match. + * This is only used after the bypass property has been evaluated. + * + * @param defaultAction the defaultAction value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withDefaultAction(DefaultActionType defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the ipRules property: Rules governing the accessibility of a resource from a specific ip address or ip range. + * + * @return the ipRules value. + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the ipRules property: Rules governing the accessibility of a resource from a specific ip address or ip range. + * + * @param ipRules the ipRules value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); + jsonWriter.writeArrayField("ipRules", this.ipRules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkAcls from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkAcls 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 NetworkAcls. + */ + public static NetworkAcls fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkAcls deserializedNetworkAcls = new NetworkAcls(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defaultAction".equals(fieldName)) { + deserializedNetworkAcls.defaultAction = DefaultActionType.fromString(reader.getString()); + } else if ("ipRules".equals(fieldName)) { + List ipRules = reader.readArray(reader1 -> IPRule.fromJson(reader1)); + deserializedNetworkAcls.ipRules = ipRules; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkAcls; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java deleted file mode 100644 index 1f17d8081c85..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - -/** - * Abstract class for NLP related AutoML tasks. - * NLP - Natural Language Processing. - */ -@Fluent -public class NlpVertical implements JsonSerializable { - /* - * Execution constraints for AutoMLJob. - */ - private NlpVerticalLimitSettings limitSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /** - * Creates an instance of NlpVertical class. - */ - public NlpVertical() { - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - jsonWriter.writeJsonField("validationData", this.validationData); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NlpVertical from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NlpVertical 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 NlpVertical. - */ - public static NlpVertical fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NlpVertical deserializedNlpVertical = new NlpVertical(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedNlpVertical.limitSettings = NlpVerticalLimitSettings.fromJson(reader); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedNlpVertical.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); - } else if ("validationData".equals(fieldName)) { - deserializedNlpVertical.validationData = MLTableJobInput.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNlpVertical; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java index ac035c0e317f..351ffb239876 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,16 +30,6 @@ public NlpVerticalFeaturizationSettings withDatasetLanguage(String datasetLangua return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java index fc3bb6072cb7..fd1bad8bcaf3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -19,9 +19,9 @@ @Fluent public final class NlpVerticalLimitSettings implements JsonSerializable { /* - * AutoML job timeout. + * Maximum Concurrent AutoML iterations. */ - private Duration timeout; + private Integer maxConcurrentTrials; /* * Number of AutoML iterations. @@ -29,9 +29,9 @@ public final class NlpVerticalLimitSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); + if ("maxConcurrentTrials".equals(fieldName)) { + deserializedNlpVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); } else if ("maxTrials".equals(fieldName)) { deserializedNlpVerticalLimitSettings.maxTrials = reader.getNullable(JsonReader::getInt); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedNlpVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); + } else if ("timeout".equals(fieldName)) { + deserializedNlpVerticalLimitSettings.timeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java index 9585317b1bd0..d956917ceb87 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java index f18e968373d1..38178d54141b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,31 +17,43 @@ @Immutable public final class NodeStateCounts implements JsonSerializable { /* + * Idle node count. + * * Number of compute nodes in idle state. */ private Integer idleNodeCount; /* + * Running node count. + * * Number of compute nodes which are running jobs. */ private Integer runningNodeCount; /* + * Preparing node count. + * * Number of compute nodes which are being prepared. */ private Integer preparingNodeCount; /* + * Unusable node count. + * * Number of compute nodes which are in unusable state. */ private Integer unusableNodeCount; /* + * Leaving node count. + * * Number of compute nodes which are leaving the amlCompute. */ private Integer leavingNodeCount; /* + * Preempted node count. + * * Number of compute nodes which are in preempted state. */ private Integer preemptedNodeCount; @@ -49,11 +61,13 @@ public final class NodeStateCounts implements JsonSerializable /** * Creates an instance of NodeStateCounts class. */ - public NodeStateCounts() { + private NodeStateCounts() { } /** - * Get the idleNodeCount property: Number of compute nodes in idle state. + * Get the idleNodeCount property: Idle node count. + * + * Number of compute nodes in idle state. * * @return the idleNodeCount value. */ @@ -62,7 +76,9 @@ public Integer idleNodeCount() { } /** - * Get the runningNodeCount property: Number of compute nodes which are running jobs. + * Get the runningNodeCount property: Running node count. + * + * Number of compute nodes which are running jobs. * * @return the runningNodeCount value. */ @@ -71,7 +87,9 @@ public Integer runningNodeCount() { } /** - * Get the preparingNodeCount property: Number of compute nodes which are being prepared. + * Get the preparingNodeCount property: Preparing node count. + * + * Number of compute nodes which are being prepared. * * @return the preparingNodeCount value. */ @@ -80,7 +98,9 @@ public Integer preparingNodeCount() { } /** - * Get the unusableNodeCount property: Number of compute nodes which are in unusable state. + * Get the unusableNodeCount property: Unusable node count. + * + * Number of compute nodes which are in unusable state. * * @return the unusableNodeCount value. */ @@ -89,7 +109,9 @@ public Integer unusableNodeCount() { } /** - * Get the leavingNodeCount property: Number of compute nodes which are leaving the amlCompute. + * Get the leavingNodeCount property: Leaving node count. + * + * Number of compute nodes which are leaving the amlCompute. * * @return the leavingNodeCount value. */ @@ -98,7 +120,9 @@ public Integer leavingNodeCount() { } /** - * Get the preemptedNodeCount property: Number of compute nodes which are in preempted state. + * Get the preemptedNodeCount property: Preempted node count. + * + * Number of compute nodes which are in preempted state. * * @return the preemptedNodeCount value. */ @@ -106,14 +130,6 @@ public Integer preemptedNodeCount() { return this.preemptedNodeCount; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java index 7fa852b13a2d..4faf8584d703 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public NodesValueType nodesValueType() { return this.nodesValueType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java index c6e506e0f89b..12b95ef0ea1a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java index 1fbdf1bc301a..aaa3130a69d5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -25,16 +25,6 @@ public final class NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceCo */ private ConnectionAuthType authType = ConnectionAuthType.NONE; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of NoneAuthTypeWorkspaceConnectionProperties class. */ @@ -52,31 +42,20 @@ public ConnectionAuthType authType() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public NoneAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -102,8 +81,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSha * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public NoneAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -111,8 +90,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public NoneAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -120,8 +99,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withMetadata(Map sharedUserList) { - super.withSharedUserList(sharedUserList); + public NoneAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -129,8 +108,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public NoneAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -138,19 +117,19 @@ public NoneAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public NoneAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -160,15 +139,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); return jsonWriter.writeEndObject(); } @@ -193,29 +174,36 @@ public static NoneAuthTypeWorkspaceConnectionProperties fromJson(JsonReader json deserializedNoneAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedNoneAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedNoneAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java index 1181f7139943..479e62c13fdb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public CredentialsType credentialsType() { return this.credentialsType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java index 16f860733f31..2d88f164b305 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,46 +11,39 @@ */ public interface NotebookAccessTokenResult { /** - * Gets the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - String notebookResourceId(); - - /** - * Gets the hostname property: The hostName property. + * Gets the accessToken property: The accessToken property. * - * @return the hostname value. + * @return the accessToken value. */ - String hostname(); + String accessToken(); /** - * Gets the publicDns property: The publicDns property. + * Gets the expiresIn property: The expiresIn property. * - * @return the publicDns value. + * @return the expiresIn value. */ - String publicDns(); + Integer expiresIn(); /** - * Gets the accessToken property: The accessToken property. + * Gets the hostname property: The hostName property. * - * @return the accessToken value. + * @return the hostname value. */ - String accessToken(); + String hostname(); /** - * Gets the tokenType property: The tokenType property. + * Gets the notebookResourceId property: The notebookResourceId property. * - * @return the tokenType value. + * @return the notebookResourceId value. */ - String tokenType(); + String notebookResourceId(); /** - * Gets the expiresIn property: The expiresIn property. + * Gets the publicDns property: The publicDns property. * - * @return the expiresIn value. + * @return the publicDns value. */ - Integer expiresIn(); + String publicDns(); /** * Gets the refreshToken property: The refreshToken property. @@ -66,6 +59,13 @@ public interface NotebookAccessTokenResult { */ String scope(); + /** + * Gets the tokenType property: The tokenType property. + * + * @return the tokenType value. + */ + String tokenType(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java index f68e7d296588..623c4b1ff4dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The NotebookPreparationError model. */ -@Fluent +@Immutable public final class NotebookPreparationError implements JsonSerializable { /* * The errorMessage property. @@ -29,7 +29,7 @@ public final class NotebookPreparationError implements JsonSerializable { /* - * This is the email recipient list which has a limitation of 499 characters in total concat with comma separator + * Send email notification to user on specified notification type */ - private List emails; + private List emailOn; /* - * Send email notification to user on specified notification type + * This is the email recipient list which has a limitation of 499 characters in total concat with comma separator */ - private List emailOn; + private List emails; /* * Send webhook callback to a service. Key is a user-provided name for the webhook. @@ -40,44 +40,44 @@ public NotificationSetting() { } /** - * Get the emails property: This is the email recipient list which has a limitation of 499 characters in total - * concat with comma separator. + * Get the emailOn property: Send email notification to user on specified notification type. * - * @return the emails value. + * @return the emailOn value. */ - public List emails() { - return this.emails; + public List emailOn() { + return this.emailOn; } /** - * Set the emails property: This is the email recipient list which has a limitation of 499 characters in total - * concat with comma separator. + * Set the emailOn property: Send email notification to user on specified notification type. * - * @param emails the emails value to set. + * @param emailOn the emailOn value to set. * @return the NotificationSetting object itself. */ - public NotificationSetting withEmails(List emails) { - this.emails = emails; + public NotificationSetting withEmailOn(List emailOn) { + this.emailOn = emailOn; return this; } /** - * Get the emailOn property: Send email notification to user on specified notification type. + * Get the emails property: This is the email recipient list which has a limitation of 499 characters in total + * concat with comma separator. * - * @return the emailOn value. + * @return the emails value. */ - public List emailOn() { - return this.emailOn; + public List emails() { + return this.emails; } /** - * Set the emailOn property: Send email notification to user on specified notification type. + * Set the emails property: This is the email recipient list which has a limitation of 499 characters in total + * concat with comma separator. * - * @param emailOn the emailOn value to set. + * @param emails the emails value to set. * @return the NotificationSetting object itself. */ - public NotificationSetting withEmailOn(List emailOn) { - this.emailOn = emailOn; + public NotificationSetting withEmails(List emails) { + this.emails = emails; return this; } @@ -101,30 +101,15 @@ public NotificationSetting withWebhooks(Map webhooks) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (webhooks() != null) { - webhooks().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("emails", this.emails, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("emailOn", this.emailOn, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("emails", this.emails, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("webhooks", this.webhooks, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -144,13 +129,13 @@ public static NotificationSetting fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("emails".equals(fieldName)) { - List emails = reader.readArray(reader1 -> reader1.getString()); - deserializedNotificationSetting.emails = emails; - } else if ("emailOn".equals(fieldName)) { + if ("emailOn".equals(fieldName)) { List emailOn = reader.readArray(reader1 -> EmailNotificationEnableType.fromString(reader1.getString())); deserializedNotificationSetting.emailOn = emailOn; + } else if ("emails".equals(fieldName)) { + List emails = reader.readArray(reader1 -> reader1.getString()); + deserializedNotificationSetting.emails = emails; } else if ("webhooks".equals(fieldName)) { Map webhooks = reader.readMap(reader1 -> Webhook.fromJson(reader1)); deserializedNotificationSetting.webhooks = webhooks; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java index a35da18f7bcb..5c0ede84a5c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,23 +12,23 @@ */ public final class NumericalDataDriftMetric extends ExpandableStringEnum { /** - * Static value JensenShannonDistance for NumericalDataDriftMetric. + * The Jensen Shannon Distance (JSD) metric. */ public static final NumericalDataDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); /** - * Static value PopulationStabilityIndex for NumericalDataDriftMetric. + * The Population Stability Index (PSI) metric. */ public static final NumericalDataDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); /** - * Static value NormalizedWassersteinDistance for NumericalDataDriftMetric. + * The Normalized Wasserstein Distance metric. */ public static final NumericalDataDriftMetric NORMALIZED_WASSERSTEIN_DISTANCE = fromString("NormalizedWassersteinDistance"); /** - * Static value TwoSampleKolmogorovSmirnovTest for NumericalDataDriftMetric. + * The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. */ public static final NumericalDataDriftMetric TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST = fromString("TwoSampleKolmogorovSmirnovTest"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java index 8d04f58ba940..c6eab77eef55 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -71,23 +70,6 @@ public NumericalDataDriftMetricThreshold withThreshold(MonitoringThreshold thres return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model NumericalDataDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NumericalDataDriftMetricThreshold.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java index cb11945fcfa3..540ae7117cf1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class NumericalDataQualityMetric extends ExpandableStringEnum { /** - * Static value NullValueRate for NumericalDataQualityMetric. + * Calculates the rate of null values. */ public static final NumericalDataQualityMetric NULL_VALUE_RATE = fromString("NullValueRate"); /** - * Static value DataTypeErrorRate for NumericalDataQualityMetric. + * Calculates the rate of data type errors. */ public static final NumericalDataQualityMetric DATA_TYPE_ERROR_RATE = fromString("DataTypeErrorRate"); /** - * Static value OutOfBoundsRate for NumericalDataQualityMetric. + * Calculates the rate values are out of bounds. */ public static final NumericalDataQualityMetric OUT_OF_BOUNDS_RATE = fromString("OutOfBoundsRate"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java index 52d7eb95ec72..f6cd90b573ef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -71,23 +70,6 @@ public NumericalDataQualityMetricThreshold withThreshold(MonitoringThreshold thr return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model NumericalDataQualityMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NumericalDataQualityMetricThreshold.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java index 379949abac71..b0efaac3b9ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,24 +12,24 @@ */ public final class NumericalPredictionDriftMetric extends ExpandableStringEnum { /** - * Static value JensenShannonDistance for NumericalPredictionDriftMetric. + * The Jensen Shannon Distance (JSD) metric. */ public static final NumericalPredictionDriftMetric JENSEN_SHANNON_DISTANCE = fromString("JensenShannonDistance"); /** - * Static value PopulationStabilityIndex for NumericalPredictionDriftMetric. + * The Population Stability Index (PSI) metric. */ public static final NumericalPredictionDriftMetric POPULATION_STABILITY_INDEX = fromString("PopulationStabilityIndex"); /** - * Static value NormalizedWassersteinDistance for NumericalPredictionDriftMetric. + * The Normalized Wasserstein Distance metric. */ public static final NumericalPredictionDriftMetric NORMALIZED_WASSERSTEIN_DISTANCE = fromString("NormalizedWassersteinDistance"); /** - * Static value TwoSampleKolmogorovSmirnovTest for NumericalPredictionDriftMetric. + * The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric. */ public static final NumericalPredictionDriftMetric TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST = fromString("TwoSampleKolmogorovSmirnovTest"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java index e56d7ca78a4e..872a801f2109 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -71,23 +70,6 @@ public NumericalPredictionDriftMetricThreshold withThreshold(MonitoringThreshold return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metric in model NumericalPredictionDriftMetricThreshold")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(NumericalPredictionDriftMetricThreshold.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java index 3cf0c81e54c4..c6c4b1b85053 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -26,21 +26,10 @@ public final class OAuth2AuthTypeWorkspaceConnectionProperties extends Workspace private ConnectionAuthType authType = ConnectionAuthType.OAUTH2; /* - * ClientId and ClientSecret are required. Other properties are optional - * depending on each OAuth2 provider's implementation. + * The credentials property. */ private WorkspaceConnectionOAuth2 credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of OAuth2AuthTypeWorkspaceConnectionProperties class. */ @@ -58,8 +47,7 @@ public ConnectionAuthType authType() { } /** - * Get the credentials property: ClientId and ClientSecret are required. Other properties are optional - * depending on each OAuth2 provider's implementation. + * Get the credentials property: The credentials property. * * @return the credentials value. */ @@ -68,8 +56,7 @@ public WorkspaceConnectionOAuth2 credentials() { } /** - * Set the credentials property: ClientId and ClientSecret are required. Other properties are optional - * depending on each OAuth2 provider's implementation. + * Set the credentials property: The credentials property. * * @param credentials the credentials value to set. * @return the OAuth2AuthTypeWorkspaceConnectionProperties object itself. @@ -80,31 +67,20 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConn } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public OAuth2AuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public OAuth2AuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -130,8 +106,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isS * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public OAuth2AuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -139,8 +115,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public OAuth2AuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -148,8 +124,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withMetadata(Map sharedUserList) { - super.withSharedUserList(sharedUserList); + public OAuth2AuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -157,8 +133,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -166,22 +142,19 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public OAuth2AuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public OAuth2AuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -191,15 +164,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -225,30 +200,36 @@ public static OAuth2AuthTypeWorkspaceConnectionProperties fromJson(JsonReader js deserializedOAuth2AuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java index 557f041b4d35..109ec45cd7cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,8 @@ */ public final class ObjectDetectionPrimaryMetrics extends ExpandableStringEnum { /** - * Static value MeanAveragePrecision for ObjectDetectionPrimaryMetrics. + * Mean Average Precision (MAP) is the average of AP (Average Precision). + * AP is calculated for each class and averaged to get the MAP. */ public static final ObjectDetectionPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java index 37c64b9ec66e..d825b84a26d6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,14 +17,14 @@ @Fluent public final class Objective implements JsonSerializable { /* - * [Required] Name of the metric to optimize. + * [Required] Defines supported metric goals for hyperparameter tuning */ - private String primaryMetric; + private Goal goal; /* - * [Required] Defines supported metric goals for hyperparameter tuning + * [Required] Name of the metric to optimize. */ - private Goal goal; + private String primaryMetric; /** * Creates an instance of Objective class. @@ -33,26 +32,6 @@ public final class Objective implements JsonSerializable { public Objective() { } - /** - * Get the primaryMetric property: [Required] Name of the metric to optimize. - * - * @return the primaryMetric value. - */ - public String primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: [Required] Name of the metric to optimize. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Objective object itself. - */ - public Objective withPrimaryMetric(String primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - /** * Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning. * @@ -74,22 +53,24 @@ public Objective withGoal(Goal goal) { } /** - * Validates the instance. + * Get the primaryMetric property: [Required] Name of the metric to optimize. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the primaryMetric value. */ - public void validate() { - if (primaryMetric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property primaryMetric in model Objective")); - } - if (goal() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property goal in model Objective")); - } + public String primaryMetric() { + return this.primaryMetric; } - private static final ClientLogger LOGGER = new ClientLogger(Objective.class); + /** + * Set the primaryMetric property: [Required] Name of the metric to optimize. + * + * @param primaryMetric the primaryMetric value to set. + * @return the Objective object itself. + */ + public Objective withPrimaryMetric(String primaryMetric) { + this.primaryMetric = primaryMetric; + return this; + } /** * {@inheritDoc} @@ -97,8 +78,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric); jsonWriter.writeStringField("goal", this.goal == null ? null : this.goal.toString()); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric); return jsonWriter.writeEndObject(); } @@ -118,10 +99,10 @@ public static Objective fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("primaryMetric".equals(fieldName)) { - deserializedObjective.primaryMetric = reader.getString(); - } else if ("goal".equals(fieldName)) { + if ("goal".equals(fieldName)) { deserializedObjective.goal = Goal.fromString(reader.getString()); + } else if ("primaryMetric".equals(fieldName)) { + deserializedObjective.primaryMetric = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java index 6fcf7216d782..bf5bebd7001c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,20 +61,6 @@ public OneLakeArtifact withArtifactName(String artifactName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (artifactName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property artifactName in model OneLakeArtifact")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OneLakeArtifact.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java index 20461e8621f0..1d0b32b3d773 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java index 2a03ab3c93fa..67829a766c54 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,7 +17,7 @@ @Fluent public final class OneLakeDatastore extends DatastoreProperties { /* - * [Required] Storage type backing the datastore. + * Enum to determine the datastore contents type. */ private DatastoreType datastoreType = DatastoreType.ONE_LAKE; @@ -27,25 +26,20 @@ public final class OneLakeDatastore extends DatastoreProperties { */ private OneLakeArtifact artifact; - /* - * [Required] OneLake workspace name. - */ - private String oneLakeWorkspaceName; - /* * OneLake endpoint to use for the datastore. */ private String endpoint; /* - * Indicates which identity to use to authenticate service data access to customer's storage. + * [Required] OneLake workspace name. */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + private String oneLakeWorkspaceName; /* - * Readonly property to indicate if datastore is the workspace default datastore + * Indicates which identity to use to authenticate service data access to customer's storage. */ - private Boolean isDefault; + private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; /** * Creates an instance of OneLakeDatastore class. @@ -54,7 +48,7 @@ public OneLakeDatastore() { } /** - * Get the datastoreType property: [Required] Storage type backing the datastore. + * Get the datastoreType property: Enum to determine the datastore contents type. * * @return the datastoreType value. */ @@ -84,42 +78,42 @@ public OneLakeDatastore withArtifact(OneLakeArtifact artifact) { } /** - * Get the oneLakeWorkspaceName property: [Required] OneLake workspace name. + * Get the endpoint property: OneLake endpoint to use for the datastore. * - * @return the oneLakeWorkspaceName value. + * @return the endpoint value. */ - public String oneLakeWorkspaceName() { - return this.oneLakeWorkspaceName; + public String endpoint() { + return this.endpoint; } /** - * Set the oneLakeWorkspaceName property: [Required] OneLake workspace name. + * Set the endpoint property: OneLake endpoint to use for the datastore. * - * @param oneLakeWorkspaceName the oneLakeWorkspaceName value to set. + * @param endpoint the endpoint value to set. * @return the OneLakeDatastore object itself. */ - public OneLakeDatastore withOneLakeWorkspaceName(String oneLakeWorkspaceName) { - this.oneLakeWorkspaceName = oneLakeWorkspaceName; + public OneLakeDatastore withEndpoint(String endpoint) { + this.endpoint = endpoint; return this; } /** - * Get the endpoint property: OneLake endpoint to use for the datastore. + * Get the oneLakeWorkspaceName property: [Required] OneLake workspace name. * - * @return the endpoint value. + * @return the oneLakeWorkspaceName value. */ - public String endpoint() { - return this.endpoint; + public String oneLakeWorkspaceName() { + return this.oneLakeWorkspaceName; } /** - * Set the endpoint property: OneLake endpoint to use for the datastore. + * Set the oneLakeWorkspaceName property: [Required] OneLake workspace name. * - * @param endpoint the endpoint value to set. + * @param oneLakeWorkspaceName the oneLakeWorkspaceName value to set. * @return the OneLakeDatastore object itself. */ - public OneLakeDatastore withEndpoint(String endpoint) { - this.endpoint = endpoint; + public OneLakeDatastore withOneLakeWorkspaceName(String oneLakeWorkspaceName) { + this.oneLakeWorkspaceName = oneLakeWorkspaceName; return this; } @@ -146,16 +140,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { return this; } - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - /** * {@inheritDoc} */ @@ -174,15 +158,6 @@ public OneLakeDatastore withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public OneLakeDatastore withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -193,28 +168,14 @@ public OneLakeDatastore withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (artifact() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property artifact in model OneLakeDatastore")); - } else { - artifact().validate(); - } - if (oneLakeWorkspaceName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property oneLakeWorkspaceName in model OneLakeDatastore")); - } + public OneLakeDatastore withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(OneLakeDatastore.class); - /** * {@inheritDoc} */ @@ -223,8 +184,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("artifact", this.artifact); jsonWriter.writeStringField("oneLakeWorkspaceName", this.oneLakeWorkspaceName); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); @@ -254,14 +215,14 @@ public static OneLakeDatastore fromJson(JsonReader jsonReader) throws IOExceptio deserializedOneLakeDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedOneLakeDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOneLakeDatastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedOneLakeDatastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedOneLakeDatastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedOneLakeDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedOneLakeDatastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("artifact".equals(fieldName)) { deserializedOneLakeDatastore.artifact = OneLakeArtifact.fromJson(reader); } else if ("oneLakeWorkspaceName".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java index b4f98e370386..aa5f3dad8863 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -58,19 +58,19 @@ public interface OnlineDeployment { OnlineDeploymentProperties properties(); /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - String kind(); + ManagedServiceIdentity identity(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - ManagedServiceIdentity identity(); + String kind(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -160,8 +160,8 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName, endpointName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @return the next definition stage. */ WithProperties withExistingOnlineEndpoint(String resourceGroupName, String workspaceName, @@ -185,8 +185,8 @@ interface WithProperties { * The stage of the OnlineDeployment 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -217,32 +217,32 @@ interface WithTags { } /** - * The stage of the OnlineDeployment definition allowing to specify kind. + * The stage of the OnlineDeployment definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the OnlineDeployment definition allowing to specify identity. + * The stage of the OnlineDeployment definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java index e7618bb4711e..57748781a9f9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,27 +22,24 @@ public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase private EndpointComputeType endpointComputeType = EndpointComputeType.fromString("OnlineDeploymentProperties"); /* - * Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. + * If true, enables Application Insights logging. */ - private OnlineScaleSettings scaleSettings; + private Boolean appInsightsEnabled; /* - * Request settings for the deployment. + * The mdc configuration, we disable mdc when it's null. */ - private OnlineRequestSettings requestSettings; + private DataCollector dataCollector; /* - * The path to mount the model in custom container. + * Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. */ - private String modelMountPath; + private EgressPublicNetworkAccessType egressPublicNetworkAccess; /* - * If true, enables Application Insights logging. + * Compute instance type. Default: Standard_F4s_v2. */ - private Boolean appInsightsEnabled; + private String instanceType; /* * Liveness probe monitors the health of the container regularly. @@ -50,10 +47,14 @@ public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase private ProbeSettings livenessProbe; /* - * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as - * liveness probe. + * The URI path to the model. */ - private ProbeSettings readinessProbe; + private String model; + + /* + * The path to mount the model in custom container. + */ + private String modelMountPath; /* * Provisioning state for the endpoint deployment. @@ -61,24 +62,28 @@ public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase private DeploymentProvisioningState provisioningState; /* - * Compute instance type. + * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as + * liveness probe. */ - private String instanceType; + private ProbeSettings readinessProbe; /* - * The URI path to the model. + * Request settings for the deployment. */ - private String model; + private OnlineRequestSettings requestSettings; /* - * If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + * Scale settings for the deployment. + * If it is null or not provided, + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + * and to DefaultScaleSettings for ManagedOnlineDeployment. */ - private EgressPublicNetworkAccessType egressPublicNetworkAccess; + private OnlineScaleSettings scaleSettings; /* - * The mdc configuration, we disable mdc when it's null. + * Startup probe verify whether an application within a container has started successfully. */ - private DataCollector dataCollector; + private ProbeSettings startupProbe; /** * Creates an instance of OnlineDeploymentProperties class. @@ -96,88 +101,85 @@ public EndpointComputeType endpointComputeType() { } /** - * Get the scaleSettings property: Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. + * Get the appInsightsEnabled property: If true, enables Application Insights logging. * - * @return the scaleSettings value. + * @return the appInsightsEnabled value. */ - public OnlineScaleSettings scaleSettings() { - return this.scaleSettings; + public Boolean appInsightsEnabled() { + return this.appInsightsEnabled; } /** - * Set the scaleSettings property: Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. + * Set the appInsightsEnabled property: If true, enables Application Insights logging. * - * @param scaleSettings the scaleSettings value to set. + * @param appInsightsEnabled the appInsightsEnabled value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; + public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnabled) { + this.appInsightsEnabled = appInsightsEnabled; return this; } /** - * Get the requestSettings property: Request settings for the deployment. + * Get the dataCollector property: The mdc configuration, we disable mdc when it's null. * - * @return the requestSettings value. + * @return the dataCollector value. */ - public OnlineRequestSettings requestSettings() { - return this.requestSettings; + public DataCollector dataCollector() { + return this.dataCollector; } /** - * Set the requestSettings property: Request settings for the deployment. + * Set the dataCollector property: The mdc configuration, we disable mdc when it's null. * - * @param requestSettings the requestSettings value to set. + * @param dataCollector the dataCollector value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withRequestSettings(OnlineRequestSettings requestSettings) { - this.requestSettings = requestSettings; + public OnlineDeploymentProperties withDataCollector(DataCollector dataCollector) { + this.dataCollector = dataCollector; return this; } /** - * Get the modelMountPath property: The path to mount the model in custom container. + * Get the egressPublicNetworkAccess property: Enum to determine whether PublicNetworkAccess is Enabled or Disabled + * for egress of a deployment. * - * @return the modelMountPath value. + * @return the egressPublicNetworkAccess value. */ - public String modelMountPath() { - return this.modelMountPath; + public EgressPublicNetworkAccessType egressPublicNetworkAccess() { + return this.egressPublicNetworkAccess; } /** - * Set the modelMountPath property: The path to mount the model in custom container. + * Set the egressPublicNetworkAccess property: Enum to determine whether PublicNetworkAccess is Enabled or Disabled + * for egress of a deployment. * - * @param modelMountPath the modelMountPath value to set. + * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { - this.modelMountPath = modelMountPath; + public OnlineDeploymentProperties + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { + this.egressPublicNetworkAccess = egressPublicNetworkAccess; return this; } /** - * Get the appInsightsEnabled property: If true, enables Application Insights logging. + * Get the instanceType property: Compute instance type. Default: Standard_F4s_v2. * - * @return the appInsightsEnabled value. + * @return the instanceType value. */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; + public String instanceType() { + return this.instanceType; } /** - * Set the appInsightsEnabled property: If true, enables Application Insights logging. + * Set the instanceType property: Compute instance type. Default: Standard_F4s_v2. * - * @param appInsightsEnabled the appInsightsEnabled value to set. + * @param instanceType the instanceType value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; + public OnlineDeploymentProperties withInstanceType(String instanceType) { + this.instanceType = instanceType; return this; } @@ -202,24 +204,42 @@ public OnlineDeploymentProperties withLivenessProbe(ProbeSettings livenessProbe) } /** - * Get the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The - * properties and defaults are the same as liveness probe. + * Get the model property: The URI path to the model. * - * @return the readinessProbe value. + * @return the model value. */ - public ProbeSettings readinessProbe() { - return this.readinessProbe; + public String model() { + return this.model; } /** - * Set the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The - * properties and defaults are the same as liveness probe. + * Set the model property: The URI path to the model. * - * @param readinessProbe the readinessProbe value to set. + * @param model the model value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withReadinessProbe(ProbeSettings readinessProbe) { - this.readinessProbe = readinessProbe; + public OnlineDeploymentProperties withModel(String model) { + this.model = model; + return this; + } + + /** + * Get the modelMountPath property: The path to mount the model in custom container. + * + * @return the modelMountPath value. + */ + public String modelMountPath() { + return this.modelMountPath; + } + + /** + * Set the modelMountPath property: The path to mount the model in custom container. + * + * @param modelMountPath the modelMountPath value to set. + * @return the OnlineDeploymentProperties object itself. + */ + public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { + this.modelMountPath = modelMountPath; return this; } @@ -244,94 +264,92 @@ OnlineDeploymentProperties withProvisioningState(DeploymentProvisioningState pro } /** - * Get the instanceType property: Compute instance type. + * Get the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The + * properties and defaults are the same as liveness probe. * - * @return the instanceType value. + * @return the readinessProbe value. */ - public String instanceType() { - return this.instanceType; + public ProbeSettings readinessProbe() { + return this.readinessProbe; } /** - * Set the instanceType property: Compute instance type. + * Set the readinessProbe property: Readiness probe validates if the container is ready to serve traffic. The + * properties and defaults are the same as liveness probe. * - * @param instanceType the instanceType value to set. + * @param readinessProbe the readinessProbe value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withInstanceType(String instanceType) { - this.instanceType = instanceType; + public OnlineDeploymentProperties withReadinessProbe(ProbeSettings readinessProbe) { + this.readinessProbe = readinessProbe; return this; } /** - * Get the model property: The URI path to the model. + * Get the requestSettings property: Request settings for the deployment. * - * @return the model value. + * @return the requestSettings value. */ - public String model() { - return this.model; + public OnlineRequestSettings requestSettings() { + return this.requestSettings; } /** - * Set the model property: The URI path to the model. + * Set the requestSettings property: Request settings for the deployment. * - * @param model the model value to set. + * @param requestSettings the requestSettings value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withModel(String model) { - this.model = model; + public OnlineDeploymentProperties withRequestSettings(OnlineRequestSettings requestSettings) { + this.requestSettings = requestSettings; return this; } /** - * Get the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. + * Get the scaleSettings property: Scale settings for the deployment. + * If it is null or not provided, + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + * and to DefaultScaleSettings for ManagedOnlineDeployment. * - * @return the egressPublicNetworkAccess value. + * @return the scaleSettings value. */ - public EgressPublicNetworkAccessType egressPublicNetworkAccess() { - return this.egressPublicNetworkAccess; + public OnlineScaleSettings scaleSettings() { + return this.scaleSettings; } /** - * Set the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. + * Set the scaleSettings property: Scale settings for the deployment. + * If it is null or not provided, + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + * and to DefaultScaleSettings for ManagedOnlineDeployment. * - * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. + * @param scaleSettings the scaleSettings value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - this.egressPublicNetworkAccess = egressPublicNetworkAccess; + public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSettings) { + this.scaleSettings = scaleSettings; return this; } /** - * Get the dataCollector property: The mdc configuration, we disable mdc when it's null. + * Get the startupProbe property: Startup probe verify whether an application within a container has started + * successfully. * - * @return the dataCollector value. + * @return the startupProbe value. */ - public DataCollector dataCollector() { - return this.dataCollector; + public ProbeSettings startupProbe() { + return this.startupProbe; } /** - * Set the dataCollector property: The mdc configuration, we disable mdc when it's null. + * Set the startupProbe property: Startup probe verify whether an application within a container has started + * successfully. * - * @param dataCollector the dataCollector value to set. + * @param startupProbe the startupProbe value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withDataCollector(DataCollector dataCollector) { - this.dataCollector = dataCollector; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public OnlineDeploymentProperties withDescription(String description) { - super.withDescription(description); + public OnlineDeploymentProperties withStartupProbe(ProbeSettings startupProbe) { + this.startupProbe = startupProbe; return this; } @@ -339,8 +357,8 @@ public OnlineDeploymentProperties withDescription(String description) { * {@inheritDoc} */ @Override - public OnlineDeploymentProperties withProperties(Map properties) { - super.withProperties(properties); + public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -348,8 +366,8 @@ public OnlineDeploymentProperties withProperties(Map properties) * {@inheritDoc} */ @Override - public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public OnlineDeploymentProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -372,28 +390,12 @@ public OnlineDeploymentProperties withEnvironmentVariables(Map e } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (requestSettings() != null) { - requestSettings().validate(); - } - if (livenessProbe() != null) { - livenessProbe().validate(); - } - if (readinessProbe() != null) { - readinessProbe().validate(); - } - if (dataCollector() != null) { - dataCollector().validate(); - } + public OnlineDeploymentProperties withProperties(Map properties) { + super.withProperties(properties); + return this; } /** @@ -402,25 +404,26 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("endpointComputeType", this.endpointComputeType == null ? null : this.endpointComputeType.toString()); - jsonWriter.writeJsonField("scaleSettings", this.scaleSettings); - jsonWriter.writeJsonField("requestSettings", this.requestSettings); - jsonWriter.writeStringField("modelMountPath", this.modelMountPath); jsonWriter.writeBooleanField("appInsightsEnabled", this.appInsightsEnabled); - jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); - jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("model", this.model); + jsonWriter.writeJsonField("dataCollector", this.dataCollector); jsonWriter.writeStringField("egressPublicNetworkAccess", this.egressPublicNetworkAccess == null ? null : this.egressPublicNetworkAccess.toString()); - jsonWriter.writeJsonField("dataCollector", this.dataCollector); + jsonWriter.writeStringField("instanceType", this.instanceType); + jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); + jsonWriter.writeStringField("model", this.model); + jsonWriter.writeStringField("modelMountPath", this.modelMountPath); + jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); + jsonWriter.writeJsonField("requestSettings", this.requestSettings); + jsonWriter.writeJsonField("scaleSettings", this.scaleSettings); + jsonWriter.writeJsonField("startupProbe", this.startupProbe); return jsonWriter.writeEndObject(); } @@ -466,46 +469,48 @@ static OnlineDeploymentProperties fromJsonKnownDiscriminator(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedOnlineDeploymentProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedOnlineDeploymentProperties.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedOnlineDeploymentProperties.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedOnlineDeploymentProperties.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedOnlineDeploymentProperties.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedOnlineDeploymentProperties.withEnvironmentVariables(environmentVariables); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedOnlineDeploymentProperties.withProperties(properties); } else if ("endpointComputeType".equals(fieldName)) { deserializedOnlineDeploymentProperties.endpointComputeType = EndpointComputeType.fromString(reader.getString()); - } else if ("scaleSettings".equals(fieldName)) { - deserializedOnlineDeploymentProperties.scaleSettings = OnlineScaleSettings.fromJson(reader); - } else if ("requestSettings".equals(fieldName)) { - deserializedOnlineDeploymentProperties.requestSettings = OnlineRequestSettings.fromJson(reader); - } else if ("modelMountPath".equals(fieldName)) { - deserializedOnlineDeploymentProperties.modelMountPath = reader.getString(); } else if ("appInsightsEnabled".equals(fieldName)) { deserializedOnlineDeploymentProperties.appInsightsEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("dataCollector".equals(fieldName)) { + deserializedOnlineDeploymentProperties.dataCollector = DataCollector.fromJson(reader); + } else if ("egressPublicNetworkAccess".equals(fieldName)) { + deserializedOnlineDeploymentProperties.egressPublicNetworkAccess + = EgressPublicNetworkAccessType.fromString(reader.getString()); + } else if ("instanceType".equals(fieldName)) { + deserializedOnlineDeploymentProperties.instanceType = reader.getString(); } else if ("livenessProbe".equals(fieldName)) { deserializedOnlineDeploymentProperties.livenessProbe = ProbeSettings.fromJson(reader); - } else if ("readinessProbe".equals(fieldName)) { - deserializedOnlineDeploymentProperties.readinessProbe = ProbeSettings.fromJson(reader); + } else if ("model".equals(fieldName)) { + deserializedOnlineDeploymentProperties.model = reader.getString(); + } else if ("modelMountPath".equals(fieldName)) { + deserializedOnlineDeploymentProperties.modelMountPath = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedOnlineDeploymentProperties.provisioningState = DeploymentProvisioningState.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedOnlineDeploymentProperties.instanceType = reader.getString(); - } else if ("model".equals(fieldName)) { - deserializedOnlineDeploymentProperties.model = reader.getString(); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { - deserializedOnlineDeploymentProperties.egressPublicNetworkAccess - = EgressPublicNetworkAccessType.fromString(reader.getString()); - } else if ("dataCollector".equals(fieldName)) { - deserializedOnlineDeploymentProperties.dataCollector = DataCollector.fromJson(reader); + } else if ("readinessProbe".equals(fieldName)) { + deserializedOnlineDeploymentProperties.readinessProbe = ProbeSettings.fromJson(reader); + } else if ("requestSettings".equals(fieldName)) { + deserializedOnlineDeploymentProperties.requestSettings = OnlineRequestSettings.fromJson(reader); + } else if ("scaleSettings".equals(fieldName)) { + deserializedOnlineDeploymentProperties.scaleSettings = OnlineScaleSettings.fromJson(reader); + } else if ("startupProbe".equals(fieldName)) { + deserializedOnlineDeploymentProperties.startupProbe = ProbeSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java index 99cbd345a1aa..b9dc4d2c3c97 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,42 +13,41 @@ */ public interface OnlineDeployments { /** - * List Inference Endpoint Deployments. + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. + * @return inference Deployment Deployment along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + String deploymentName, Context context); /** - * List Inference Endpoint Deployments. + * Get Inference Deployment Deployment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. + * @return inference Deployment Deployment. */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, - String orderBy, Integer top, String skip, Context context); + OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); /** * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -60,8 +59,8 @@ PagedIterable list(String resourceGroupName, String workspaceN * Delete Inference Endpoint Deployment (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,42 +71,43 @@ void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Get Inference Deployment Deployment. + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. + * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - String deploymentName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); /** - * Get Inference Deployment Deployment. + * List Inference Endpoint Deployments. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param orderBy Ordering of list. + * @param top Top of list. + * @param skip Continuation token for pagination. + * @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 inference Deployment Deployment. + * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. */ - OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); + PagedIterable list(String resourceGroupName, String workspaceName, String endpointName, + String orderBy, Integer top, String skip, Context context); /** * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,9 +122,9 @@ Response getLogsWithResponse(String resourceGroupName, String wo * Polls an Endpoint operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param deploymentName Inference Endpoint Deployment name. * @param body The request containing parameters for retrieving logs. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -138,8 +138,8 @@ DeploymentLogs getLogs(String resourceGroupName, String workspaceName, String en * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -153,8 +153,8 @@ PagedIterable listSkus(String resourceGroupName, String workspaceNa * List Inference Endpoint Deployment Skus. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @param deploymentName Inference Endpoint Deployment name. * @param count Number of Skus to be retrieved in a page of results. * @param skip Continuation token for pagination. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java index 06aeb02546a0..2753f9a42c7f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -58,19 +58,19 @@ public interface OnlineEndpoint { OnlineEndpointProperties properties(); /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - String kind(); + ManagedServiceIdentity identity(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - ManagedServiceIdentity identity(); + String kind(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -160,7 +160,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); @@ -183,8 +183,8 @@ interface WithProperties { * The stage of the OnlineEndpoint 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -215,32 +215,32 @@ interface WithTags { } /** - * The stage of the OnlineEndpoint definition allowing to specify kind. + * The stage of the OnlineEndpoint definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the OnlineEndpoint definition allowing to specify identity. + * The stage of the OnlineEndpoint definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java index 48209bb0a73f..b6b0a5b5ac68 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -18,11 +18,6 @@ */ @Fluent public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner { - /* - * Provisioning state for the endpoint. - */ - private EndpointProvisioningState provisioningState; - /* * ARM resource ID of the compute if it exists. * optional @@ -30,44 +25,40 @@ public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner private String compute; /* - * Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to + * sum to utmost 50. */ - private PublicNetworkAccessType publicNetworkAccess; + private Map mirrorTraffic; /* - * Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + * Provisioning state for the endpoint. */ - private Map traffic; + private EndpointProvisioningState provisioningState; /* - * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to - * sum to utmost 50. + * Enum to determine whether PublicNetworkAccess is Enabled or Disabled. */ - private Map mirrorTraffic; + private PublicNetworkAccess publicNetworkAccess; /* - * Endpoint URI. + * Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. */ - private String scoringUri; + private Map traffic; /* * Endpoint Swagger URI. */ private String swaggerUri; - /** - * Creates an instance of OnlineEndpointProperties class. + /* + * Endpoint URI. */ - public OnlineEndpointProperties() { - } + private String scoringUri; /** - * Get the provisioningState property: Provisioning state for the endpoint. - * - * @return the provisioningState value. + * Creates an instance of OnlineEndpointProperties class. */ - public EndpointProvisioningState provisioningState() { - return this.provisioningState; + public OnlineEndpointProperties() { } /** @@ -93,23 +84,52 @@ public OnlineEndpointProperties withCompute(String compute) { } /** - * Get the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. + * Get the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned + * scoring. Traffic values need to sum to utmost 50. + * + * @return the mirrorTraffic value. + */ + public Map mirrorTraffic() { + return this.mirrorTraffic; + } + + /** + * Set the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned + * scoring. Traffic values need to sum to utmost 50. + * + * @param mirrorTraffic the mirrorTraffic value to set. + * @return the OnlineEndpointProperties object itself. + */ + public OnlineEndpointProperties withMirrorTraffic(Map mirrorTraffic) { + this.mirrorTraffic = mirrorTraffic; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the endpoint. + * + * @return the provisioningState value. + */ + public EndpointProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the publicNetworkAccess property: Enum to determine whether PublicNetworkAccess is Enabled or Disabled. * * @return the publicNetworkAccess value. */ - public PublicNetworkAccessType publicNetworkAccess() { + public PublicNetworkAccess publicNetworkAccess() { return this.publicNetworkAccess; } /** - * Set the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private - * Link is enabled. + * Set the publicNetworkAccess property: Enum to determine whether PublicNetworkAccess is Enabled or Disabled. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the OnlineEndpointProperties object itself. */ - public OnlineEndpointProperties withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + public OnlineEndpointProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -136,38 +156,6 @@ public OnlineEndpointProperties withTraffic(Map traffic) { return this; } - /** - * Get the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned - * scoring. Traffic values need to sum to utmost 50. - * - * @return the mirrorTraffic value. - */ - public Map mirrorTraffic() { - return this.mirrorTraffic; - } - - /** - * Set the mirrorTraffic property: Percentage of traffic to be mirrored to each deployment without using returned - * scoring. Traffic values need to sum to utmost 50. - * - * @param mirrorTraffic the mirrorTraffic value to set. - * @return the OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withMirrorTraffic(Map mirrorTraffic) { - this.mirrorTraffic = mirrorTraffic; - return this; - } - - /** - * Get the scoringUri property: Endpoint URI. - * - * @return the scoringUri value. - */ - @Override - public String scoringUri() { - return this.scoringUri; - } - /** * Get the swaggerUri property: Endpoint Swagger URI. * @@ -179,20 +167,21 @@ public String swaggerUri() { } /** - * {@inheritDoc} + * Get the scoringUri property: Endpoint URI. + * + * @return the scoringUri value. */ @Override - public OnlineEndpointProperties withDescription(String description) { - super.withDescription(description); - return this; + public String scoringUri() { + return this.scoringUri; } /** * {@inheritDoc} */ @Override - public OnlineEndpointProperties withProperties(Map properties) { - super.withProperties(properties); + public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { + super.withAuthMode(authMode); return this; } @@ -200,8 +189,8 @@ public OnlineEndpointProperties withProperties(Map properties) { * {@inheritDoc} */ @Override - public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); + public OnlineEndpointProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -215,13 +204,12 @@ public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public OnlineEndpointProperties withProperties(Map properties) { + super.withProperties(properties); + return this; } /** @@ -232,13 +220,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("keys", keys()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("compute", this.compute); + jsonWriter.writeMapField("mirrorTraffic", this.mirrorTraffic, (writer, element) -> writer.writeInt(element)); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); jsonWriter.writeMapField("traffic", this.traffic, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeMapField("mirrorTraffic", this.mirrorTraffic, (writer, element) -> writer.writeInt(element)); return jsonWriter.writeEndObject(); } @@ -262,6 +250,8 @@ public static OnlineEndpointProperties fromJson(JsonReader jsonReader) throws IO deserializedOnlineEndpointProperties.withAuthMode(EndpointAuthMode.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedOnlineEndpointProperties.withDescription(reader.getString()); + } else if ("keys".equals(fieldName)) { + deserializedOnlineEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedOnlineEndpointProperties.withProperties(properties); @@ -269,22 +259,20 @@ public static OnlineEndpointProperties fromJson(JsonReader jsonReader) throws IO deserializedOnlineEndpointProperties.scoringUri = reader.getString(); } else if ("swaggerUri".equals(fieldName)) { deserializedOnlineEndpointProperties.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedOnlineEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); + } else if ("compute".equals(fieldName)) { + deserializedOnlineEndpointProperties.compute = reader.getString(); + } else if ("mirrorTraffic".equals(fieldName)) { + Map mirrorTraffic = reader.readMap(reader1 -> reader1.getInt()); + deserializedOnlineEndpointProperties.mirrorTraffic = mirrorTraffic; } else if ("provisioningState".equals(fieldName)) { deserializedOnlineEndpointProperties.provisioningState = EndpointProvisioningState.fromString(reader.getString()); - } else if ("compute".equals(fieldName)) { - deserializedOnlineEndpointProperties.compute = reader.getString(); } else if ("publicNetworkAccess".equals(fieldName)) { deserializedOnlineEndpointProperties.publicNetworkAccess - = PublicNetworkAccessType.fromString(reader.getString()); + = PublicNetworkAccess.fromString(reader.getString()); } else if ("traffic".equals(fieldName)) { Map traffic = reader.readMap(reader1 -> reader1.getInt()); deserializedOnlineEndpointProperties.traffic = traffic; - } else if ("mirrorTraffic".equals(fieldName)) { - Map mirrorTraffic = reader.readMap(reader1 -> reader1.getInt()); - deserializedOnlineEndpointProperties.mirrorTraffic = mirrorTraffic; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java index 43ae90a86193..d1aa76385397 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,46 +13,38 @@ */ public interface OnlineEndpoints { /** - * List Online Endpoints. + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. + * @return online Endpoint along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, + Context context); /** - * List Online Endpoints. + * Get Online Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. + * @return online Endpoint. */ - PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, - EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, - Context context); + OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName); /** * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -64,7 +56,7 @@ PagedIterable list(String resourceGroupName, String workspaceNam * Delete Online Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -74,38 +66,46 @@ PagedIterable list(String resourceGroupName, String workspaceNam void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); /** - * Get Online Endpoint. + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. + * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String endpointName, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get Online Endpoint. + * List Online Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Name of the endpoint. + * @param count Number of endpoints to be retrieved in a page of results. + * @param computeType EndpointComputeType to be filtered by. + * @param skip Continuation token for pagination. + * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or + * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + * @param properties A set of properties with which to filter the returned models. It is a comma separated string of + * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + * @param orderBy The option to order the response. + * @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 online Endpoint. + * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. */ - OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName); + PagedIterable list(String resourceGroupName, String workspaceName, String name, Integer count, + EndpointComputeType computeType, String skip, String tags, String properties, OrderString orderBy, + Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -120,7 +120,7 @@ Response listKeysWithResponse(String resourceGroupName, String * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,7 +133,7 @@ Response listKeysWithResponse(String resourceGroupName, String * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -147,7 +147,7 @@ void regenerateKeys(String resourceGroupName, String workspaceName, String endpo * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. @@ -162,7 +162,7 @@ void regenerateKeys(String resourceGroupName, String workspaceName, String endpo * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -177,7 +177,7 @@ Response getTokenWithResponse(String resourceGroupName, Strin * Retrieve a valid AML token for an Endpoint using AMLToken-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param endpointName Online Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java index 050ae5e1e7c2..7c769c6a6b3f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -19,6 +19,12 @@ @Fluent public final class OnlineRequestSettings implements JsonSerializable { /* + * The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + */ + private Integer maxConcurrentRequestsPerInstance; + + /* + * * (Deprecated for Managed Online Endpoints) The maximum amount of time a request will stay in the queue in ISO 8601 * format. * Defaults to 500ms. @@ -27,16 +33,12 @@ public final class OnlineRequestSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); } else if ("requestTimeout".equals(fieldName)) { deserializedOnlineRequestSettings.requestTimeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("maxConcurrentRequestsPerInstance".equals(fieldName)) { - deserializedOnlineRequestSettings.maxConcurrentRequestsPerInstance - = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java index 59fe3ca0ddeb..85abe3fc07d3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public ScaleType scaleType() { return this.scaleType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java new file mode 100644 index 000000000000..a344977aded2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 OpenAIEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class OpenAIEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "Azure.OpenAI"; + + /* + * Model used for the endpoint deployment. + */ + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + private String raiPolicyName; + + /* + * The sku property. + */ + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of OpenAIEndpointDeploymentResourceProperties class. + */ + public OpenAIEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the model property: Model used for the endpoint deployment. + * + * @return the model value. + */ + public EndpointDeploymentModel model() { + return this.model; + } + + /** + * Set the model property: Model used for the endpoint deployment. + * + * @param model the model value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties withModel(EndpointDeploymentModel model) { + this.model = model; + return this; + } + + /** + * Get the raiPolicyName property: The name of RAI policy. + * + * @return the raiPolicyName value. + */ + public String raiPolicyName() { + return this.raiPolicyName; + } + + /** + * Set the raiPolicyName property: The name of RAI policy. + * + * @param raiPolicyName the raiPolicyName value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties withRaiPolicyName(String raiPolicyName) { + this.raiPolicyName = raiPolicyName; + return this; + } + + /** + * Get the sku property: The sku property. + * + * @return the sku value. + */ + public CognitiveServicesSku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku property. + * + * @param sku the sku value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties withSku(CognitiveServicesSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the versionUpgradeOption property: Deployment model version upgrade option. + * + * @return the versionUpgradeOption value. + */ + public DeploymentModelVersionUpgradeOption versionUpgradeOption() { + return this.versionUpgradeOption; + } + + /** + * Set the versionUpgradeOption property: Deployment model version upgrade option. + * + * @param versionUpgradeOption the versionUpgradeOption value to set. + * @return the OpenAIEndpointDeploymentResourceProperties object itself. + */ + public OpenAIEndpointDeploymentResourceProperties + withVersionUpgradeOption(DeploymentModelVersionUpgradeOption versionUpgradeOption) { + this.versionUpgradeOption = versionUpgradeOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("raiPolicyName", this.raiPolicyName); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("versionUpgradeOption", + this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OpenAIEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OpenAIEndpointDeploymentResourceProperties 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 OpenAIEndpointDeploymentResourceProperties. + */ + public static OpenAIEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OpenAIEndpointDeploymentResourceProperties deserializedOpenAIEndpointDeploymentResourceProperties + = new OpenAIEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("model".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.model + = EndpointDeploymentModel.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("raiPolicyName".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.raiPolicyName = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.sku = CognitiveServicesSku.fromJson(reader); + } else if ("versionUpgradeOption".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.versionUpgradeOption + = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOpenAIEndpointDeploymentResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java new file mode 100644 index 000000000000..60c8528edc0c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The OpenAIEndpointResourceProperties model. + */ +@Fluent +public final class OpenAIEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.AZURE_OPEN_AI; + + /** + * Creates an instance of OpenAIEndpointResourceProperties class. + */ + public OpenAIEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OpenAIEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OpenAIEndpointResourceProperties 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 OpenAIEndpointResourceProperties. + */ + public static OpenAIEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OpenAIEndpointResourceProperties deserializedOpenAIEndpointResourceProperties + = new OpenAIEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedOpenAIEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOpenAIEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java index 9d7e4d92a45b..1d272a8f65d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java index adf592c09634..1b6a18f35030 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -20,7 +20,7 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane - * operations and "false" for ARM/control-plane operations. + * operations and "false" for Azure Resource Manager/control-plane operations. * * @return the isDataAction value. */ @@ -42,8 +42,8 @@ public interface Operation { Origin origin(); /** - * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal - * only APIs. + * Gets the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are + * for internal only APIs. * * @return the actionType value. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java index b5cf5cbe0e0f..d204f6e7357f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Localized display information for this particular operation. + * Localized display information for an operation. */ @Immutable public final class OperationDisplay implements JsonSerializable { @@ -42,7 +42,7 @@ public final class OperationDisplay implements JsonSerializable { */ public static final OperationName RESTART = fromString("Restart"); + /** + * Static value Resize for OperationName. + */ + public static final OperationName RESIZE = fromString("Resize"); + /** * Static value Reimage for OperationName. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java index a5196eb5cb80..42bfe0c0c1b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -41,6 +41,11 @@ public final class OperationStatus extends ExpandableStringEnum */ public static final OperationStatus RESTART_FAILED = fromString("RestartFailed"); + /** + * Static value ResizeFailed for OperationStatus. + */ + public static final OperationStatus RESIZE_FAILED = fromString("ResizeFailed"); + /** * Static value ReimageFailed for OperationStatus. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java index 1b8725426aca..6bf92663e312 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java index adf5d02799a0..0dc611fc50a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,9 @@ */ public interface Operations { /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -22,7 +24,9 @@ public interface Operations { PagedIterable list(); /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. + * Lists all of the available Azure Machine Learning Workspaces REST API operations + * + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java index 40a3205e420a..25e7cf69bb37 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java index 03891a10841e..4ebf649dfe50 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,17 +13,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java new file mode 100644 index 000000000000..db928ce784bb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Returns metadata about the os patching. + */ +@Immutable +public final class OsPatchingStatus implements JsonSerializable { + /* + * The os patching status. + */ + private PatchStatus patchStatus; + + /* + * Time of the latest os patching. + */ + private String latestPatchTime; + + /* + * Specifies whether this compute instance is pending for reboot to finish os patching. + */ + private Boolean rebootPending; + + /* + * Time of scheduled reboot. + */ + private String scheduledRebootTime; + + /* + * Collection of errors encountered when doing os patching. + */ + private List osPatchingErrors; + + /** + * Creates an instance of OsPatchingStatus class. + */ + private OsPatchingStatus() { + } + + /** + * Get the patchStatus property: The os patching status. + * + * @return the patchStatus value. + */ + public PatchStatus patchStatus() { + return this.patchStatus; + } + + /** + * Get the latestPatchTime property: Time of the latest os patching. + * + * @return the latestPatchTime value. + */ + public String latestPatchTime() { + return this.latestPatchTime; + } + + /** + * Get the rebootPending property: Specifies whether this compute instance is pending for reboot to finish os + * patching. + * + * @return the rebootPending value. + */ + public Boolean rebootPending() { + return this.rebootPending; + } + + /** + * Get the scheduledRebootTime property: Time of scheduled reboot. + * + * @return the scheduledRebootTime value. + */ + public String scheduledRebootTime() { + return this.scheduledRebootTime; + } + + /** + * Get the osPatchingErrors property: Collection of errors encountered when doing os patching. + * + * @return the osPatchingErrors value. + */ + public List osPatchingErrors() { + return this.osPatchingErrors; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("patchStatus", this.patchStatus == null ? null : this.patchStatus.toString()); + jsonWriter.writeStringField("latestPatchTime", this.latestPatchTime); + jsonWriter.writeBooleanField("rebootPending", this.rebootPending); + jsonWriter.writeStringField("scheduledRebootTime", this.scheduledRebootTime); + jsonWriter.writeArrayField("osPatchingErrors", this.osPatchingErrors, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OsPatchingStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OsPatchingStatus 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 OsPatchingStatus. + */ + public static OsPatchingStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OsPatchingStatus deserializedOsPatchingStatus = new OsPatchingStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("patchStatus".equals(fieldName)) { + deserializedOsPatchingStatus.patchStatus = PatchStatus.fromString(reader.getString()); + } else if ("latestPatchTime".equals(fieldName)) { + deserializedOsPatchingStatus.latestPatchTime = reader.getString(); + } else if ("rebootPending".equals(fieldName)) { + deserializedOsPatchingStatus.rebootPending = reader.getNullable(JsonReader::getBoolean); + } else if ("scheduledRebootTime".equals(fieldName)) { + deserializedOsPatchingStatus.scheduledRebootTime = reader.getString(); + } else if ("osPatchingErrors".equals(fieldName)) { + List osPatchingErrors + = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); + deserializedOsPatchingStatus.osPatchingErrors = osPatchingErrors; + } else { + reader.skipChildren(); + } + } + + return deserializedOsPatchingStatus; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java index 582075077ad6..7e7904baefde 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java index 35b2832512cc..bca969bae04d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Outbound Rule for the managed network of a machine learning workspace. @@ -31,6 +32,16 @@ public class OutboundRule implements JsonSerializable { */ private RuleStatus status; + /* + * Error information about an outbound rule of a machine learning workspace if RuleStatus is failed. + */ + private String errorInformation; + + /* + * The parentRuleNames property. + */ + private List parentRuleNames; + /** * Creates an instance of OutboundRule class. */ @@ -87,11 +98,45 @@ public OutboundRule withStatus(RuleStatus status) { } /** - * Validates the instance. + * Get the errorInformation property: Error information about an outbound rule of a machine learning workspace if + * RuleStatus is failed. + * + * @return the errorInformation value. + */ + public String errorInformation() { + return this.errorInformation; + } + + /** + * Set the errorInformation property: Error information about an outbound rule of a machine learning workspace if + * RuleStatus is failed. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param errorInformation the errorInformation value to set. + * @return the OutboundRule object itself. */ - public void validate() { + OutboundRule withErrorInformation(String errorInformation) { + this.errorInformation = errorInformation; + return this; + } + + /** + * Get the parentRuleNames property: The parentRuleNames property. + * + * @return the parentRuleNames value. + */ + public List parentRuleNames() { + return this.parentRuleNames; + } + + /** + * Set the parentRuleNames property: The parentRuleNames property. + * + * @param parentRuleNames the parentRuleNames value to set. + * @return the OutboundRule object itself. + */ + OutboundRule withParentRuleNames(List parentRuleNames) { + this.parentRuleNames = parentRuleNames; + return this; } /** @@ -130,12 +175,12 @@ public static OutboundRule fromJson(JsonReader jsonReader) throws IOException { } } // Use the discriminator value to determine which subtype should be deserialized. - if ("PrivateEndpoint".equals(discriminatorValue)) { + if ("FQDN".equals(discriminatorValue)) { + return FqdnOutboundRule.fromJson(readerToUse.reset()); + } else if ("PrivateEndpoint".equals(discriminatorValue)) { return PrivateEndpointOutboundRule.fromJson(readerToUse.reset()); } else if ("ServiceTag".equals(discriminatorValue)) { return ServiceTagOutboundRule.fromJson(readerToUse.reset()); - } else if ("FQDN".equals(discriminatorValue)) { - return FqdnOutboundRule.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -156,6 +201,11 @@ static OutboundRule fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOE deserializedOutboundRule.category = RuleCategory.fromString(reader.getString()); } else if ("status".equals(fieldName)) { deserializedOutboundRule.status = RuleStatus.fromString(reader.getString()); + } else if ("errorInformation".equals(fieldName)) { + deserializedOutboundRule.errorInformation = reader.getString(); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedOutboundRule.parentRuleNames = parentRuleNames; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java index 9ffd9fc14c5f..936f4281e88b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRules.java new file mode 100644 index 000000000000..28c435553d92 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRules.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; + +/** + * Resource collection API of OutboundRules. + */ +public interface OutboundRules { + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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 concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String managedNetworkName, String ruleName, Context context); + + /** + * The GET API for retrieveing a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + OutboundRuleBasicResource get(String resourceGroupName, String workspaceName, String managedNetworkName, + String ruleName); + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + OutboundRuleBasicResource createOrUpdate(String resourceGroupName, String workspaceName, String managedNetworkName, + String ruleName, OutboundRuleBasicResourceInner body); + + /** + * Create a OutboundRuleBasicResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param body The body 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 concrete proxy resource types can be created by aliasing this type using a specific property type. + */ + OutboundRuleBasicResource createOrUpdate(String resourceGroupName, String workspaceName, String managedNetworkName, + String ruleName, OutboundRuleBasicResourceInner body, Context context); + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @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 resourceGroupName, String workspaceName, String managedNetworkName, String ruleName); + + /** + * The DELETE API for deleting a single outbound rule of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param ruleName Name of the workspace managed network outbound rule. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String managedNetworkName, String ruleName, + Context context); + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName); + + /** + * The GET API for retrieveing the list of outbound rules of the managed network associated with the machine + * learning workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String managedNetworkName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRulesOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRulesOperations.java new file mode 100644 index 000000000000..ef4d06e8fbe0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRulesOperations.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; + +/** + * Resource collection API of OutboundRulesOperations. + */ +public interface OutboundRulesOperations { + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body); + + /** + * The POST API for updating the outbound rules of the managed network associated with the machine learning + * workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param managedNetworkName Name of the managedNetwork associated with the workspace. Only 'default' is supported. + * @param body The Managed Network Settings object of the workspace. + * @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 paged collection of OutboundRuleBasicResource items as paginated response with {@link PagedIterable}. + */ + PagedIterable post(String resourceGroupName, String workspaceName, + String managedNetworkName, ManagedNetworkSettingsBasicResourceInner body, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java index 930eb55f0a0b..e38a2474bfce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java index 58a86de49271..b266f37a21f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,14 +21,14 @@ public final class OutputPathAssetReference extends AssetReferenceBase { private ReferenceType referenceType = ReferenceType.OUTPUT_PATH; /* - * The path of the file/directory in the job output. + * ARM resource ID of the job. */ - private String path; + private String jobId; /* - * ARM resource ID of the job. + * The path of the file/directory in the job output. */ - private String jobId; + private String path; /** * Creates an instance of OutputPathAssetReference class. @@ -46,26 +46,6 @@ public ReferenceType referenceType() { return this.referenceType; } - /** - * Get the path property: The path of the file/directory in the job output. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path of the file/directory in the job output. - * - * @param path the path value to set. - * @return the OutputPathAssetReference object itself. - */ - public OutputPathAssetReference withPath(String path) { - this.path = path; - return this; - } - /** * Get the jobId property: ARM resource ID of the job. * @@ -87,13 +67,23 @@ public OutputPathAssetReference withJobId(String jobId) { } /** - * Validates the instance. + * Get the path property: The path of the file/directory in the job output. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the path value. */ - @Override - public void validate() { - super.validate(); + public String path() { + return this.path; + } + + /** + * Set the path property: The path of the file/directory in the job output. + * + * @param path the path value to set. + * @return the OutputPathAssetReference object itself. + */ + public OutputPathAssetReference withPath(String path) { + this.path = path; + return this; } /** @@ -103,8 +93,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - jsonWriter.writeStringField("path", this.path); jsonWriter.writeStringField("jobId", this.jobId); + jsonWriter.writeStringField("path", this.path); return jsonWriter.writeEndObject(); } @@ -125,10 +115,10 @@ public static OutputPathAssetReference fromJson(JsonReader jsonReader) throws IO if ("referenceType".equals(fieldName)) { deserializedOutputPathAssetReference.referenceType = ReferenceType.fromString(reader.getString()); - } else if ("path".equals(fieldName)) { - deserializedOutputPathAssetReference.path = reader.getString(); } else if ("jobId".equals(fieldName)) { deserializedOutputPathAssetReference.jobId = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedOutputPathAssetReference.path = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PATAuthTypeWorkspaceConnectionProperties.java similarity index 59% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PATAuthTypeWorkspaceConnectionProperties.java index 839f1fae0ee7..ca11c0ac35e3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PATAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -16,10 +16,10 @@ import java.util.Map; /** - * The PatAuthTypeWorkspaceConnectionProperties model. + * The PATAuthTypeWorkspaceConnectionProperties model. */ @Fluent -public final class PatAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { +public final class PATAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { /* * Authentication type of the connection target */ @@ -30,20 +30,10 @@ public final class PatAuthTypeWorkspaceConnectionProperties extends WorkspaceCon */ private WorkspaceConnectionPersonalAccessToken credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** - * Creates an instance of PatAuthTypeWorkspaceConnectionProperties class. + * Creates an instance of PATAuthTypeWorkspaceConnectionProperties class. */ - public PatAuthTypeWorkspaceConnectionProperties() { + public PATAuthTypeWorkspaceConnectionProperties() { } /** @@ -69,40 +59,29 @@ public WorkspaceConnectionPersonalAccessToken credentials() { * Set the credentials property: The credentials property. * * @param credentials the credentials value to set. - * @return the PatAuthTypeWorkspaceConnectionProperties object itself. + * @return the PATAuthTypeWorkspaceConnectionProperties object itself. */ - public PatAuthTypeWorkspaceConnectionProperties + public PATAuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConnectionPersonalAccessToken credentials) { this.credentials = credentials; return this; } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public PATAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public PATAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -110,7 +89,7 @@ public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + public PATAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { super.withExpiryTime(expiryTime); return this; } @@ -119,7 +98,7 @@ public PatAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime ex * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + public PATAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { super.withIsSharedToAll(isSharedToAll); return this; } @@ -128,8 +107,8 @@ public PatAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isShar * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public PATAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -137,8 +116,8 @@ public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public PATAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -146,8 +125,8 @@ public PatAuthTypeWorkspaceConnectionProperties withMetadata(Map * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); + public PATAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +134,8 @@ public PatAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public PATAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -164,22 +143,19 @@ public PatAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public PATAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public PATAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -189,75 +165,84 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); } /** - * Reads an instance of PatAuthTypeWorkspaceConnectionProperties from the JsonReader. + * Reads an instance of PATAuthTypeWorkspaceConnectionProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of PatAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an instance of + * @return An instance of PATAuthTypeWorkspaceConnectionProperties 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 PatAuthTypeWorkspaceConnectionProperties. + * @throws IOException If an error occurs while reading the PATAuthTypeWorkspaceConnectionProperties. */ - public static PatAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + public static PATAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - PatAuthTypeWorkspaceConnectionProperties deserializedPatAuthTypeWorkspaceConnectionProperties - = new PatAuthTypeWorkspaceConnectionProperties(); + PATAuthTypeWorkspaceConnectionProperties deserializedPATAuthTypeWorkspaceConnectionProperties + = new PATAuthTypeWorkspaceConnectionProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("category".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties + deserializedPATAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedPATAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedPATAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader + deserializedPATAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedPATAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties + deserializedPATAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedPatAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + deserializedPATAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedPATAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedPATAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedPatAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + deserializedPATAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); + } else if ("target".equals(fieldName)) { + deserializedPATAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { + deserializedPATAuthTypeWorkspaceConnectionProperties + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.authType + deserializedPATAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); } else if ("credentials".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.credentials + deserializedPATAuthTypeWorkspaceConnectionProperties.credentials = WorkspaceConnectionPersonalAccessToken.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedPatAuthTypeWorkspaceConnectionProperties; + return deserializedPATAuthTypeWorkspaceConnectionProperties; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUDeploymentUsage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUDeploymentUsage.java new file mode 100644 index 000000000000..23710b0409b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUDeploymentUsage.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 PTUDeploymentUsage model. + */ +@Immutable +public final class PTUDeploymentUsage implements JsonSerializable { + /* + * Usage number from the collection level quota + */ + private Long collectionQuotaUsage; + + /* + * Deployment name + */ + private String deploymentName; + + /* + * Resource group name + */ + private String resourceGroup; + + /* + * Usage number from subscription level quota + */ + private Long usage; + + /* + * Workspace name + */ + private String workspaceName; + + /** + * Creates an instance of PTUDeploymentUsage class. + */ + private PTUDeploymentUsage() { + } + + /** + * Get the collectionQuotaUsage property: Usage number from the collection level quota. + * + * @return the collectionQuotaUsage value. + */ + public Long collectionQuotaUsage() { + return this.collectionQuotaUsage; + } + + /** + * Get the deploymentName property: Deployment name. + * + * @return the deploymentName value. + */ + public String deploymentName() { + return this.deploymentName; + } + + /** + * Get the resourceGroup property: Resource group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the usage property: Usage number from subscription level quota. + * + * @return the usage value. + */ + public Long usage() { + return this.usage; + } + + /** + * Get the workspaceName property: Workspace name. + * + * @return the workspaceName value. + */ + public String workspaceName() { + return this.workspaceName; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("collectionQuotaUsage", this.collectionQuotaUsage); + jsonWriter.writeStringField("deploymentName", this.deploymentName); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeNumberField("usage", this.usage); + jsonWriter.writeStringField("workspaceName", this.workspaceName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PTUDeploymentUsage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PTUDeploymentUsage 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 PTUDeploymentUsage. + */ + public static PTUDeploymentUsage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PTUDeploymentUsage deserializedPTUDeploymentUsage = new PTUDeploymentUsage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("collectionQuotaUsage".equals(fieldName)) { + deserializedPTUDeploymentUsage.collectionQuotaUsage = reader.getNullable(JsonReader::getLong); + } else if ("deploymentName".equals(fieldName)) { + deserializedPTUDeploymentUsage.deploymentName = reader.getString(); + } else if ("resourceGroup".equals(fieldName)) { + deserializedPTUDeploymentUsage.resourceGroup = reader.getString(); + } else if ("usage".equals(fieldName)) { + deserializedPTUDeploymentUsage.usage = reader.getNullable(JsonReader::getLong); + } else if ("workspaceName".equals(fieldName)) { + deserializedPTUDeploymentUsage.workspaceName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPTUDeploymentUsage; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUQuotas.java new file mode 100644 index 000000000000..39f05814cc10 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PTUQuotas.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 PTUQuotas. + */ +public interface PTUQuotas { + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listAvailable(String location); + + /** + * List available MaaS PTU quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listAvailable(String location, String skip, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The location 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 available MaaS PTU quota along with {@link Response}. + */ + Response getAvailableWithResponse(String location, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The location name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota. + */ + AvailableQuota getAvailable(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The location name. + * @param skip Continuation token for pagination. + * @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 paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, String skip, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java new file mode 100644 index 000000000000..000193e5098b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 PackageDetails model. + */ +@Fluent +public final class PackageDetails implements JsonSerializable { + /* + * Install path. + */ + private String installPath; + + /* + * Installed version. + */ + private String installedVersion; + + /* + * Package or dependency name. + */ + private String name; + + /* + * Patched version. + */ + private String patchedVersion; + + /** + * Creates an instance of PackageDetails class. + */ + public PackageDetails() { + } + + /** + * Get the installPath property: Install path. + * + * @return the installPath value. + */ + public String installPath() { + return this.installPath; + } + + /** + * Set the installPath property: Install path. + * + * @param installPath the installPath value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withInstallPath(String installPath) { + this.installPath = installPath; + return this; + } + + /** + * Get the installedVersion property: Installed version. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.installedVersion; + } + + /** + * Set the installedVersion property: Installed version. + * + * @param installedVersion the installedVersion value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withInstalledVersion(String installedVersion) { + this.installedVersion = installedVersion; + return this; + } + + /** + * Get the name property: Package or dependency name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Package or dependency name. + * + * @param name the name value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the patchedVersion property: Patched version. + * + * @return the patchedVersion value. + */ + public String patchedVersion() { + return this.patchedVersion; + } + + /** + * Set the patchedVersion property: Patched version. + * + * @param patchedVersion the patchedVersion value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withPatchedVersion(String patchedVersion) { + this.patchedVersion = patchedVersion; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("installPath", this.installPath); + jsonWriter.writeStringField("installedVersion", this.installedVersion); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("patchedVersion", this.patchedVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PackageDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PackageDetails 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 PackageDetails. + */ + public static PackageDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PackageDetails deserializedPackageDetails = new PackageDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("installPath".equals(fieldName)) { + deserializedPackageDetails.installPath = reader.getString(); + } else if ("installedVersion".equals(fieldName)) { + deserializedPackageDetails.installedVersion = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPackageDetails.name = reader.getString(); + } else if ("patchedVersion".equals(fieldName)) { + deserializedPackageDetails.patchedVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPackageDetails; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java index c33566e64b1a..0be6c06ccea8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public PartialBatchDeployment withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java index 8be8f3b97dd9..bc534a942aae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -75,17 +75,6 @@ public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withTag return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java index b5a4c734015b..504811bbce2b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -82,14 +82,6 @@ public PartialManagedServiceIdentity withUserAssignedIdentities(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java index 94621ebcbc36..6121aeb56f97 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -56,19 +56,6 @@ public PartialMinimalTrackedResourceWithIdentity withTags(Map ta return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (identity() != null) { - identity().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java index 16db7a27cf84..e0b9ef5e5e9c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -56,19 +56,6 @@ public PartialMinimalTrackedResourceWithSku withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java index 263a8830f439..d635014080fa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,14 +17,14 @@ @Fluent public final class PartialMinimalTrackedResourceWithSkuAndIdentity extends PartialMinimalTrackedResource { /* - * Sku details required for ARM contract for Autoscaling. + * Managed service identity (system assigned and/or user assigned identities) */ - private PartialSku sku; + private PartialManagedServiceIdentity identity; /* - * Managed service identity (system assigned and/or user assigned identities) + * Sku details required for ARM contract for Autoscaling. */ - private PartialManagedServiceIdentity identity; + private PartialSku sku; /** * Creates an instance of PartialMinimalTrackedResourceWithSkuAndIdentity class. @@ -33,42 +33,42 @@ public PartialMinimalTrackedResourceWithSkuAndIdentity() { } /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the sku value. + * @return the identity value. */ - public PartialSku sku() { - return this.sku; + public PartialManagedServiceIdentity identity() { + return this.identity; } /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param sku the sku value to set. + * @param identity the identity value to set. * @return the PartialMinimalTrackedResourceWithSkuAndIdentity object itself. */ - public PartialMinimalTrackedResourceWithSkuAndIdentity withSku(PartialSku sku) { - this.sku = sku; + public PartialMinimalTrackedResourceWithSkuAndIdentity withIdentity(PartialManagedServiceIdentity identity) { + this.identity = identity; return this; } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the sku property: Sku details required for ARM contract for Autoscaling. * - * @return the identity value. + * @return the sku value. */ - public PartialManagedServiceIdentity identity() { - return this.identity; + public PartialSku sku() { + return this.sku; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the sku property: Sku details required for ARM contract for Autoscaling. * - * @param identity the identity value to set. + * @param sku the sku value to set. * @return the PartialMinimalTrackedResourceWithSkuAndIdentity object itself. */ - public PartialMinimalTrackedResourceWithSkuAndIdentity withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; + public PartialMinimalTrackedResourceWithSkuAndIdentity withSku(PartialSku sku) { + this.sku = sku; return this; } @@ -81,22 +81,6 @@ public PartialMinimalTrackedResourceWithSkuAndIdentity withTags(Map writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -128,11 +112,11 @@ public static PartialMinimalTrackedResourceWithSkuAndIdentity fromJson(JsonReade if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.withTags(tags); - } else if ("sku".equals(fieldName)) { - deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.sku = PartialSku.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.identity = PartialManagedServiceIdentity.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.sku = PartialSku.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java index d5739dbf1a57..bf0bf512c442 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -99,20 +99,6 @@ public PartialRegistryPartialTrackedResource withTags(Map tags) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java index a4e0cec722d0..9bebce6fb039 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,32 +17,32 @@ @Fluent public final class PartialSku implements JsonSerializable { /* - * The name of the SKU. Ex - P3. It is typically a letter+number code. + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. */ - private String name; + private Integer capacity; /* - * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is - * not required on a PUT. + * If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - private SkuTier tier; + private String family; /* - * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone - * code. + * The name of the SKU. Ex - P3. It is typically a letter+number code. */ - private String size; + private String name; /* - * If the service has different generations of hardware, for the same SKU, then that can be captured here. + * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone + * code. */ - private String family; + private String size; /* - * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible - * for the resource this may be omitted. + * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is + * not required on a PUT. */ - private Integer capacity; + private SkuTier tier; /** * Creates an instance of PartialSku class. @@ -51,132 +51,124 @@ public PartialSku() { } /** - * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. + * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If + * scale out/in is not possible for the resource this may be omitted. * - * @return the name value. + * @return the capacity value. */ - public String name() { - return this.name; + public Integer capacity() { + return this.capacity; } /** - * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. + * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If + * scale out/in is not possible for the resource this may be omitted. * - * @param name the name value to set. + * @param capacity the capacity value to set. * @return the PartialSku object itself. */ - public PartialSku withName(String name) { - this.name = name; + public PartialSku withCapacity(Integer capacity) { + this.capacity = capacity; return this; } /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @return the tier value. + * @return the family value. */ - public SkuTier tier() { - return this.tier; + public String family() { + return this.family; } /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @param tier the tier value to set. + * @param family the family value to set. * @return the PartialSku object itself. */ - public PartialSku withTier(SkuTier tier) { - this.tier = tier; + public PartialSku withFamily(String family) { + this.family = family; return this; } /** - * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. + * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * - * @return the size value. + * @return the name value. */ - public String size() { - return this.size; + public String name() { + return this.name; } /** - * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. + * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * - * @param size the size value to set. + * @param name the name value to set. * @return the PartialSku object itself. */ - public PartialSku withSize(String size) { - this.size = size; + public PartialSku withName(String name) { + this.name = name; return this; } /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. + * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this + * would be the standalone code. * - * @return the family value. + * @return the size value. */ - public String family() { - return this.family; + public String size() { + return this.size; } /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. + * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this + * would be the standalone code. * - * @param family the family value to set. + * @param size the size value to set. * @return the PartialSku object itself. */ - public PartialSku withFamily(String family) { - this.family = family; + public PartialSku withSize(String size) { + this.size = size; return this; } /** - * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. + * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more + * than one tier, but is not required on a PUT. * - * @return the capacity value. + * @return the tier value. */ - public Integer capacity() { - return this.capacity; + public SkuTier tier() { + return this.tier; } /** - * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. + * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more + * than one tier, but is not required on a PUT. * - * @param capacity the capacity value to set. + * @param tier the tier value to set. * @return the PartialSku object itself. */ - public PartialSku withCapacity(Integer capacity) { - this.capacity = capacity; + public PartialSku withTier(SkuTier tier) { + this.tier = tier; 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("capacity", this.capacity); + jsonWriter.writeStringField("family", this.family); jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); jsonWriter.writeStringField("size", this.size); - jsonWriter.writeStringField("family", this.family); - jsonWriter.writeNumberField("capacity", this.capacity); + jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); return jsonWriter.writeEndObject(); } @@ -195,16 +187,16 @@ public static PartialSku fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("name".equals(fieldName)) { + if ("capacity".equals(fieldName)) { + deserializedPartialSku.capacity = reader.getNullable(JsonReader::getInt); + } else if ("family".equals(fieldName)) { + deserializedPartialSku.family = reader.getString(); + } else if ("name".equals(fieldName)) { deserializedPartialSku.name = reader.getString(); - } else if ("tier".equals(fieldName)) { - deserializedPartialSku.tier = SkuTier.fromString(reader.getString()); } else if ("size".equals(fieldName)) { deserializedPartialSku.size = reader.getString(); - } else if ("family".equals(fieldName)) { - deserializedPartialSku.family = reader.getString(); - } else if ("capacity".equals(fieldName)) { - deserializedPartialSku.capacity = reader.getNullable(JsonReader::getInt); + } else if ("tier".equals(fieldName)) { + deserializedPartialSku.tier = SkuTier.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java index a91cd1af69ca..ebf610ff2988 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -29,7 +29,7 @@ public final class Password implements JsonSerializable { /** * Creates an instance of Password class. */ - public Password() { + private Password() { } /** @@ -50,14 +50,6 @@ public String value() { return this.value; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java new file mode 100644 index 000000000000..74cfee2489f4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The os patching status. + */ +public final class PatchStatus extends ExpandableStringEnum { + /** + * Static value CompletedWithWarnings for PatchStatus. + */ + public static final PatchStatus COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); + + /** + * Static value Failed for PatchStatus. + */ + public static final PatchStatus FAILED = fromString("Failed"); + + /** + * Static value InProgress for PatchStatus. + */ + public static final PatchStatus IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Succeeded for PatchStatus. + */ + public static final PatchStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Unknown for PatchStatus. + */ + public static final PatchStatus UNKNOWN = fromString("Unknown"); + + /** + * Creates a new instance of PatchStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchStatus() { + } + + /** + * Creates or finds a PatchStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchStatus. + */ + public static PatchStatus fromString(String name) { + return fromString(name, PatchStatus.class); + } + + /** + * Gets known PatchStatus values. + * + * @return known PatchStatus values. + */ + public static Collection values() { + return values(PatchStatus.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java index 92e9b1628d91..11cbb9d8470b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -25,7 +25,7 @@ public class PendingUploadCredentialDto implements JsonSerializable { /* + * Assigned User. + * * A user explicitly assigned to a personal compute instance. */ private AssignedUser assignedUser; @@ -28,7 +30,9 @@ public PersonalComputeInstanceSettings() { } /** - * Get the assignedUser property: A user explicitly assigned to a personal compute instance. + * Get the assignedUser property: Assigned User. + * + * A user explicitly assigned to a personal compute instance. * * @return the assignedUser value. */ @@ -37,7 +41,9 @@ public AssignedUser assignedUser() { } /** - * Set the assignedUser property: A user explicitly assigned to a personal compute instance. + * Set the assignedUser property: Assigned User. + * + * A user explicitly assigned to a personal compute instance. * * @param assignedUser the assignedUser value to set. * @return the PersonalComputeInstanceSettings object itself. @@ -47,17 +53,6 @@ public PersonalComputeInstanceSettings withAssignedUser(AssignedUser assignedUse return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assignedUser() != null) { - assignedUser().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java index 2abbbdf9138f..e32e45d3095f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,34 +22,29 @@ public final class PipelineJob extends JobBaseProperties { private JobType jobType = JobType.PIPELINE; /* - * Pipeline settings, for things like ContinueRunOnStepFailure etc. + * Inputs for the pipeline job. */ - private Object settings; + private Map inputs; /* * Jobs construct the Pipeline Job. */ private Map jobs; - /* - * Inputs for the pipeline job. - */ - private Map inputs; - /* * Outputs for the pipeline job */ private Map outputs; /* - * ARM resource ID of source job. + * Pipeline settings, for things like ContinueRunOnStepFailure etc. */ - private String sourceJobId; + private Object settings; /* - * Status of the job. + * ARM resource ID of source job. */ - private JobStatus status; + private String sourceJobId; /** * Creates an instance of PipelineJob class. @@ -68,22 +63,22 @@ public JobType jobType() { } /** - * Get the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. + * Get the inputs property: Inputs for the pipeline job. * - * @return the settings value. + * @return the inputs value. */ - public Object settings() { - return this.settings; + public Map inputs() { + return this.inputs; } /** - * Set the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. + * Set the inputs property: Inputs for the pipeline job. * - * @param settings the settings value to set. + * @param inputs the inputs value to set. * @return the PipelineJob object itself. */ - public PipelineJob withSettings(Object settings) { - this.settings = settings; + public PipelineJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -108,42 +103,42 @@ public PipelineJob withJobs(Map jobs) { } /** - * Get the inputs property: Inputs for the pipeline job. + * Get the outputs property: Outputs for the pipeline job. * - * @return the inputs value. + * @return the outputs value. */ - public Map inputs() { - return this.inputs; + public Map outputs() { + return this.outputs; } /** - * Set the inputs property: Inputs for the pipeline job. + * Set the outputs property: Outputs for the pipeline job. * - * @param inputs the inputs value to set. + * @param outputs the outputs value to set. * @return the PipelineJob object itself. */ - public PipelineJob withInputs(Map inputs) { - this.inputs = inputs; + public PipelineJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } /** - * Get the outputs property: Outputs for the pipeline job. + * Get the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. * - * @return the outputs value. + * @return the settings value. */ - public Map outputs() { - return this.outputs; + public Object settings() { + return this.settings; } /** - * Set the outputs property: Outputs for the pipeline job. + * Set the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. * - * @param outputs the outputs value to set. + * @param settings the settings value to set. * @return the PipelineJob object itself. */ - public PipelineJob withOutputs(Map outputs) { - this.outputs = outputs; + public PipelineJob withSettings(Object settings) { + this.settings = settings; return this; } @@ -168,21 +163,20 @@ public PipelineJob withSourceJobId(String sourceJobId) { } /** - * Get the status property: Status of the job. - * - * @return the status value. + * {@inheritDoc} */ @Override - public JobStatus status() { - return this.status; + public PipelineJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; } /** * {@inheritDoc} */ @Override - public PipelineJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public PipelineJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -190,8 +184,8 @@ public PipelineJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public PipelineJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public PipelineJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -199,8 +193,8 @@ public PipelineJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public PipelineJob withServices(Map services) { - super.withServices(services); + public PipelineJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -208,8 +202,8 @@ public PipelineJob withServices(Map services) { * {@inheritDoc} */ @Override - public PipelineJob withComputeId(String computeId) { - super.withComputeId(computeId); + public PipelineJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); return this; } @@ -226,8 +220,8 @@ public PipelineJob withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public PipelineJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); + public PipelineJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); return this; } @@ -235,8 +229,8 @@ public PipelineJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public PipelineJob withComponentId(String componentId) { - super.withComponentId(componentId); + public PipelineJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -244,8 +238,8 @@ public PipelineJob withComponentId(String componentId) { * {@inheritDoc} */ @Override - public PipelineJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); + public PipelineJob withServices(Map services) { + super.withServices(services); return this; } @@ -258,15 +252,6 @@ public PipelineJob withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public PipelineJob withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -277,27 +262,12 @@ public PipelineJob withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } + public PipelineJob withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -307,21 +277,24 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeUntypedField("settings", this.settings); - jsonWriter.writeMapField("jobs", this.jobs, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("jobs", this.jobs, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); + if (this.settings != null) { + jsonWriter.writeUntypedField("settings", this.settings); + } jsonWriter.writeStringField("sourceJobId", this.sourceJobId); return jsonWriter.writeEndObject(); } @@ -343,44 +316,46 @@ public static PipelineJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedPipelineJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPipelineJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedPipelineJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPipelineJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedPipelineJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedPipelineJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedPipelineJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedPipelineJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedPipelineJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedPipelineJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedPipelineJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedPipelineJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedPipelineJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedPipelineJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedPipelineJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedPipelineJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedPipelineJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedPipelineJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedPipelineJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("jobType".equals(fieldName)) { deserializedPipelineJob.jobType = JobType.fromString(reader.getString()); - } else if ("settings".equals(fieldName)) { - deserializedPipelineJob.settings = reader.readUntyped(); - } else if ("jobs".equals(fieldName)) { - Map jobs = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedPipelineJob.jobs = jobs; } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedPipelineJob.inputs = inputs; + } else if ("jobs".equals(fieldName)) { + Map jobs = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedPipelineJob.jobs = jobs; } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedPipelineJob.outputs = outputs; + } else if ("settings".equals(fieldName)) { + deserializedPipelineJob.settings = reader.readUntyped(); } else if ("sourceJobId".equals(fieldName)) { deserializedPipelineJob.sourceJobId = reader.getString(); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java new file mode 100644 index 000000000000..9672d8983dfc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * State of pool related resources provisioning. + */ +public final class PoolProvisioningState extends ExpandableStringEnum { + /** + * Static value Creating for PoolProvisioningState. + */ + public static final PoolProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Deleting for PoolProvisioningState. + */ + public static final PoolProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Succeeded for PoolProvisioningState. + */ + public static final PoolProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for PoolProvisioningState. + */ + public static final PoolProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Updating for PoolProvisioningState. + */ + public static final PoolProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Canceled for PoolProvisioningState. + */ + public static final PoolProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of PoolProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PoolProvisioningState() { + } + + /** + * Creates or finds a PoolProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PoolProvisioningState. + */ + public static PoolProvisioningState fromString(String name) { + return fromString(name, PoolProvisioningState.class); + } + + /** + * Gets known PoolProvisioningState values. + * + * @return known PoolProvisioningState values. + */ + public static Collection values() { + return values(PoolProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java index a1108385b311..1e0417aa977f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -64,17 +64,6 @@ public PredictionDriftMetricThresholdBase withThreshold(MonitoringThreshold thre return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (threshold() != null) { - threshold().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java index 41a8ed5d9da9..875613d3138d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,6 +22,11 @@ public final class PredictionDriftMonitoringSignal extends MonitoringSignalBase */ private MonitoringSignalType signalType = MonitoringSignalType.PREDICTION_DRIFT; + /* + * A dictionary that maps feature names to their respective data types. + */ + private Map featureDataTypeOverride; + /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -38,11 +42,6 @@ public final class PredictionDriftMonitoringSignal extends MonitoringSignalBase */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of PredictionDriftMonitoringSignal class. */ @@ -59,6 +58,27 @@ public MonitoringSignalType signalType() { return this.signalType; } + /** + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @return the featureDataTypeOverride value. + */ + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; + } + + /** + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. + * + * @param featureDataTypeOverride the featureDataTypeOverride value to set. + * @return the PredictionDriftMonitoringSignal object itself. + */ + public PredictionDriftMonitoringSignal + withFeatureDataTypeOverride(Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; + return this; + } + /** * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. * @@ -120,27 +140,6 @@ public PredictionDriftMonitoringSignal withReferenceData(MonitoringInputDataBase return this; } - /** - * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @return the featureDataTypeOverride value. - */ - public Map featureDataTypeOverride() { - return this.featureDataTypeOverride; - } - - /** - * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. - * - * @param featureDataTypeOverride the featureDataTypeOverride value to set. - * @return the PredictionDriftMonitoringSignal object itself. - */ - public PredictionDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - /** * {@inheritDoc} */ @@ -159,39 +158,6 @@ public PredictionDriftMonitoringSignal withProperties(Map proper return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (metricThresholds() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property metricThresholds in model PredictionDriftMonitoringSignal")); - } else { - metricThresholds().forEach(e -> e.validate()); - } - if (productionData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property productionData in model PredictionDriftMonitoringSignal")); - } else { - productionData().validate(); - } - if (referenceData() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property referenceData in model PredictionDriftMonitoringSignal")); - } else { - referenceData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PredictionDriftMonitoringSignal.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java index 2ba502e24e8c..5c412399658a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ import java.io.IOException; /** - * The Private Endpoint resource. + * The private endpoint resource. */ @Immutable public class PrivateEndpoint implements JsonSerializable { /* - * The ARM identifier for Private Endpoint + * The resource identifier of the private endpoint */ private String id; @@ -28,7 +28,7 @@ public PrivateEndpoint() { } /** - * Get the id property: The ARM identifier for Private Endpoint. + * Get the id property: The resource identifier of the private endpoint. * * @return the id value. */ @@ -37,7 +37,7 @@ public String id() { } /** - * Set the id property: The ARM identifier for Private Endpoint. + * Set the id property: The resource identifier of the private endpoint. * * @param id the id value to set. * @return the PrivateEndpoint object itself. @@ -47,14 +47,6 @@ PrivateEndpoint withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java index af1b0ca198b4..15f55979c00c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,32 +36,33 @@ public interface PrivateEndpointConnection { String type(); /** - * Gets the identity property: The identity of the resource. + * Gets the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ ManagedServiceIdentity identity(); /** - * Gets the location property: Specifies the location of the resource. + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. * - * @return the location value. + * @return the sku value. */ - String location(); + Sku sku(); /** - * Gets the tags property: Contains resource tags defined as key/value pairs. + * Gets the location property: *Same as workspace location. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the sku property: The sku of the workspace. + * Gets the tags property: The tags property. * - * @return the sku value. + * @return the tags value. */ - Sku sku(); + Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -71,22 +72,21 @@ public interface PrivateEndpointConnection { SystemData systemData(); /** - * Gets the privateEndpoint property: The resource of private end point. + * Gets the privateEndpoint property: The privateEndpoint property. * * @return the privateEndpoint value. */ - PrivateEndpoint privateEndpoint(); + WorkspacePrivateEndpointResource privateEndpoint(); /** - * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the - * connection between service consumer and provider. + * Gets the privateLinkServiceConnectionState property: The connection state. * * @return the privateLinkServiceConnectionState value. */ PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); /** - * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. + * Gets the provisioningState property: The current provisioning state. * * @return the provisioningState value. */ @@ -145,7 +145,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithCreate withExistingWorkspace(String resourceGroupName, String workspaceName); @@ -181,7 +181,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Specifies the location of the resource. + * @param location *Same as workspace location. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -189,7 +189,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Specifies the location of the resource. + * @param location *Same as workspace location. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -200,9 +200,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. + * Specifies the tags property: The tags property.. * - * @param tags Contains resource tags defined as key/value pairs. + * @param tags The tags property. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -213,9 +213,9 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param identity The identity of the resource. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); @@ -226,9 +226,11 @@ interface WithIdentity { */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. * - * @param sku The sku of the workspace. + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ WithCreate withSku(Sku sku); @@ -239,12 +241,12 @@ interface WithSku { */ interface WithPrivateEndpoint { /** - * Specifies the privateEndpoint property: The resource of private end point.. + * Specifies the privateEndpoint property: The privateEndpoint property.. * - * @param privateEndpoint The resource of private end point. + * @param privateEndpoint The privateEndpoint property. * @return the next definition stage. */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + WithCreate withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint); } /** @@ -252,11 +254,9 @@ interface WithPrivateEndpoint { */ interface WithPrivateLinkServiceConnectionState { /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. + * Specifies the privateLinkServiceConnectionState property: The connection state.. * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * @param privateLinkServiceConnectionState The connection state. * @return the next definition stage. */ WithCreate withPrivateLinkServiceConnectionState( @@ -301,9 +301,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. + * Specifies the tags property: The tags property.. * - * @param tags Contains resource tags defined as key/value pairs. + * @param tags The tags property. * @return the next definition stage. */ Update withTags(Map tags); @@ -314,9 +314,9 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param identity The identity of the resource. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ Update withIdentity(ManagedServiceIdentity identity); @@ -327,9 +327,11 @@ interface WithIdentity { */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. * - * @param sku The sku of the workspace. + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ Update withSku(Sku sku); @@ -340,12 +342,12 @@ interface WithSku { */ interface WithPrivateEndpoint { /** - * Specifies the privateEndpoint property: The resource of private end point.. + * Specifies the privateEndpoint property: The privateEndpoint property.. * - * @param privateEndpoint The resource of private end point. + * @param privateEndpoint The privateEndpoint property. * @return the next definition stage. */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + Update withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint); } /** @@ -353,11 +355,9 @@ interface WithPrivateEndpoint { */ interface WithPrivateLinkServiceConnectionState { /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. + * Specifies the privateLinkServiceConnectionState property: The connection state.. * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * @param privateLinkServiceConnectionState The connection state. * @return the next definition stage. */ Update withPrivateLinkServiceConnectionState( diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java index b0390745bc2d..418ceab56385 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java index a451262c1dd8..12d9191f9d5d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,112 +13,112 @@ */ public interface PrivateEndpointConnections { /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection 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 list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** - * List all the private endpoint connections associated with the workspace. + * Called by end-users to get a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. + * @return the Private Endpoint Connection resource. */ - PagedIterable list(String resourceGroupName, String workspaceName, Context context); + PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the {@link Response}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, + Response deleteWithResponse(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param privateEndpointConnectionName NRP Private Endpoint Connection Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. */ - PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return list of private endpoint connection associated with the specified workspace as paginated response with + * {@link PagedIterable}. */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, - String privateEndpointConnectionName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to get all PE connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. + * @param workspaceName Azure Machine Learning Workspace 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 list of private endpoint connection associated with the specified workspace as paginated response with + * {@link PagedIterable}. */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to get a PE connection. * * @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 specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ PrivateEndpointConnection getById(String id); /** - * Gets the specified private endpoint connection associated with the workspace. + * Called by end-users to get a PE connection. * * @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 specified private endpoint connection associated with the workspace along with {@link Response}. + * @return the Private Endpoint Connection resource along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -128,7 +128,7 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void deleteById(String id); /** - * Deletes the specified private endpoint connection associated with the workspace. + * Called by end-users to delete a PE connection. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java index b76a001a9345..aae0b3754538 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -123,14 +123,6 @@ public PrivateEndpointDestination withSubresourceTarget(String subresourceTarget return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java index f1f9fd565f37..b0e917be5927 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Private Endpoint Outbound Rule for the managed network of a machine learning workspace. @@ -26,6 +27,11 @@ public final class PrivateEndpointOutboundRule extends OutboundRule { */ private PrivateEndpointDestination destination; + /* + * The fqdns property. + */ + private List fqdns; + /** * Creates an instance of PrivateEndpointOutboundRule class. */ @@ -64,6 +70,26 @@ public PrivateEndpointOutboundRule withDestination(PrivateEndpointDestination de return this; } + /** + * Get the fqdns property: The fqdns property. + * + * @return the fqdns value. + */ + public List fqdns() { + return this.fqdns; + } + + /** + * Set the fqdns property: The fqdns property. + * + * @param fqdns the fqdns value to set. + * @return the PrivateEndpointOutboundRule object itself. + */ + public PrivateEndpointOutboundRule withFqdns(List fqdns) { + this.fqdns = fqdns; + return this; + } + /** * {@inheritDoc} */ @@ -82,19 +108,6 @@ public PrivateEndpointOutboundRule withStatus(RuleStatus status) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (destination() != null) { - destination().validate(); - } - } - /** * {@inheritDoc} */ @@ -105,6 +118,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("status", status() == null ? null : status().toString()); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeJsonField("destination", this.destination); + jsonWriter.writeArrayField("fqdns", this.fqdns, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -127,10 +141,18 @@ public static PrivateEndpointOutboundRule fromJson(JsonReader jsonReader) throws deserializedPrivateEndpointOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); } else if ("status".equals(fieldName)) { deserializedPrivateEndpointOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); + } else if ("errorInformation".equals(fieldName)) { + deserializedPrivateEndpointOutboundRule.withErrorInformation(reader.getString()); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointOutboundRule.withParentRuleNames(parentRuleNames); } else if ("type".equals(fieldName)) { deserializedPrivateEndpointOutboundRule.type = RuleType.fromString(reader.getString()); } else if ("destination".equals(fieldName)) { deserializedPrivateEndpointOutboundRule.destination = PrivateEndpointDestination.fromJson(reader); + } else if ("fqdns".equals(fieldName)) { + List fqdns = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointOutboundRule.fqdns = fqdns; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java index d6cf70a8406b..03a6e2ba68f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,7 +21,7 @@ public final class PrivateEndpointResource extends PrivateEndpoint { private String subnetArmId; /* - * The ARM identifier for Private Endpoint + * The resource identifier of the private endpoint */ private String id; @@ -52,7 +52,7 @@ public PrivateEndpointResource withSubnetArmId(String subnetArmId) { } /** - * Get the id property: The ARM identifier for Private Endpoint. + * Get the id property: The resource identifier of the private endpoint. * * @return the id value. */ @@ -61,16 +61,6 @@ public String id() { return this.id; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java index 3b384798802f..0edef723a726 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,19 +8,19 @@ import java.util.Collection; /** - * The private endpoint connection status. + * Connection status of the service consumer with the service provider. */ public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum { /** - * Static value Pending for PrivateEndpointServiceConnectionStatus. + * Static value Approved for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); /** - * Static value Approved for PrivateEndpointServiceConnectionStatus. + * Static value Pending for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); /** * Static value Rejected for PrivateEndpointServiceConnectionStatus. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java index 415c63c8ae50..2489d8c441d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java @@ -1,317 +1,100 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.PrivateLinkResourceProperties; -import java.io.IOException; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; import java.util.List; import java.util.Map; /** - * A private link resource. + * An immutable client-side representation of PrivateLinkResource. */ -@Fluent -public final class PrivateLinkResource extends ProxyResource { - /* - * Resource properties. - */ - private PrivateLinkResourceProperties innerProperties; - - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of PrivateLinkResource class. - */ - public PrivateLinkResource() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } - +public interface PrivateLinkResource { /** - * Get the identity property: The identity of the resource. + * Gets the id property: Fully qualified resource Id for the resource. * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateLinkResource object itself. + * @return the id value. */ - public PrivateLinkResource withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } + String id(); /** - * Get the location property: Specifies the location of the resource. + * Gets the name property: The name of the resource. * - * @return the location value. + * @return the name value. */ - public String location() { - return this.location; - } + String name(); /** - * Set the location property: Specifies the location of the resource. + * Gets the type property: The type of the resource. * - * @param location the location value to set. - * @return the PrivateLinkResource object itself. + * @return the type value. */ - public PrivateLinkResource withLocation(String location) { - this.location = location; - return this; - } + String type(); /** - * Get the tags property: Contains resource tags defined as key/value pairs. + * Gets the identity property: The identity property. * - * @return the tags value. + * @return the identity value. */ - public Map tags() { - return this.tags; - } + ManagedServiceIdentity identity(); /** - * Set the tags property: Contains resource tags defined as key/value pairs. + * Gets the location property: Same as workspace location. * - * @param tags the tags value to set. - * @return the PrivateLinkResource object itself. + * @return the location value. */ - public PrivateLinkResource withTags(Map tags) { - this.tags = tags; - return this; - } + String location(); /** - * Get the sku property: The sku of the workspace. + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. * * @return the sku value. */ - public Sku sku() { - return this.sku; - } + Sku sku(); /** - * Set the sku property: The sku of the workspace. + * Gets the tags property: The tags property. * - * @param sku the sku value to set. - * @return the PrivateLinkResource object itself. + * @return the tags value. */ - public PrivateLinkResource withSku(Sku sku) { - this.sku = sku; - return this; - } + Map tags(); /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */ - public SystemData systemData() { - return this.systemData; - } + SystemData systemData(); /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the groupId property: The private link resource group id. + * Gets the groupId property: The private link resource group id. * * @return the groupId value. */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); - } + String groupId(); /** - * Get the requiredMembers property: The private link resource required member names. + * Gets the requiredMembers property: The private link resource required member names. * * @return the requiredMembers value. */ - public List requiredMembers() { - return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); - } + List requiredMembers(); /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. * * @return the requiredZoneNames value. */ - public List requiredZoneNames() { - return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkResourceProperties(); - } - this.innerProperties().withRequiredZoneNames(requiredZoneNames); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } + List requiredZoneNames(); /** - * Reads an instance of PrivateLinkResource from the JsonReader. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner object. * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResource 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 PrivateLinkResource. + * @return the inner object. */ - public static PrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResource deserializedPrivateLinkResource = new PrivateLinkResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResource.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResource.innerProperties = PrivateLinkResourceProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedPrivateLinkResource.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedPrivateLinkResource.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateLinkResource.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedPrivateLinkResource.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateLinkResource.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResource; - }); - } + PrivateLinkResourceInner innerModel(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.java deleted file mode 100644 index b160ef185afd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.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.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import java.util.List; - -/** - * An immutable client-side representation of PrivateLinkResourceListResult. - */ -public interface PrivateLinkResourceListResult { - /** - * Gets the value property: Array of private link resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner object. - * - * @return the inner object. - */ - PrivateLinkResourceListResultInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java index 2ea81b90bfc3..1d0af96dad57 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; /** @@ -12,28 +12,47 @@ */ public interface PrivateLinkResources { /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - Response listWithResponse(String resourceGroupName, String workspaceName, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Gets the private link resources that need to be created for a workspace. + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". + * + * Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. + * Each "private link resource" is a connection endpoint (IP address) to the resource. + * Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. + * Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. + * Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 private link resources that need to be created for a workspace. + * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName); + PagedIterable list(String resourceGroupName, String workspaceName, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java index d1c7df0093f0..0ea0f427c5e6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,19 +17,24 @@ @Fluent public final class PrivateLinkServiceConnectionState implements JsonSerializable { /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + * Some RP chose "None". Other RPs use this for region expansion. */ - private PrivateEndpointServiceConnectionStatus status; + private String actionsRequired; /* - * The reason for approval/rejection of the connection. + * User-defined message that, per NRP doc, may be used for approval-related message. */ private String description; /* - * A message indicating if changes on the service provider require any updates on the consumer. + * Connection status of the service consumer with the service provider\r\nPossible state transitions\r\nPending -> + * Approved (Service provider approves the connection request)\r\nPending -> Rejected (Service provider rejects the + * connection request)\r\nPending -> Disconnected (Service provider deletes the connection)\r\nApproved -> Rejected + * (Service provider rejects the approved connection)\r\nApproved -> Disconnected (Service provider deletes the + * connection)\r\nRejected -> Pending (Service consumer re-initiates the connection request that was + * rejected)\r\nRejected -> Disconnected (Service provider deletes the connection) */ - private String actionsRequired; + private PrivateEndpointServiceConnectionStatus status; /** * Creates an instance of PrivateLinkServiceConnectionState class. @@ -38,29 +43,27 @@ public PrivateLinkServiceConnectionState() { } /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. + * Get the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. * - * @return the status value. + * @return the actionsRequired value. */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; + public String actionsRequired() { + return this.actionsRequired; } /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. + * Set the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. * - * @param status the status value to set. + * @param actionsRequired the actionsRequired value to set. * @return the PrivateLinkServiceConnectionState object itself. */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; return this; } /** - * Get the description property: The reason for approval/rejection of the connection. + * Get the description property: User-defined message that, per NRP doc, may be used for approval-related message. * * @return the description value. */ @@ -69,7 +72,7 @@ public String description() { } /** - * Set the description property: The reason for approval/rejection of the connection. + * Set the description property: User-defined message that, per NRP doc, may be used for approval-related message. * * @param description the description value to set. * @return the PrivateLinkServiceConnectionState object itself. @@ -80,44 +83,46 @@ public PrivateLinkServiceConnectionState withDescription(String description) { } /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. + * Get the status property: Connection status of the service consumer with the service provider\r\nPossible state + * transitions\r\nPending -> Approved (Service provider approves the connection request)\r\nPending -> + * Rejected (Service provider rejects the connection request)\r\nPending -> Disconnected (Service provider + * deletes the connection)\r\nApproved -> Rejected (Service provider rejects the approved connection)\r\nApproved + * -> Disconnected (Service provider deletes the connection)\r\nRejected -> Pending (Service consumer + * re-initiates the connection request that was rejected)\r\nRejected -> Disconnected (Service provider deletes + * the connection). * - * @return the actionsRequired value. + * @return the status value. */ - public String actionsRequired() { - return this.actionsRequired; + public PrivateEndpointServiceConnectionStatus status() { + return this.status; } /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. + * Set the status property: Connection status of the service consumer with the service provider\r\nPossible state + * transitions\r\nPending -> Approved (Service provider approves the connection request)\r\nPending -> + * Rejected (Service provider rejects the connection request)\r\nPending -> Disconnected (Service provider + * deletes the connection)\r\nApproved -> Rejected (Service provider rejects the approved connection)\r\nApproved + * -> Disconnected (Service provider deletes the connection)\r\nRejected -> Pending (Service consumer + * re-initiates the connection request that was rejected)\r\nRejected -> Disconnected (Service provider deletes + * the connection). * - * @param actionsRequired the actionsRequired value to set. + * @param status the status value to set. * @return the PrivateLinkServiceConnectionState object itself. */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; + public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus 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("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("actionsRequired", this.actionsRequired); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); return jsonWriter.writeEndObject(); } @@ -137,13 +142,13 @@ public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); + if ("actionsRequired".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); } else if ("description".equals(fieldName)) { deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("actionsRequired".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.status + = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java index 58138c8e36c3..7aa48acea4e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -24,24 +24,24 @@ public final class ProbeSettings implements JsonSerializable { private Integer failureThreshold; /* - * The number of successful probes before returning a healthy status. + * The delay before the first probe in ISO 8601 format. */ - private Integer successThreshold; + private Duration initialDelay; /* - * The probe timeout in ISO 8601 format. + * The length of time between probes in ISO 8601 format. */ - private Duration timeout; + private Duration period; /* - * The length of time between probes in ISO 8601 format. + * The number of successful probes before returning a healthy status. */ - private Duration period; + private Integer successThreshold; /* - * The delay before the first probe in ISO 8601 format. + * The probe timeout in ISO 8601 format. */ - private Duration initialDelay; + private Duration timeout; /** * Creates an instance of ProbeSettings class. @@ -70,42 +70,22 @@ public ProbeSettings withFailureThreshold(Integer failureThreshold) { } /** - * Get the successThreshold property: The number of successful probes before returning a healthy status. - * - * @return the successThreshold value. - */ - public Integer successThreshold() { - return this.successThreshold; - } - - /** - * Set the successThreshold property: The number of successful probes before returning a healthy status. - * - * @param successThreshold the successThreshold value to set. - * @return the ProbeSettings object itself. - */ - public ProbeSettings withSuccessThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - return this; - } - - /** - * Get the timeout property: The probe timeout in ISO 8601 format. + * Get the initialDelay property: The delay before the first probe in ISO 8601 format. * - * @return the timeout value. + * @return the initialDelay value. */ - public Duration timeout() { - return this.timeout; + public Duration initialDelay() { + return this.initialDelay; } /** - * Set the timeout property: The probe timeout in ISO 8601 format. + * Set the initialDelay property: The delay before the first probe in ISO 8601 format. * - * @param timeout the timeout value to set. + * @param initialDelay the initialDelay value to set. * @return the ProbeSettings object itself. */ - public ProbeSettings withTimeout(Duration timeout) { - this.timeout = timeout; + public ProbeSettings withInitialDelay(Duration initialDelay) { + this.initialDelay = initialDelay; return this; } @@ -130,31 +110,43 @@ public ProbeSettings withPeriod(Duration period) { } /** - * Get the initialDelay property: The delay before the first probe in ISO 8601 format. + * Get the successThreshold property: The number of successful probes before returning a healthy status. * - * @return the initialDelay value. + * @return the successThreshold value. */ - public Duration initialDelay() { - return this.initialDelay; + public Integer successThreshold() { + return this.successThreshold; } /** - * Set the initialDelay property: The delay before the first probe in ISO 8601 format. + * Set the successThreshold property: The number of successful probes before returning a healthy status. * - * @param initialDelay the initialDelay value to set. + * @param successThreshold the successThreshold value to set. * @return the ProbeSettings object itself. */ - public ProbeSettings withInitialDelay(Duration initialDelay) { - this.initialDelay = initialDelay; + public ProbeSettings withSuccessThreshold(Integer successThreshold) { + this.successThreshold = successThreshold; return this; } /** - * Validates the instance. + * Get the timeout property: The probe timeout in ISO 8601 format. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the timeout value. */ - public void validate() { + public Duration timeout() { + return this.timeout; + } + + /** + * Set the timeout property: The probe timeout in ISO 8601 format. + * + * @param timeout the timeout value to set. + * @return the ProbeSettings object itself. + */ + public ProbeSettings withTimeout(Duration timeout) { + this.timeout = timeout; + return this; } /** @@ -164,10 +156,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("failureThreshold", this.failureThreshold); + jsonWriter.writeStringField("initialDelay", CoreUtils.durationToStringWithDays(this.initialDelay)); + jsonWriter.writeStringField("period", CoreUtils.durationToStringWithDays(this.period)); jsonWriter.writeNumberField("successThreshold", this.successThreshold); jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - jsonWriter.writeStringField("period", CoreUtils.durationToStringWithDays(this.period)); - jsonWriter.writeStringField("initialDelay", CoreUtils.durationToStringWithDays(this.initialDelay)); return jsonWriter.writeEndObject(); } @@ -188,16 +180,16 @@ public static ProbeSettings fromJson(JsonReader jsonReader) throws IOException { if ("failureThreshold".equals(fieldName)) { deserializedProbeSettings.failureThreshold = reader.getNullable(JsonReader::getInt); - } else if ("successThreshold".equals(fieldName)) { - deserializedProbeSettings.successThreshold = reader.getNullable(JsonReader::getInt); - } else if ("timeout".equals(fieldName)) { - deserializedProbeSettings.timeout + } else if ("initialDelay".equals(fieldName)) { + deserializedProbeSettings.initialDelay = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else if ("period".equals(fieldName)) { deserializedProbeSettings.period = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("initialDelay".equals(fieldName)) { - deserializedProbeSettings.initialDelay + } else if ("successThreshold".equals(fieldName)) { + deserializedProbeSettings.successThreshold = reader.getNullable(JsonReader::getInt); + } else if ("timeout".equals(fieldName)) { + deserializedProbeSettings.timeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else { reader.skipChildren(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PromptSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PromptSettings.java new file mode 100644 index 000000000000..a07948b05b75 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PromptSettings.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 PromptSettings model. + */ +@Fluent +public final class PromptSettings implements JsonSerializable { + /* + * The enableChainOfDensity property. + */ + private Boolean enableChainOfDensity; + + /* + * The enableChainOfThought property. + */ + private Boolean enableChainOfThought; + + /* + * The maxLenSummary property. + */ + private Integer maxLenSummary; + + /** + * Creates an instance of PromptSettings class. + */ + public PromptSettings() { + } + + /** + * Get the enableChainOfDensity property: The enableChainOfDensity property. + * + * @return the enableChainOfDensity value. + */ + public Boolean enableChainOfDensity() { + return this.enableChainOfDensity; + } + + /** + * Set the enableChainOfDensity property: The enableChainOfDensity property. + * + * @param enableChainOfDensity the enableChainOfDensity value to set. + * @return the PromptSettings object itself. + */ + public PromptSettings withEnableChainOfDensity(Boolean enableChainOfDensity) { + this.enableChainOfDensity = enableChainOfDensity; + return this; + } + + /** + * Get the enableChainOfThought property: The enableChainOfThought property. + * + * @return the enableChainOfThought value. + */ + public Boolean enableChainOfThought() { + return this.enableChainOfThought; + } + + /** + * Set the enableChainOfThought property: The enableChainOfThought property. + * + * @param enableChainOfThought the enableChainOfThought value to set. + * @return the PromptSettings object itself. + */ + public PromptSettings withEnableChainOfThought(Boolean enableChainOfThought) { + this.enableChainOfThought = enableChainOfThought; + return this; + } + + /** + * Get the maxLenSummary property: The maxLenSummary property. + * + * @return the maxLenSummary value. + */ + public Integer maxLenSummary() { + return this.maxLenSummary; + } + + /** + * Set the maxLenSummary property: The maxLenSummary property. + * + * @param maxLenSummary the maxLenSummary value to set. + * @return the PromptSettings object itself. + */ + public PromptSettings withMaxLenSummary(Integer maxLenSummary) { + this.maxLenSummary = maxLenSummary; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableChainOfDensity", this.enableChainOfDensity); + jsonWriter.writeBooleanField("enableChainOfThought", this.enableChainOfThought); + jsonWriter.writeNumberField("maxLenSummary", this.maxLenSummary); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PromptSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PromptSettings 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 PromptSettings. + */ + public static PromptSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PromptSettings deserializedPromptSettings = new PromptSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableChainOfDensity".equals(fieldName)) { + deserializedPromptSettings.enableChainOfDensity = reader.getNullable(JsonReader::getBoolean); + } else if ("enableChainOfThought".equals(fieldName)) { + deserializedPromptSettings.enableChainOfThought = reader.getNullable(JsonReader::getBoolean); + } else if ("maxLenSummary".equals(fieldName)) { + deserializedPromptSettings.maxLenSummary = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedPromptSettings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java new file mode 100644 index 000000000000..da1e073e928e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Base definition for pool resources. + */ +@Fluent +public class PropertiesBase implements JsonSerializable { + /* + * Description of the resource. + */ + private String description; + + /* + * Property dictionary. Properties can be added, but not removed or altered. + */ + private List properties; + + /** + * Creates an instance of PropertiesBase class. + */ + public PropertiesBase() { + } + + /** + * Get the description property: Description of the resource. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the resource. + * + * @param description the description value to set. + * @return the PropertiesBase object itself. + */ + public PropertiesBase withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @return the properties value. + */ + public List properties() { + return this.properties; + } + + /** + * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. + * + * @param properties the properties value to set. + * @return the PropertiesBase object itself. + */ + public PropertiesBase withProperties(List properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("properties", this.properties, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PropertiesBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PropertiesBase 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 PropertiesBase. + */ + public static PropertiesBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PropertiesBase deserializedPropertiesBase = new PropertiesBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedPropertiesBase.description = reader.getString(); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringStringKeyValuePair.fromJson(reader1)); + deserializedPropertiesBase.properties = properties; + } else { + reader.skipChildren(); + } + } + + return deserializedPropertiesBase; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java index f7acb8827758..28b3c2dbe56f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Endpoint Communication Protocol - * * Protocol over which communication will happen over this endpoint. */ public final class Protocol extends ExpandableStringEnum { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java index 8b9f3f919d3d..edd90adb9b8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,7 @@ import java.util.Collection; /** - * The current deployment state of workspace resource. The provisioningState is to indicate states for resource - * provisioning. + * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. */ public final class ProvisioningState extends ExpandableStringEnum { /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java index 7f648d1e4ef5..c82609af4c1b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java index fc4f3647534e..3e08f22f0957 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Whether requests from Public Network are allowed. + * Enum to determine whether PublicNetworkAccess is Enabled or Disabled. */ public final class PublicNetworkAccess extends ExpandableStringEnum { /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.java deleted file mode 100644 index 631d09e2877e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Enum to determine whether PublicNetworkAccess is Enabled or Disabled. - */ -public final class PublicNetworkAccessType extends ExpandableStringEnum { - /** - * Static value Enabled for PublicNetworkAccessType. - */ - public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PublicNetworkAccessType. - */ - public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccessType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccessType() { - } - - /** - * Creates or finds a PublicNetworkAccessType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccessType. - */ - public static PublicNetworkAccessType fromString(String name) { - return fromString(name, PublicNetworkAccessType.class); - } - - /** - * Gets known PublicNetworkAccessType values. - * - * @return known PublicNetworkAccessType values. - */ - public static Collection values() { - return values(PublicNetworkAccessType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java index 6f0ada746ac7..8c0aee1b4f4f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,16 +61,6 @@ public PyTorch withProcessCountPerInstance(Integer processCountPerInstance) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java index 5bd3b4d276fb..7df7487010f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,7 +17,7 @@ @Fluent public final class QueueSettings implements JsonSerializable { /* - * Controls the compute job tier + * Enum to determine the job tier. */ private JobTier jobTier; @@ -28,7 +28,7 @@ public QueueSettings() { } /** - * Get the jobTier property: Controls the compute job tier. + * Get the jobTier property: Enum to determine the job tier. * * @return the jobTier value. */ @@ -37,7 +37,7 @@ public JobTier jobTier() { } /** - * Set the jobTier property: Controls the compute job tier. + * Set the jobTier property: Enum to determine the job tier. * * @param jobTier the jobTier value to set. * @return the QueueSettings object itself. @@ -47,14 +47,6 @@ public QueueSettings withJobTier(JobTier jobTier) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java index 7d81d8d5435b..3b744c67cfdd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -27,6 +27,8 @@ public final class QuotaBaseProperties implements JsonSerializable e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java index e8d4b6a08c8c..36b2bcb88e56 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -15,8 +15,8 @@ public interface Quotas { /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @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. @@ -29,8 +29,8 @@ Response updateWithResponse(String location, QuotaU /** * Update quota for each VM family in workspace. * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. + * @param location The location name. + * @param parameters The request body. * @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. @@ -41,7 +41,7 @@ Response updateWithResponse(String location, QuotaU /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -53,7 +53,7 @@ Response updateWithResponse(String location, QuotaU /** * Gets the currently assigned Workspace Quotas based on VMFamily. * - * @param location The location for which resource usage is queried. + * @param location The location 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java new file mode 100644 index 000000000000..0b3674172a58 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Azure OpenAI blocklist config. + */ +@Fluent +public final class RaiBlocklistConfig implements JsonSerializable { + /* + * If blocking would occur. + */ + private Boolean blocking; + + /* + * Name of ContentFilter. + */ + private String blocklistName; + + /** + * Creates an instance of RaiBlocklistConfig class. + */ + public RaiBlocklistConfig() { + } + + /** + * Get the blocking property: If blocking would occur. + * + * @return the blocking value. + */ + public Boolean blocking() { + return this.blocking; + } + + /** + * Set the blocking property: If blocking would occur. + * + * @param blocking the blocking value to set. + * @return the RaiBlocklistConfig object itself. + */ + public RaiBlocklistConfig withBlocking(Boolean blocking) { + this.blocking = blocking; + return this; + } + + /** + * Get the blocklistName property: Name of ContentFilter. + * + * @return the blocklistName value. + */ + public String blocklistName() { + return this.blocklistName; + } + + /** + * Set the blocklistName property: Name of ContentFilter. + * + * @param blocklistName the blocklistName value to set. + * @return the RaiBlocklistConfig object itself. + */ + public RaiBlocklistConfig withBlocklistName(String blocklistName) { + this.blocklistName = blocklistName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("blocking", this.blocking); + jsonWriter.writeStringField("blocklistName", this.blocklistName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistConfig 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 RaiBlocklistConfig. + */ + public static RaiBlocklistConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistConfig deserializedRaiBlocklistConfig = new RaiBlocklistConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("blocking".equals(fieldName)) { + deserializedRaiBlocklistConfig.blocking = reader.getNullable(JsonReader::getBoolean); + } else if ("blocklistName".equals(fieldName)) { + deserializedRaiBlocklistConfig.blocklistName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistConfig; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java new file mode 100644 index 000000000000..0f2d6f51af7c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 Cognitive Services RaiBlocklist Item request body. + */ +@Fluent +public final class RaiBlocklistItemBulkRequest implements JsonSerializable { + /* + * The name property. + */ + private String name; + + /* + * Properties of Cognitive Services RaiBlocklist Item. + */ + private RaiBlocklistItemProperties properties; + + /** + * Creates an instance of RaiBlocklistItemBulkRequest class. + */ + public RaiBlocklistItemBulkRequest() { + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the RaiBlocklistItemBulkRequest object itself. + */ + public RaiBlocklistItemBulkRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: Properties of Cognitive Services RaiBlocklist Item. + * + * @return the properties value. + */ + public RaiBlocklistItemProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of Cognitive Services RaiBlocklist Item. + * + * @param properties the properties value to set. + * @return the RaiBlocklistItemBulkRequest object itself. + */ + public RaiBlocklistItemBulkRequest withProperties(RaiBlocklistItemProperties properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistItemBulkRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemBulkRequest 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 RaiBlocklistItemBulkRequest. + */ + public static RaiBlocklistItemBulkRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemBulkRequest deserializedRaiBlocklistItemBulkRequest = new RaiBlocklistItemBulkRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRaiBlocklistItemBulkRequest.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiBlocklistItemBulkRequest.properties = RaiBlocklistItemProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemBulkRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java new file mode 100644 index 000000000000..9ec83eb5cfe8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * RAI Custom Blocklist Item properties. + */ +@Fluent +public final class RaiBlocklistItemProperties implements JsonSerializable { + /* + * If the pattern is a regex pattern. + */ + private Boolean isRegex; + + /* + * Pattern to match against. + */ + private String pattern; + + /** + * Creates an instance of RaiBlocklistItemProperties class. + */ + public RaiBlocklistItemProperties() { + } + + /** + * Get the isRegex property: If the pattern is a regex pattern. + * + * @return the isRegex value. + */ + public Boolean isRegex() { + return this.isRegex; + } + + /** + * Set the isRegex property: If the pattern is a regex pattern. + * + * @param isRegex the isRegex value to set. + * @return the RaiBlocklistItemProperties object itself. + */ + public RaiBlocklistItemProperties withIsRegex(Boolean isRegex) { + this.isRegex = isRegex; + return this; + } + + /** + * Get the pattern property: Pattern to match against. + * + * @return the pattern value. + */ + public String pattern() { + return this.pattern; + } + + /** + * Set the pattern property: Pattern to match against. + * + * @param pattern the pattern value to set. + * @return the RaiBlocklistItemProperties object itself. + */ + public RaiBlocklistItemProperties withPattern(String pattern) { + this.pattern = pattern; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isRegex", this.isRegex); + jsonWriter.writeStringField("pattern", this.pattern); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistItemProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemProperties 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 RaiBlocklistItemProperties. + */ + public static RaiBlocklistItemProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemProperties deserializedRaiBlocklistItemProperties = new RaiBlocklistItemProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isRegex".equals(fieldName)) { + deserializedRaiBlocklistItemProperties.isRegex = reader.getNullable(JsonReader::getBoolean); + } else if ("pattern".equals(fieldName)) { + deserializedRaiBlocklistItemProperties.pattern = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java new file mode 100644 index 000000000000..1f3fa5bf0901 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; + +/** + * An immutable client-side representation of RaiBlocklistItemPropertiesBasicResource. + */ +public interface RaiBlocklistItemPropertiesBasicResource { + /** + * 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: RAI Custom Blocklist Item properties. + * + * @return the properties value. + */ + RaiBlocklistItemProperties 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.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner object. + * + * @return the inner object. + */ + RaiBlocklistItemPropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the RaiBlocklistItemPropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The RaiBlocklistItemPropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the RaiBlocklistItemPropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the RaiBlocklistItemPropertiesBasicResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, connectionName, raiBlocklistName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param raiBlocklistName The name of the RaiBlocklist. + * @return the next definition stage. + */ + WithProperties withExistingRaiBlocklist(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName); + } + + /** + * The stage of the RaiBlocklistItemPropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: RAI Custom Blocklist Item properties.. + * + * @param properties RAI Custom Blocklist Item properties. + * @return the next definition stage. + */ + WithCreate withProperties(RaiBlocklistItemProperties properties); + } + + /** + * The stage of the RaiBlocklistItemPropertiesBasicResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + RaiBlocklistItemPropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RaiBlocklistItemPropertiesBasicResource create(Context context); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RaiBlocklistItemPropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RaiBlocklistItemPropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java new file mode 100644 index 000000000000..3de40ab2e57e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * RAI Custom Blocklist properties. + */ +@Fluent +public final class RaiBlocklistProperties implements JsonSerializable { + /* + * Description of the block list. + */ + private String description; + + /** + * Creates an instance of RaiBlocklistProperties class. + */ + public RaiBlocklistProperties() { + } + + /** + * Get the description property: Description of the block list. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the block list. + * + * @param description the description value to set. + * @return the RaiBlocklistProperties object itself. + */ + public RaiBlocklistProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistProperties 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 RaiBlocklistProperties. + */ + public static RaiBlocklistProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistProperties deserializedRaiBlocklistProperties = new RaiBlocklistProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedRaiBlocklistProperties.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java new file mode 100644 index 000000000000..71f7426d53c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; + +/** + * An immutable client-side representation of RaiBlocklistPropertiesBasicResource. + */ +public interface RaiBlocklistPropertiesBasicResource { + /** + * 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: RAI Custom Blocklist properties. + * + * @return the properties value. + */ + RaiBlocklistProperties 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.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner + * object. + * + * @return the inner object. + */ + RaiBlocklistPropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the RaiBlocklistPropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The RaiBlocklistPropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the RaiBlocklistPropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the RaiBlocklistPropertiesBasicResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, connectionName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @return the next definition stage. + */ + WithProperties withExistingConnection(String resourceGroupName, String workspaceName, + String connectionName); + } + + /** + * The stage of the RaiBlocklistPropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: RAI Custom Blocklist properties.. + * + * @param properties RAI Custom Blocklist properties. + * @return the next definition stage. + */ + WithCreate withProperties(RaiBlocklistProperties properties); + } + + /** + * The stage of the RaiBlocklistPropertiesBasicResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + RaiBlocklistPropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RaiBlocklistPropertiesBasicResource create(Context context); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RaiBlocklistPropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RaiBlocklistPropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java new file mode 100644 index 000000000000..654cc3dea823 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of RaiPolicies. + */ +public interface RaiPolicies { + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Content Filters associated with the Azure OpenAI account. + */ + RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @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 resourceGroupName, String workspaceName, String endpointName, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @param raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 specified Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + RaiPolicyPropertiesBasicResource getById(String id); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 specified Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 specified Content Filters associated with the Azure OpenAI account. + * + * @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. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new RaiPolicyPropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new RaiPolicyPropertiesBasicResource definition. + */ + RaiPolicyPropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPoliciesOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPoliciesOperations.java new file mode 100644 index 000000000000..59d57bf5f034 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPoliciesOperations.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of RaiPoliciesOperations. + */ +public interface RaiPoliciesOperations { + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java new file mode 100644 index 000000000000..bd5db630c61f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Azure OpenAI Content Filter. + */ +@Fluent +public final class RaiPolicyContentFilter implements JsonSerializable { + /* + * Level at which content is filtered. + */ + private AllowedContentLevel allowedContentLevel; + + /* + * If blocking would occur. + */ + private Boolean blocking; + + /* + * If the ContentFilter is enabled. + */ + private Boolean enabled; + + /* + * Name of ContentFilter. + */ + private String name; + + /* + * Content source to apply the Content Filters. + */ + private RaiPolicyContentSource source; + + /** + * Creates an instance of RaiPolicyContentFilter class. + */ + public RaiPolicyContentFilter() { + } + + /** + * Get the allowedContentLevel property: Level at which content is filtered. + * + * @return the allowedContentLevel value. + */ + public AllowedContentLevel allowedContentLevel() { + return this.allowedContentLevel; + } + + /** + * Set the allowedContentLevel property: Level at which content is filtered. + * + * @param allowedContentLevel the allowedContentLevel value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withAllowedContentLevel(AllowedContentLevel allowedContentLevel) { + this.allowedContentLevel = allowedContentLevel; + return this; + } + + /** + * Get the blocking property: If blocking would occur. + * + * @return the blocking value. + */ + public Boolean blocking() { + return this.blocking; + } + + /** + * Set the blocking property: If blocking would occur. + * + * @param blocking the blocking value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withBlocking(Boolean blocking) { + this.blocking = blocking; + return this; + } + + /** + * Get the enabled property: If the ContentFilter is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: If the ContentFilter is enabled. + * + * @param enabled the enabled value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the name property: Name of ContentFilter. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of ContentFilter. + * + * @param name the name value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withName(String name) { + this.name = name; + return this; + } + + /** + * Get the source property: Content source to apply the Content Filters. + * + * @return the source value. + */ + public RaiPolicyContentSource source() { + return this.source; + } + + /** + * Set the source property: Content source to apply the Content Filters. + * + * @param source the source value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withSource(RaiPolicyContentSource source) { + this.source = source; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("allowedContentLevel", + this.allowedContentLevel == null ? null : this.allowedContentLevel.toString()); + jsonWriter.writeBooleanField("blocking", this.blocking); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiPolicyContentFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyContentFilter 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 RaiPolicyContentFilter. + */ + public static RaiPolicyContentFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyContentFilter deserializedRaiPolicyContentFilter = new RaiPolicyContentFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowedContentLevel".equals(fieldName)) { + deserializedRaiPolicyContentFilter.allowedContentLevel + = AllowedContentLevel.fromString(reader.getString()); + } else if ("blocking".equals(fieldName)) { + deserializedRaiPolicyContentFilter.blocking = reader.getNullable(JsonReader::getBoolean); + } else if ("enabled".equals(fieldName)) { + deserializedRaiPolicyContentFilter.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("name".equals(fieldName)) { + deserializedRaiPolicyContentFilter.name = reader.getString(); + } else if ("source".equals(fieldName)) { + deserializedRaiPolicyContentFilter.source = RaiPolicyContentSource.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyContentFilter; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java new file mode 100644 index 000000000000..397f6fcc1c87 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Content source to apply the Content Filters. + */ +public final class RaiPolicyContentSource extends ExpandableStringEnum { + /** + * Static value Prompt for RaiPolicyContentSource. + */ + public static final RaiPolicyContentSource PROMPT = fromString("Prompt"); + + /** + * Static value Completion for RaiPolicyContentSource. + */ + public static final RaiPolicyContentSource COMPLETION = fromString("Completion"); + + /** + * Creates a new instance of RaiPolicyContentSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RaiPolicyContentSource() { + } + + /** + * Creates or finds a RaiPolicyContentSource from its string representation. + * + * @param name a name to look for. + * @return the corresponding RaiPolicyContentSource. + */ + public static RaiPolicyContentSource fromString(String name) { + return fromString(name, RaiPolicyContentSource.class); + } + + /** + * Gets known RaiPolicyContentSource values. + * + * @return known RaiPolicyContentSource values. + */ + public static Collection values() { + return values(RaiPolicyContentSource.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java new file mode 100644 index 000000000000..e632a0fe2dc6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Content Filters mode. + */ +public final class RaiPolicyMode extends ExpandableStringEnum { + /** + * Static value Default for RaiPolicyMode. + */ + public static final RaiPolicyMode DEFAULT = fromString("Default"); + + /** + * Static value Deferred for RaiPolicyMode. + */ + public static final RaiPolicyMode DEFERRED = fromString("Deferred"); + + /** + * Static value Blocking for RaiPolicyMode. + */ + public static final RaiPolicyMode BLOCKING = fromString("Blocking"); + + /** + * Creates a new instance of RaiPolicyMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RaiPolicyMode() { + } + + /** + * Creates or finds a RaiPolicyMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding RaiPolicyMode. + */ + public static RaiPolicyMode fromString(String name) { + return fromString(name, RaiPolicyMode.class); + } + + /** + * Gets known RaiPolicyMode values. + * + * @return known RaiPolicyMode values. + */ + public static Collection values() { + return values(RaiPolicyMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java new file mode 100644 index 000000000000..25070dff1600 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Azure OpenAI Content Filters properties. + */ +@Fluent +public final class RaiPolicyProperties implements JsonSerializable { + /* + * Name of the base Content Filters. + */ + private String basePolicyName; + + /* + * The completionBlocklists property. + */ + private List completionBlocklists; + + /* + * The contentFilters property. + */ + private List contentFilters; + + /* + * Content Filters mode. + */ + private RaiPolicyMode mode; + + /* + * The promptBlocklists property. + */ + private List promptBlocklists; + + /* + * Content Filters policy type. + */ + private RaiPolicyType type; + + /** + * Creates an instance of RaiPolicyProperties class. + */ + public RaiPolicyProperties() { + } + + /** + * Get the basePolicyName property: Name of the base Content Filters. + * + * @return the basePolicyName value. + */ + public String basePolicyName() { + return this.basePolicyName; + } + + /** + * Set the basePolicyName property: Name of the base Content Filters. + * + * @param basePolicyName the basePolicyName value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withBasePolicyName(String basePolicyName) { + this.basePolicyName = basePolicyName; + return this; + } + + /** + * Get the completionBlocklists property: The completionBlocklists property. + * + * @return the completionBlocklists value. + */ + public List completionBlocklists() { + return this.completionBlocklists; + } + + /** + * Set the completionBlocklists property: The completionBlocklists property. + * + * @param completionBlocklists the completionBlocklists value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withCompletionBlocklists(List completionBlocklists) { + this.completionBlocklists = completionBlocklists; + return this; + } + + /** + * Get the contentFilters property: The contentFilters property. + * + * @return the contentFilters value. + */ + public List contentFilters() { + return this.contentFilters; + } + + /** + * Set the contentFilters property: The contentFilters property. + * + * @param contentFilters the contentFilters value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withContentFilters(List contentFilters) { + this.contentFilters = contentFilters; + return this; + } + + /** + * Get the mode property: Content Filters mode. + * + * @return the mode value. + */ + public RaiPolicyMode mode() { + return this.mode; + } + + /** + * Set the mode property: Content Filters mode. + * + * @param mode the mode value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withMode(RaiPolicyMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the promptBlocklists property: The promptBlocklists property. + * + * @return the promptBlocklists value. + */ + public List promptBlocklists() { + return this.promptBlocklists; + } + + /** + * Set the promptBlocklists property: The promptBlocklists property. + * + * @param promptBlocklists the promptBlocklists value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withPromptBlocklists(List promptBlocklists) { + this.promptBlocklists = promptBlocklists; + return this; + } + + /** + * Get the type property: Content Filters policy type. + * + * @return the type value. + */ + public RaiPolicyType type() { + return this.type; + } + + /** + * Set the type property: Content Filters policy type. + * + * @param type the type value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withType(RaiPolicyType type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("basePolicyName", this.basePolicyName); + jsonWriter.writeArrayField("completionBlocklists", this.completionBlocklists, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("contentFilters", this.contentFilters, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeArrayField("promptBlocklists", this.promptBlocklists, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyProperties 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 RaiPolicyProperties. + */ + public static RaiPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyProperties deserializedRaiPolicyProperties = new RaiPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("basePolicyName".equals(fieldName)) { + deserializedRaiPolicyProperties.basePolicyName = reader.getString(); + } else if ("completionBlocklists".equals(fieldName)) { + List completionBlocklists + = reader.readArray(reader1 -> RaiBlocklistConfig.fromJson(reader1)); + deserializedRaiPolicyProperties.completionBlocklists = completionBlocklists; + } else if ("contentFilters".equals(fieldName)) { + List contentFilters + = reader.readArray(reader1 -> RaiPolicyContentFilter.fromJson(reader1)); + deserializedRaiPolicyProperties.contentFilters = contentFilters; + } else if ("mode".equals(fieldName)) { + deserializedRaiPolicyProperties.mode = RaiPolicyMode.fromString(reader.getString()); + } else if ("promptBlocklists".equals(fieldName)) { + List promptBlocklists + = reader.readArray(reader1 -> RaiBlocklistConfig.fromJson(reader1)); + deserializedRaiPolicyProperties.promptBlocklists = promptBlocklists; + } else if ("type".equals(fieldName)) { + deserializedRaiPolicyProperties.type = RaiPolicyType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java new file mode 100644 index 000000000000..ac7e68718002 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * An immutable client-side representation of RaiPolicyPropertiesBasicResource. + */ +public interface RaiPolicyPropertiesBasicResource { + /** + * 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: Azure OpenAI Content Filters properties. + * + * @return the properties value. + */ + RaiPolicyProperties 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.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner + * object. + * + * @return the inner object. + */ + RaiPolicyPropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the RaiPolicyPropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The RaiPolicyPropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the RaiPolicyPropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the RaiPolicyPropertiesBasicResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, endpointName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param endpointName Name of the endpoint resource. + * @return the next definition stage. + */ + WithProperties withExistingEndpoint(String resourceGroupName, String workspaceName, String endpointName); + } + + /** + * The stage of the RaiPolicyPropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure OpenAI Content Filters properties.. + * + * @param properties Azure OpenAI Content Filters properties. + * @return the next definition stage. + */ + WithCreate withProperties(RaiPolicyProperties properties); + } + + /** + * The stage of the RaiPolicyPropertiesBasicResource 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 { + /** + * Executes the create request. + * + * @return the created resource. + */ + RaiPolicyPropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RaiPolicyPropertiesBasicResource create(Context context); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RaiPolicyPropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RaiPolicyPropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java new file mode 100644 index 000000000000..2072e5b3082d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Content Filters policy type. + */ +public final class RaiPolicyType extends ExpandableStringEnum { + /** + * Static value UserManaged for RaiPolicyType. + */ + public static final RaiPolicyType USER_MANAGED = fromString("UserManaged"); + + /** + * Static value SystemManaged for RaiPolicyType. + */ + public static final RaiPolicyType SYSTEM_MANAGED = fromString("SystemManaged"); + + /** + * Creates a new instance of RaiPolicyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RaiPolicyType() { + } + + /** + * Creates or finds a RaiPolicyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RaiPolicyType. + */ + public static RaiPolicyType fromString(String name) { + return fromString(name, RaiPolicyType.class); + } + + /** + * Gets known RaiPolicyType values. + * + * @return known RaiPolicyType values. + */ + public static Collection values() { + return values(RaiPolicyType.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java index cad825a4e399..24eba6c6c704 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,14 +21,14 @@ public final class RandomSamplingAlgorithm extends SamplingAlgorithm { private SamplingAlgorithmType samplingAlgorithmType = SamplingAlgorithmType.RANDOM; /* - * An optional integer to use as the seed for random number generation + * The specific type of random algorithm */ - private Integer seed; + private RandomSamplingAlgorithmRule rule; /* - * The specific type of random algorithm + * An optional integer to use as the seed for random number generation */ - private RandomSamplingAlgorithmRule rule; + private Integer seed; /** * Creates an instance of RandomSamplingAlgorithm class. @@ -47,26 +47,6 @@ public SamplingAlgorithmType samplingAlgorithmType() { return this.samplingAlgorithmType; } - /** - * Get the seed property: An optional integer to use as the seed for random number generation. - * - * @return the seed value. - */ - public Integer seed() { - return this.seed; - } - - /** - * Set the seed property: An optional integer to use as the seed for random number generation. - * - * @param seed the seed value to set. - * @return the RandomSamplingAlgorithm object itself. - */ - public RandomSamplingAlgorithm withSeed(Integer seed) { - this.seed = seed; - return this; - } - /** * Get the rule property: The specific type of random algorithm. * @@ -88,13 +68,23 @@ public RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule) { } /** - * Validates the instance. + * Get the seed property: An optional integer to use as the seed for random number generation. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the seed value. */ - @Override - public void validate() { - super.validate(); + public Integer seed() { + return this.seed; + } + + /** + * Set the seed property: An optional integer to use as the seed for random number generation. + * + * @param seed the seed value to set. + * @return the RandomSamplingAlgorithm object itself. + */ + public RandomSamplingAlgorithm withSeed(Integer seed) { + this.seed = seed; + return this; } /** @@ -105,8 +95,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("samplingAlgorithmType", this.samplingAlgorithmType == null ? null : this.samplingAlgorithmType.toString()); - jsonWriter.writeNumberField("seed", this.seed); jsonWriter.writeStringField("rule", this.rule == null ? null : this.rule.toString()); + jsonWriter.writeNumberField("seed", this.seed); return jsonWriter.writeEndObject(); } @@ -128,11 +118,11 @@ public static RandomSamplingAlgorithm fromJson(JsonReader jsonReader) throws IOE if ("samplingAlgorithmType".equals(fieldName)) { deserializedRandomSamplingAlgorithm.samplingAlgorithmType = SamplingAlgorithmType.fromString(reader.getString()); - } else if ("seed".equals(fieldName)) { - deserializedRandomSamplingAlgorithm.seed = reader.getNullable(JsonReader::getInt); } else if ("rule".equals(fieldName)) { deserializedRandomSamplingAlgorithm.rule = RandomSamplingAlgorithmRule.fromString(reader.getString()); + } else if ("seed".equals(fieldName)) { + deserializedRandomSamplingAlgorithm.seed = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java index 6cce58bfa30c..fbf7b2d2a024 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java new file mode 100644 index 000000000000..0a5da0a4e8bf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Ray distribution configuration. + * A class for managing the configuration for a distributed Ray job. + */ +@Fluent +public final class Ray extends DistributionConfiguration { + /* + * [Required] Specifies the type of distribution framework. + */ + private DistributionType distributionType = DistributionType.RAY; + + /* + * The port of the head ray process. + */ + private Integer port; + + /* + * The address of Ray head node. + */ + private String address; + + /* + * Provide this argument to start the Ray dashboard GUI. + */ + private Boolean includeDashboard; + + /* + * The port to bind the dashboard server to. + */ + private Integer dashboardPort; + + /* + * Additional arguments passed to ray start in head node. + */ + private String headNodeAdditionalArgs; + + /* + * Additional arguments passed to ray start in worker node. + */ + private String workerNodeAdditionalArgs; + + /** + * Creates an instance of Ray class. + */ + public Ray() { + } + + /** + * Get the distributionType property: [Required] Specifies the type of distribution framework. + * + * @return the distributionType value. + */ + @Override + public DistributionType distributionType() { + return this.distributionType; + } + + /** + * Get the port property: The port of the head ray process. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port of the head ray process. + * + * @param port the port value to set. + * @return the Ray object itself. + */ + public Ray withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the address property: The address of Ray head node. + * + * @return the address value. + */ + public String address() { + return this.address; + } + + /** + * Set the address property: The address of Ray head node. + * + * @param address the address value to set. + * @return the Ray object itself. + */ + public Ray withAddress(String address) { + this.address = address; + return this; + } + + /** + * Get the includeDashboard property: Provide this argument to start the Ray dashboard GUI. + * + * @return the includeDashboard value. + */ + public Boolean includeDashboard() { + return this.includeDashboard; + } + + /** + * Set the includeDashboard property: Provide this argument to start the Ray dashboard GUI. + * + * @param includeDashboard the includeDashboard value to set. + * @return the Ray object itself. + */ + public Ray withIncludeDashboard(Boolean includeDashboard) { + this.includeDashboard = includeDashboard; + return this; + } + + /** + * Get the dashboardPort property: The port to bind the dashboard server to. + * + * @return the dashboardPort value. + */ + public Integer dashboardPort() { + return this.dashboardPort; + } + + /** + * Set the dashboardPort property: The port to bind the dashboard server to. + * + * @param dashboardPort the dashboardPort value to set. + * @return the Ray object itself. + */ + public Ray withDashboardPort(Integer dashboardPort) { + this.dashboardPort = dashboardPort; + return this; + } + + /** + * Get the headNodeAdditionalArgs property: Additional arguments passed to ray start in head node. + * + * @return the headNodeAdditionalArgs value. + */ + public String headNodeAdditionalArgs() { + return this.headNodeAdditionalArgs; + } + + /** + * Set the headNodeAdditionalArgs property: Additional arguments passed to ray start in head node. + * + * @param headNodeAdditionalArgs the headNodeAdditionalArgs value to set. + * @return the Ray object itself. + */ + public Ray withHeadNodeAdditionalArgs(String headNodeAdditionalArgs) { + this.headNodeAdditionalArgs = headNodeAdditionalArgs; + return this; + } + + /** + * Get the workerNodeAdditionalArgs property: Additional arguments passed to ray start in worker node. + * + * @return the workerNodeAdditionalArgs value. + */ + public String workerNodeAdditionalArgs() { + return this.workerNodeAdditionalArgs; + } + + /** + * Set the workerNodeAdditionalArgs property: Additional arguments passed to ray start in worker node. + * + * @param workerNodeAdditionalArgs the workerNodeAdditionalArgs value to set. + * @return the Ray object itself. + */ + public Ray withWorkerNodeAdditionalArgs(String workerNodeAdditionalArgs) { + this.workerNodeAdditionalArgs = workerNodeAdditionalArgs; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("distributionType", + this.distributionType == null ? null : this.distributionType.toString()); + jsonWriter.writeNumberField("port", this.port); + jsonWriter.writeStringField("address", this.address); + jsonWriter.writeBooleanField("includeDashboard", this.includeDashboard); + jsonWriter.writeNumberField("dashboardPort", this.dashboardPort); + jsonWriter.writeStringField("headNodeAdditionalArgs", this.headNodeAdditionalArgs); + jsonWriter.writeStringField("workerNodeAdditionalArgs", this.workerNodeAdditionalArgs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Ray from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Ray 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 Ray. + */ + public static Ray fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Ray deserializedRay = new Ray(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("distributionType".equals(fieldName)) { + deserializedRay.distributionType = DistributionType.fromString(reader.getString()); + } else if ("port".equals(fieldName)) { + deserializedRay.port = reader.getNullable(JsonReader::getInt); + } else if ("address".equals(fieldName)) { + deserializedRay.address = reader.getString(); + } else if ("includeDashboard".equals(fieldName)) { + deserializedRay.includeDashboard = reader.getNullable(JsonReader::getBoolean); + } else if ("dashboardPort".equals(fieldName)) { + deserializedRay.dashboardPort = reader.getNullable(JsonReader::getInt); + } else if ("headNodeAdditionalArgs".equals(fieldName)) { + deserializedRay.headNodeAdditionalArgs = reader.getString(); + } else if ("workerNodeAdditionalArgs".equals(fieldName)) { + deserializedRay.workerNodeAdditionalArgs = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRay; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java index de9fb39fe4c8..5f3de64fda18 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -153,17 +153,6 @@ public Recurrence withSchedule(ComputeRecurrenceSchedule schedule) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schedule() != null) { - schedule().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java index cb1d13b76703..c3b0571e971a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,27 +12,27 @@ */ public final class RecurrenceFrequency extends ExpandableStringEnum { /** - * Static value Minute for RecurrenceFrequency. + * Minute frequency. */ public static final RecurrenceFrequency MINUTE = fromString("Minute"); /** - * Static value Hour for RecurrenceFrequency. + * Hour frequency. */ public static final RecurrenceFrequency HOUR = fromString("Hour"); /** - * Static value Day for RecurrenceFrequency. + * Day frequency. */ public static final RecurrenceFrequency DAY = fromString("Day"); /** - * Static value Week for RecurrenceFrequency. + * Week frequency. */ public static final RecurrenceFrequency WEEK = fromString("Week"); /** - * Static value Month for RecurrenceFrequency. + * Month frequency. */ public static final RecurrenceFrequency MONTH = fromString("Month"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java index 4572b77f814a..05579b903f22 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -29,14 +28,14 @@ public final class RecurrenceSchedule implements JsonSerializable minutes; /* - * List of days for the schedule. + * List of month days for the schedule */ - private List weekDays; + private List monthDays; /* - * List of month days for the schedule + * List of days for the schedule. */ - private List monthDays; + private List weekDays; /** * Creates an instance of RecurrenceSchedule class. @@ -84,26 +83,6 @@ public RecurrenceSchedule withMinutes(List minutes) { return this; } - /** - * Get the weekDays property: List of days for the schedule. - * - * @return the weekDays value. - */ - public List weekDays() { - return this.weekDays; - } - - /** - * Set the weekDays property: List of days for the schedule. - * - * @param weekDays the weekDays value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withWeekDays(List weekDays) { - this.weekDays = weekDays; - return this; - } - /** * Get the monthDays property: List of month days for the schedule. * @@ -125,22 +104,24 @@ public RecurrenceSchedule withMonthDays(List monthDays) { } /** - * Validates the instance. + * Get the weekDays property: List of days for the schedule. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the weekDays value. */ - public void validate() { - if (hours() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property hours in model RecurrenceSchedule")); - } - if (minutes() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property minutes in model RecurrenceSchedule")); - } + public List weekDays() { + return this.weekDays; } - private static final ClientLogger LOGGER = new ClientLogger(RecurrenceSchedule.class); + /** + * Set the weekDays property: List of days for the schedule. + * + * @param weekDays the weekDays value to set. + * @return the RecurrenceSchedule object itself. + */ + public RecurrenceSchedule withWeekDays(List weekDays) { + this.weekDays = weekDays; + return this; + } /** * {@inheritDoc} @@ -150,9 +131,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("hours", this.hours, (writer, element) -> writer.writeInt(element)); jsonWriter.writeArrayField("minutes", this.minutes, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeArrayField("monthDays", this.monthDays, (writer, element) -> writer.writeInt(element)); jsonWriter.writeArrayField("weekDays", this.weekDays, (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("monthDays", this.monthDays, (writer, element) -> writer.writeInt(element)); return jsonWriter.writeEndObject(); } @@ -178,12 +159,12 @@ public static RecurrenceSchedule fromJson(JsonReader jsonReader) throws IOExcept } else if ("minutes".equals(fieldName)) { List minutes = reader.readArray(reader1 -> reader1.getInt()); deserializedRecurrenceSchedule.minutes = minutes; - } else if ("weekDays".equals(fieldName)) { - List weekDays = reader.readArray(reader1 -> WeekDay.fromString(reader1.getString())); - deserializedRecurrenceSchedule.weekDays = weekDays; } else if ("monthDays".equals(fieldName)) { List monthDays = reader.readArray(reader1 -> reader1.getInt()); deserializedRecurrenceSchedule.monthDays = monthDays; + } else if ("weekDays".equals(fieldName)) { + List weekDays = reader.readArray(reader1 -> WeekDay.fromString(reader1.getString())); + deserializedRecurrenceSchedule.weekDays = weekDays; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java index e1c1b4c80f86..abe6213b3221 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -139,25 +138,6 @@ public RecurrenceTrigger withTimeZone(String timeZone) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (frequency() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); - } - if (schedule() != null) { - schedule().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecurrenceTrigger.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java index 014a22993670..6fc61fb54968 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java index 89c554b646d3..1f69b63f3648 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -73,21 +72,6 @@ public RegenerateEndpointKeysRequest withKeyValue(String keyValue) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property keyType in model RegenerateEndpointKeysRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RegenerateEndpointKeysRequest.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java new file mode 100644 index 000000000000..7e0b342c7a87 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 RegenerateServiceAccountKeyContent model. + */ +@Fluent +public final class RegenerateServiceAccountKeyContent implements JsonSerializable { + /* + * The keyName property. + */ + private ServiceAccountKeyName keyName; + + /** + * Creates an instance of RegenerateServiceAccountKeyContent class. + */ + public RegenerateServiceAccountKeyContent() { + } + + /** + * Get the keyName property: The keyName property. + * + * @return the keyName value. + */ + public ServiceAccountKeyName keyName() { + return this.keyName; + } + + /** + * Set the keyName property: The keyName property. + * + * @param keyName the keyName value to set. + * @return the RegenerateServiceAccountKeyContent object itself. + */ + public RegenerateServiceAccountKeyContent withKeyName(ServiceAccountKeyName keyName) { + this.keyName = keyName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyName", this.keyName == null ? null : this.keyName.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegenerateServiceAccountKeyContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegenerateServiceAccountKeyContent 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 RegenerateServiceAccountKeyContent. + */ + public static RegenerateServiceAccountKeyContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegenerateServiceAccountKeyContent deserializedRegenerateServiceAccountKeyContent + = new RegenerateServiceAccountKeyContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyName".equals(fieldName)) { + deserializedRegenerateServiceAccountKeyContent.keyName + = ServiceAccountKeyName.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRegenerateServiceAccountKeyContent; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java index df1cd3c0bcf4..5afe2e9697f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,95 +14,95 @@ */ public interface Registries { /** - * List registries by subscription. + * Get registry. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return registry along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); /** - * List registries by subscription. + * Get registry. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. + * @return registry. */ - PagedIterable list(Context context); + Registry getByResourceGroup(String resourceGroupName, String registryName); /** - * List registries. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void deleteByResourceGroup(String resourceGroupName, String registryName); /** - * List registries. + * Delete registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void delete(String resourceGroupName, String registryName, Context context); /** - * Delete registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String registryName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Delete registry. + * List registries. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String registryName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 registry along with {@link Response}. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String registryName, Context context); + PagedIterable list(); /** - * Get registry. + * List registries by subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param registryName Name of Azure Machine Learning registry. This 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 registry. + * @return a paginated list of Registry entities as paginated response with {@link PagedIterable}. */ - Registry getByResourceGroup(String resourceGroupName, String registryName); + PagedIterable list(Context context); /** * Remove regions from registry. @@ -113,7 +113,7 @@ public interface Registries { * @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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body); @@ -127,7 +127,7 @@ public interface Registries { * @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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ Registry removeRegions(String resourceGroupName, String registryName, RegistryInner body, Context context); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java index 4434116a58a0..7a7d1fb81c28 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -101,6 +101,13 @@ public interface Registry { */ ArmResourceId managedResourceGroup(); + /** + * Gets the managedResourceGroupSettings property: Managed resource group specific settings. + * + * @return the managedResourceGroupSettings value. + */ + ManagedResourceGroupSettings managedResourceGroupSettings(); + /** * Gets the mlFlowRegistryUri property: MLFlow Registry URI for the Registry. * @@ -217,8 +224,9 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithDiscoveryUrl, DefinitionStages.WithIntellectualPropertyPublisher, DefinitionStages.WithManagedResourceGroup, - DefinitionStages.WithMlFlowRegistryUri, DefinitionStages.WithRegistryPrivateEndpointConnections, - DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithRegionDetails { + DefinitionStages.WithManagedResourceGroupSettings, DefinitionStages.WithMlFlowRegistryUri, + DefinitionStages.WithRegistryPrivateEndpointConnections, DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithRegionDetails { /** * Executes the create request. * @@ -330,6 +338,19 @@ interface WithManagedResourceGroup { WithCreate withManagedResourceGroup(ArmResourceId managedResourceGroup); } + /** + * The stage of the Registry definition allowing to specify managedResourceGroupSettings. + */ + interface WithManagedResourceGroupSettings { + /** + * Specifies the managedResourceGroupSettings property: Managed resource group specific settings. + * + * @param managedResourceGroupSettings Managed resource group specific settings. + * @return the next definition stage. + */ + WithCreate withManagedResourceGroupSettings(ManagedResourceGroupSettings managedResourceGroupSettings); + } + /** * The stage of the Registry definition allowing to specify mlFlowRegistryUri. */ @@ -482,7 +503,7 @@ interface WithSku { * @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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ Registry removeRegions(RegistryInner body); @@ -494,7 +515,7 @@ interface WithSku { * @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. + * @return concrete tracked resource types can be created by aliasing this type using a specific property type. */ Registry removeRegions(RegistryInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java index 970c7e9cc090..9e544d3f06c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,112 +14,112 @@ */ public interface RegistryCodeContainers { /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param codeName Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return code container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName); + Response getWithResponse(String resourceGroupName, String registryName, String codeName, + Context context); /** - * List containers. + * Get Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param codeName Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. + * @return code container. */ - PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + CodeContainer get(String resourceGroupName, String registryName, String codeName); /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String codeName); + CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, + CodeContainerInner body); /** - * Delete Code container. + * Create or update Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String codeName, Context context); + CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, + CodeContainerInner body, Context context); /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container 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 code container along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - Context context); + void delete(String resourceGroupName, String registryName, String codeName); /** - * Get Code container. + * Delete Code container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container 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 code container. */ - CodeContainer get(String resourceGroupName, String registryName, String codeName); + void delete(String resourceGroupName, String registryName, String codeName, Context context); /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body); + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update Code container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. */ - CodeContainer createOrUpdate(String resourceGroupName, String registryName, String codeName, - CodeContainerInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java index b398b19524c7..dc5023c1632d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,133 +14,133 @@ */ public interface RegistryCodeVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. + * @param version Version identifier. + * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName, String codeName); + Response getWithResponse(String resourceGroupName, String registryName, String codeName, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. * @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 paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String registryName, String codeName, String orderBy, - Integer top, String skip, Context context); + CodeVersion get(String resourceGroupName, String registryName, String codeName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String codeName, String version); + CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, + CodeVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); + CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, + CodeVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. - * @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 version along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String codeName, - String version, Context context); + void delete(String resourceGroupName, String registryName, String codeName, String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. * @param version Version identifier. + * @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 version. */ - CodeVersion get(String resourceGroupName, String registryName, String codeName, String version); + void delete(String resourceGroupName, String registryName, String codeName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body); + PagedIterable list(String resourceGroupName, String registryName, String codeName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param codeName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of CodeVersion entities as paginated response with {@link PagedIterable}. */ - CodeVersion createOrUpdate(String resourceGroupName, String registryName, String codeName, String version, - CodeVersionInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String codeName, String orderBy, + Integer top, String skip, Context context); /** * Generate a storage location and credential for the client to upload a code asset to. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -156,8 +156,8 @@ Response createOrGetStartPendingUploadWithResponse(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param codeName Pending upload name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param codeName Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java index 08e328a774f8..1c550c4977b4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,112 +14,112 @@ */ public interface RegistryComponentContainers { /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param componentName Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName); + Response getWithResponse(String resourceGroupName, String registryName, String componentName, + Context context); /** - * List containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param componentName Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); + ComponentContainer get(String resourceGroupName, String registryName, String componentName); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String componentName); + ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, + ComponentContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String componentName, Context context); + ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, + ComponentContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container 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 container along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String componentName, - Context context); + void delete(String resourceGroupName, String registryName, String componentName); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container 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 container. */ - ComponentContainer get(String resourceGroupName, String registryName, String componentName); + void delete(String resourceGroupName, String registryName, String componentName, Context context); /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body); + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update container. + * List containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param componentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. */ - ComponentContainer createOrUpdate(String resourceGroupName, String registryName, String componentName, - ComponentContainerInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String skip, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java index 9caf1ec17f94..8b4fc6237b90 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,123 +14,123 @@ */ public interface RegistryComponentVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. + * @param version Version identifier. + * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName, String componentName); + Response getWithResponse(String resourceGroupName, String registryName, String componentName, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param version Version identifier. * @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 paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String registryName, String componentName, - String orderBy, Integer top, String skip, Context context); + ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String componentName, String version); + ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, String version, + ComponentVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); + ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, String version, + ComponentVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. - * @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 version along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String componentName, - String version, Context context); + void delete(String resourceGroupName, String registryName, String componentName, String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. * @param version Version identifier. + * @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 version. */ - ComponentVersion get(String resourceGroupName, String registryName, String componentName, String version); + void delete(String resourceGroupName, String registryName, String componentName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body); + PagedIterable list(String resourceGroupName, String registryName, String componentName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param componentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. */ - ComponentVersion createOrUpdate(String resourceGroupName, String registryName, String componentName, String version, - ComponentVersionInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String componentName, + String orderBy, Integer top, String skip, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java index ca72b55e9d64..1c95bd8d1291 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,113 +14,113 @@ */ public interface RegistryDataContainers { /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param name Container name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName); + Response getWithResponse(String resourceGroupName, String registryName, String name, + Context context); /** - * List Data containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); + DataContainer get(String resourceGroupName, String registryName, String name); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String name); + DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, DataContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String name, Context context); + DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, DataContainerInner body, + Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container 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 container along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String name, - Context context); + void delete(String resourceGroupName, String registryName, String name); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container 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 container. */ - DataContainer get(String resourceGroupName, String registryName, String name); + void delete(String resourceGroupName, String registryName, String name, Context context); /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, DataContainerInner body); + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update container. + * List Data containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. */ - DataContainer createOrUpdate(String resourceGroupName, String registryName, String name, DataContainerInner body, - Context context); + PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java index 61a2ed21e36f..2ab6f1ed4ca8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java index 79b18d9e5879..30a2c48d2790 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,137 +14,137 @@ */ public interface RegistryDataVersions { /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. + * @param name Container name. + * @param version Version identifier. + * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName, String name); + Response getWithResponse(String resourceGroupName, String registryName, String name, + String version, Context context); /** - * List data versions in the data container. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. - * If topCount > page size, results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param name Container name. + * @param version Version identifier. * @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 paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String registryName, String name, String orderBy, - Integer top, String skip, String tags, ListViewType listViewType, Context context); + DataVersionBase get(String resourceGroupName, String registryName, String name, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String name, String version); + DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, + DataVersionBaseInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String name, String version, Context context); + DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, + DataVersionBaseInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. - * @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 version along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String name, - String version, Context context); + void delete(String resourceGroupName, String registryName, String name, String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. * @param version Version identifier. + * @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 version. */ - DataVersionBase get(String resourceGroupName, String registryName, String name, String version); + void delete(String resourceGroupName, String registryName, String name, String version, Context context); /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body); + PagedIterable list(String resourceGroupName, String registryName, String name); /** - * Create or update version. + * List data versions in the data container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. + * @param top Top count of results, top count cannot be greater than the page size. + * If topCount > page size, results with be default page size count will be returned. + * @param skip Continuation token for pagination. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for + * including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. */ - DataVersionBase createOrUpdate(String resourceGroupName, String registryName, String name, String version, - DataVersionBaseInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String name, String orderBy, + Integer top, String skip, String tags, ListViewType listViewType, Context context); /** * Generate a storage location and credential for the client to upload a data asset to. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -160,8 +160,8 @@ Response createOrGetStartPendingUploadWithResponse(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param name Data asset name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. + * @param name Container name. + * @param version Version identifier. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java index 6c608f18c208..7b103d81cf66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,114 +14,114 @@ */ public interface RegistryEnvironmentContainers { /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param environmentName Container name. This is case-sensitive. + * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName); + Response getWithResponse(String resourceGroupName, String registryName, + String environmentName, Context context); /** - * List environment containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param environmentName Container name. This is case-sensitive. * @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 paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); + EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String environmentName); + EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, + EnvironmentContainerInner body); /** - * Delete container. + * Create or update container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. + * @param environmentName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String environmentName, Context context); + EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, + EnvironmentContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @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 container along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, - String environmentName, Context context); + void delete(String resourceGroupName, String registryName, String environmentName); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. + * @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 container. */ - EnvironmentContainer get(String resourceGroupName, String registryName, String environmentName); + void delete(String resourceGroupName, String registryName, String environmentName, Context context); /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body); + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update container. + * List environment containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. */ - EnvironmentContainer createOrUpdate(String resourceGroupName, String registryName, String environmentName, - EnvironmentContainerInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java index 938b160055ad..287dd5e70f8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,124 +14,124 @@ */ public interface RegistryEnvironmentVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName, String environmentName); + Response getWithResponse(String resourceGroupName, String registryName, String environmentName, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String registryName, String environmentName, - String orderBy, Integer top, String skip, ListViewType listViewType, Context context); + EnvironmentVersion get(String resourceGroupName, String registryName, String environmentName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String environmentName, String version); + EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, + String version, EnvironmentVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. + * @param environmentName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); + EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, + String version, EnvironmentVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String environmentName, - String version, Context context); + void delete(String resourceGroupName, String registryName, String environmentName, String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param environmentName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. */ - EnvironmentVersion get(String resourceGroupName, String registryName, String environmentName, String version); + void delete(String resourceGroupName, String registryName, String environmentName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body); + PagedIterable list(String resourceGroupName, String registryName, String environmentName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param environmentName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param environmentName Container name. This is case-sensitive. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. */ - EnvironmentVersion createOrUpdate(String resourceGroupName, String registryName, String environmentName, - String version, EnvironmentVersionInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String environmentName, + String orderBy, Integer top, String skip, ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java index 838c746104ce..6324dd0c84a7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,31 +15,31 @@ /** * The RegistryListCredentialsResult model. */ -@Fluent +@Immutable public final class RegistryListCredentialsResult implements JsonSerializable { /* - * The location property. + * The location of the workspace ACR */ private String location; /* - * The username property. + * The passwords property. */ - private String username; + private List passwords; /* - * The passwords property. + * The username of the workspace ACR */ - private List passwords; + private String username; /** * Creates an instance of RegistryListCredentialsResult class. */ - public RegistryListCredentialsResult() { + private RegistryListCredentialsResult() { } /** - * Get the location property: The location property. + * Get the location property: The location of the workspace ACR. * * @return the location value. */ @@ -47,15 +47,6 @@ public String location() { return this.location; } - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - /** * Get the passwords property: The passwords property. * @@ -66,25 +57,12 @@ public List passwords() { } /** - * Set the passwords property: The passwords property. + * Get the username property: The username of the workspace ACR. * - * @param passwords the passwords value to set. - * @return the RegistryListCredentialsResult object itself. - */ - public RegistryListCredentialsResult withPasswords(List passwords) { - this.passwords = passwords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the username value. */ - public void validate() { - if (passwords() != null) { - passwords().forEach(e -> e.validate()); - } + public String username() { + return this.username; } /** @@ -115,11 +93,11 @@ public static RegistryListCredentialsResult fromJson(JsonReader jsonReader) thro if ("location".equals(fieldName)) { deserializedRegistryListCredentialsResult.location = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedRegistryListCredentialsResult.username = reader.getString(); } else if ("passwords".equals(fieldName)) { List passwords = reader.readArray(reader1 -> Password.fromJson(reader1)); deserializedRegistryListCredentialsResult.passwords = passwords; + } else if ("username".equals(fieldName)) { + deserializedRegistryListCredentialsResult.username = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java index 1f7e2ec89c37..14e8f28a7c3c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,114 +14,114 @@ */ public interface RegistryModelContainers { /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. + * @param modelName Container name. This is case-sensitive. + * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName); + Response getWithResponse(String resourceGroupName, String registryName, String modelName, + Context context); /** - * List model containers. + * Get container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param modelName Container name. This is case-sensitive. * @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 paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. + * @return container. */ - PagedIterable list(String resourceGroupName, String registryName, String skip, - ListViewType listViewType, Context context); + ModelContainer get(String resourceGroupName, String registryName, String modelName); /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String modelName); + ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, + ModelContainerInner body); /** - * Delete container. + * Create or update model container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String modelName, Context context); + ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, + ModelContainerInner body, Context context); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @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 container along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - Context context); + void delete(String resourceGroupName, String registryName, String modelName); /** - * Get container. + * Delete container. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. + * @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 container. */ - ModelContainer get(String resourceGroupName, String registryName, String modelName); + void delete(String resourceGroupName, String registryName, String modelName, Context context); /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body); + PagedIterable list(String resourceGroupName, String registryName); /** - * Create or update model container. + * List model containers. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param body Container entity to create or update. + * @param skip Continuation token for pagination. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. */ - ModelContainer createOrUpdate(String resourceGroupName, String registryName, String modelName, - ModelContainerInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String skip, + ListViewType listViewType, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java index 214dc3c40ca9..c69903a0f7e3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,138 +14,138 @@ */ public interface RegistryModelVersions { /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String registryName, String modelName); + Response getWithResponse(String resourceGroupName, String registryName, String modelName, + String version, Context context); /** - * List versions. + * Get version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Version identifier. - * @param description Model description. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. + * @param version Version identifier. This is case-sensitive. * @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 paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. + * @return version. */ - PagedIterable list(String resourceGroupName, String registryName, String modelName, String skip, - String orderBy, Integer top, String version, String description, String tags, String properties, - ListViewType listViewType, Context context); + ModelVersion get(String resourceGroupName, String registryName, String modelName, String version); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String modelName, String version); + ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, + ModelVersionInner body); /** - * Delete version. + * Create or update version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. + * @param modelName Container name. This is case-sensitive. + * @param version Version identifier. This is case-sensitive. + * @param body Version entity to create or update. * @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 azure Resource Manager resource envelope. */ - void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); + ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, + ModelVersionInner body, Context context); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. - * @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 version along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String registryName, String modelName, - String version, Context context); + void delete(String resourceGroupName, String registryName, String modelName, String version); /** - * Get version. + * Delete version. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. + * @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 version. */ - ModelVersion get(String resourceGroupName, String registryName, String modelName, String version); + void delete(String resourceGroupName, String registryName, String modelName, String version, Context context); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. - * @param version Version identifier. - * @param body Version entity to create or update. + * @param modelName Container name. This is case-sensitive. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body); + PagedIterable list(String resourceGroupName, String registryName, String modelName); /** - * Create or update version. + * List versions. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Container name. + * @param modelName Container name. This is case-sensitive. + * @param skip Continuation token for pagination. + * @param orderBy Ordering of list. + * @param top Maximum number of records to return. * @param version Version identifier. - * @param body Version entity to create or update. + * @param description Model description. + * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + * @param listViewType View type for including/excluding (for example) archived entities. * @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 azure Resource Manager resource envelope. + * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. */ - ModelVersion createOrUpdate(String resourceGroupName, String registryName, String modelName, String version, - ModelVersionInner body, Context context); + PagedIterable list(String resourceGroupName, String registryName, String modelName, String skip, + String orderBy, Integer top, String version, String description, String tags, String properties, + ListViewType listViewType, Context context); /** * Generate a storage location and credential for the client to upload a model asset to. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @param context The context to associate with this operation. @@ -162,7 +162,7 @@ Response createOrGetStartPendingUploadWithResponse(Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName Name of Azure Machine Learning registry. This is case-insensitive. - * @param modelName Model name. This is case-sensitive. + * @param modelName Container name. This is case-sensitive. * @param version Version identifier. This is case-sensitive. * @param body Pending upload request object. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java index 758eeba7764a..0be7167efc5b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonWriter; import java.io.IOException; import java.util.Map; -import java.util.UUID; /** * Managed service identity (system assigned and/or user assigned identities). @@ -18,16 +17,16 @@ @Fluent public final class RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. */ - private UUID principalId; + private String tenantId; /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. */ - private UUID tenantId; + private String principalId; /** * Creates an instance of RegistryPartialManagedServiceIdentity class. @@ -36,25 +35,25 @@ public RegistryPartialManagedServiceIdentity() { } /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. * - * @return the principalId value. + * @return the tenantId value. */ @Override - public UUID principalId() { - return this.principalId; + public String tenantId() { + return this.tenantId; } /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. + * Get the principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. * - * @return the tenantId value. + * @return the principalId value. */ @Override - public UUID tenantId() { - return this.tenantId; + public String principalId() { + return this.principalId; } /** @@ -76,16 +75,6 @@ public RegistryPartialManagedServiceIdentity withType(ManagedServiceIdentityType return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -119,11 +108,9 @@ public static RegistryPartialManagedServiceIdentity fromJson(JsonReader jsonRead deserializedRegistryPartialManagedServiceIdentity .withType(ManagedServiceIdentityType.fromString(reader.getString())); } else if ("principalId".equals(fieldName)) { - deserializedRegistryPartialManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedRegistryPartialManagedServiceIdentity.principalId = reader.getString(); } else if ("tenantId".equals(fieldName)) { - deserializedRegistryPartialManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedRegistryPartialManagedServiceIdentity.tenantId = reader.getString(); } else if ("userAssignedIdentities".equals(fieldName)) { Map userAssignedIdentities = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java index 40c7480f9645..6afbc19f5b9c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -192,17 +192,6 @@ public RegistryPrivateEndpointConnection withProvisioningState(String provisioni return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java index e1a5718b593d..c95574269b06 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,7 +30,7 @@ public final class RegistryPrivateLinkServiceConnectionState /* * Connection status of the service consumer with the service provider */ - private EndpointServiceConnectionStatus status; + private PrivateEndpointServiceConnectionStatus status; /** * Creates an instance of RegistryPrivateLinkServiceConnectionState class. @@ -83,7 +83,7 @@ public RegistryPrivateLinkServiceConnectionState withDescription(String descript * * @return the status value. */ - public EndpointServiceConnectionStatus status() { + public PrivateEndpointServiceConnectionStatus status() { return this.status; } @@ -93,19 +93,11 @@ public EndpointServiceConnectionStatus status() { * @param status the status value to set. * @return the RegistryPrivateLinkServiceConnectionState object itself. */ - public RegistryPrivateLinkServiceConnectionState withStatus(EndpointServiceConnectionStatus status) { + public RegistryPrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { this.status = status; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -140,7 +132,7 @@ public static RegistryPrivateLinkServiceConnectionState fromJson(JsonReader json deserializedRegistryPrivateLinkServiceConnectionState.description = reader.getString(); } else if ("status".equals(fieldName)) { deserializedRegistryPrivateLinkServiceConnectionState.status - = EndpointServiceConnectionStatus.fromString(reader.getString()); + = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java index 2d6c2590a760..8367bb70e8e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -98,20 +98,6 @@ public RegistryRegionArmDetails withStorageAccountDetails(List e.validate()); - } - if (storageAccountDetails() != null) { - storageAccountDetails().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java index 9ed55c8ac80f..17702374ba49 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,14 +22,14 @@ public final class Regression extends AutoMLVertical { private TaskType taskType = TaskType.REGRESSION; /* - * Primary metric for regression task. + * Columns to use for CVSplit data. */ - private RegressionPrimaryMetrics primaryMetric; + private List cvSplitColumnNames; /* - * Inputs for training phase for an AutoML Job. + * Featurization inputs needed for AutoML job. */ - private RegressionTrainingSettings trainingSettings; + private TableVerticalFeaturizationSettings featurizationSettings; /* * Execution constraints for AutoMLJob. @@ -43,26 +43,22 @@ public final class Regression extends AutoMLVertical { private NCrossValidations nCrossValidations; /* - * Columns to use for CVSplit data. + * Test data input. */ - private List cvSplitColumnNames; + private MLTableJobInput testData; /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. + * The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. */ - private String weightColumnName; + private Double testDataSize; /* * Validation data inputs. */ private MLTableJobInput validationData; - /* - * Test data input. - */ - private MLTableJobInput testData; - /* * The fraction of training dataset that needs to be set aside for validation purpose. * Values between (0.0 , 1.0) @@ -71,16 +67,20 @@ public final class Regression extends AutoMLVertical { private Double validationDataSize; /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the + * data to be weighted up or down. */ - private Double testDataSize; + private String weightColumnName; /* - * Featurization inputs needed for AutoML job. + * Primary metrics for Regression task. */ - private TableVerticalFeaturizationSettings featurizationSettings; + private RegressionPrimaryMetrics primaryMetric; + + /* + * Inputs for training phase for an AutoML Job. + */ + private RegressionTrainingSettings trainingSettings; /** * Creates an instance of Regression class. @@ -99,42 +99,42 @@ public TaskType taskType() { } /** - * Get the primaryMetric property: Primary metric for regression task. + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @return the primaryMetric value. + * @return the cvSplitColumnNames value. */ - public RegressionPrimaryMetrics primaryMetric() { - return this.primaryMetric; + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; } /** - * Set the primaryMetric property: Primary metric for regression task. + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @param primaryMetric the primaryMetric value to set. + * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Regression object itself. */ - public Regression withPrimaryMetric(RegressionPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; + public Regression withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; return this; } /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the trainingSettings value. + * @return the featurizationSettings value. */ - public RegressionTrainingSettings trainingSettings() { - return this.trainingSettings; + public TableVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param trainingSettings the trainingSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the Regression object itself. */ - public Regression withTrainingSettings(RegressionTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; + public Regression withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } @@ -181,44 +181,46 @@ public Regression withNCrossValidations(NCrossValidations nCrossValidations) { } /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * Get the testData property: Test data input. * - * @return the cvSplitColumnNames value. + * @return the testData value. */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; + public MLTableJobInput testData() { + return this.testData; } /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * Set the testData property: Test data input. * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @param testData the testData value to set. * @return the Regression object itself. */ - public Regression withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; + public Regression withTestData(MLTableJobInput testData) { + this.testData = testData; return this; } /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. + * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. * - * @return the weightColumnName value. + * @return the testDataSize value. */ - public String weightColumnName() { - return this.weightColumnName; + public Double testDataSize() { + return this.testDataSize; } /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. + * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. + * Values between (0.0 , 1.0) + * Applied when validation dataset is not provided. * - * @param weightColumnName the weightColumnName value to set. + * @param testDataSize the testDataSize value to set. * @return the Regression object itself. */ - public Regression withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; + public Regression withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; return this; } @@ -242,26 +244,6 @@ public Regression withValidationData(MLTableJobInput validationData) { return this; } - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Regression object itself. - */ - public Regression withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation * purpose. @@ -289,55 +271,64 @@ public Regression withValidationDataSize(Double validationDataSize) { } /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column + * as an input, causing rows in the data to be weighted up or down. * - * @return the testDataSize value. + * @return the weightColumnName value. */ - public Double testDataSize() { - return this.testDataSize; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. + * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column + * as an input, causing rows in the data to be weighted up or down. * - * @param testDataSize the testDataSize value to set. + * @param weightColumnName the weightColumnName value to set. * @return the Regression object itself. */ - public Regression withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; + public Regression withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the primaryMetric property: Primary metrics for Regression task. * - * @return the featurizationSettings value. + * @return the primaryMetric value. */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public RegressionPrimaryMetrics primaryMetric() { + return this.primaryMetric; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the primaryMetric property: Primary metrics for Regression task. * - * @param featurizationSettings the featurizationSettings value to set. + * @param primaryMetric the primaryMetric value to set. * @return the Regression object itself. */ - public Regression withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public Regression withPrimaryMetric(RegressionPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; return this; } /** - * {@inheritDoc} + * Get the trainingSettings property: Inputs for training phase for an AutoML Job. + * + * @return the trainingSettings value. */ - @Override - public Regression withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); + public RegressionTrainingSettings trainingSettings() { + return this.trainingSettings; + } + + /** + * Set the trainingSettings property: Inputs for training phase for an AutoML Job. + * + * @param trainingSettings the trainingSettings value to set. + * @return the Regression object itself. + */ + public Regression withTrainingSettings(RegressionTrainingSettings trainingSettings) { + this.trainingSettings = trainingSettings; return this; } @@ -345,8 +336,8 @@ public Regression withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public Regression withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public Regression withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -360,31 +351,12 @@ public Regression withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (trainingSettings() != null) { - trainingSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } + public Regression withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } /** @@ -397,18 +369,18 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); + jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("weightColumnName", this.weightColumnName); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); + jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); return jsonWriter.writeEndObject(); } @@ -436,29 +408,29 @@ public static Regression fromJson(JsonReader jsonReader) throws IOException { deserializedRegression.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedRegression.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedRegression.primaryMetric = RegressionPrimaryMetrics.fromString(reader.getString()); - } else if ("trainingSettings".equals(fieldName)) { - deserializedRegression.trainingSettings = RegressionTrainingSettings.fromJson(reader); + } else if ("cvSplitColumnNames".equals(fieldName)) { + List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedRegression.cvSplitColumnNames = cvSplitColumnNames; + } else if ("featurizationSettings".equals(fieldName)) { + deserializedRegression.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); } else if ("limitSettings".equals(fieldName)) { deserializedRegression.limitSettings = TableVerticalLimitSettings.fromJson(reader); } else if ("nCrossValidations".equals(fieldName)) { deserializedRegression.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedRegression.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedRegression.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedRegression.validationData = MLTableJobInput.fromJson(reader); } else if ("testData".equals(fieldName)) { deserializedRegression.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedRegression.validationDataSize = reader.getNullable(JsonReader::getDouble); } else if ("testDataSize".equals(fieldName)) { deserializedRegression.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedRegression.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedRegression.validationData = MLTableJobInput.fromJson(reader); + } else if ("validationDataSize".equals(fieldName)) { + deserializedRegression.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("weightColumnName".equals(fieldName)) { + deserializedRegression.weightColumnName = reader.getString(); + } else if ("primaryMetric".equals(fieldName)) { + deserializedRegression.primaryMetric = RegressionPrimaryMetrics.fromString(reader.getString()); + } else if ("trainingSettings".equals(fieldName)) { + deserializedRegression.trainingSettings = RegressionTrainingSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java index b57e1bd35f2f..7737d01f60a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,52 +12,65 @@ */ public final class RegressionModels extends ExpandableStringEnum { /** - * Static value ElasticNet for RegressionModels. + * Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically + * the L1 and L2 penalty functions. */ public static final RegressionModels ELASTIC_NET = fromString("ElasticNet"); /** - * Static value GradientBoosting for RegressionModels. + * The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting + * algorithm process works on this theory of execution. */ public static final RegressionModels GRADIENT_BOOSTING = fromString("GradientBoosting"); /** - * Static value DecisionTree for RegressionModels. + * Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. + * The goal is to create a model that predicts the value of a target variable by learning simple decision rules + * inferred from the data features. */ public static final RegressionModels DECISION_TREE = fromString("DecisionTree"); /** - * Static value KNN for RegressionModels. + * K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + * which further means that the new data point will be assigned a value based on how closely it matches the points + * in the training set. */ public static final RegressionModels KNN = fromString("KNN"); /** - * Static value LassoLars for RegressionModels. + * Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as + * regularizer. */ public static final RegressionModels LASSO_LARS = fromString("LassoLars"); /** - * Static value SGD for RegressionModels. + * SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + * to find the model parameters that correspond to the best fit between predicted and actual outputs. + * It's an inexact but powerful technique. */ public static final RegressionModels SGD = fromString("SGD"); /** - * Static value RandomForest for RegressionModels. + * Random forest is a supervised learning algorithm. + * The "forest" it builds, is an ensemble of decision trees, usually trained with the "bagging" method. + * The general idea of the bagging method is that a combination of learning models increases the overall result. */ public static final RegressionModels RANDOM_FOREST = fromString("RandomForest"); /** - * Static value ExtremeRandomTrees for RegressionModels. + * Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. + * It is related to the widely used random forest algorithm. */ public static final RegressionModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); /** - * Static value LightGBM for RegressionModels. + * LightGBM is a gradient boosting framework that uses tree based learning algorithms. */ public static final RegressionModels LIGHT_GBM = fromString("LightGBM"); /** - * Static value XGBoostRegressor for RegressionModels. + * XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of + * base learners. */ public static final RegressionModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java index 012b72021bdd..dcc90257ad8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,23 +12,25 @@ */ public final class RegressionPrimaryMetrics extends ExpandableStringEnum { /** - * Static value SpearmanCorrelation for RegressionPrimaryMetrics. + * The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation. */ public static final RegressionPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); /** - * Static value NormalizedRootMeanSquaredError for RegressionPrimaryMetrics. + * The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different + * scales. */ public static final RegressionPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR = fromString("NormalizedRootMeanSquaredError"); /** - * Static value R2Score for RegressionPrimaryMetrics. + * The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. */ public static final RegressionPrimaryMetrics R2SCORE = fromString("R2Score"); /** - * Static value NormalizedMeanAbsoluteError for RegressionPrimaryMetrics. + * The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of + * (time) series with different scales. */ public static final RegressionPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR = fromString("NormalizedMeanAbsoluteError"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java index aaf2bce55082..0fef1bb9412e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -78,8 +78,8 @@ public RegressionTrainingSettings withBlockedTrainingAlgorithms(List writer.writeString(element == null ? null : element.toString())); jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, @@ -183,12 +173,15 @@ public static RegressionTrainingSettings fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { deserializedRegressionTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { + .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableModelExplainability".equals(fieldName)) { deserializedRegressionTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); + .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { + deserializedRegressionTrainingSettings + .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedRegressionTrainingSettings .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); @@ -198,12 +191,9 @@ public static RegressionTrainingSettings fromJson(JsonReader jsonReader) throws } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedRegressionTrainingSettings.withEnsembleModelDownloadTimeout( reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { + } else if ("stackEnsembleSettings".equals(fieldName)) { deserializedRegressionTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); } else if ("allowedTrainingAlgorithms".equals(fieldName)) { List allowedTrainingAlgorithms = reader.readArray(reader1 -> RegressionModels.fromString(reader1.getString())); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java index 8553656691b2..8b20407a5514 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Close remote Login Access Port - * * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all * nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified * - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java new file mode 100644 index 000000000000..67e3fc8fc88b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Scoring requests configuration. + */ +@Fluent +public final class RequestConfiguration implements JsonSerializable { + /* + * The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + */ + private Integer maxConcurrentRequestsPerInstance; + + /* + * + * The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + */ + private Duration requestTimeout; + + /** + * Creates an instance of RequestConfiguration class. + */ + public RequestConfiguration() { + } + + /** + * Get the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed per + * deployment. Defaults to 1. + * + * @return the maxConcurrentRequestsPerInstance value. + */ + public Integer maxConcurrentRequestsPerInstance() { + return this.maxConcurrentRequestsPerInstance; + } + + /** + * Set the maxConcurrentRequestsPerInstance property: The number of maximum concurrent requests per node allowed per + * deployment. Defaults to 1. + * + * @param maxConcurrentRequestsPerInstance the maxConcurrentRequestsPerInstance value to set. + * @return the RequestConfiguration object itself. + */ + public RequestConfiguration withMaxConcurrentRequestsPerInstance(Integer maxConcurrentRequestsPerInstance) { + this.maxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; + return this; + } + + /** + * Get the requestTimeout property: + * The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + * + * @return the requestTimeout value. + */ + public Duration requestTimeout() { + return this.requestTimeout; + } + + /** + * Set the requestTimeout property: + * The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + * + * @param requestTimeout the requestTimeout value to set. + * @return the RequestConfiguration object itself. + */ + public RequestConfiguration withRequestTimeout(Duration requestTimeout) { + this.requestTimeout = requestTimeout; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maxConcurrentRequestsPerInstance", this.maxConcurrentRequestsPerInstance); + jsonWriter.writeStringField("requestTimeout", CoreUtils.durationToStringWithDays(this.requestTimeout)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RequestConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RequestConfiguration 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 RequestConfiguration. + */ + public static RequestConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RequestConfiguration deserializedRequestConfiguration = new RequestConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxConcurrentRequestsPerInstance".equals(fieldName)) { + deserializedRequestConfiguration.maxConcurrentRequestsPerInstance + = reader.getNullable(JsonReader::getInt); + } else if ("requestTimeout".equals(fieldName)) { + deserializedRequestConfiguration.requestTimeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRequestConfiguration; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java index ee29411190b8..d3a029f2e4dc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -53,14 +53,6 @@ public RequestLogging withCaptureHeaders(List captureHeaders) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java new file mode 100644 index 000000000000..aa98adc67f35 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Schema for Compute Instance resize. + */ +@Fluent +public final class ResizeSchema implements JsonSerializable { + /* + * The name of the virtual machine size. + */ + private String targetVMSize; + + /** + * Creates an instance of ResizeSchema class. + */ + public ResizeSchema() { + } + + /** + * Get the targetVMSize property: The name of the virtual machine size. + * + * @return the targetVMSize value. + */ + public String targetVMSize() { + return this.targetVMSize; + } + + /** + * Set the targetVMSize property: The name of the virtual machine size. + * + * @param targetVMSize the targetVMSize value to set. + * @return the ResizeSchema object itself. + */ + public ResizeSchema withTargetVMSize(String targetVMSize) { + this.targetVMSize = targetVMSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetVMSize", this.targetVMSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResizeSchema from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResizeSchema 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 ResizeSchema. + */ + public static ResizeSchema fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResizeSchema deserializedResizeSchema = new ResizeSchema(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetVMSize".equals(fieldName)) { + deserializedResizeSchema.targetVMSize = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResizeSchema; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java index 2c08db43b2b7..cdd78496383b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -23,14 +23,14 @@ public class ResourceBase implements JsonSerializable { private String description; /* - * Tag dictionary. Tags can be added, removed, and updated. + * The asset property dictionary. */ - private Map tags; + private Map properties; /* - * The asset property dictionary. + * Tag dictionary. Tags can be added, removed, and updated. */ - private Map properties; + private Map tags; /** * Creates an instance of ResourceBase class. @@ -58,26 +58,6 @@ public ResourceBase withDescription(String description) { return this; } - /** - * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tag dictionary. Tags can be added, removed, and updated. - * - * @param tags the tags value to set. - * @return the ResourceBase object itself. - */ - public ResourceBase withTags(Map tags) { - this.tags = tags; - return this; - } - /** * Get the properties property: The asset property dictionary. * @@ -99,11 +79,23 @@ public ResourceBase withProperties(Map properties) { } /** - * Validates the instance. + * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the tags value. */ - public void validate() { + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tag dictionary. Tags can be added, removed, and updated. + * + * @param tags the tags value to set. + * @return the ResourceBase object itself. + */ + public ResourceBase withTags(Map tags) { + this.tags = tags; + return this; } /** @@ -113,8 +105,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -135,12 +127,12 @@ public static ResourceBase fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedResourceBase.description = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedResourceBase.tags = tags; } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedResourceBase.properties = properties; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedResourceBase.tags = tags; } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java index 5cbf10d7ade1..f0e05ce1dabc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -98,14 +98,6 @@ public ResourceConfiguration withProperties(Map properties) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java index 194c1b119a67..ab5f2fa3f94c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -48,20 +47,6 @@ public ResourceId withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model ResourceId")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceId.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java index 383cf8440c9d..9945d2f86577 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -29,7 +29,7 @@ public final class ResourceName implements JsonSerializable { /** * Creates an instance of ResourceName class. */ - public ResourceName() { + private ResourceName() { } /** @@ -50,14 +50,6 @@ public String localizedValue() { return this.localizedValue; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java index 85bc8443984d..d7e009d3098b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -39,7 +39,9 @@ public interface ResourceQuota { ResourceName name(); /** - * Gets the limit property: The maximum permitted quota of the resource. + * Gets the limit property: Limit. + * + * The maximum permitted quota of the resource. * * @return the limit value. */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java index d21abe38c714..7f0794c94638 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -24,6 +23,11 @@ public final class RollingInputData extends MonitoringInputDataBase { */ private MonitoringInputDataType inputDataType = MonitoringInputDataType.ROLLING; + /* + * Reference to the component asset used to preprocess the data. + */ + private String preprocessingComponentId; + /* * [Required] The time offset between the end of the data window and the monitor's current run time. */ @@ -34,11 +38,6 @@ public final class RollingInputData extends MonitoringInputDataBase { */ private Duration windowSize; - /* - * Reference to the component asset used to preprocess the data. - */ - private String preprocessingComponentId; - /** * Creates an instance of RollingInputData class. */ @@ -55,6 +54,26 @@ public MonitoringInputDataType inputDataType() { return this.inputDataType; } + /** + * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @return the preprocessingComponentId value. + */ + public String preprocessingComponentId() { + return this.preprocessingComponentId; + } + + /** + * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @param preprocessingComponentId the preprocessingComponentId value to set. + * @return the RollingInputData object itself. + */ + public RollingInputData withPreprocessingComponentId(String preprocessingComponentId) { + this.preprocessingComponentId = preprocessingComponentId; + return this; + } + /** * Get the windowOffset property: [Required] The time offset between the end of the data window and the monitor's * current run time. @@ -98,22 +117,11 @@ public RollingInputData withWindowSize(Duration windowSize) { } /** - * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @return the preprocessingComponentId value. - */ - public String preprocessingComponentId() { - return this.preprocessingComponentId; - } - - /** - * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @param preprocessingComponentId the preprocessingComponentId value to set. - * @return the RollingInputData object itself. + * {@inheritDoc} */ - public RollingInputData withPreprocessingComponentId(String preprocessingComponentId) { - this.preprocessingComponentId = preprocessingComponentId; + @Override + public RollingInputData withColumns(Map columns) { + super.withColumns(columns); return this; } @@ -144,35 +152,6 @@ public RollingInputData withUri(String uri) { return this; } - /** - * {@inheritDoc} - */ - @Override - public RollingInputData withColumns(Map columns) { - super.withColumns(columns); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (windowOffset() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowOffset in model RollingInputData")); - } - if (windowSize() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowSize in model RollingInputData")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RollingInputData.class); - /** * {@inheritDoc} */ @@ -181,8 +160,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeStringField("windowOffset", CoreUtils.durationToStringWithDays(this.windowOffset)); jsonWriter.writeStringField("windowSize", CoreUtils.durationToStringWithDays(this.windowSize)); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); @@ -210,11 +189,11 @@ public static RollingInputData fromJson(JsonReader jsonReader) throws IOExceptio deserializedRollingInputData.withJobInputType(JobInputType.fromString(reader.getString())); } else if ("uri".equals(fieldName)) { deserializedRollingInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedRollingInputData.withDataContext(reader.getString()); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedRollingInputData.withColumns(columns); + } else if ("dataContext".equals(fieldName)) { + deserializedRollingInputData.withDataContext(reader.getString()); } else if ("windowOffset".equals(fieldName)) { deserializedRollingInputData.windowOffset = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java index 718833559f87..a5e1d3b1c99f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java index 1bdf766427da..914e650390c6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -73,19 +72,6 @@ public Route withPort(int port) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (path() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property path in model Route")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Route.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java index 650aad805d24..266ecf3ddc55 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java index d5b1d8717269..e07f78d8e8c1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java index 102835e447a4..79efb171c57b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,6 +21,21 @@ public final class RuleStatus extends ExpandableStringEnum { */ public static final RuleStatus ACTIVE = fromString("Active"); + /** + * Static value Provisioning for RuleStatus. + */ + public static final RuleStatus PROVISIONING = fromString("Provisioning"); + + /** + * Static value Deleting for RuleStatus. + */ + public static final RuleStatus DELETING = fromString("Deleting"); + + /** + * Static value Failed for RuleStatus. + */ + public static final RuleStatus FAILED = fromString("Failed"); + /** * Creates a new instance of RuleStatus value. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java index d3c426d67a90..66f73eb1609c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java index 4846403c3bed..cf732b602e92 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -38,14 +38,6 @@ public SamplingAlgorithmType samplingAlgorithmType() { return this.samplingAlgorithmType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java index 2dc248a5747f..056edaf90c90 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java index 33ccc29791fe..0f664abc6f62 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,16 +30,6 @@ public final class SasAuthTypeWorkspaceConnectionProperties extends WorkspaceCon */ private WorkspaceConnectionSharedAccessSignature credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of SasAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,20 @@ public WorkspaceConnectionSharedAccessSignature credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public SasAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -128,8 +107,8 @@ public SasAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isShar * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public SasAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -137,8 +116,8 @@ public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public SasAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -146,8 +125,8 @@ public SasAuthTypeWorkspaceConnectionProperties withMetadata(Map * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { - super.withSharedUserList(sharedUserList); + public SasAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +134,8 @@ public SasAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public SasAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -164,22 +143,19 @@ public SasAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public SasAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -189,15 +165,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -223,29 +201,36 @@ public static SasAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonR deserializedSasAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedSasAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedSasAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedSasAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedSasAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java index cd31e7be4d1c..8233067f4945 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * Access with full SAS uri. */ -@Fluent +@Immutable public final class SasCredential extends DataReferenceCredential { /* * [Required] Credential type used to authentication with storage. @@ -28,7 +28,7 @@ public final class SasCredential extends DataReferenceCredential { /** * Creates an instance of SasCredential class. */ - public SasCredential() { + private SasCredential() { } /** @@ -50,27 +50,6 @@ public String sasUri() { return this.sasUri; } - /** - * Set the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. - * - * @param sasUri the sasUri value to set. - * @return the SasCredential object itself. - */ - public SasCredential withSasUri(String sasUri) { - this.sasUri = sasUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java index 435c44e23b65..b60de83d6fae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -13,7 +13,7 @@ /** * The SasCredentialDto model. */ -@Fluent +@Immutable public final class SasCredentialDto extends PendingUploadCredentialDto { /* * [Required] Credential type used to authentication with storage. @@ -28,7 +28,7 @@ public final class SasCredentialDto extends PendingUploadCredentialDto { /** * Creates an instance of SasCredentialDto class. */ - public SasCredentialDto() { + private SasCredentialDto() { } /** @@ -50,27 +50,6 @@ public String sasUri() { return this.sasUri; } - /** - * Set the sasUri property: Full SAS Uri, including the storage, container/blob path and SAS token. - * - * @param sasUri the sasUri value to set. - * @return the SasCredentialDto object itself. - */ - public SasCredentialDto withSasUri(String sasUri) { - this.sasUri = sasUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java index 6fd6dec72378..280df1776cb3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,25 +61,6 @@ public SasDatastoreCredentials withSecrets(SasDatastoreSecrets secrets) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (secrets() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property secrets in model SasDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SasDatastoreCredentials.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java index 47aca7a15101..df937d9ec58b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -62,16 +62,6 @@ public SasDatastoreSecrets withSasToken(String sasToken) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java index 943e18f36e2b..af7a5f3ed727 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -101,14 +101,6 @@ public ScaleSettings withNodeIdleTimeBeforeScaleDown(Duration nodeIdleTimeBefore return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java index b9b9ba136573..217d584d7ff8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,7 +17,7 @@ @Fluent public final class ScaleSettingsInformation implements JsonSerializable { /* - * scale settings for AML Compute + * Scale settings. */ private ScaleSettings scaleSettings; @@ -28,7 +28,7 @@ public ScaleSettingsInformation() { } /** - * Get the scaleSettings property: scale settings for AML Compute. + * Get the scaleSettings property: Scale settings. * * @return the scaleSettings value. */ @@ -37,7 +37,7 @@ public ScaleSettings scaleSettings() { } /** - * Set the scaleSettings property: scale settings for AML Compute. + * Set the scaleSettings property: Scale settings. * * @param scaleSettings the scaleSettings value to set. * @return the ScaleSettingsInformation object itself. @@ -47,17 +47,6 @@ public ScaleSettingsInformation withScaleSettings(ScaleSettings scaleSettings) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleSettings() != null) { - scaleSettings().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java index 079d04a2b872..156933c00d9a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java new file mode 100644 index 000000000000..6dc57ae76fae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Configuration for ScaleUnit pool. + */ +@Fluent +public final class ScaleUnitConfiguration implements JsonSerializable { + /* + * Gets or sets a value indicating whether PublicEgress is disabled. + */ + private Boolean disablePublicEgress; + + /* + * Gets or sets a list of Registry sources that will be used to confirm identity, storage, ACR. + */ + private List registries; + + /** + * Creates an instance of ScaleUnitConfiguration class. + */ + public ScaleUnitConfiguration() { + } + + /** + * Get the disablePublicEgress property: Gets or sets a value indicating whether PublicEgress is disabled. + * + * @return the disablePublicEgress value. + */ + public Boolean disablePublicEgress() { + return this.disablePublicEgress; + } + + /** + * Set the disablePublicEgress property: Gets or sets a value indicating whether PublicEgress is disabled. + * + * @param disablePublicEgress the disablePublicEgress value to set. + * @return the ScaleUnitConfiguration object itself. + */ + public ScaleUnitConfiguration withDisablePublicEgress(Boolean disablePublicEgress) { + this.disablePublicEgress = disablePublicEgress; + return this; + } + + /** + * Get the registries property: Gets or sets a list of Registry sources that will be used to confirm identity, + * storage, ACR. + * + * @return the registries value. + */ + public List registries() { + return this.registries; + } + + /** + * Set the registries property: Gets or sets a list of Registry sources that will be used to confirm identity, + * storage, ACR. + * + * @param registries the registries value to set. + * @return the ScaleUnitConfiguration object itself. + */ + public ScaleUnitConfiguration withRegistries(List registries) { + this.registries = registries; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("disablePublicEgress", this.disablePublicEgress); + jsonWriter.writeArrayField("registries", this.registries, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScaleUnitConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScaleUnitConfiguration 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 ScaleUnitConfiguration. + */ + public static ScaleUnitConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScaleUnitConfiguration deserializedScaleUnitConfiguration = new ScaleUnitConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disablePublicEgress".equals(fieldName)) { + deserializedScaleUnitConfiguration.disablePublicEgress = reader.getNullable(JsonReader::getBoolean); + } else if ("registries".equals(fieldName)) { + List registries = reader.readArray(reader1 -> reader1.getString()); + deserializedScaleUnitConfiguration.registries = registries; + } else { + reader.skipChildren(); + } + } + + return deserializedScaleUnitConfiguration; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java index 7a1c484a85b4..a6dd2ecd5719 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -86,7 +86,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java index 8efcd708c16f..7bc762ca5a64 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public ScheduleActionType actionType() { return this.actionType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java index d241042768cc..e54921d100da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java index aa0e42bdf3d9..15bbd4a8f732 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -97,14 +97,6 @@ public ScheduleBase withStatus(ScheduleStatus status) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java index 90a9b93aaef0..c9cc4321f91b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java index 6cd0572ffa4e..015663c8a59f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -17,6 +16,11 @@ */ @Fluent public final class ScheduleProperties extends ResourceBase { + /* + * [Required] Specifies the action of the schedule + */ + private ScheduleActionBase action; + /* * Display name of schedule. */ @@ -27,25 +31,40 @@ public final class ScheduleProperties extends ResourceBase { */ private Boolean isEnabled; + /* + * Provisioning state for the schedule. + */ + private ScheduleProvisioningStatus provisioningState; + /* * [Required] Specifies the trigger details */ private TriggerBase trigger; - /* - * [Required] Specifies the action of the schedule + /** + * Creates an instance of ScheduleProperties class. */ - private ScheduleActionBase action; + public ScheduleProperties() { + } - /* - * Provisioning state for the schedule. + /** + * Get the action property: [Required] Specifies the action of the schedule. + * + * @return the action value. */ - private ScheduleProvisioningStatus provisioningState; + public ScheduleActionBase action() { + return this.action; + } /** - * Creates an instance of ScheduleProperties class. + * Set the action property: [Required] Specifies the action of the schedule. + * + * @param action the action value to set. + * @return the ScheduleProperties object itself. */ - public ScheduleProperties() { + public ScheduleProperties withAction(ScheduleActionBase action) { + this.action = action; + return this; } /** @@ -88,6 +107,15 @@ public ScheduleProperties withIsEnabled(Boolean isEnabled) { return this; } + /** + * Get the provisioningState property: Provisioning state for the schedule. + * + * @return the provisioningState value. + */ + public ScheduleProvisioningStatus provisioningState() { + return this.provisioningState; + } + /** * Get the trigger property: [Required] Specifies the trigger details. * @@ -108,35 +136,6 @@ public ScheduleProperties withTrigger(TriggerBase trigger) { return this; } - /** - * Get the action property: [Required] Specifies the action of the schedule. - * - * @return the action value. - */ - public ScheduleActionBase action() { - return this.action; - } - - /** - * Set the action property: [Required] Specifies the action of the schedule. - * - * @param action the action value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withAction(ScheduleActionBase action) { - this.action = action; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the schedule. - * - * @return the provisioningState value. - */ - public ScheduleProvisioningStatus provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @@ -146,15 +145,6 @@ public ScheduleProperties withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public ScheduleProperties withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -165,29 +155,14 @@ public ScheduleProperties withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (trigger() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); - } else { - trigger().validate(); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property action in model ScheduleProperties")); - } else { - action().validate(); - } + public ScheduleProperties withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(ScheduleProperties.class); - /** * {@inheritDoc} */ @@ -195,10 +170,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("trigger", this.trigger); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("action", this.action); + jsonWriter.writeJsonField("trigger", this.trigger); jsonWriter.writeStringField("displayName", this.displayName); jsonWriter.writeBooleanField("isEnabled", this.isEnabled); return jsonWriter.writeEndObject(); @@ -222,16 +197,16 @@ public static ScheduleProperties fromJson(JsonReader jsonReader) throws IOExcept if ("description".equals(fieldName)) { deserializedScheduleProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedScheduleProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedScheduleProperties.withProperties(properties); - } else if ("trigger".equals(fieldName)) { - deserializedScheduleProperties.trigger = TriggerBase.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedScheduleProperties.withTags(tags); } else if ("action".equals(fieldName)) { deserializedScheduleProperties.action = ScheduleActionBase.fromJson(reader); + } else if ("trigger".equals(fieldName)) { + deserializedScheduleProperties.trigger = TriggerBase.fromJson(reader); } else if ("displayName".equals(fieldName)) { deserializedScheduleProperties.displayName = reader.getString(); } else if ("isEnabled".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java index 605cf95e34ca..d532037ea949 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java index 6aebb75209ec..a82d8748889c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java index bc2d402ad4d5..3ab3b652e667 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java index 8a1f5f25c1c1..bc4086e18a14 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,38 +13,37 @@ */ public interface Schedules { /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + * @return schedule along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); /** - * List schedules in specified workspace. + * Get schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Schedule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. + * @return schedule. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - ScheduleListViewType listViewType, Context context); + Schedule get(String resourceGroupName, String workspaceName, String name); /** * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -56,7 +55,7 @@ PagedIterable list(String resourceGroupName, String workspaceName, Str * Delete schedule. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Schedule name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,31 +65,32 @@ PagedIterable list(String resourceGroupName, String workspaceName, Str void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response}. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get schedule. + * List schedules in specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @param listViewType Status filter for schedule. + * @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 schedule. + * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. */ - Schedule get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + ScheduleListViewType listViewType, Context context); /** * Get schedule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java index 583b1a9dd62d..265c601ab190 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,7 +17,7 @@ @Fluent public final class ScriptReference implements JsonSerializable { /* - * The storage source of the script: workspace. + * The storage source of the script: inline, workspace. */ private String scriptSource; @@ -43,7 +43,7 @@ public ScriptReference() { } /** - * Get the scriptSource property: The storage source of the script: workspace. + * Get the scriptSource property: The storage source of the script: inline, workspace. * * @return the scriptSource value. */ @@ -52,7 +52,7 @@ public String scriptSource() { } /** - * Set the scriptSource property: The storage source of the script: workspace. + * Set the scriptSource property: The storage source of the script: inline, workspace. * * @param scriptSource the scriptSource value to set. * @return the ScriptReference object itself. @@ -122,14 +122,6 @@ public ScriptReference withTimeout(String timeout) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java index 6e04eaa8859a..68dc1e59bfa3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,20 +72,6 @@ public ScriptsToExecute withCreationScript(ScriptReference creationScript) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startupScript() != null) { - startupScript().validate(); - } - if (creationScript() != null) { - creationScript().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java index 2bdc415ee3d8..7cb373ddbc7e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public SeasonalityMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java index bc816386e04b..d3dc2a535bd7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class SeasonalityMode extends ExpandableStringEnum { /** - * Static value Auto for SeasonalityMode. + * Seasonality to be determined automatically. */ public static final SeasonalityMode AUTO = fromString("Auto"); /** - * Static value Custom for SeasonalityMode. + * Use the custom seasonality value. */ public static final SeasonalityMode CUSTOM = fromString("Custom"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java new file mode 100644 index 000000000000..fd6f88dce8c9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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; + +/** + * Secret expiration configuration. + */ +@Fluent +public final class SecretExpiry implements JsonSerializable { + /* + * Indicates if the secret is expirable. + */ + private Boolean expirableSecret; + + /* + * Number of hours after which the secret will expire. + */ + private Integer expireAfterHours; + + /** + * Creates an instance of SecretExpiry class. + */ + public SecretExpiry() { + } + + /** + * Get the expirableSecret property: Indicates if the secret is expirable. + * + * @return the expirableSecret value. + */ + public Boolean expirableSecret() { + return this.expirableSecret; + } + + /** + * Set the expirableSecret property: Indicates if the secret is expirable. + * + * @param expirableSecret the expirableSecret value to set. + * @return the SecretExpiry object itself. + */ + public SecretExpiry withExpirableSecret(Boolean expirableSecret) { + this.expirableSecret = expirableSecret; + return this; + } + + /** + * Get the expireAfterHours property: Number of hours after which the secret will expire. + * + * @return the expireAfterHours value. + */ + public Integer expireAfterHours() { + return this.expireAfterHours; + } + + /** + * Set the expireAfterHours property: Number of hours after which the secret will expire. + * + * @param expireAfterHours the expireAfterHours value to set. + * @return the SecretExpiry object itself. + */ + public SecretExpiry withExpireAfterHours(Integer expireAfterHours) { + this.expireAfterHours = expireAfterHours; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("expirableSecret", this.expirableSecret); + jsonWriter.writeNumberField("expireAfterHours", this.expireAfterHours); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretExpiry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretExpiry 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 SecretExpiry. + */ + public static SecretExpiry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretExpiry deserializedSecretExpiry = new SecretExpiry(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expirableSecret".equals(fieldName)) { + deserializedSecretExpiry.expirableSecret = reader.getNullable(JsonReader::getBoolean); + } else if ("expireAfterHours".equals(fieldName)) { + deserializedSecretExpiry.expireAfterHours = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretExpiry; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java index 7652428a933d..fc5de158b01c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java index 67d84ce9fe0d..ed6ab25525ae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -77,14 +77,6 @@ public ServerlessComputeSettings withServerlessComputeNoPublicIp(Boolean serverl return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java index 4a6d2f5d405c..0a208aed1264 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -58,19 +58,19 @@ public interface ServerlessEndpoint { ServerlessEndpointProperties properties(); /** - * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the kind value. + * @return the identity value. */ - String kind(); + ManagedServiceIdentity identity(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of + * the same type. * - * @return the identity value. + * @return the kind value. */ - ManagedServiceIdentity identity(); + String kind(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -160,7 +160,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); @@ -183,8 +183,8 @@ interface WithProperties { * The stage of the ServerlessEndpoint 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -215,32 +215,32 @@ interface WithTags { } /** - * The stage of the ServerlessEndpoint definition allowing to specify kind. + * The stage of the ServerlessEndpoint definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the ServerlessEndpoint definition allowing to specify identity. + * The stage of the ServerlessEndpoint definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the + * same type. * @return the next definition stage. */ - WithCreate withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** @@ -267,7 +267,7 @@ interface WithSku { /** * The template for ServerlessEndpoint update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { /** * Executes the update request. * @@ -302,30 +302,30 @@ interface WithTags { } /** - * The stage of the ServerlessEndpoint update allowing to specify sku. + * The stage of the ServerlessEndpoint update allowing to specify identity. */ - interface WithSku { + interface WithIdentity { /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param sku Sku details required for ARM contract for Autoscaling. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - Update withSku(PartialSku sku); + Update withIdentity(PartialManagedServiceIdentity identity); } /** - * The stage of the ServerlessEndpoint update allowing to specify identity. + * The stage of the ServerlessEndpoint update allowing to specify sku. */ - interface WithIdentity { + interface WithSku { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param sku Sku details required for ARM contract for Autoscaling. * @return the next definition stage. */ - Update withIdentity(PartialManagedServiceIdentity identity); + Update withSku(PartialSku sku); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java new file mode 100644 index 000000000000..ef67a76a1e78 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ServerlessEndpointCapacityReservation model. + */ +@Fluent +public final class ServerlessEndpointCapacityReservation + implements JsonSerializable { + /* + * The capacityReservationGroupId property. + */ + private String capacityReservationGroupId; + + /* + * The endpointReservedCapacity property. + */ + private Integer endpointReservedCapacity; + + /** + * Creates an instance of ServerlessEndpointCapacityReservation class. + */ + public ServerlessEndpointCapacityReservation() { + } + + /** + * Get the capacityReservationGroupId property: The capacityReservationGroupId property. + * + * @return the capacityReservationGroupId value. + */ + public String capacityReservationGroupId() { + return this.capacityReservationGroupId; + } + + /** + * Set the capacityReservationGroupId property: The capacityReservationGroupId property. + * + * @param capacityReservationGroupId the capacityReservationGroupId value to set. + * @return the ServerlessEndpointCapacityReservation object itself. + */ + public ServerlessEndpointCapacityReservation withCapacityReservationGroupId(String capacityReservationGroupId) { + this.capacityReservationGroupId = capacityReservationGroupId; + return this; + } + + /** + * Get the endpointReservedCapacity property: The endpointReservedCapacity property. + * + * @return the endpointReservedCapacity value. + */ + public Integer endpointReservedCapacity() { + return this.endpointReservedCapacity; + } + + /** + * Set the endpointReservedCapacity property: The endpointReservedCapacity property. + * + * @param endpointReservedCapacity the endpointReservedCapacity value to set. + * @return the ServerlessEndpointCapacityReservation object itself. + */ + public ServerlessEndpointCapacityReservation withEndpointReservedCapacity(Integer endpointReservedCapacity) { + this.endpointReservedCapacity = endpointReservedCapacity; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("capacityReservationGroupId", this.capacityReservationGroupId); + jsonWriter.writeNumberField("endpointReservedCapacity", this.endpointReservedCapacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointCapacityReservation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointCapacityReservation 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 ServerlessEndpointCapacityReservation. + */ + public static ServerlessEndpointCapacityReservation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointCapacityReservation deserializedServerlessEndpointCapacityReservation + = new ServerlessEndpointCapacityReservation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacityReservationGroupId".equals(fieldName)) { + deserializedServerlessEndpointCapacityReservation.capacityReservationGroupId = reader.getString(); + } else if ("endpointReservedCapacity".equals(fieldName)) { + deserializedServerlessEndpointCapacityReservation.endpointReservedCapacity + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointCapacityReservation; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java new file mode 100644 index 000000000000..131badd27b20 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ServerlessEndpointContentSafety model. + */ +@Fluent +public final class ServerlessEndpointContentSafety implements JsonSerializable { + /* + * Specifies the status of content safety. + */ + private ContentSafetyStatus contentSafetyStatus; + + /** + * Creates an instance of ServerlessEndpointContentSafety class. + */ + public ServerlessEndpointContentSafety() { + } + + /** + * Get the contentSafetyStatus property: Specifies the status of content safety. + * + * @return the contentSafetyStatus value. + */ + public ContentSafetyStatus contentSafetyStatus() { + return this.contentSafetyStatus; + } + + /** + * Set the contentSafetyStatus property: Specifies the status of content safety. + * + * @param contentSafetyStatus the contentSafetyStatus value to set. + * @return the ServerlessEndpointContentSafety object itself. + */ + public ServerlessEndpointContentSafety withContentSafetyStatus(ContentSafetyStatus contentSafetyStatus) { + this.contentSafetyStatus = contentSafetyStatus; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("contentSafetyStatus", + this.contentSafetyStatus == null ? null : this.contentSafetyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointContentSafety from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointContentSafety 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 ServerlessEndpointContentSafety. + */ + public static ServerlessEndpointContentSafety fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointContentSafety deserializedServerlessEndpointContentSafety + = new ServerlessEndpointContentSafety(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("contentSafetyStatus".equals(fieldName)) { + deserializedServerlessEndpointContentSafety.contentSafetyStatus + = ContentSafetyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointContentSafety; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java new file mode 100644 index 000000000000..ae0b1925aded --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.Map; + +/** + * The ServerlessEndpointInferenceEndpoint model. + */ +@Immutable +public final class ServerlessEndpointInferenceEndpoint + implements JsonSerializable { + /* + * The headers property. + */ + private Map headers; + + /* + * The uri property. + */ + private String uri; + + /** + * Creates an instance of ServerlessEndpointInferenceEndpoint class. + */ + public ServerlessEndpointInferenceEndpoint() { + } + + /** + * Get the headers property: The headers property. + * + * @return the headers value. + */ + public Map headers() { + return this.headers; + } + + /** + * Get the uri property: The uri property. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointInferenceEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointInferenceEndpoint 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 ServerlessEndpointInferenceEndpoint. + */ + public static ServerlessEndpointInferenceEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointInferenceEndpoint deserializedServerlessEndpointInferenceEndpoint + = new ServerlessEndpointInferenceEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedServerlessEndpointInferenceEndpoint.uri = reader.getString(); + } else if ("headers".equals(fieldName)) { + Map headers = reader.readMap(reader1 -> reader1.getString()); + deserializedServerlessEndpointInferenceEndpoint.headers = headers; + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointInferenceEndpoint; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java new file mode 100644 index 000000000000..37068d26720d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ServerlessEndpointModelSettings model. + */ +@Fluent +public final class ServerlessEndpointModelSettings implements JsonSerializable { + /* + * The modelId property. + */ + private String modelId; + + /** + * Creates an instance of ServerlessEndpointModelSettings class. + */ + public ServerlessEndpointModelSettings() { + } + + /** + * Get the modelId property: The modelId property. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: The modelId property. + * + * @param modelId the modelId value to set. + * @return the ServerlessEndpointModelSettings object itself. + */ + public ServerlessEndpointModelSettings withModelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("modelId", this.modelId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointModelSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointModelSettings 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 ServerlessEndpointModelSettings. + */ + public static ServerlessEndpointModelSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointModelSettings deserializedServerlessEndpointModelSettings + = new ServerlessEndpointModelSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("modelId".equals(fieldName)) { + deserializedServerlessEndpointModelSettings.modelId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointModelSettings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java index c9a8c938e016..d75695d39105 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -17,30 +16,25 @@ */ @Fluent public final class ServerlessEndpointProperties implements JsonSerializable { - /* - * The model settings (model id) for the model being serviced on the ServerlessEndpoint. - */ - private ModelSettings modelSettings; - /* * [Required] Specifies the authentication mode for the Serverless endpoint. */ private ServerlessInferenceEndpointAuthMode authMode; /* - * The inference uri to target when making requests against the serverless endpoint + * Specifies the content safety options. If omitted, the default content safety settings will be configured */ - private ServerlessInferenceEndpoint inferenceEndpoint; + private ContentSafety contentSafety; /* - * Provisioning state for the endpoint. + * The current state of the ServerlessEndpoint. */ - private EndpointProvisioningState provisioningState; + private ServerlessEndpointState endpointState; /* - * The current state of the ServerlessEndpoint. + * The inference uri to target when making requests against the serverless endpoint */ - private ServerlessEndpointState endpointState; + private ServerlessInferenceEndpoint inferenceEndpoint; /* * The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. @@ -48,36 +42,19 @@ public final class ServerlessEndpointProperties implements JsonSerializable deployments) { + super.withDeployments(deployments); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties + withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); + jsonWriter.writeJsonField("capacityReservation", this.capacityReservation); + jsonWriter.writeJsonField("contentSafety", this.contentSafety); + jsonWriter.writeStringField("endpointState", this.endpointState == null ? null : this.endpointState.toString()); + jsonWriter.writeJsonField("inferenceEndpoint", this.inferenceEndpoint); + jsonWriter.writeStringField("marketplaceSubscriptionId", this.marketplaceSubscriptionId); + if (this.metadata != null) { + jsonWriter.writeUntypedField("metadata", this.metadata); + } + jsonWriter.writeJsonField("modelSettings", this.modelSettings); + jsonWriter.writeJsonField("offer", this.offer); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointResourceProperties 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 ServerlessEndpointResourceProperties. + */ + public static ServerlessEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointResourceProperties deserializedServerlessEndpointResourceProperties + = new ServerlessEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedServerlessEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("authMode".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.authMode + = ServerlessInferenceEndpointAuthMode.fromString(reader.getString()); + } else if ("capacityReservation".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.capacityReservation + = ServerlessEndpointCapacityReservation.fromJson(reader); + } else if ("contentSafety".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.contentSafety + = ServerlessEndpointContentSafety.fromJson(reader); + } else if ("endpointState".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.endpointState + = ServerlessEndpointState.fromString(reader.getString()); + } else if ("inferenceEndpoint".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.inferenceEndpoint + = ServerlessEndpointInferenceEndpoint.fromJson(reader); + } else if ("marketplaceSubscriptionId".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.marketplaceSubscriptionId = reader.getString(); + } else if ("metadata".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.metadata = reader.readUntyped(); + } else if ("modelSettings".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.modelSettings + = ServerlessEndpointModelSettings.fromJson(reader); + } else if ("offer".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.offer = ServerlessOffer.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java index a224cd14a6b8..4a3c30a42cc8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java index 66664125c7bb..e42e9d634687 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -13,37 +13,38 @@ */ public interface ServerlessEndpoints { /** - * List Serverless Endpoints. + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Serverless Endpoint name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + * @return serverless Endpoint along with {@link Response}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); /** - * List Serverless Endpoints. + * Get Serverless Endpoint. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param name Serverless Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. + * @return serverless Endpoint. */ - PagedIterable list(String resourceGroupName, String workspaceName, String skip, - Context context); + ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name); /** * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -55,7 +56,7 @@ PagedIterable list(String resourceGroupName, String workspac * Delete Serverless Endpoint (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -65,38 +66,37 @@ PagedIterable list(String resourceGroupName, String workspac void delete(String resourceGroupName, String workspaceName, String name, Context context); /** - * Get Serverless Endpoint. + * List Serverless Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return serverless Endpoint along with {@link Response}. + * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * Get Serverless Endpoint. + * List Serverless Endpoints. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Serverless Endpoint name. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param skip Continuation token for pagination. + * @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 serverless Endpoint. + * @return a paginated list of ServerlessEndpoint entities as paginated response with {@link PagedIterable}. */ - ServerlessEndpoint get(String resourceGroupName, String workspaceName, String name); + PagedIterable list(String resourceGroupName, String workspaceName, String skip, + Context context); /** * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,7 +111,7 @@ Response listKeysWithResponse(String resourceGroupName, String * List EndpointAuthKeys for an Endpoint using Key-based authentication. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -124,7 +124,7 @@ Response listKeysWithResponse(String resourceGroupName, String * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -139,7 +139,7 @@ EndpointAuthKeys regenerateKeys(String resourceGroupName, String workspaceName, * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param name Serverless Endpoint name. * @param body RegenerateKeys request . * @param context The context to associate with this operation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java index 98103042d85e..f68f6deb37c7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,44 +15,22 @@ /** * The ServerlessInferenceEndpoint model. */ -@Fluent +@Immutable public final class ServerlessInferenceEndpoint implements JsonSerializable { - /* - * [Required] The inference uri to target when making requests against the Serverless Endpoint. - */ - private String uri; - /* * Specifies any required headers to target this serverless endpoint. */ private Map headers; - /** - * Creates an instance of ServerlessInferenceEndpoint class. - */ - public ServerlessInferenceEndpoint() { - } - - /** - * Get the uri property: [Required] The inference uri to target when making requests against the Serverless - * Endpoint. - * - * @return the uri value. + /* + * [Required] The inference uri to target when making requests against the Serverless Endpoint. */ - public String uri() { - return this.uri; - } + private String uri; /** - * Set the uri property: [Required] The inference uri to target when making requests against the Serverless - * Endpoint. - * - * @param uri the uri value to set. - * @return the ServerlessInferenceEndpoint object itself. + * Creates an instance of ServerlessInferenceEndpoint class. */ - public ServerlessInferenceEndpoint withUri(String uri) { - this.uri = uri; - return this; + private ServerlessInferenceEndpoint() { } /** @@ -66,27 +43,21 @@ public Map headers() { } /** - * Validates the instance. + * Get the uri property: [Required] The inference uri to target when making requests against the Serverless + * Endpoint. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the uri value. */ - public void validate() { - if (uri() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property uri in model ServerlessInferenceEndpoint")); - } + public String uri() { + return this.uri; } - private static final ClientLogger LOGGER = new ClientLogger(ServerlessInferenceEndpoint.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java index 7dcd97bc44f8..92b68a5bb62a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,6 +17,16 @@ public final class ServerlessInferenceEndpointAuthMode */ public static final ServerlessInferenceEndpointAuthMode KEY = fromString("Key"); + /** + * Static value AAD for ServerlessInferenceEndpointAuthMode. + */ + public static final ServerlessInferenceEndpointAuthMode AAD = fromString("AAD"); + + /** + * Static value KeyAndAAD for ServerlessInferenceEndpointAuthMode. + */ + public static final ServerlessInferenceEndpointAuthMode KEY_AND_AAD = fromString("KeyAndAAD"); + /** * Creates a new instance of ServerlessInferenceEndpointAuthMode value. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java new file mode 100644 index 000000000000..a4c0515a9aef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 ServerlessOffer model. + */ +@Fluent +public final class ServerlessOffer implements JsonSerializable { + /* + * The offerName property. + */ + private String offerName; + + /* + * The publisher property. + */ + private String publisher; + + /** + * Creates an instance of ServerlessOffer class. + */ + public ServerlessOffer() { + } + + /** + * Get the offerName property: The offerName property. + * + * @return the offerName value. + */ + public String offerName() { + return this.offerName; + } + + /** + * Set the offerName property: The offerName property. + * + * @param offerName the offerName value to set. + * @return the ServerlessOffer object itself. + */ + public ServerlessOffer withOfferName(String offerName) { + this.offerName = offerName; + return this; + } + + /** + * Get the publisher property: The publisher property. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The publisher property. + * + * @param publisher the publisher value to set. + * @return the ServerlessOffer object itself. + */ + public ServerlessOffer withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("offerName", this.offerName); + jsonWriter.writeStringField("publisher", this.publisher); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessOffer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessOffer 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 ServerlessOffer. + */ + public static ServerlessOffer fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessOffer deserializedServerlessOffer = new ServerlessOffer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("offerName".equals(fieldName)) { + deserializedServerlessOffer.offerName = reader.getString(); + } else if ("publisher".equals(fieldName)) { + deserializedServerlessOffer.publisher = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessOffer; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java new file mode 100644 index 000000000000..e31a9da70ed1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ServiceAccountKeyName. + */ +public final class ServiceAccountKeyName extends ExpandableStringEnum { + /** + * Static value Key1 for ServiceAccountKeyName. + */ + public static final ServiceAccountKeyName KEY1 = fromString("Key1"); + + /** + * Static value Key2 for ServiceAccountKeyName. + */ + public static final ServiceAccountKeyName KEY2 = fromString("Key2"); + + /** + * Creates a new instance of ServiceAccountKeyName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ServiceAccountKeyName() { + } + + /** + * Creates or finds a ServiceAccountKeyName from its string representation. + * + * @param name a name to look for. + * @return the corresponding ServiceAccountKeyName. + */ + public static ServiceAccountKeyName fromString(String name) { + return fromString(name, ServiceAccountKeyName.class); + } + + /** + * Gets known ServiceAccountKeyName values. + * + * @return known ServiceAccountKeyName values. + */ + public static Collection values() { + return values(ServiceAccountKeyName.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java index 47ba7fbd2cc7..e0a8e4114014 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,18 +12,18 @@ */ public final class ServiceDataAccessAuthIdentity extends ExpandableStringEnum { /** - * Static value None for ServiceDataAccessAuthIdentity. + * Do not use any identity for service data access. */ public static final ServiceDataAccessAuthIdentity NONE = fromString("None"); /** - * Static value WorkspaceSystemAssignedIdentity for ServiceDataAccessAuthIdentity. + * Use the system assigned managed identity of the Workspace to authenticate service data access. */ public static final ServiceDataAccessAuthIdentity WORKSPACE_SYSTEM_ASSIGNED_IDENTITY = fromString("WorkspaceSystemAssignedIdentity"); /** - * Static value WorkspaceUserAssignedIdentity for ServiceDataAccessAuthIdentity. + * Use the user assigned managed identity of the Workspace to authenticate service data access. */ public static final ServiceDataAccessAuthIdentity WORKSPACE_USER_ASSIGNED_IDENTITY = fromString("WorkspaceUserAssignedIdentity"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java index 3d0853b9b566..bf03cb2d262c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,7 +17,7 @@ @Fluent public final class ServiceManagedResourcesSettings implements JsonSerializable { /* - * The settings for the service managed cosmosdb account. + * The cosmosDb property. */ private CosmosDbSettings cosmosDb; @@ -28,7 +28,7 @@ public ServiceManagedResourcesSettings() { } /** - * Get the cosmosDb property: The settings for the service managed cosmosdb account. + * Get the cosmosDb property: The cosmosDb property. * * @return the cosmosDb value. */ @@ -37,7 +37,7 @@ public CosmosDbSettings cosmosDb() { } /** - * Set the cosmosDb property: The settings for the service managed cosmosdb account. + * Set the cosmosDb property: The cosmosDb property. * * @param cosmosDb the cosmosDb value to set. * @return the ServiceManagedResourcesSettings object itself. @@ -47,17 +47,6 @@ public ServiceManagedResourcesSettings withCosmosDb(CosmosDbSettings cosmosDb) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cosmosDb() != null) { - cosmosDb().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java index 651ca1082d69..4fafc66f2e09 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,16 +30,6 @@ public final class ServicePrincipalAuthTypeWorkspaceConnectionProperties extends */ private WorkspaceConnectionServicePrincipal credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,20 @@ public WorkspaceConnectionServicePrincipal credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -128,8 +107,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withIsSharedToAll(B * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -137,8 +116,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String t * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -146,8 +125,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withMetadata(Map sharedUserList) { - super.withSharedUserList(sharedUserList); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +134,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withSharedUserList( * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -164,22 +143,19 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValue(String va * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public ServicePrincipalAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -189,15 +165,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -224,31 +202,37 @@ public static ServicePrincipalAuthTypeWorkspaceConnectionProperties fromJson(Jso deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties .withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java index 66e170dda417..794baaf3ccef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; -import java.util.Objects; -import java.util.UUID; /** * Service Principal datastore credentials configuration. @@ -29,24 +26,24 @@ public final class ServicePrincipalDatastoreCredentials extends DatastoreCredent private String authorityUrl; /* - * Resource the service principal has access to. + * [Required] Service principal client ID. */ - private String resourceUrl; + private String clientId; /* - * [Required] ID of the tenant to which the service principal belongs. + * Resource the service principal has access to. */ - private UUID tenantId; + private String resourceUrl; /* - * [Required] Service principal client ID. + * [Required] Service principal secrets. */ - private UUID clientId; + private ServicePrincipalDatastoreSecrets secrets; /* - * [Required] Service principal secrets. + * [Required] ID of the tenant to which the service principal belongs. */ - private ServicePrincipalDatastoreSecrets secrets; + private String tenantId; /** * Creates an instance of ServicePrincipalDatastoreCredentials class. @@ -85,62 +82,42 @@ public ServicePrincipalDatastoreCredentials withAuthorityUrl(String authorityUrl } /** - * Get the resourceUrl property: Resource the service principal has access to. - * - * @return the resourceUrl value. - */ - public String resourceUrl() { - return this.resourceUrl; - } - - /** - * Set the resourceUrl property: Resource the service principal has access to. - * - * @param resourceUrl the resourceUrl value to set. - * @return the ServicePrincipalDatastoreCredentials object itself. - */ - public ServicePrincipalDatastoreCredentials withResourceUrl(String resourceUrl) { - this.resourceUrl = resourceUrl; - return this; - } - - /** - * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Get the clientId property: [Required] Service principal client ID. * - * @return the tenantId value. + * @return the clientId value. */ - public UUID tenantId() { - return this.tenantId; + public String clientId() { + return this.clientId; } /** - * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Set the clientId property: [Required] Service principal client ID. * - * @param tenantId the tenantId value to set. + * @param clientId the clientId value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ - public ServicePrincipalDatastoreCredentials withTenantId(UUID tenantId) { - this.tenantId = tenantId; + public ServicePrincipalDatastoreCredentials withClientId(String clientId) { + this.clientId = clientId; return this; } /** - * Get the clientId property: [Required] Service principal client ID. + * Get the resourceUrl property: Resource the service principal has access to. * - * @return the clientId value. + * @return the resourceUrl value. */ - public UUID clientId() { - return this.clientId; + public String resourceUrl() { + return this.resourceUrl; } /** - * Set the clientId property: [Required] Service principal client ID. + * Set the resourceUrl property: Resource the service principal has access to. * - * @param clientId the clientId value to set. + * @param resourceUrl the resourceUrl value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ - public ServicePrincipalDatastoreCredentials withClientId(UUID clientId) { - this.clientId = clientId; + public ServicePrincipalDatastoreCredentials withResourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; return this; } @@ -165,33 +142,24 @@ public ServicePrincipalDatastoreCredentials withSecrets(ServicePrincipalDatastor } /** - * Validates the instance. + * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the tenantId value. */ - @Override - public void validate() { - super.validate(); - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); - } - if (clientId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property clientId in model ServicePrincipalDatastoreCredentials")); - } - if (secrets() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property secrets in model ServicePrincipalDatastoreCredentials")); - } else { - secrets().validate(); - } + public String tenantId() { + return this.tenantId; } - private static final ClientLogger LOGGER = new ClientLogger(ServicePrincipalDatastoreCredentials.class); + /** + * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * + * @param tenantId the tenantId value to set. + * @return the ServicePrincipalDatastoreCredentials object itself. + */ + public ServicePrincipalDatastoreCredentials withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } /** * {@inheritDoc} @@ -199,9 +167,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); - jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); + jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeJsonField("secrets", this.secrets); + jsonWriter.writeStringField("tenantId", this.tenantId); jsonWriter.writeStringField("credentialsType", this.credentialsType == null ? null : this.credentialsType.toString()); jsonWriter.writeStringField("authorityUrl", this.authorityUrl); @@ -226,15 +194,13 @@ public static ServicePrincipalDatastoreCredentials fromJson(JsonReader jsonReade String fieldName = reader.getFieldName(); reader.nextToken(); - if ("tenantId".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + if ("clientId".equals(fieldName)) { + deserializedServicePrincipalDatastoreCredentials.clientId = reader.getString(); } else if ("secrets".equals(fieldName)) { deserializedServicePrincipalDatastoreCredentials.secrets = ServicePrincipalDatastoreSecrets.fromJson(reader); + } else if ("tenantId".equals(fieldName)) { + deserializedServicePrincipalDatastoreCredentials.tenantId = reader.getString(); } else if ("credentialsType".equals(fieldName)) { deserializedServicePrincipalDatastoreCredentials.credentialsType = CredentialsType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java index 98cbcf7f186d..5c57296baed7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -62,16 +62,6 @@ public ServicePrincipalDatastoreSecrets withClientSecret(String clientSecret) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java index a574a3eb61d6..55fd6c982f4e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -77,6 +77,17 @@ public List addressPrefixes() { return this.addressPrefixes; } + /** + * Set the addressPrefixes property: Optional, if provided, the ServiceTag property will be ignored. + * + * @param addressPrefixes the addressPrefixes value to set. + * @return the ServiceTagDestination object itself. + */ + public ServiceTagDestination withAddressPrefixes(List addressPrefixes) { + this.addressPrefixes = addressPrefixes; + return this; + } + /** * Get the portRanges property: The portRanges property. * @@ -137,14 +148,6 @@ public ServiceTagDestination withServiceTag(String serviceTag) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -152,6 +155,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + jsonWriter.writeArrayField("addressPrefixes", this.addressPrefixes, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("portRanges", this.portRanges); jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceTag", this.serviceTag); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java index 742b73db9dc8..cdfe36b74db6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Service Tag Outbound Rule for the managed network of a machine learning workspace. @@ -81,19 +82,6 @@ public ServiceTagOutboundRule withStatus(RuleStatus status) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (destination() != null) { - destination().validate(); - } - } - /** * {@inheritDoc} */ @@ -126,6 +114,11 @@ public static ServiceTagOutboundRule fromJson(JsonReader jsonReader) throws IOEx deserializedServiceTagOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); } else if ("status".equals(fieldName)) { deserializedServiceTagOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); + } else if ("errorInformation".equals(fieldName)) { + deserializedServiceTagOutboundRule.withErrorInformation(reader.getString()); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceTagOutboundRule.withParentRuleNames(parentRuleNames); } else if ("type".equals(fieldName)) { deserializedServiceTagOutboundRule.type = RuleType.fromString(reader.getString()); } else if ("destination".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java index f4c6309c0d0e..8d4f39de9358 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,17 +47,6 @@ public SetupScripts withScripts(ScriptsToExecute scripts) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scripts() != null) { - scripts().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java index 06fbc71b599a..b25b6431b3ee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -18,12 +18,12 @@ @Fluent public final class SharedPrivateLinkResource implements JsonSerializable { /* - * Unique name of the private link. + * Unique name of the private link */ private String name; /* - * Resource properties. + * Properties of a shared private link resource. */ private SharedPrivateLinkResourceProperty innerProperties; @@ -54,7 +54,7 @@ public SharedPrivateLinkResource withName(String name) { } /** - * Get the innerProperties property: Resource properties. + * Get the innerProperties property: Properties of a shared private link resource. * * @return the innerProperties value. */ @@ -63,48 +63,48 @@ private SharedPrivateLinkResourceProperty innerProperties() { } /** - * Get the privateLinkResourceId property: The resource id that private link links to. + * Get the groupId property: group id of the private link. * - * @return the privateLinkResourceId value. + * @return the groupId value. */ - public String privateLinkResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId(); + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); } /** - * Set the privateLinkResourceId property: The resource id that private link links to. + * Set the groupId property: group id of the private link. * - * @param privateLinkResourceId the privateLinkResourceId value to set. + * @param groupId the groupId value to set. * @return the SharedPrivateLinkResource object itself. */ - public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) { + public SharedPrivateLinkResource withGroupId(String groupId) { if (this.innerProperties() == null) { this.innerProperties = new SharedPrivateLinkResourceProperty(); } - this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId); + this.innerProperties().withGroupId(groupId); return this; } /** - * Get the groupId property: The private link resource group id. + * Get the privateLinkResourceId property: the resource id that private link links to. * - * @return the groupId value. + * @return the privateLinkResourceId value. */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); + public String privateLinkResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId(); } /** - * Set the groupId property: The private link resource group id. + * Set the privateLinkResourceId property: the resource id that private link links to. * - * @param groupId the groupId value to set. + * @param privateLinkResourceId the privateLinkResourceId value to set. * @return the SharedPrivateLinkResource object itself. */ - public SharedPrivateLinkResource withGroupId(String groupId) { + public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) { if (this.innerProperties() == null) { this.innerProperties = new SharedPrivateLinkResourceProperty(); } - this.innerProperties().withGroupId(groupId); + this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId); return this; } @@ -132,8 +132,13 @@ public SharedPrivateLinkResource withRequestMessage(String requestMessage) { } /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. + * Get the status property: Connection status of the service consumer with the service provider\r\nPossible state + * transitions\r\nPending -> Approved (Service provider approves the connection request)\r\nPending -> + * Rejected (Service provider rejects the connection request)\r\nPending -> Disconnected (Service provider + * deletes the connection)\r\nApproved -> Rejected (Service provider rejects the approved connection)\r\nApproved + * -> Disconnected (Service provider deletes the connection)\r\nRejected -> Pending (Service consumer + * re-initiates the connection request that was rejected)\r\nRejected -> Disconnected (Service provider deletes + * the connection). * * @return the status value. */ @@ -142,8 +147,13 @@ public PrivateEndpointServiceConnectionStatus status() { } /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. + * Set the status property: Connection status of the service consumer with the service provider\r\nPossible state + * transitions\r\nPending -> Approved (Service provider approves the connection request)\r\nPending -> + * Rejected (Service provider rejects the connection request)\r\nPending -> Disconnected (Service provider + * deletes the connection)\r\nApproved -> Rejected (Service provider rejects the approved connection)\r\nApproved + * -> Disconnected (Service provider deletes the connection)\r\nRejected -> Pending (Service consumer + * re-initiates the connection request that was rejected)\r\nRejected -> Disconnected (Service provider deletes + * the connection). * * @param status the status value to set. * @return the SharedPrivateLinkResource object itself. @@ -156,17 +166,6 @@ public SharedPrivateLinkResource withStatus(PrivateEndpointServiceConnectionStat return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java index c0432d8030ad..1db485d948b3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,22 +12,22 @@ */ public final class ShortSeriesHandlingConfiguration extends ExpandableStringEnum { /** - * Static value None for ShortSeriesHandlingConfiguration. + * Represents no/null value. */ public static final ShortSeriesHandlingConfiguration NONE = fromString("None"); /** - * Static value Auto for ShortSeriesHandlingConfiguration. + * Short series will be padded if there are no long series, otherwise short series will be dropped. */ public static final ShortSeriesHandlingConfiguration AUTO = fromString("Auto"); /** - * Static value Pad for ShortSeriesHandlingConfiguration. + * All the short series will be padded. */ public static final ShortSeriesHandlingConfiguration PAD = fromString("Pad"); /** - * Static value Drop for ShortSeriesHandlingConfiguration. + * All the short series will be dropped. */ public static final ShortSeriesHandlingConfiguration DROP = fromString("Drop"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java index 43243f6100f7..ee831084e708 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -159,19 +158,6 @@ public Sku withCapacity(Integer capacity) { 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 Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java index 50bdf48a59fc..b843161819f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,12 +14,12 @@ /** * SKU capacity information. */ -@Fluent +@Immutable public final class SkuCapacity implements JsonSerializable { /* - * Gets or sets the minimum. + * Gets or sets the default capacity. */ - private Integer minimum; + private Integer defaultProperty; /* * Gets or sets the maximum. @@ -27,39 +27,28 @@ public final class SkuCapacity implements JsonSerializable { private Integer maximum; /* - * Gets or sets the default capacity. + * Gets or sets the minimum. */ - private Integer defaultProperty; + private Integer minimum; /* - * Gets or sets the type of the scale. + * Node scaling setting for the compute sku. */ private SkuScaleType scaleType; /** * Creates an instance of SkuCapacity class. */ - public SkuCapacity() { + private SkuCapacity() { } /** - * Get the minimum property: Gets or sets the minimum. - * - * @return the minimum value. - */ - public Integer minimum() { - return this.minimum; - } - - /** - * Set the minimum property: Gets or sets the minimum. + * Get the defaultProperty property: Gets or sets the default capacity. * - * @param minimum the minimum value to set. - * @return the SkuCapacity object itself. + * @return the defaultProperty value. */ - public SkuCapacity withMinimum(Integer minimum) { - this.minimum = minimum; - return this; + public Integer defaultProperty() { + return this.defaultProperty; } /** @@ -72,38 +61,16 @@ public Integer maximum() { } /** - * Set the maximum property: Gets or sets the maximum. - * - * @param maximum the maximum value to set. - * @return the SkuCapacity object itself. - */ - public SkuCapacity withMaximum(Integer maximum) { - this.maximum = maximum; - return this; - } - - /** - * Get the defaultProperty property: Gets or sets the default capacity. - * - * @return the defaultProperty value. - */ - public Integer defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: Gets or sets the default capacity. + * Get the minimum property: Gets or sets the minimum. * - * @param defaultProperty the defaultProperty value to set. - * @return the SkuCapacity object itself. + * @return the minimum value. */ - public SkuCapacity withDefaultProperty(Integer defaultProperty) { - this.defaultProperty = defaultProperty; - return this; + public Integer minimum() { + return this.minimum; } /** - * Get the scaleType property: Gets or sets the type of the scale. + * Get the scaleType property: Node scaling setting for the compute sku. * * @return the scaleType value. */ @@ -111,34 +78,15 @@ public SkuScaleType scaleType() { return this.scaleType; } - /** - * Set the scaleType property: Gets or sets the type of the scale. - * - * @param scaleType the scaleType value to set. - * @return the SkuCapacity object itself. - */ - public SkuCapacity withScaleType(SkuScaleType scaleType) { - this.scaleType = scaleType; - 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("minimum", this.minimum); - jsonWriter.writeNumberField("maximum", this.maximum); jsonWriter.writeNumberField("default", this.defaultProperty); + jsonWriter.writeNumberField("maximum", this.maximum); + jsonWriter.writeNumberField("minimum", this.minimum); jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); return jsonWriter.writeEndObject(); } @@ -158,12 +106,12 @@ public static SkuCapacity fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("minimum".equals(fieldName)) { - deserializedSkuCapacity.minimum = reader.getNullable(JsonReader::getInt); + if ("default".equals(fieldName)) { + deserializedSkuCapacity.defaultProperty = reader.getNullable(JsonReader::getInt); } else if ("maximum".equals(fieldName)) { deserializedSkuCapacity.maximum = reader.getNullable(JsonReader::getInt); - } else if ("default".equals(fieldName)) { - deserializedSkuCapacity.defaultProperty = reader.getNullable(JsonReader::getInt); + } else if ("minimum".equals(fieldName)) { + deserializedSkuCapacity.minimum = reader.getNullable(JsonReader::getInt); } else if ("scaleType".equals(fieldName)) { deserializedSkuCapacity.scaleType = SkuScaleType.fromString(reader.getString()); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java index 3bbd83fa8bb0..3ac629ace760 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -10,6 +10,13 @@ * An immutable client-side representation of SkuResource. */ public interface SkuResource { + /** + * Gets the capacity property: Gets or sets the Sku Capacity. + * + * @return the capacity value. + */ + SkuCapacity capacity(); + /** * Gets the resourceType property: The resource type name. * @@ -24,13 +31,6 @@ public interface SkuResource { */ SkuSetting sku(); - /** - * Gets the capacity property: Gets or sets the Sku Capacity. - * - * @return the capacity value. - */ - SkuCapacity capacity(); - /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java index 2d53080f8976..afc526507603 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,17 +12,17 @@ */ public final class SkuScaleType extends ExpandableStringEnum { /** - * Static value Automatic for SkuScaleType. + * Automatically scales node count. */ public static final SkuScaleType AUTOMATIC = fromString("Automatic"); /** - * Static value Manual for SkuScaleType. + * Node count scaled upon user request. */ public static final SkuScaleType MANUAL = fromString("Manual"); /** - * Static value None for SkuScaleType. + * Fixed set of nodes. */ public static final SkuScaleType NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java index a847b264d6ab..01ee4f9f9c67 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +14,7 @@ /** * SkuSetting fulfills the need for stripped down SKU info in ARM contract. */ -@Fluent +@Immutable public final class SkuSetting implements JsonSerializable { /* * [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. @@ -31,7 +30,7 @@ public final class SkuSetting implements JsonSerializable { /** * Creates an instance of SkuSetting class. */ - public SkuSetting() { + private SkuSetting() { } /** @@ -43,17 +42,6 @@ public String name() { return this.name; } - /** - * Set the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @param name the name value to set. - * @return the SkuSetting object itself. - */ - public SkuSetting withName(String name) { - this.name = name; - return this; - } - /** * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more * than one tier, but is not required on a PUT. @@ -64,32 +52,6 @@ public SkuTier tier() { return this.tier; } - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the SkuSetting object itself. - */ - public SkuSetting withTier(SkuTier tier) { - this.tier = tier; - 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 SkuSetting")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SkuSetting.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java index 9fe163fb9c66..bd70646e1320 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -10,22 +10,22 @@ */ public enum SkuTier { /** - * Enum value Free. + * The Free service tier. */ FREE("Free"), /** - * Enum value Basic. + * The Basic service tier. */ BASIC("Basic"), /** - * Enum value Standard. + * The Standard service tier. */ STANDARD("Standard"), /** - * Enum value Premium. + * The Premium service tier. */ PREMIUM("Premium"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java index 16600363c58d..5bceda9fb7b4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java index ad1ddf074bc6..741ddb05bf25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -24,9 +23,9 @@ public final class SparkJob extends JobBaseProperties { private JobType jobType = JobType.SPARK; /* - * Compute Resource configuration for the job. + * Archive files used in the job. */ - private SparkResourceConfiguration resources; + private List archives; /* * Arguments for the job. @@ -38,6 +37,11 @@ public final class SparkJob extends JobBaseProperties { */ private String codeId; + /* + * Spark configured properties. + */ + private Map conf; + /* * [Required] The entry to execute on startup of the job. */ @@ -49,19 +53,19 @@ public final class SparkJob extends JobBaseProperties { private String environmentId; /* - * Mapping of input data bindings used in the job. + * Environment variables included in the job. */ - private Map inputs; + private Map environmentVariables; /* - * Mapping of output data bindings used in the job. + * Files used in the job. */ - private Map outputs; + private List files; /* - * Python files used in the job. + * Mapping of input data bindings used in the job. */ - private List pyFiles; + private Map inputs; /* * Jar files used in the job. @@ -69,19 +73,14 @@ public final class SparkJob extends JobBaseProperties { private List jars; /* - * Files used in the job. - */ - private List files; - - /* - * Archive files used in the job. + * Mapping of output data bindings used in the job. */ - private List archives; + private Map outputs; /* - * Spark configured properties. + * Python files used in the job. */ - private Map conf; + private List pyFiles; /* * Queue settings for the job @@ -89,14 +88,9 @@ public final class SparkJob extends JobBaseProperties { private QueueSettings queueSettings; /* - * Environment variables included in the job. - */ - private Map environmentVariables; - - /* - * Status of the job. + * Compute Resource configuration for the job. */ - private JobStatus status; + private SparkResourceConfiguration resources; /** * Creates an instance of SparkJob class. @@ -115,22 +109,22 @@ public JobType jobType() { } /** - * Get the resources property: Compute Resource configuration for the job. + * Get the archives property: Archive files used in the job. * - * @return the resources value. + * @return the archives value. */ - public SparkResourceConfiguration resources() { - return this.resources; + public List archives() { + return this.archives; } /** - * Set the resources property: Compute Resource configuration for the job. + * Set the archives property: Archive files used in the job. * - * @param resources the resources value to set. + * @param archives the archives value to set. * @return the SparkJob object itself. */ - public SparkJob withResources(SparkResourceConfiguration resources) { - this.resources = resources; + public SparkJob withArchives(List archives) { + this.archives = archives; return this; } @@ -174,6 +168,26 @@ public SparkJob withCodeId(String codeId) { return this; } + /** + * Get the conf property: Spark configured properties. + * + * @return the conf value. + */ + public Map conf() { + return this.conf; + } + + /** + * Set the conf property: Spark configured properties. + * + * @param conf the conf value to set. + * @return the SparkJob object itself. + */ + public SparkJob withConf(Map conf) { + this.conf = conf; + return this; + } + /** * Get the entry property: [Required] The entry to execute on startup of the job. * @@ -215,62 +229,62 @@ public SparkJob withEnvironmentId(String environmentId) { } /** - * Get the inputs property: Mapping of input data bindings used in the job. + * Get the environmentVariables property: Environment variables included in the job. * - * @return the inputs value. + * @return the environmentVariables value. */ - public Map inputs() { - return this.inputs; + public Map environmentVariables() { + return this.environmentVariables; } /** - * Set the inputs property: Mapping of input data bindings used in the job. + * Set the environmentVariables property: Environment variables included in the job. * - * @param inputs the inputs value to set. + * @param environmentVariables the environmentVariables value to set. * @return the SparkJob object itself. */ - public SparkJob withInputs(Map inputs) { - this.inputs = inputs; + public SparkJob withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; return this; } /** - * Get the outputs property: Mapping of output data bindings used in the job. + * Get the files property: Files used in the job. * - * @return the outputs value. + * @return the files value. */ - public Map outputs() { - return this.outputs; + public List files() { + return this.files; } /** - * Set the outputs property: Mapping of output data bindings used in the job. + * Set the files property: Files used in the job. * - * @param outputs the outputs value to set. + * @param files the files value to set. * @return the SparkJob object itself. */ - public SparkJob withOutputs(Map outputs) { - this.outputs = outputs; + public SparkJob withFiles(List files) { + this.files = files; return this; } /** - * Get the pyFiles property: Python files used in the job. + * Get the inputs property: Mapping of input data bindings used in the job. * - * @return the pyFiles value. + * @return the inputs value. */ - public List pyFiles() { - return this.pyFiles; + public Map inputs() { + return this.inputs; } /** - * Set the pyFiles property: Python files used in the job. + * Set the inputs property: Mapping of input data bindings used in the job. * - * @param pyFiles the pyFiles value to set. + * @param inputs the inputs value to set. * @return the SparkJob object itself. */ - public SparkJob withPyFiles(List pyFiles) { - this.pyFiles = pyFiles; + public SparkJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -295,62 +309,42 @@ public SparkJob withJars(List jars) { } /** - * Get the files property: Files used in the job. - * - * @return the files value. - */ - public List files() { - return this.files; - } - - /** - * Set the files property: Files used in the job. - * - * @param files the files value to set. - * @return the SparkJob object itself. - */ - public SparkJob withFiles(List files) { - this.files = files; - return this; - } - - /** - * Get the archives property: Archive files used in the job. + * Get the outputs property: Mapping of output data bindings used in the job. * - * @return the archives value. + * @return the outputs value. */ - public List archives() { - return this.archives; + public Map outputs() { + return this.outputs; } /** - * Set the archives property: Archive files used in the job. + * Set the outputs property: Mapping of output data bindings used in the job. * - * @param archives the archives value to set. + * @param outputs the outputs value to set. * @return the SparkJob object itself. */ - public SparkJob withArchives(List archives) { - this.archives = archives; + public SparkJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } /** - * Get the conf property: Spark configured properties. + * Get the pyFiles property: Python files used in the job. * - * @return the conf value. + * @return the pyFiles value. */ - public Map conf() { - return this.conf; + public List pyFiles() { + return this.pyFiles; } /** - * Set the conf property: Spark configured properties. + * Set the pyFiles property: Python files used in the job. * - * @param conf the conf value to set. + * @param pyFiles the pyFiles value to set. * @return the SparkJob object itself. */ - public SparkJob withConf(Map conf) { - this.conf = conf; + public SparkJob withPyFiles(List pyFiles) { + this.pyFiles = pyFiles; return this; } @@ -375,41 +369,40 @@ public SparkJob withQueueSettings(QueueSettings queueSettings) { } /** - * Get the environmentVariables property: Environment variables included in the job. + * Get the resources property: Compute Resource configuration for the job. * - * @return the environmentVariables value. + * @return the resources value. */ - public Map environmentVariables() { - return this.environmentVariables; + public SparkResourceConfiguration resources() { + return this.resources; } /** - * Set the environmentVariables property: Environment variables included in the job. + * Set the resources property: Compute Resource configuration for the job. * - * @param environmentVariables the environmentVariables value to set. + * @param resources the resources value to set. * @return the SparkJob object itself. */ - public SparkJob withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; + public SparkJob withResources(SparkResourceConfiguration resources) { + this.resources = resources; return this; } /** - * Get the status property: Status of the job. - * - * @return the status value. + * {@inheritDoc} */ @Override - public JobStatus status() { - return this.status; + public SparkJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; } /** * {@inheritDoc} */ @Override - public SparkJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public SparkJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -417,8 +410,8 @@ public SparkJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public SparkJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public SparkJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -426,8 +419,8 @@ public SparkJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public SparkJob withServices(Map services) { - super.withServices(services); + public SparkJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -435,8 +428,8 @@ public SparkJob withServices(Map services) { * {@inheritDoc} */ @Override - public SparkJob withComputeId(String computeId) { - super.withComputeId(computeId); + public SparkJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); return this; } @@ -453,8 +446,8 @@ public SparkJob withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public SparkJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); + public SparkJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); return this; } @@ -462,8 +455,8 @@ public SparkJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public SparkJob withComponentId(String componentId) { - super.withComponentId(componentId); + public SparkJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -471,8 +464,8 @@ public SparkJob withComponentId(String componentId) { * {@inheritDoc} */ @Override - public SparkJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); + public SparkJob withServices(Map services) { + super.withServices(services); return this; } @@ -485,15 +478,6 @@ public SparkJob withDescription(String description) { return this; } - /** - * {@inheritDoc} - */ - @Override - public SparkJob withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * {@inheritDoc} */ @@ -504,47 +488,14 @@ public SparkJob withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } - if (codeId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property codeId in model SparkJob")); - } - if (entry() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property entry in model SparkJob")); - } else { - entry().validate(); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (queueSettings() != null) { - queueSettings().validate(); - } + public SparkJob withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(SparkJob.class); - /** * {@inheritDoc} */ @@ -552,32 +503,33 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("codeId", this.codeId); jsonWriter.writeJsonField("entry", this.entry); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); + jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("args", this.args); + jsonWriter.writeMapField("conf", this.conf, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("environmentId", this.environmentId); + jsonWriter.writeMapField("environmentVariables", this.environmentVariables, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("pyFiles", this.pyFiles, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("conf", this.conf, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -599,69 +551,71 @@ public static SparkJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedSparkJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedSparkJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedSparkJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedSparkJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedSparkJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedSparkJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedSparkJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedSparkJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedSparkJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedSparkJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedSparkJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedSparkJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedSparkJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedSparkJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedSparkJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedSparkJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedSparkJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("codeId".equals(fieldName)) { deserializedSparkJob.codeId = reader.getString(); } else if ("entry".equals(fieldName)) { deserializedSparkJob.entry = SparkJobEntry.fromJson(reader); } else if ("jobType".equals(fieldName)) { deserializedSparkJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedSparkJob.resources = SparkResourceConfiguration.fromJson(reader); + } else if ("archives".equals(fieldName)) { + List archives = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkJob.archives = archives; } else if ("args".equals(fieldName)) { deserializedSparkJob.args = reader.getString(); + } else if ("conf".equals(fieldName)) { + Map conf = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkJob.conf = conf; } else if ("environmentId".equals(fieldName)) { deserializedSparkJob.environmentId = reader.getString(); + } else if ("environmentVariables".equals(fieldName)) { + Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkJob.environmentVariables = environmentVariables; + } else if ("files".equals(fieldName)) { + List files = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkJob.files = files; } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedSparkJob.inputs = inputs; + } else if ("jars".equals(fieldName)) { + List jars = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkJob.jars = jars; } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedSparkJob.outputs = outputs; } else if ("pyFiles".equals(fieldName)) { List pyFiles = reader.readArray(reader1 -> reader1.getString()); deserializedSparkJob.pyFiles = pyFiles; - } else if ("jars".equals(fieldName)) { - List jars = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.jars = jars; - } else if ("files".equals(fieldName)) { - List files = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.files = files; - } else if ("archives".equals(fieldName)) { - List archives = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.archives = archives; - } else if ("conf".equals(fieldName)) { - Map conf = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.conf = conf; } else if ("queueSettings".equals(fieldName)) { deserializedSparkJob.queueSettings = QueueSettings.fromJson(reader); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.environmentVariables = environmentVariables; + } else if ("resources".equals(fieldName)) { + deserializedSparkJob.resources = SparkResourceConfiguration.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java index 798b5708150d..eb45da3228a6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public SparkJobEntryType sparkJobEntryType() { return this.sparkJobEntryType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java index faca97a178bd..cb87520be548 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java index c2db6133028f..5c6d3729d257 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,22 +61,6 @@ public SparkJobPythonEntry withFile(String file) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (file() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property file in model SparkJobPythonEntry")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SparkJobPythonEntry.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java index e735204c3b6d..f9345a5d06d5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -62,22 +61,6 @@ public SparkJobScalaEntry withClassName(String className) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (className() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property className in model SparkJobScalaEntry")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SparkJobScalaEntry.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java index 49b2e0c596d7..27e4881ac64a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,6 @@ public SparkResourceConfiguration withRuntimeVersion(String runtimeVersion) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java new file mode 100644 index 000000000000..e915d79478cc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 SpeechEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class SpeechEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "Azure.Speech"; + + /* + * Model used for the endpoint deployment. + */ + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + private String raiPolicyName; + + /* + * The sku property. + */ + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of SpeechEndpointDeploymentResourceProperties class. + */ + public SpeechEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the model property: Model used for the endpoint deployment. + * + * @return the model value. + */ + public EndpointDeploymentModel model() { + return this.model; + } + + /** + * Set the model property: Model used for the endpoint deployment. + * + * @param model the model value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties withModel(EndpointDeploymentModel model) { + this.model = model; + return this; + } + + /** + * Get the raiPolicyName property: The name of RAI policy. + * + * @return the raiPolicyName value. + */ + public String raiPolicyName() { + return this.raiPolicyName; + } + + /** + * Set the raiPolicyName property: The name of RAI policy. + * + * @param raiPolicyName the raiPolicyName value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties withRaiPolicyName(String raiPolicyName) { + this.raiPolicyName = raiPolicyName; + return this; + } + + /** + * Get the sku property: The sku property. + * + * @return the sku value. + */ + public CognitiveServicesSku sku() { + return this.sku; + } + + /** + * Set the sku property: The sku property. + * + * @param sku the sku value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties withSku(CognitiveServicesSku sku) { + this.sku = sku; + return this; + } + + /** + * Get the versionUpgradeOption property: Deployment model version upgrade option. + * + * @return the versionUpgradeOption value. + */ + public DeploymentModelVersionUpgradeOption versionUpgradeOption() { + return this.versionUpgradeOption; + } + + /** + * Set the versionUpgradeOption property: Deployment model version upgrade option. + * + * @param versionUpgradeOption the versionUpgradeOption value to set. + * @return the SpeechEndpointDeploymentResourceProperties object itself. + */ + public SpeechEndpointDeploymentResourceProperties + withVersionUpgradeOption(DeploymentModelVersionUpgradeOption versionUpgradeOption) { + this.versionUpgradeOption = versionUpgradeOption; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointDeploymentResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("raiPolicyName", this.raiPolicyName); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("versionUpgradeOption", + this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SpeechEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SpeechEndpointDeploymentResourceProperties 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 SpeechEndpointDeploymentResourceProperties. + */ + public static SpeechEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SpeechEndpointDeploymentResourceProperties deserializedSpeechEndpointDeploymentResourceProperties + = new SpeechEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("model".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.model + = EndpointDeploymentModel.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("raiPolicyName".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.raiPolicyName = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.sku = CognitiveServicesSku.fromJson(reader); + } else if ("versionUpgradeOption".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.versionUpgradeOption + = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSpeechEndpointDeploymentResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java new file mode 100644 index 000000000000..4eaa0f8fd212 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The SpeechEndpointResourceProperties model. + */ +@Fluent +public final class SpeechEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.AZURE_SPEECH; + + /** + * Creates an instance of SpeechEndpointResourceProperties class. + */ + public SpeechEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SpeechEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SpeechEndpointResourceProperties 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 SpeechEndpointResourceProperties. + */ + public static SpeechEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SpeechEndpointResourceProperties deserializedSpeechEndpointResourceProperties + = new SpeechEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedSpeechEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSpeechEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java index 0468dbf671a7..24a108085867 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Access policy for SSH - * * State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this * instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if * applicable. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java index dbd0ce120535..beae7e81549e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java index e47753ea237d..7f26ab4ff0a3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -172,14 +172,6 @@ public SslConfiguration withOverwriteExistingDomain(Boolean overwriteExistingDom return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java index ed6bf75444c2..267c703299d0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,9 +17,9 @@ @Fluent public final class StackEnsembleSettings implements JsonSerializable { /* - * The meta-learner is a model trained on the output of the individual heterogeneous models. + * Optional parameters to pass to the initializer of the meta-learner. */ - private StackMetaLearnerType stackMetaLearnerType; + private Object stackMetaLearnerKWargs; /* * Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved @@ -28,9 +28,13 @@ public final class StackEnsembleSettings implements JsonSerializable columns) { + super.withColumns(columns); return this; } @@ -129,8 +128,8 @@ public StaticInputData withDataContext(String dataContext) { * {@inheritDoc} */ @Override - public StaticInputData withJobInputType(JobInputType jobInputType) { - super.withJobInputType(jobInputType); + public StaticInputData withDataContext(String dataContext) { + super.withDataContext(dataContext); return this; } @@ -138,8 +137,8 @@ public StaticInputData withJobInputType(JobInputType jobInputType) { * {@inheritDoc} */ @Override - public StaticInputData withUri(String uri) { - super.withUri(uri); + public StaticInputData withJobInputType(JobInputType jobInputType) { + super.withJobInputType(jobInputType); return this; } @@ -147,31 +146,11 @@ public StaticInputData withUri(String uri) { * {@inheritDoc} */ @Override - public StaticInputData withColumns(Map columns) { - super.withColumns(columns); + public StaticInputData withUri(String uri) { + super.withUri(uri); return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (windowStart() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowStart in model StaticInputData")); - } - if (windowEnd() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowEnd in model StaticInputData")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(StaticInputData.class); - /** * {@inheritDoc} */ @@ -180,12 +159,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("windowStart", - this.windowStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowStart)); + jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeStringField("windowEnd", this.windowEnd == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowEnd)); + jsonWriter.writeStringField("windowStart", + this.windowStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowStart)); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); jsonWriter.writeStringField("preprocessingComponentId", this.preprocessingComponentId); return jsonWriter.writeEndObject(); @@ -211,17 +190,17 @@ public static StaticInputData fromJson(JsonReader jsonReader) throws IOException deserializedStaticInputData.withJobInputType(JobInputType.fromString(reader.getString())); } else if ("uri".equals(fieldName)) { deserializedStaticInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedStaticInputData.withDataContext(reader.getString()); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedStaticInputData.withColumns(columns); - } else if ("windowStart".equals(fieldName)) { - deserializedStaticInputData.windowStart = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("dataContext".equals(fieldName)) { + deserializedStaticInputData.withDataContext(reader.getString()); } else if ("windowEnd".equals(fieldName)) { deserializedStaticInputData.windowEnd = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("windowStart".equals(fieldName)) { + deserializedStaticInputData.windowStart = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("inputDataType".equals(fieldName)) { deserializedStaticInputData.inputDataType = MonitoringInputDataType.fromString(reader.getString()); } else if ("preprocessingComponentId".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java index cdd87410f6c6..79ab3e8c216c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Update Workspace Quota Status. - * * Status of update workspace quota. */ public final class Status extends ExpandableStringEnum { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java index 4ed799a937cd..fb2aec99d4e1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,22 +12,22 @@ */ public final class StochasticOptimizer extends ExpandableStringEnum { /** - * Static value None for StochasticOptimizer. + * No optimizer selected. */ public static final StochasticOptimizer NONE = fromString("None"); /** - * Static value Sgd for StochasticOptimizer. + * Stochastic Gradient Descent optimizer. */ public static final StochasticOptimizer SGD = fromString("Sgd"); /** - * Static value Adam for StochasticOptimizer. + * Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments. */ public static final StochasticOptimizer ADAM = fromString("Adam"); /** - * Static value Adamw for StochasticOptimizer. + * AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay. */ public static final StochasticOptimizer ADAMW = fromString("Adamw"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java index f11d487bb51a..a9e7900f6ad0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,11 +21,6 @@ public final class StorageAccountDetails implements JsonSerializable { + /* + * The key property. + */ + private String key; + + /* + * The value property. + */ + private String value; + + /** + * Creates an instance of StringStringKeyValuePair class. + */ + public StringStringKeyValuePair() { + } + + /** + * Get the key property: The key property. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key property. + * + * @param key the key value to set. + * @return the StringStringKeyValuePair object itself. + */ + public StringStringKeyValuePair withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the StringStringKeyValuePair object itself. + */ + public StringStringKeyValuePair withValue(String value) { + this.value = value; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringStringKeyValuePair from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringStringKeyValuePair 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 StringStringKeyValuePair. + */ + public static StringStringKeyValuePair fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringStringKeyValuePair deserializedStringStringKeyValuePair = new StringStringKeyValuePair(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringStringKeyValuePair.key = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedStringStringKeyValuePair.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStringStringKeyValuePair; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java index b5679fa6f668..0c83e0a0ebcb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -23,55 +22,50 @@ public final class SweepJob extends JobBaseProperties { private JobType jobType = JobType.SWEEP; /* - * [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the - * parameter + * Early termination policies enable canceling poor-performing runs before they complete */ - private Object searchSpace; + private EarlyTerminationPolicy earlyTermination; /* - * [Required] The hyperparameter sampling algorithm + * Mapping of input data bindings used in the job. */ - private SamplingAlgorithm samplingAlgorithm; + private Map inputs; /* * Sweep Job limit. */ private SweepJobLimits limits; - /* - * Early termination policies enable canceling poor-performing runs before they complete - */ - private EarlyTerminationPolicy earlyTermination; - /* * [Required] Optimization objective. */ private Objective objective; /* - * [Required] Trial component definition. + * Mapping of output data bindings used in the job. */ - private TrialComponent trial; + private Map outputs; /* - * Mapping of input data bindings used in the job. + * Queue settings for the job */ - private Map inputs; + private QueueSettings queueSettings; /* - * Mapping of output data bindings used in the job. + * [Required] The hyperparameter sampling algorithm */ - private Map outputs; + private SamplingAlgorithm samplingAlgorithm; /* - * Queue settings for the job + * [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the + * parameter */ - private QueueSettings queueSettings; + private Object searchSpace; /* - * Status of the job. + * [Required] Trial component definition. */ - private JobStatus status; + private TrialComponent trial; /** * Creates an instance of SweepJob class. @@ -90,44 +84,44 @@ public JobType jobType() { } /** - * Get the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The - * dictionary key is the name of the parameter. + * Get the earlyTermination property: Early termination policies enable canceling poor-performing runs before they + * complete. * - * @return the searchSpace value. + * @return the earlyTermination value. */ - public Object searchSpace() { - return this.searchSpace; + public EarlyTerminationPolicy earlyTermination() { + return this.earlyTermination; } /** - * Set the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The - * dictionary key is the name of the parameter. + * Set the earlyTermination property: Early termination policies enable canceling poor-performing runs before they + * complete. * - * @param searchSpace the searchSpace value to set. + * @param earlyTermination the earlyTermination value to set. * @return the SweepJob object itself. */ - public SweepJob withSearchSpace(Object searchSpace) { - this.searchSpace = searchSpace; + public SweepJob withEarlyTermination(EarlyTerminationPolicy earlyTermination) { + this.earlyTermination = earlyTermination; return this; } /** - * Get the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. + * Get the inputs property: Mapping of input data bindings used in the job. * - * @return the samplingAlgorithm value. + * @return the inputs value. */ - public SamplingAlgorithm samplingAlgorithm() { - return this.samplingAlgorithm; + public Map inputs() { + return this.inputs; } /** - * Set the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. + * Set the inputs property: Mapping of input data bindings used in the job. * - * @param samplingAlgorithm the samplingAlgorithm value to set. + * @param inputs the inputs value to set. * @return the SweepJob object itself. */ - public SweepJob withSamplingAlgorithm(SamplingAlgorithm samplingAlgorithm) { - this.samplingAlgorithm = samplingAlgorithm; + public SweepJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -151,28 +145,6 @@ public SweepJob withLimits(SweepJobLimits limits) { return this; } - /** - * Get the earlyTermination property: Early termination policies enable canceling poor-performing runs before they - * complete. - * - * @return the earlyTermination value. - */ - public EarlyTerminationPolicy earlyTermination() { - return this.earlyTermination; - } - - /** - * Set the earlyTermination property: Early termination policies enable canceling poor-performing runs before they - * complete. - * - * @param earlyTermination the earlyTermination value to set. - * @return the SweepJob object itself. - */ - public SweepJob withEarlyTermination(EarlyTerminationPolicy earlyTermination) { - this.earlyTermination = earlyTermination; - return this; - } - /** * Get the objective property: [Required] Optimization objective. * @@ -194,101 +166,104 @@ public SweepJob withObjective(Objective objective) { } /** - * Get the trial property: [Required] Trial component definition. + * Get the outputs property: Mapping of output data bindings used in the job. * - * @return the trial value. + * @return the outputs value. */ - public TrialComponent trial() { - return this.trial; + public Map outputs() { + return this.outputs; } /** - * Set the trial property: [Required] Trial component definition. + * Set the outputs property: Mapping of output data bindings used in the job. * - * @param trial the trial value to set. + * @param outputs the outputs value to set. * @return the SweepJob object itself. */ - public SweepJob withTrial(TrialComponent trial) { - this.trial = trial; + public SweepJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } /** - * Get the inputs property: Mapping of input data bindings used in the job. + * Get the queueSettings property: Queue settings for the job. * - * @return the inputs value. + * @return the queueSettings value. */ - public Map inputs() { - return this.inputs; + public QueueSettings queueSettings() { + return this.queueSettings; } /** - * Set the inputs property: Mapping of input data bindings used in the job. + * Set the queueSettings property: Queue settings for the job. * - * @param inputs the inputs value to set. + * @param queueSettings the queueSettings value to set. * @return the SweepJob object itself. */ - public SweepJob withInputs(Map inputs) { - this.inputs = inputs; + public SweepJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; return this; } /** - * Get the outputs property: Mapping of output data bindings used in the job. + * Get the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. * - * @return the outputs value. + * @return the samplingAlgorithm value. */ - public Map outputs() { - return this.outputs; + public SamplingAlgorithm samplingAlgorithm() { + return this.samplingAlgorithm; } /** - * Set the outputs property: Mapping of output data bindings used in the job. + * Set the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. * - * @param outputs the outputs value to set. + * @param samplingAlgorithm the samplingAlgorithm value to set. * @return the SweepJob object itself. */ - public SweepJob withOutputs(Map outputs) { - this.outputs = outputs; + public SweepJob withSamplingAlgorithm(SamplingAlgorithm samplingAlgorithm) { + this.samplingAlgorithm = samplingAlgorithm; return this; } /** - * Get the queueSettings property: Queue settings for the job. + * Get the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The + * dictionary key is the name of the parameter. * - * @return the queueSettings value. + * @return the searchSpace value. */ - public QueueSettings queueSettings() { - return this.queueSettings; + public Object searchSpace() { + return this.searchSpace; } /** - * Set the queueSettings property: Queue settings for the job. + * Set the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The + * dictionary key is the name of the parameter. * - * @param queueSettings the queueSettings value to set. + * @param searchSpace the searchSpace value to set. * @return the SweepJob object itself. */ - public SweepJob withQueueSettings(QueueSettings queueSettings) { - this.queueSettings = queueSettings; + public SweepJob withSearchSpace(Object searchSpace) { + this.searchSpace = searchSpace; return this; } /** - * Get the status property: Status of the job. + * Get the trial property: [Required] Trial component definition. * - * @return the status value. + * @return the trial value. */ - @Override - public JobStatus status() { - return this.status; + public TrialComponent trial() { + return this.trial; } /** - * {@inheritDoc} + * Set the trial property: [Required] Trial component definition. + * + * @param trial the trial value to set. + * @return the SweepJob object itself. */ - @Override - public SweepJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public SweepJob withTrial(TrialComponent trial) { + this.trial = trial; return this; } @@ -296,8 +271,8 @@ public SweepJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public SweepJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public SweepJob withComponentId(String componentId) { + super.withComponentId(componentId); return this; } @@ -305,8 +280,8 @@ public SweepJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public SweepJob withServices(Map services) { - super.withServices(services); + public SweepJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -314,8 +289,8 @@ public SweepJob withServices(Map services) { * {@inheritDoc} */ @Override - public SweepJob withComputeId(String computeId) { - super.withComputeId(computeId); + public SweepJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -323,8 +298,8 @@ public SweepJob withComputeId(String computeId) { * {@inheritDoc} */ @Override - public SweepJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public SweepJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -341,8 +316,8 @@ public SweepJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public SweepJob withComponentId(String componentId) { - super.withComponentId(componentId); + public SweepJob withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -359,8 +334,8 @@ public SweepJob withNotificationSetting(NotificationSetting notificationSetting) * {@inheritDoc} */ @Override - public SweepJob withDescription(String description) { - super.withDescription(description); + public SweepJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -368,8 +343,17 @@ public SweepJob withDescription(String description) { * {@inheritDoc} */ @Override - public SweepJob withTags(Map tags) { - super.withTags(tags); + public SweepJob withServices(Map services) { + super.withServices(services); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SweepJob withDescription(String description) { + super.withDescription(description); return this; } @@ -383,62 +367,14 @@ public SweepJob withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (searchSpace() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); - } - if (samplingAlgorithm() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property samplingAlgorithm in model SweepJob")); - } else { - samplingAlgorithm().validate(); - } - if (limits() != null) { - limits().validate(); - } - if (earlyTermination() != null) { - earlyTermination().validate(); - } - if (objective() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property objective in model SweepJob")); - } else { - objective().validate(); - } - if (trial() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property trial in model SweepJob")); - } else { - trial().validate(); - } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (queueSettings() != null) { - queueSettings().validate(); - } + public SweepJob withTags(Map tags) { + super.withTags(tags); + return this; } - private static final ClientLogger LOGGER = new ClientLogger(SweepJob.class); - /** * {@inheritDoc} */ @@ -446,24 +382,25 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); - jsonWriter.writeUntypedField("searchSpace", this.searchSpace); - jsonWriter.writeJsonField("samplingAlgorithm", this.samplingAlgorithm); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("objective", this.objective); + jsonWriter.writeJsonField("samplingAlgorithm", this.samplingAlgorithm); + jsonWriter.writeUntypedField("searchSpace", this.searchSpace); jsonWriter.writeJsonField("trial", this.trial); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("limits", this.limits); jsonWriter.writeJsonField("earlyTermination", this.earlyTermination); jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("limits", this.limits); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); return jsonWriter.writeEndObject(); @@ -487,48 +424,50 @@ public static SweepJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedSweepJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSweepJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedSweepJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSweepJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedSweepJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedSweepJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedSweepJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedSweepJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedSweepJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedSweepJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedSweepJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedSweepJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedSweepJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedSweepJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedSweepJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedSweepJob.withNotificationSetting(NotificationSetting.fromJson(reader)); - } else if ("searchSpace".equals(fieldName)) { - deserializedSweepJob.searchSpace = reader.readUntyped(); - } else if ("samplingAlgorithm".equals(fieldName)) { - deserializedSweepJob.samplingAlgorithm = SamplingAlgorithm.fromJson(reader); + } else if ("parentJobName".equals(fieldName)) { + deserializedSweepJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedSweepJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedSweepJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("objective".equals(fieldName)) { deserializedSweepJob.objective = Objective.fromJson(reader); + } else if ("samplingAlgorithm".equals(fieldName)) { + deserializedSweepJob.samplingAlgorithm = SamplingAlgorithm.fromJson(reader); + } else if ("searchSpace".equals(fieldName)) { + deserializedSweepJob.searchSpace = reader.readUntyped(); } else if ("trial".equals(fieldName)) { deserializedSweepJob.trial = TrialComponent.fromJson(reader); } else if ("jobType".equals(fieldName)) { deserializedSweepJob.jobType = JobType.fromString(reader.getString()); - } else if ("limits".equals(fieldName)) { - deserializedSweepJob.limits = SweepJobLimits.fromJson(reader); } else if ("earlyTermination".equals(fieldName)) { deserializedSweepJob.earlyTermination = EarlyTerminationPolicy.fromJson(reader); } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedSweepJob.inputs = inputs; + } else if ("limits".equals(fieldName)) { + deserializedSweepJob.limits = SweepJobLimits.fromJson(reader); } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedSweepJob.outputs = outputs; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java index 1262136044f3..71bbc2fbf4ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -23,14 +23,14 @@ public final class SweepJobLimits extends JobLimits { private JobLimitsType jobLimitsType = JobLimitsType.SWEEP; /* - * Sweep Job max total trials. + * Sweep Job max concurrent trials. */ - private Integer maxTotalTrials; + private Integer maxConcurrentTrials; /* - * Sweep Job max concurrent trials. + * Sweep Job max total trials. */ - private Integer maxConcurrentTrials; + private Integer maxTotalTrials; /* * Sweep Job Trial timeout value. @@ -54,42 +54,42 @@ public JobLimitsType jobLimitsType() { } /** - * Get the maxTotalTrials property: Sweep Job max total trials. + * Get the maxConcurrentTrials property: Sweep Job max concurrent trials. * - * @return the maxTotalTrials value. + * @return the maxConcurrentTrials value. */ - public Integer maxTotalTrials() { - return this.maxTotalTrials; + public Integer maxConcurrentTrials() { + return this.maxConcurrentTrials; } /** - * Set the maxTotalTrials property: Sweep Job max total trials. + * Set the maxConcurrentTrials property: Sweep Job max concurrent trials. * - * @param maxTotalTrials the maxTotalTrials value to set. + * @param maxConcurrentTrials the maxConcurrentTrials value to set. * @return the SweepJobLimits object itself. */ - public SweepJobLimits withMaxTotalTrials(Integer maxTotalTrials) { - this.maxTotalTrials = maxTotalTrials; + public SweepJobLimits withMaxConcurrentTrials(Integer maxConcurrentTrials) { + this.maxConcurrentTrials = maxConcurrentTrials; return this; } /** - * Get the maxConcurrentTrials property: Sweep Job max concurrent trials. + * Get the maxTotalTrials property: Sweep Job max total trials. * - * @return the maxConcurrentTrials value. + * @return the maxTotalTrials value. */ - public Integer maxConcurrentTrials() { - return this.maxConcurrentTrials; + public Integer maxTotalTrials() { + return this.maxTotalTrials; } /** - * Set the maxConcurrentTrials property: Sweep Job max concurrent trials. + * Set the maxTotalTrials property: Sweep Job max total trials. * - * @param maxConcurrentTrials the maxConcurrentTrials value to set. + * @param maxTotalTrials the maxTotalTrials value to set. * @return the SweepJobLimits object itself. */ - public SweepJobLimits withMaxConcurrentTrials(Integer maxConcurrentTrials) { - this.maxConcurrentTrials = maxConcurrentTrials; + public SweepJobLimits withMaxTotalTrials(Integer maxTotalTrials) { + this.maxTotalTrials = maxTotalTrials; return this; } @@ -122,16 +122,6 @@ public SweepJobLimits withTimeout(Duration timeout) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ @@ -140,8 +130,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(timeout())); jsonWriter.writeStringField("jobLimitsType", this.jobLimitsType == null ? null : this.jobLimitsType.toString()); - jsonWriter.writeNumberField("maxTotalTrials", this.maxTotalTrials); jsonWriter.writeNumberField("maxConcurrentTrials", this.maxConcurrentTrials); + jsonWriter.writeNumberField("maxTotalTrials", this.maxTotalTrials); jsonWriter.writeStringField("trialTimeout", CoreUtils.durationToStringWithDays(this.trialTimeout)); return jsonWriter.writeEndObject(); } @@ -166,10 +156,10 @@ public static SweepJobLimits fromJson(JsonReader jsonReader) throws IOException .withTimeout(reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); } else if ("jobLimitsType".equals(fieldName)) { deserializedSweepJobLimits.jobLimitsType = JobLimitsType.fromString(reader.getString()); - } else if ("maxTotalTrials".equals(fieldName)) { - deserializedSweepJobLimits.maxTotalTrials = reader.getNullable(JsonReader::getInt); } else if ("maxConcurrentTrials".equals(fieldName)) { deserializedSweepJobLimits.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); + } else if ("maxTotalTrials".equals(fieldName)) { + deserializedSweepJobLimits.maxTotalTrials = reader.getNullable(JsonReader::getInt); } else if ("trialTimeout".equals(fieldName)) { deserializedSweepJobLimits.trialTimeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java index 3a00e4eb5ea8..f8109ab14821 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class SynapseSpark extends Compute { */ private SynapseSparkProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of SynapseSpark class. */ @@ -91,58 +64,6 @@ public SynapseSpark withProperties(SynapseSparkProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,23 @@ public static SynapseSpark fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedSynapseSpark.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedSynapseSpark.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedSynapseSpark.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedSynapseSpark.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedSynapseSpark.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedSynapseSpark.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedSynapseSpark.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedSynapseSpark.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedSynapseSpark.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedSynapseSpark.provisioningErrors = provisioningErrors; + deserializedSynapseSpark.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedSynapseSpark.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedSynapseSpark.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedSynapseSpark.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java index a473862a14a4..74729e3b0913 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -272,20 +272,6 @@ public SynapseSparkProperties withPoolName(String poolName) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoScaleProperties() != null) { - autoScaleProperties().validate(); - } - if (autoPauseProperties() != null) { - autoPauseProperties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java index 1bbd63d0359d..48e37ec4e702 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -97,17 +97,6 @@ public SystemCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (armResourceId() != null) { - armResourceId().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java index 67a7acf2c955..775ef02930da 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -37,6 +37,7 @@ public final class SystemCreatedStorageAccount implements JsonSerializable { + /** + * Static value AccessKey for SystemDatastoresAuthMode. + */ + public static final SystemDatastoresAuthMode ACCESS_KEY = fromString("AccessKey"); + + /** + * Static value Identity for SystemDatastoresAuthMode. + */ + public static final SystemDatastoresAuthMode IDENTITY = fromString("Identity"); + + /** + * Static value UserDelegationSAS for SystemDatastoresAuthMode. + */ + public static final SystemDatastoresAuthMode USER_DELEGATION_SAS = fromString("UserDelegationSAS"); + + /** + * Creates a new instance of SystemDatastoresAuthMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SystemDatastoresAuthMode() { + } + + /** + * Creates or finds a SystemDatastoresAuthMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding SystemDatastoresAuthMode. + */ + public static SystemDatastoresAuthMode fromString(String name) { + return fromString(name, SystemDatastoresAuthMode.class); + } + + /** + * Gets known SystemDatastoresAuthMode values. + * + * @return known SystemDatastoresAuthMode values. + */ + public static Collection values() { + return values(SystemDatastoresAuthMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java index 0ebdb9798ed7..c180c78b939d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -34,7 +34,7 @@ public final class SystemService implements JsonSerializable { /** * Creates an instance of SystemService class. */ - public SystemService() { + private SystemService() { } /** @@ -64,14 +64,6 @@ public String version() { return this.version; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java deleted file mode 100644 index c7db2ecc7ce5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - -/** - * Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. - */ -@Fluent -public class TableVertical implements JsonSerializable { - /* - * Execution constraints for AutoMLJob. - */ - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - private NCrossValidations nCrossValidations; - - /* - * Columns to use for CVSplit data. - */ - private List cvSplitColumnNames; - - /* - * The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the - * data to be weighted up or down. - */ - private String weightColumnName; - - /* - * Validation data inputs. - */ - private MLTableJobInput validationData; - - /* - * Test data input. - */ - private MLTableJobInput testData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double validationDataSize; - - /* - * The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. - */ - private TableVerticalFeaturizationSettings featurizationSettings; - - /** - * Creates an instance of TableVertical class. - */ - public TableVertical() { - } - - /** - * Get the limitSettings property: Execution constraints for AutoMLJob. - * - * @return the limitSettings value. - */ - public TableVerticalLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: Execution constraints for AutoMLJob. - * - * @param limitSettings the limitSettings value to set. - * @return the TableVertical object itself. - */ - public TableVertical withLimitSettings(TableVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the TableVertical object itself. - */ - public TableVertical withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the TableVertical object itself. - */ - public TableVertical withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the TableVertical object itself. - */ - public TableVertical withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TableVertical object itself. - */ - public TableVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the TableVertical object itself. - */ - public TableVertical withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the TableVertical object itself. - */ - public TableVertical withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); - jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); - jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); - jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TableVertical from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TableVertical 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 TableVertical. - */ - public static TableVertical fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TableVertical deserializedTableVertical = new TableVertical(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("limitSettings".equals(fieldName)) { - deserializedTableVertical.limitSettings = TableVerticalLimitSettings.fromJson(reader); - } else if ("nCrossValidations".equals(fieldName)) { - deserializedTableVertical.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedTableVertical.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedTableVertical.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedTableVertical.validationData = MLTableJobInput.fromJson(reader); - } else if ("testData".equals(fieldName)) { - deserializedTableVertical.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedTableVertical.validationDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("testDataSize".equals(fieldName)) { - deserializedTableVertical.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedTableVertical.featurizationSettings - = TableVerticalFeaturizationSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedTableVertical; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java index e7a2cab26bd6..331a18597325 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,14 +17,6 @@ */ @Fluent public final class TableVerticalFeaturizationSettings extends FeaturizationSettings { - /* - * Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation - * of the data in featurization phase. - * If 'Off' is selected then no featurization is done. - * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - */ - private FeaturizationMode mode; - /* * These transformers shall not be used in featurization. */ @@ -35,47 +27,29 @@ public final class TableVerticalFeaturizationSettings extends FeaturizationSetti */ private Map columnNameAndTypes; - /* - * User can specify additional transformers to be used along with the columns to which it would be applied and - * parameters for the transformer constructor. - */ - private Map> transformerParams; - /* * Determines whether to use Dnn based featurizers for data featurization. */ private Boolean enableDnnFeaturization; - /** - * Creates an instance of TableVerticalFeaturizationSettings class. - */ - public TableVerticalFeaturizationSettings() { - } - - /** - * Get the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of - * necessary transformation of the data in featurization phase. + /* + * Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation + * of the data in featurization phase. * If 'Off' is selected then no featurization is done. * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - * - * @return the mode value. */ - public FeaturizationMode mode() { - return this.mode; - } + private FeaturizationMode mode; + + /* + * User can specify additional transformers to be used along with the columns to which it would be applied and + * parameters for the transformer constructor. + */ + private Map> transformerParams; /** - * Set the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of - * necessary transformation of the data in featurization phase. - * If 'Off' is selected then no featurization is done. - * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - * - * @param mode the mode value to set. - * @return the TableVerticalFeaturizationSettings object itself. + * Creates an instance of TableVerticalFeaturizationSettings class. */ - public TableVerticalFeaturizationSettings withMode(FeaturizationMode mode) { - this.mode = mode; - return this; + public TableVerticalFeaturizationSettings() { } /** @@ -119,72 +93,81 @@ public TableVerticalFeaturizationSettings withColumnNameAndTypes(Map> transformerParams() { - return this.transformerParams; + public Boolean enableDnnFeaturization() { + return this.enableDnnFeaturization; } /** - * Set the transformerParams property: User can specify additional transformers to be used along with the columns to - * which it would be applied and parameters for the transformer constructor. + * Set the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. * - * @param transformerParams the transformerParams value to set. + * @param enableDnnFeaturization the enableDnnFeaturization value to set. * @return the TableVerticalFeaturizationSettings object itself. */ - public TableVerticalFeaturizationSettings - withTransformerParams(Map> transformerParams) { - this.transformerParams = transformerParams; + public TableVerticalFeaturizationSettings withEnableDnnFeaturization(Boolean enableDnnFeaturization) { + this.enableDnnFeaturization = enableDnnFeaturization; return this; } /** - * Get the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. + * Get the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of + * necessary transformation of the data in featurization phase. + * If 'Off' is selected then no featurization is done. + * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. * - * @return the enableDnnFeaturization value. + * @return the mode value. */ - public Boolean enableDnnFeaturization() { - return this.enableDnnFeaturization; + public FeaturizationMode mode() { + return this.mode; } /** - * Set the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. + * Set the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of + * necessary transformation of the data in featurization phase. + * If 'Off' is selected then no featurization is done. + * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. * - * @param enableDnnFeaturization the enableDnnFeaturization value to set. + * @param mode the mode value to set. * @return the TableVerticalFeaturizationSettings object itself. */ - public TableVerticalFeaturizationSettings withEnableDnnFeaturization(Boolean enableDnnFeaturization) { - this.enableDnnFeaturization = enableDnnFeaturization; + public TableVerticalFeaturizationSettings withMode(FeaturizationMode mode) { + this.mode = mode; return this; } /** - * {@inheritDoc} + * Get the transformerParams property: User can specify additional transformers to be used along with the columns to + * which it would be applied and parameters for the transformer constructor. + * + * @return the transformerParams value. */ - @Override - public TableVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { - super.withDatasetLanguage(datasetLanguage); - return this; + public Map> transformerParams() { + return this.transformerParams; } /** - * Validates the instance. + * Set the transformerParams property: User can specify additional transformers to be used along with the columns to + * which it would be applied and parameters for the transformer constructor. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param transformerParams the transformerParams value to set. + * @return the TableVerticalFeaturizationSettings object itself. + */ + public TableVerticalFeaturizationSettings + withTransformerParams(Map> transformerParams) { + this.transformerParams = transformerParams; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (transformerParams() != null) { - transformerParams().values().forEach(e -> { - if (e != null) { - e.forEach(e1 -> e1.validate()); - } - }); - } + public TableVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { + super.withDatasetLanguage(datasetLanguage); + return this; } /** @@ -194,14 +177,14 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("datasetLanguage", datasetLanguage()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeArrayField("blockedTransformers", this.blockedTransformers, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeMapField("columnNameAndTypes", this.columnNameAndTypes, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("enableDnnFeaturization", this.enableDnnFeaturization); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeMapField("transformerParams", this.transformerParams, (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeJson(element1))); - jsonWriter.writeBooleanField("enableDnnFeaturization", this.enableDnnFeaturization); return jsonWriter.writeEndObject(); } @@ -223,9 +206,6 @@ public static TableVerticalFeaturizationSettings fromJson(JsonReader jsonReader) if ("datasetLanguage".equals(fieldName)) { deserializedTableVerticalFeaturizationSettings.withDatasetLanguage(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedTableVerticalFeaturizationSettings.mode - = FeaturizationMode.fromString(reader.getString()); } else if ("blockedTransformers".equals(fieldName)) { List blockedTransformers = reader.readArray(reader1 -> BlockedTransformers.fromString(reader1.getString())); @@ -233,13 +213,16 @@ public static TableVerticalFeaturizationSettings fromJson(JsonReader jsonReader) } else if ("columnNameAndTypes".equals(fieldName)) { Map columnNameAndTypes = reader.readMap(reader1 -> reader1.getString()); deserializedTableVerticalFeaturizationSettings.columnNameAndTypes = columnNameAndTypes; + } else if ("enableDnnFeaturization".equals(fieldName)) { + deserializedTableVerticalFeaturizationSettings.enableDnnFeaturization + = reader.getNullable(JsonReader::getBoolean); + } else if ("mode".equals(fieldName)) { + deserializedTableVerticalFeaturizationSettings.mode + = FeaturizationMode.fromString(reader.getString()); } else if ("transformerParams".equals(fieldName)) { Map> transformerParams = reader.readMap(reader1 -> reader1.readArray(reader2 -> ColumnTransformer.fromJson(reader2))); deserializedTableVerticalFeaturizationSettings.transformerParams = transformerParams; - } else if ("enableDnnFeaturization".equals(fieldName)) { - deserializedTableVerticalFeaturizationSettings.enableDnnFeaturization - = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java index 16b8c9d6cce3..88214341e553 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -19,19 +19,15 @@ @Fluent public final class TableVerticalLimitSettings implements JsonSerializable { /* - * Number of iterations. - */ - private Integer maxTrials; - - /* - * Iteration timeout. + * Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score + * improvement in last 20 iterations. */ - private Duration trialTimeout; + private Boolean enableEarlyTermination; /* - * AutoML job timeout. + * Exit score for the AutoML job. */ - private Duration timeout; + private Double exitScore; /* * Maximum Concurrent iterations. @@ -44,79 +40,65 @@ public final class TableVerticalLimitSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); - } else if ("timeout".equals(fieldName)) { - deserializedTableVerticalLimitSettings.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + if ("enableEarlyTermination".equals(fieldName)) { + deserializedTableVerticalLimitSettings.enableEarlyTermination + = reader.getNullable(JsonReader::getBoolean); + } else if ("exitScore".equals(fieldName)) { + deserializedTableVerticalLimitSettings.exitScore = reader.getNullable(JsonReader::getDouble); } else if ("maxConcurrentTrials".equals(fieldName)) { deserializedTableVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); } else if ("maxCoresPerTrial".equals(fieldName)) { deserializedTableVerticalLimitSettings.maxCoresPerTrial = reader.getNullable(JsonReader::getInt); - } else if ("exitScore".equals(fieldName)) { - deserializedTableVerticalLimitSettings.exitScore = reader.getNullable(JsonReader::getDouble); - } else if ("enableEarlyTermination".equals(fieldName)) { - deserializedTableVerticalLimitSettings.enableEarlyTermination - = reader.getNullable(JsonReader::getBoolean); + } else if ("maxTrials".equals(fieldName)) { + deserializedTableVerticalLimitSettings.maxTrials = reader.getNullable(JsonReader::getInt); + } else if ("timeout".equals(fieldName)) { + deserializedTableVerticalLimitSettings.timeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("trialTimeout".equals(fieldName)) { + deserializedTableVerticalLimitSettings.trialTimeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java index d0a6a1109c02..9cb63bccb38b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ */ public final class TargetAggregationFunction extends ExpandableStringEnum { /** - * Static value None for TargetAggregationFunction. + * Represent no value set. */ public static final TargetAggregationFunction NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java index 3fb081339656..9ae04804d333 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public TargetLagsMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java index 99105013ef13..3f51a6f1a9fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class TargetLagsMode extends ExpandableStringEnum { /** - * Static value Auto for TargetLagsMode. + * Target lags to be determined automatically. */ public static final TargetLagsMode AUTO = fromString("Auto"); /** - * Static value Custom for TargetLagsMode. + * Use the custom target lags. */ public static final TargetLagsMode CUSTOM = fromString("Custom"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java index d3d2c38bfa5a..17ba4a807810 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,14 +36,6 @@ public TargetRollingWindowSizeMode mode() { return this.mode; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java index 7a87b9bc2256..489c29d63ce1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,12 +12,12 @@ */ public final class TargetRollingWindowSizeMode extends ExpandableStringEnum { /** - * Static value Auto for TargetRollingWindowSizeMode. + * Determine rolling windows size automatically. */ public static final TargetRollingWindowSizeMode AUTO = fromString("Auto"); /** - * Static value Custom for TargetRollingWindowSizeMode. + * Use the specified rolling window size. */ public static final TargetRollingWindowSizeMode CUSTOM = fromString("Custom"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java index 2297d0f1da3d..740903f449e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -23,24 +23,24 @@ public final class TargetUtilizationScaleSettings extends OnlineScaleSettings { private ScaleType scaleType = ScaleType.TARGET_UTILIZATION; /* - * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. + * The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. */ - private Duration pollingInterval; + private Integer maxInstances; /* - * Target CPU usage for the autoscaler. + * The minimum number of instances to always be present. */ - private Integer targetUtilizationPercentage; + private Integer minInstances; /* - * The minimum number of instances to always be present. + * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. */ - private Integer minInstances; + private Duration pollingInterval; /* - * The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. + * Target CPU usage for the autoscaler. */ - private Integer maxInstances; + private Integer targetUtilizationPercentage; /** * Creates an instance of TargetUtilizationScaleSettings class. @@ -59,44 +59,24 @@ public ScaleType scaleType() { } /** - * Get the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision - * as low as Seconds. - * - * @return the pollingInterval value. - */ - public Duration pollingInterval() { - return this.pollingInterval; - } - - /** - * Set the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision - * as low as Seconds. - * - * @param pollingInterval the pollingInterval value to set. - * @return the TargetUtilizationScaleSettings object itself. - */ - public TargetUtilizationScaleSettings withPollingInterval(Duration pollingInterval) { - this.pollingInterval = pollingInterval; - return this; - } - - /** - * Get the targetUtilizationPercentage property: Target CPU usage for the autoscaler. + * Get the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will + * be reserved for max_instances. * - * @return the targetUtilizationPercentage value. + * @return the maxInstances value. */ - public Integer targetUtilizationPercentage() { - return this.targetUtilizationPercentage; + public Integer maxInstances() { + return this.maxInstances; } /** - * Set the targetUtilizationPercentage property: Target CPU usage for the autoscaler. + * Set the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will + * be reserved for max_instances. * - * @param targetUtilizationPercentage the targetUtilizationPercentage value to set. + * @param maxInstances the maxInstances value to set. * @return the TargetUtilizationScaleSettings object itself. */ - public TargetUtilizationScaleSettings withTargetUtilizationPercentage(Integer targetUtilizationPercentage) { - this.targetUtilizationPercentage = targetUtilizationPercentage; + public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances) { + this.maxInstances = maxInstances; return this; } @@ -121,35 +101,45 @@ public TargetUtilizationScaleSettings withMinInstances(Integer minInstances) { } /** - * Get the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will - * be reserved for max_instances. + * Get the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision + * as low as Seconds. * - * @return the maxInstances value. + * @return the pollingInterval value. */ - public Integer maxInstances() { - return this.maxInstances; + public Duration pollingInterval() { + return this.pollingInterval; } /** - * Set the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will - * be reserved for max_instances. + * Set the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision + * as low as Seconds. * - * @param maxInstances the maxInstances value to set. + * @param pollingInterval the pollingInterval value to set. * @return the TargetUtilizationScaleSettings object itself. */ - public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances) { - this.maxInstances = maxInstances; + public TargetUtilizationScaleSettings withPollingInterval(Duration pollingInterval) { + this.pollingInterval = pollingInterval; return this; } /** - * Validates the instance. + * Get the targetUtilizationPercentage property: Target CPU usage for the autoscaler. + * + * @return the targetUtilizationPercentage value. + */ + public Integer targetUtilizationPercentage() { + return this.targetUtilizationPercentage; + } + + /** + * Set the targetUtilizationPercentage property: Target CPU usage for the autoscaler. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param targetUtilizationPercentage the targetUtilizationPercentage value to set. + * @return the TargetUtilizationScaleSettings object itself. */ - @Override - public void validate() { - super.validate(); + public TargetUtilizationScaleSettings withTargetUtilizationPercentage(Integer targetUtilizationPercentage) { + this.targetUtilizationPercentage = targetUtilizationPercentage; + return this; } /** @@ -159,10 +149,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); + jsonWriter.writeNumberField("maxInstances", this.maxInstances); + jsonWriter.writeNumberField("minInstances", this.minInstances); jsonWriter.writeStringField("pollingInterval", CoreUtils.durationToStringWithDays(this.pollingInterval)); jsonWriter.writeNumberField("targetUtilizationPercentage", this.targetUtilizationPercentage); - jsonWriter.writeNumberField("minInstances", this.minInstances); - jsonWriter.writeNumberField("maxInstances", this.maxInstances); return jsonWriter.writeEndObject(); } @@ -184,16 +174,16 @@ public static TargetUtilizationScaleSettings fromJson(JsonReader jsonReader) thr if ("scaleType".equals(fieldName)) { deserializedTargetUtilizationScaleSettings.scaleType = ScaleType.fromString(reader.getString()); + } else if ("maxInstances".equals(fieldName)) { + deserializedTargetUtilizationScaleSettings.maxInstances = reader.getNullable(JsonReader::getInt); + } else if ("minInstances".equals(fieldName)) { + deserializedTargetUtilizationScaleSettings.minInstances = reader.getNullable(JsonReader::getInt); } else if ("pollingInterval".equals(fieldName)) { deserializedTargetUtilizationScaleSettings.pollingInterval = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else if ("targetUtilizationPercentage".equals(fieldName)) { deserializedTargetUtilizationScaleSettings.targetUtilizationPercentage = reader.getNullable(JsonReader::getInt); - } else if ("minInstances".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.minInstances = reader.getNullable(JsonReader::getInt); - } else if ("maxInstances".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.maxInstances = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java index 994f19ec1b57..d51075aefe13 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,52 +12,65 @@ */ public final class TaskType extends ExpandableStringEnum { /** - * Static value Classification for TaskType. + * Classification in machine learning and statistics is a supervised learning approach in which + * the computer program learns from the data given to it and make new observations or classifications. */ public static final TaskType CLASSIFICATION = fromString("Classification"); /** - * Static value Regression for TaskType. + * Regression means to predict the value using the input data. Regression models are used to predict a continuous + * value. */ public static final TaskType REGRESSION = fromString("Regression"); /** - * Static value Forecasting for TaskType. + * Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model + * that can be used to predict the near future values based on the inputs. */ public static final TaskType FORECASTING = fromString("Forecasting"); /** - * Static value ImageClassification for TaskType. + * Image Classification. Multi-class image classification is used when an image is classified with only a single + * label + * from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. */ public static final TaskType IMAGE_CLASSIFICATION = fromString("ImageClassification"); /** - * Static value ImageClassificationMultilabel for TaskType. + * Image Classification Multilabel. Multi-label image classification is used when an image could have one or more + * labels + * from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. */ public static final TaskType IMAGE_CLASSIFICATION_MULTILABEL = fromString("ImageClassificationMultilabel"); /** - * Static value ImageObjectDetection for TaskType. + * Image Object Detection. Object detection is used to identify objects in an image and locate each object with a + * bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. */ public static final TaskType IMAGE_OBJECT_DETECTION = fromString("ImageObjectDetection"); /** - * Static value ImageInstanceSegmentation for TaskType. + * Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, + * drawing a polygon around each object in the image. */ public static final TaskType IMAGE_INSTANCE_SEGMENTATION = fromString("ImageInstanceSegmentation"); /** - * Static value TextClassification for TaskType. + * Text classification (also known as text tagging or text categorization) is the process of sorting texts into + * categories. + * Categories are mutually exclusive. */ public static final TaskType TEXT_CLASSIFICATION = fromString("TextClassification"); /** - * Static value TextClassificationMultilabel for TaskType. + * Multilabel classification task assigns each sample to a group (zero or more) of target labels. */ public static final TaskType TEXT_CLASSIFICATION_MULTILABEL = fromString("TextClassificationMultilabel"); /** - * Static value TextNER for TaskType. + * Text Named Entity Recognition a.k.a. TextNER. + * Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities + * such as people, locations, organizations, and more. */ public static final TaskType TEXT_NER = fromString("TextNER"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpoint.java new file mode 100644 index 000000000000..a05487212e4f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpoint.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 TeacherModelEndpoint model. + */ +@Fluent +public final class TeacherModelEndpoint implements JsonSerializable { + /* + * The endpointName property. + */ + private String endpointName; + + /** + * Creates an instance of TeacherModelEndpoint class. + */ + public TeacherModelEndpoint() { + } + + /** + * Get the endpointName property: The endpointName property. + * + * @return the endpointName value. + */ + public String endpointName() { + return this.endpointName; + } + + /** + * Set the endpointName property: The endpointName property. + * + * @param endpointName the endpointName value to set. + * @return the TeacherModelEndpoint object itself. + */ + public TeacherModelEndpoint withEndpointName(String endpointName) { + this.endpointName = endpointName; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpointName", this.endpointName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TeacherModelEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TeacherModelEndpoint 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 TeacherModelEndpoint. + */ + public static TeacherModelEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TeacherModelEndpoint deserializedTeacherModelEndpoint = new TeacherModelEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointName".equals(fieldName)) { + deserializedTeacherModelEndpoint.endpointName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTeacherModelEndpoint; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpointRequestSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpointRequestSettings.java new file mode 100644 index 000000000000..8c1b83e07176 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpointRequestSettings.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 TeacherModelEndpointRequestSettings model. + */ +@Fluent +public final class TeacherModelEndpointRequestSettings + implements JsonSerializable { + /* + * The minEndpointSuccessRatio property. + */ + private Double minEndpointSuccessRatio; + + /* + * The requestBatchSize property. + */ + private Integer requestBatchSize; + + /** + * Creates an instance of TeacherModelEndpointRequestSettings class. + */ + public TeacherModelEndpointRequestSettings() { + } + + /** + * Get the minEndpointSuccessRatio property: The minEndpointSuccessRatio property. + * + * @return the minEndpointSuccessRatio value. + */ + public Double minEndpointSuccessRatio() { + return this.minEndpointSuccessRatio; + } + + /** + * Set the minEndpointSuccessRatio property: The minEndpointSuccessRatio property. + * + * @param minEndpointSuccessRatio the minEndpointSuccessRatio value to set. + * @return the TeacherModelEndpointRequestSettings object itself. + */ + public TeacherModelEndpointRequestSettings withMinEndpointSuccessRatio(Double minEndpointSuccessRatio) { + this.minEndpointSuccessRatio = minEndpointSuccessRatio; + return this; + } + + /** + * Get the requestBatchSize property: The requestBatchSize property. + * + * @return the requestBatchSize value. + */ + public Integer requestBatchSize() { + return this.requestBatchSize; + } + + /** + * Set the requestBatchSize property: The requestBatchSize property. + * + * @param requestBatchSize the requestBatchSize value to set. + * @return the TeacherModelEndpointRequestSettings object itself. + */ + public TeacherModelEndpointRequestSettings withRequestBatchSize(Integer requestBatchSize) { + this.requestBatchSize = requestBatchSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("minEndpointSuccessRatio", this.minEndpointSuccessRatio); + jsonWriter.writeNumberField("requestBatchSize", this.requestBatchSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TeacherModelEndpointRequestSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TeacherModelEndpointRequestSettings 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 TeacherModelEndpointRequestSettings. + */ + public static TeacherModelEndpointRequestSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TeacherModelEndpointRequestSettings deserializedTeacherModelEndpointRequestSettings + = new TeacherModelEndpointRequestSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("minEndpointSuccessRatio".equals(fieldName)) { + deserializedTeacherModelEndpointRequestSettings.minEndpointSuccessRatio + = reader.getNullable(JsonReader::getDouble); + } else if ("requestBatchSize".equals(fieldName)) { + deserializedTeacherModelEndpointRequestSettings.requestBatchSize + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedTeacherModelEndpointRequestSettings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelSettings.java new file mode 100644 index 000000000000..dc11c4598da4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelSettings.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.Map; + +/** + * The TeacherModelSettings model. + */ +@Fluent +public final class TeacherModelSettings implements JsonSerializable { + /* + * Teacher Model Request Settings. + */ + private TeacherModelEndpointRequestSettings teacherModelEndpointRequestSettings; + + /* + * Teacher Model Inference Settings. + */ + private Map teacherModelInferenceParameters; + + /** + * Creates an instance of TeacherModelSettings class. + */ + public TeacherModelSettings() { + } + + /** + * Get the teacherModelEndpointRequestSettings property: Teacher Model Request Settings. + * + * @return the teacherModelEndpointRequestSettings value. + */ + public TeacherModelEndpointRequestSettings teacherModelEndpointRequestSettings() { + return this.teacherModelEndpointRequestSettings; + } + + /** + * Set the teacherModelEndpointRequestSettings property: Teacher Model Request Settings. + * + * @param teacherModelEndpointRequestSettings the teacherModelEndpointRequestSettings value to set. + * @return the TeacherModelSettings object itself. + */ + public TeacherModelSettings withTeacherModelEndpointRequestSettings( + TeacherModelEndpointRequestSettings teacherModelEndpointRequestSettings) { + this.teacherModelEndpointRequestSettings = teacherModelEndpointRequestSettings; + return this; + } + + /** + * Get the teacherModelInferenceParameters property: Teacher Model Inference Settings. + * + * @return the teacherModelInferenceParameters value. + */ + public Map teacherModelInferenceParameters() { + return this.teacherModelInferenceParameters; + } + + /** + * Set the teacherModelInferenceParameters property: Teacher Model Inference Settings. + * + * @param teacherModelInferenceParameters the teacherModelInferenceParameters value to set. + * @return the TeacherModelSettings object itself. + */ + public TeacherModelSettings + withTeacherModelInferenceParameters(Map teacherModelInferenceParameters) { + this.teacherModelInferenceParameters = teacherModelInferenceParameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("teacherModelEndpointRequestSettings", this.teacherModelEndpointRequestSettings); + jsonWriter.writeMapField("teacherModelInferenceParameters", this.teacherModelInferenceParameters, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TeacherModelSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TeacherModelSettings 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 TeacherModelSettings. + */ + public static TeacherModelSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TeacherModelSettings deserializedTeacherModelSettings = new TeacherModelSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("teacherModelEndpointRequestSettings".equals(fieldName)) { + deserializedTeacherModelSettings.teacherModelEndpointRequestSettings + = TeacherModelEndpointRequestSettings.fromJson(reader); + } else if ("teacherModelInferenceParameters".equals(fieldName)) { + Map teacherModelInferenceParameters + = reader.readMap(reader1 -> reader1.getString()); + deserializedTeacherModelSettings.teacherModelInferenceParameters = teacherModelInferenceParameters; + } else { + reader.skipChildren(); + } + } + + return deserializedTeacherModelSettings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java index 8771142e6522..adbdb30f3e64 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,14 +21,14 @@ public final class TensorFlow extends DistributionConfiguration { private DistributionType distributionType = DistributionType.TENSOR_FLOW; /* - * Number of workers. If not specified, will default to the instance count. + * Number of parameter server tasks. */ - private Integer workerCount; + private Integer parameterServerCount; /* - * Number of parameter server tasks. + * Number of workers. If not specified, will default to the instance count. */ - private Integer parameterServerCount; + private Integer workerCount; /** * Creates an instance of TensorFlow class. @@ -46,26 +46,6 @@ public DistributionType distributionType() { return this.distributionType; } - /** - * Get the workerCount property: Number of workers. If not specified, will default to the instance count. - * - * @return the workerCount value. - */ - public Integer workerCount() { - return this.workerCount; - } - - /** - * Set the workerCount property: Number of workers. If not specified, will default to the instance count. - * - * @param workerCount the workerCount value to set. - * @return the TensorFlow object itself. - */ - public TensorFlow withWorkerCount(Integer workerCount) { - this.workerCount = workerCount; - return this; - } - /** * Get the parameterServerCount property: Number of parameter server tasks. * @@ -87,13 +67,23 @@ public TensorFlow withParameterServerCount(Integer parameterServerCount) { } /** - * Validates the instance. + * Get the workerCount property: Number of workers. If not specified, will default to the instance count. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the workerCount value. */ - @Override - public void validate() { - super.validate(); + public Integer workerCount() { + return this.workerCount; + } + + /** + * Set the workerCount property: Number of workers. If not specified, will default to the instance count. + * + * @param workerCount the workerCount value to set. + * @return the TensorFlow object itself. + */ + public TensorFlow withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; + return this; } /** @@ -104,8 +94,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("distributionType", this.distributionType == null ? null : this.distributionType.toString()); - jsonWriter.writeNumberField("workerCount", this.workerCount); jsonWriter.writeNumberField("parameterServerCount", this.parameterServerCount); + jsonWriter.writeNumberField("workerCount", this.workerCount); return jsonWriter.writeEndObject(); } @@ -126,10 +116,10 @@ public static TensorFlow fromJson(JsonReader jsonReader) throws IOException { if ("distributionType".equals(fieldName)) { deserializedTensorFlow.distributionType = DistributionType.fromString(reader.getString()); - } else if ("workerCount".equals(fieldName)) { - deserializedTensorFlow.workerCount = reader.getNullable(JsonReader::getInt); } else if ("parameterServerCount".equals(fieldName)) { deserializedTensorFlow.parameterServerCount = reader.getNullable(JsonReader::getInt); + } else if ("workerCount".equals(fieldName)) { + deserializedTensorFlow.workerCount = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java index a5237d3783d9..2fd1d42b3352 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,9 +22,9 @@ public final class TextClassification extends AutoMLVertical { private TaskType taskType = TaskType.TEXT_CLASSIFICATION; /* - * Primary metric for Text-Classification task. + * Featurization inputs needed for AutoML job. */ - private ClassificationPrimaryMetrics primaryMetric; + private NlpVerticalFeaturizationSettings featurizationSettings; /* * Execution constraints for AutoMLJob. @@ -32,14 +32,14 @@ public final class TextClassification extends AutoMLVertical { private NlpVerticalLimitSettings limitSettings; /* - * Featurization inputs needed for AutoML job. + * Validation data inputs. */ - private NlpVerticalFeaturizationSettings featurizationSettings; + private MLTableJobInput validationData; /* - * Validation data inputs. + * Primary metrics for classification tasks. */ - private MLTableJobInput validationData; + private ClassificationPrimaryMetrics primaryMetric; /** * Creates an instance of TextClassification class. @@ -58,22 +58,22 @@ public TaskType taskType() { } /** - * Get the primaryMetric property: Primary metric for Text-Classification task. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the primaryMetric value. + * @return the featurizationSettings value. */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the primaryMetric property: Primary metric for Text-Classification task. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param primaryMetric the primaryMetric value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the TextClassification object itself. */ - public TextClassification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; + public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } @@ -98,42 +98,42 @@ public TextClassification withLimitSettings(NlpVerticalLimitSettings limitSettin } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the validationData property: Validation data inputs. * - * @return the featurizationSettings value. + * @return the validationData value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public MLTableJobInput validationData() { + return this.validationData; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the validationData property: Validation data inputs. * - * @param featurizationSettings the featurizationSettings value to set. + * @param validationData the validationData value to set. * @return the TextClassification object itself. */ - public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TextClassification withValidationData(MLTableJobInput validationData) { + this.validationData = validationData; return this; } /** - * Get the validationData property: Validation data inputs. + * Get the primaryMetric property: Primary metrics for classification tasks. * - * @return the validationData value. + * @return the primaryMetric value. */ - public MLTableJobInput validationData() { - return this.validationData; + public ClassificationPrimaryMetrics primaryMetric() { + return this.primaryMetric; } /** - * Set the validationData property: Validation data inputs. + * Set the primaryMetric property: Primary metrics for classification tasks. * - * @param validationData the validationData value to set. + * @param primaryMetric the primaryMetric value to set. * @return the TextClassification object itself. */ - public TextClassification withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; + public TextClassification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; return this; } @@ -146,15 +146,6 @@ public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { return this; } - /** - * {@inheritDoc} - */ - @Override - public TextClassification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); - return this; - } - /** * {@inheritDoc} */ @@ -165,22 +156,12 @@ public TextClassification withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } + public TextClassification withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } /** @@ -193,10 +174,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); return jsonWriter.writeEndObject(); } @@ -224,16 +205,16 @@ public static TextClassification fromJson(JsonReader jsonReader) throws IOExcept deserializedTextClassification.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedTextClassification.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedTextClassification.primaryMetric - = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextClassification.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("featurizationSettings".equals(fieldName)) { deserializedTextClassification.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { + deserializedTextClassification.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("validationData".equals(fieldName)) { deserializedTextClassification.validationData = MLTableJobInput.fromJson(reader); + } else if ("primaryMetric".equals(fieldName)) { + deserializedTextClassification.primaryMetric + = ClassificationPrimaryMetrics.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java index 325e4926c573..b2be1b61ec98 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -22,10 +22,9 @@ public final class TextClassificationMultilabel extends AutoMLVertical { private TaskType taskType = TaskType.TEXT_CLASSIFICATION_MULTILABEL; /* - * Primary metric for Text-Classification-Multilabel task. - * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + * Featurization inputs needed for AutoML job. */ - private ClassificationMultilabelPrimaryMetrics primaryMetric; + private NlpVerticalFeaturizationSettings featurizationSettings; /* * Execution constraints for AutoMLJob. @@ -33,14 +32,15 @@ public final class TextClassificationMultilabel extends AutoMLVertical { private NlpVerticalLimitSettings limitSettings; /* - * Featurization inputs needed for AutoML job. + * Validation data inputs. */ - private NlpVerticalFeaturizationSettings featurizationSettings; + private MLTableJobInput validationData; /* - * Validation data inputs. + * Primary metric for Text-Classification-Multilabel task. + * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. */ - private MLTableJobInput validationData; + private ClassificationMultilabelPrimaryMetrics primaryMetric; /** * Creates an instance of TextClassificationMultilabel class. @@ -59,13 +59,24 @@ public TaskType taskType() { } /** - * Get the primaryMetric property: Primary metric for Text-Classification-Multilabel task. - * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the primaryMetric value. + * @return the featurizationSettings value. */ - public ClassificationMultilabelPrimaryMetrics primaryMetric() { - return this.primaryMetric; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; + } + + /** + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @param featurizationSettings the featurizationSettings value to set. + * @return the TextClassificationMultilabel object itself. + */ + public TextClassificationMultilabel + withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; + return this; } /** @@ -88,27 +99,6 @@ public TextClassificationMultilabel withLimitSettings(NlpVerticalLimitSettings l return this; } - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the TextClassificationMultilabel object itself. - */ - public TextClassificationMultilabel - withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - /** * Get the validationData property: Validation data inputs. * @@ -130,20 +120,21 @@ public TextClassificationMultilabel withValidationData(MLTableJobInput validatio } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metric for Text-Classification-Multilabel task. + * Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + * + * @return the primaryMetric value. */ - @Override - public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; + public ClassificationMultilabelPrimaryMetrics primaryMetric() { + return this.primaryMetric; } /** * {@inheritDoc} */ @Override - public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -157,22 +148,12 @@ public TextClassificationMultilabel withTargetColumnName(String targetColumnName } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } + public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } /** @@ -185,8 +166,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("validationData", this.validationData); return jsonWriter.writeEndObject(); } @@ -216,16 +197,16 @@ public static TextClassificationMultilabel fromJson(JsonReader jsonReader) throw deserializedTextClassificationMultilabel.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedTextClassificationMultilabel.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedTextClassificationMultilabel.primaryMetric - = ClassificationMultilabelPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextClassificationMultilabel.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("featurizationSettings".equals(fieldName)) { deserializedTextClassificationMultilabel.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { + deserializedTextClassificationMultilabel.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("validationData".equals(fieldName)) { deserializedTextClassificationMultilabel.validationData = MLTableJobInput.fromJson(reader); + } else if ("primaryMetric".equals(fieldName)) { + deserializedTextClassificationMultilabel.primaryMetric + = ClassificationMultilabelPrimaryMetrics.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java index 2c6d58ad2ffc..6a84df2f3505 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -23,10 +23,9 @@ public final class TextNer extends AutoMLVertical { private TaskType taskType = TaskType.TEXT_NER; /* - * Primary metric for Text-NER task. - * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + * Featurization inputs needed for AutoML job. */ - private ClassificationPrimaryMetrics primaryMetric; + private NlpVerticalFeaturizationSettings featurizationSettings; /* * Execution constraints for AutoMLJob. @@ -34,14 +33,15 @@ public final class TextNer extends AutoMLVertical { private NlpVerticalLimitSettings limitSettings; /* - * Featurization inputs needed for AutoML job. + * Validation data inputs. */ - private NlpVerticalFeaturizationSettings featurizationSettings; + private MLTableJobInput validationData; /* - * Validation data inputs. + * Primary metric for Text-NER task. + * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. */ - private MLTableJobInput validationData; + private ClassificationPrimaryMetrics primaryMetric; /** * Creates an instance of TextNer class. @@ -60,13 +60,23 @@ public TaskType taskType() { } /** - * Get the primaryMetric property: Primary metric for Text-NER task. - * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the primaryMetric value. + * @return the featurizationSettings value. */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; + } + + /** + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @param featurizationSettings the featurizationSettings value to set. + * @return the TextNer object itself. + */ + public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; + return this; } /** @@ -89,26 +99,6 @@ public TextNer withLimitSettings(NlpVerticalLimitSettings limitSettings) { return this; } - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @return the featurizationSettings value. - */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; - } - - /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. - * - * @param featurizationSettings the featurizationSettings value to set. - * @return the TextNer object itself. - */ - public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; - return this; - } - /** * Get the validationData property: Validation data inputs. * @@ -130,20 +120,21 @@ public TextNer withValidationData(MLTableJobInput validationData) { } /** - * {@inheritDoc} + * Get the primaryMetric property: Primary metric for Text-NER task. + * Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + * + * @return the primaryMetric value. */ - @Override - public TextNer withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; + public ClassificationPrimaryMetrics primaryMetric() { + return this.primaryMetric; } /** * {@inheritDoc} */ @Override - public TextNer withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public TextNer withLogVerbosity(LogVerbosity logVerbosity) { + super.withLogVerbosity(logVerbosity); return this; } @@ -157,22 +148,12 @@ public TextNer withTargetColumnName(String targetColumnName) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } + public TextNer withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); + return this; } /** @@ -185,8 +166,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("validationData", this.validationData); return jsonWriter.writeEndObject(); } @@ -215,14 +196,14 @@ public static TextNer fromJson(JsonReader jsonReader) throws IOException { deserializedTextNer.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedTextNer.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedTextNer.primaryMetric = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextNer.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("featurizationSettings".equals(fieldName)) { deserializedTextNer.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { + deserializedTextNer.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("validationData".equals(fieldName)) { deserializedTextNer.validationData = MLTableJobInput.fromJson(reader); + } else if ("primaryMetric".equals(fieldName)) { + deserializedTextNer.primaryMetric = ClassificationPrimaryMetrics.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java index 2a9d74fb5bbd..b1c7cbbb8413 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Describes the tmpfs options for the container. + * The TmpfsOptions model. */ @Fluent public final class TmpfsOptions implements JsonSerializable { @@ -47,14 +47,6 @@ public TmpfsOptions withSize(Integer size) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java index 8aa049e6d9a2..9fb34f6e11f0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -62,16 +62,6 @@ public TopNFeaturesByAttribution withTop(Integer top) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java index 3f8ac294cd04..e3249807df22 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -19,14 +19,19 @@ @Fluent public class TrainingSettings implements JsonSerializable { /* - * Flag for enabling onnx compatible models. + * Enable recommendation of DNN models. */ - private Boolean enableOnnxCompatibleModels; + private Boolean enableDnnTraining; /* - * Stack ensemble settings for stack ensemble run. + * Flag to turn on explainability on best model. */ - private StackEnsembleSettings stackEnsembleSettings; + private Boolean enableModelExplainability; + + /* + * Flag for enabling onnx compatible models. + */ + private Boolean enableOnnxCompatibleModels; /* * Enable stack ensemble run. @@ -46,14 +51,9 @@ public class TrainingSettings implements JsonSerializable { private Duration ensembleModelDownloadTimeout; /* - * Flag to turn on explainability on best model. - */ - private Boolean enableModelExplainability; - - /* - * Enable recommendation of DNN models. + * Stack ensemble settings for stack ensemble run. */ - private Boolean enableDnnTraining; + private StackEnsembleSettings stackEnsembleSettings; /** * Creates an instance of TrainingSettings class. @@ -62,42 +62,62 @@ public TrainingSettings() { } /** - * Get the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * Get the enableDnnTraining property: Enable recommendation of DNN models. * - * @return the enableOnnxCompatibleModels value. + * @return the enableDnnTraining value. */ - public Boolean enableOnnxCompatibleModels() { - return this.enableOnnxCompatibleModels; + public Boolean enableDnnTraining() { + return this.enableDnnTraining; } /** - * Set the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * Set the enableDnnTraining property: Enable recommendation of DNN models. * - * @param enableOnnxCompatibleModels the enableOnnxCompatibleModels value to set. + * @param enableDnnTraining the enableDnnTraining value to set. * @return the TrainingSettings object itself. */ - public TrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - this.enableOnnxCompatibleModels = enableOnnxCompatibleModels; + public TrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + this.enableDnnTraining = enableDnnTraining; return this; } /** - * Get the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. + * Get the enableModelExplainability property: Flag to turn on explainability on best model. * - * @return the stackEnsembleSettings value. + * @return the enableModelExplainability value. */ - public StackEnsembleSettings stackEnsembleSettings() { - return this.stackEnsembleSettings; + public Boolean enableModelExplainability() { + return this.enableModelExplainability; } /** - * Set the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. + * Set the enableModelExplainability property: Flag to turn on explainability on best model. * - * @param stackEnsembleSettings the stackEnsembleSettings value to set. + * @param enableModelExplainability the enableModelExplainability value to set. * @return the TrainingSettings object itself. */ - public TrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - this.stackEnsembleSettings = stackEnsembleSettings; + public TrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + this.enableModelExplainability = enableModelExplainability; + return this; + } + + /** + * Get the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * + * @return the enableOnnxCompatibleModels value. + */ + public Boolean enableOnnxCompatibleModels() { + return this.enableOnnxCompatibleModels; + } + + /** + * Set the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * + * @param enableOnnxCompatibleModels the enableOnnxCompatibleModels value to set. + * @return the TrainingSettings object itself. + */ + public TrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + this.enableOnnxCompatibleModels = enableOnnxCompatibleModels; return this; } @@ -166,70 +186,39 @@ public TrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelD } /** - * Get the enableModelExplainability property: Flag to turn on explainability on best model. - * - * @return the enableModelExplainability value. - */ - public Boolean enableModelExplainability() { - return this.enableModelExplainability; - } - - /** - * Set the enableModelExplainability property: Flag to turn on explainability on best model. - * - * @param enableModelExplainability the enableModelExplainability value to set. - * @return the TrainingSettings object itself. - */ - public TrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - this.enableModelExplainability = enableModelExplainability; - return this; - } - - /** - * Get the enableDnnTraining property: Enable recommendation of DNN models. + * Get the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. * - * @return the enableDnnTraining value. + * @return the stackEnsembleSettings value. */ - public Boolean enableDnnTraining() { - return this.enableDnnTraining; + public StackEnsembleSettings stackEnsembleSettings() { + return this.stackEnsembleSettings; } /** - * Set the enableDnnTraining property: Enable recommendation of DNN models. + * Set the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. * - * @param enableDnnTraining the enableDnnTraining value to set. + * @param stackEnsembleSettings the stackEnsembleSettings value to set. * @return the TrainingSettings object itself. */ - public TrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - this.enableDnnTraining = enableDnnTraining; + public TrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + this.stackEnsembleSettings = stackEnsembleSettings; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (stackEnsembleSettings() != null) { - stackEnsembleSettings().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableDnnTraining", this.enableDnnTraining); + jsonWriter.writeBooleanField("enableModelExplainability", this.enableModelExplainability); jsonWriter.writeBooleanField("enableOnnxCompatibleModels", this.enableOnnxCompatibleModels); - jsonWriter.writeJsonField("stackEnsembleSettings", this.stackEnsembleSettings); jsonWriter.writeBooleanField("enableStackEnsemble", this.enableStackEnsemble); jsonWriter.writeBooleanField("enableVoteEnsemble", this.enableVoteEnsemble); jsonWriter.writeStringField("ensembleModelDownloadTimeout", CoreUtils.durationToStringWithDays(this.ensembleModelDownloadTimeout)); - jsonWriter.writeBooleanField("enableModelExplainability", this.enableModelExplainability); - jsonWriter.writeBooleanField("enableDnnTraining", this.enableDnnTraining); + jsonWriter.writeJsonField("stackEnsembleSettings", this.stackEnsembleSettings); return jsonWriter.writeEndObject(); } @@ -248,11 +237,13 @@ public static TrainingSettings fromJson(JsonReader jsonReader) throws IOExceptio String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { + deserializedTrainingSettings.enableDnnTraining = reader.getNullable(JsonReader::getBoolean); + } else if ("enableModelExplainability".equals(fieldName)) { + deserializedTrainingSettings.enableModelExplainability = reader.getNullable(JsonReader::getBoolean); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { deserializedTrainingSettings.enableOnnxCompatibleModels = reader.getNullable(JsonReader::getBoolean); - } else if ("stackEnsembleSettings".equals(fieldName)) { - deserializedTrainingSettings.stackEnsembleSettings = StackEnsembleSettings.fromJson(reader); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedTrainingSettings.enableStackEnsemble = reader.getNullable(JsonReader::getBoolean); } else if ("enableVoteEnsemble".equals(fieldName)) { @@ -260,10 +251,8 @@ public static TrainingSettings fromJson(JsonReader jsonReader) throws IOExceptio } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedTrainingSettings.ensembleModelDownloadTimeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedTrainingSettings.enableModelExplainability = reader.getNullable(JsonReader::getBoolean); - } else if ("enableDnnTraining".equals(fieldName)) { - deserializedTrainingSettings.enableDnnTraining = reader.getNullable(JsonReader::getBoolean); + } else if ("stackEnsembleSettings".equals(fieldName)) { + deserializedTrainingSettings.stackEnsembleSettings = StackEnsembleSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java index f95ef9e2e99f..2bf41d5a46b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -28,6 +27,11 @@ public final class TrialComponent implements JsonSerializable { */ private String command; + /* + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + */ + private DistributionConfiguration distribution; + /* * [Required] The ARM resource ID of the Environment specification for the job. */ @@ -38,11 +42,6 @@ public final class TrialComponent implements JsonSerializable { */ private Map environmentVariables; - /* - * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. - */ - private DistributionConfiguration distribution; - /* * Compute Resource configuration for the job. */ @@ -94,6 +93,28 @@ public TrialComponent withCommand(String command) { return this; } + /** + * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. + * + * @return the distribution value. + */ + public DistributionConfiguration distribution() { + return this.distribution; + } + + /** + * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. + * + * @param distribution the distribution value to set. + * @return the TrialComponent object itself. + */ + public TrialComponent withDistribution(DistributionConfiguration distribution) { + this.distribution = distribution; + return this; + } + /** * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. * @@ -134,28 +155,6 @@ public TrialComponent withEnvironmentVariables(Map environmentVa return this; } - /** - * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * - * @return the distribution value. - */ - public DistributionConfiguration distribution() { - return this.distribution; - } - - /** - * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. - * - * @param distribution the distribution value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withDistribution(DistributionConfiguration distribution) { - this.distribution = distribution; - return this; - } - /** * Get the resources property: Compute Resource configuration for the job. * @@ -176,30 +175,6 @@ public TrialComponent withResources(JobResourceConfiguration resources) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (command() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property command in model TrialComponent")); - } - if (environmentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property environmentId in model TrialComponent")); - } - if (distribution() != null) { - distribution().validate(); - } - if (resources() != null) { - resources().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrialComponent.class); - /** * {@inheritDoc} */ @@ -209,9 +184,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("command", this.command); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeStringField("codeId", this.codeId); + jsonWriter.writeJsonField("distribution", this.distribution); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("distribution", this.distribution); jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -238,11 +213,11 @@ public static TrialComponent fromJson(JsonReader jsonReader) throws IOException deserializedTrialComponent.environmentId = reader.getString(); } else if ("codeId".equals(fieldName)) { deserializedTrialComponent.codeId = reader.getString(); + } else if ("distribution".equals(fieldName)) { + deserializedTrialComponent.distribution = DistributionConfiguration.fromJson(reader); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedTrialComponent.environmentVariables = environmentVariables; - } else if ("distribution".equals(fieldName)) { - deserializedTrialComponent.distribution = DistributionConfiguration.fromJson(reader); } else if ("resources".equals(fieldName)) { deserializedTrialComponent.resources = JobResourceConfiguration.fromJson(reader); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java index e95b0f489359..16ae5c387f28 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -126,14 +126,6 @@ public TriggerBase withTimeZone(String timeZone) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -171,10 +163,10 @@ public static TriggerBase fromJson(JsonReader jsonReader) throws IOException { } } // Use the discriminator value to determine which subtype should be deserialized. - if ("Recurrence".equals(discriminatorValue)) { - return RecurrenceTrigger.fromJson(readerToUse.reset()); - } else if ("Cron".equals(discriminatorValue)) { + if ("Cron".equals(discriminatorValue)) { return CronTrigger.fromJson(readerToUse.reset()); + } else if ("Recurrence".equals(discriminatorValue)) { + return RecurrenceTrigger.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java index 9e4c2133d3ff..53dca9a3b46d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java index 27ce7c891231..514ab0f591b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,14 +21,14 @@ public final class TritonModelJobInput extends JobInput { private JobInputType jobInputType = JobInputType.TRITON_MODEL; /* - * [Required] Input Asset URI. + * Enum to determine the input data delivery mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of TritonModelJobInput class. @@ -48,42 +47,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Enum to determine the input data delivery mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Enum to determine the input data delivery mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the TritonModelJobInput object itself. */ - public TritonModelJobInput withUri(String uri) { - this.uri = uri; + public TritonModelJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the TritonModelJobInput object itself. */ - public TritonModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public TritonModelJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -96,22 +95,6 @@ public TritonModelJobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model TritonModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TritonModelJobInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java index 33028b918755..f83fda2acb30 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,15 +21,20 @@ public final class TritonModelJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.TRITON_MODEL; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* - * Output Asset Delivery Mode. + * Output data delivery mode enums. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of TritonModelJobOutput class. */ @@ -47,27 +52,27 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the TritonModelJobOutput object itself. */ - public TritonModelJobOutput withUri(String uri) { - this.uri = uri; + public TritonModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } /** - * Get the mode property: Output Asset Delivery Mode. + * Get the mode property: Output data delivery mode enums. * * @return the mode value. */ @@ -76,7 +81,7 @@ public OutputDeliveryMode mode() { } /** - * Set the mode property: Output Asset Delivery Mode. + * Set the mode property: Output data delivery mode enums. * * @param mode the mode value to set. * @return the TritonModelJobOutput object itself. @@ -87,22 +92,32 @@ public TritonModelJobOutput withMode(OutputDeliveryMode mode) { } /** - * {@inheritDoc} + * Get the uri property: Output Asset URI. + * + * @return the uri value. */ - @Override - public TritonModelJobOutput withDescription(String description) { - super.withDescription(description); - return this; + public String uri() { + return this.uri; } /** - * Validates the instance. + * Set the uri property: Output Asset URI. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param uri the uri value to set. + * @return the TritonModelJobOutput object itself. + */ + public TritonModelJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public TritonModelJobOutput withDescription(String description) { + super.withDescription(description); + return this; } /** @@ -113,8 +128,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +153,12 @@ public static TritonModelJobOutput fromJson(JsonReader jsonReader) throws IOExce deserializedTritonModelJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedTritonModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedTritonModelJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedTritonModelJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedTritonModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedTritonModelJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java index 916847f745a1..774379195121 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,15 +61,6 @@ public TruncationSelectionPolicy withTruncationPercentage(Integer truncationPerc return this; } - /** - * {@inheritDoc} - */ - @Override - public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - /** * {@inheritDoc} */ @@ -80,13 +71,12 @@ public TruncationSelectionPolicy withDelayEvaluation(Integer delayEvaluation) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); + return this; } /** @@ -95,8 +85,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); + jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); jsonWriter.writeNumberField("truncationPercentage", this.truncationPercentage); return jsonWriter.writeEndObject(); @@ -117,11 +107,11 @@ public static TruncationSelectionPolicy fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("evaluationInterval".equals(fieldName)) { + if ("delayEvaluation".equals(fieldName)) { + deserializedTruncationSelectionPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); + } else if ("evaluationInterval".equals(fieldName)) { deserializedTruncationSelectionPolicy .withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { - deserializedTruncationSelectionPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); } else if ("policyType".equals(fieldName)) { deserializedTruncationSelectionPolicy.policyType = EarlyTerminationPolicyType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java index 00e2aa9bf2c3..1facef6a0209 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java index d99290f41221..ec1394d47dd0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Unit of time measure - * * The unit of time measurement for the specified VM price. Example: OneHour. */ public final class UnitOfMeasure extends ExpandableStringEnum { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java index 35ca7760247d..b3ddf2e99844 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The properties for update Quota response. */ -@Fluent +@Immutable public final class UpdateWorkspaceQuotas implements JsonSerializable { /* * Specifies the resource ID. @@ -27,6 +27,8 @@ public final class UpdateWorkspaceQuotas implements JsonSerializable tags) { - super.withTags(tags); + public UriFileDataVersion withDescription(String description) { + super.withDescription(description); return this; } @@ -92,13 +83,12 @@ public UriFileDataVersion withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public UriFileDataVersion withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -109,10 +99,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("dataUri", dataUri()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); } @@ -137,16 +127,16 @@ public static UriFileDataVersion fromJson(JsonReader jsonReader) throws IOExcept deserializedUriFileDataVersion.withDataUri(reader.getString()); } else if ("description".equals(fieldName)) { deserializedUriFileDataVersion.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFileDataVersion.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedUriFileDataVersion.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedUriFileDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedUriFileDataVersion.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedUriFileDataVersion.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedUriFileDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataType".equals(fieldName)) { deserializedUriFileDataVersion.dataType = DataType.fromString(reader.getString()); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java index e78e095795f9..ffafc2830f94 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,14 +21,14 @@ public final class UriFileJobInput extends JobInput { private JobInputType jobInputType = JobInputType.URI_FILE; /* - * [Required] Input Asset URI. + * Enum to determine the input data delivery mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of UriFileJobInput class. @@ -48,42 +47,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Enum to determine the input data delivery mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Enum to determine the input data delivery mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the UriFileJobInput object itself. */ - public UriFileJobInput withUri(String uri) { - this.uri = uri; + public UriFileJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the UriFileJobInput object itself. */ - public UriFileJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public UriFileJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -96,22 +95,6 @@ public UriFileJobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model UriFileJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UriFileJobInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java index c041cc90a364..d0bae9d15870 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,15 +21,20 @@ public final class UriFileJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.URI_FILE; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* - * Output Asset Delivery Mode. + * Output data delivery mode enums. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of UriFileJobOutput class. */ @@ -47,27 +52,27 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the UriFileJobOutput object itself. */ - public UriFileJobOutput withUri(String uri) { - this.uri = uri; + public UriFileJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } /** - * Get the mode property: Output Asset Delivery Mode. + * Get the mode property: Output data delivery mode enums. * * @return the mode value. */ @@ -76,7 +81,7 @@ public OutputDeliveryMode mode() { } /** - * Set the mode property: Output Asset Delivery Mode. + * Set the mode property: Output data delivery mode enums. * * @param mode the mode value to set. * @return the UriFileJobOutput object itself. @@ -87,22 +92,32 @@ public UriFileJobOutput withMode(OutputDeliveryMode mode) { } /** - * {@inheritDoc} + * Get the uri property: Output Asset URI. + * + * @return the uri value. */ - @Override - public UriFileJobOutput withDescription(String description) { - super.withDescription(description); - return this; + public String uri() { + return this.uri; } /** - * Validates the instance. + * Set the uri property: Output Asset URI. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param uri the uri value to set. + * @return the UriFileJobOutput object itself. + */ + public UriFileJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public UriFileJobOutput withDescription(String description) { + super.withDescription(description); + return this; } /** @@ -113,8 +128,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +153,12 @@ public static UriFileJobOutput fromJson(JsonReader jsonReader) throws IOExceptio deserializedUriFileJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedUriFileJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFileJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedUriFileJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedUriFileJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedUriFileJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java index 0eb6c53ff5cb..dbb28e7845ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -46,15 +46,6 @@ public UriFolderDataVersion withDataUri(String dataUri) { return this; } - /** - * {@inheritDoc} - */ - @Override - public UriFolderDataVersion withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - /** * {@inheritDoc} */ @@ -68,8 +59,8 @@ public UriFolderDataVersion withIsAnonymous(Boolean isAnonymous) { * {@inheritDoc} */ @Override - public UriFolderDataVersion withDescription(String description) { - super.withDescription(description); + public UriFolderDataVersion withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -77,8 +68,8 @@ public UriFolderDataVersion withDescription(String description) { * {@inheritDoc} */ @Override - public UriFolderDataVersion withTags(Map tags) { - super.withTags(tags); + public UriFolderDataVersion withDescription(String description) { + super.withDescription(description); return this; } @@ -92,13 +83,12 @@ public UriFolderDataVersion withProperties(Map properties) { } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public UriFolderDataVersion withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -109,10 +99,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("dataUri", dataUri()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); } @@ -137,16 +127,16 @@ public static UriFolderDataVersion fromJson(JsonReader jsonReader) throws IOExce deserializedUriFolderDataVersion.withDataUri(reader.getString()); } else if ("description".equals(fieldName)) { deserializedUriFolderDataVersion.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFolderDataVersion.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedUriFolderDataVersion.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedUriFolderDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedUriFolderDataVersion.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedUriFolderDataVersion.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedUriFolderDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataType".equals(fieldName)) { deserializedUriFolderDataVersion.dataType = DataType.fromString(reader.getString()); } else { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java index c206211b1d17..1048306725c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -22,14 +21,14 @@ public final class UriFolderJobInput extends JobInput { private JobInputType jobInputType = JobInputType.URI_FOLDER; /* - * [Required] Input Asset URI. + * Enum to determine the input data delivery mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of UriFolderJobInput class. @@ -48,42 +47,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Enum to determine the input data delivery mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Enum to determine the input data delivery mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the UriFolderJobInput object itself. */ - public UriFolderJobInput withUri(String uri) { - this.uri = uri; + public UriFolderJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the UriFolderJobInput object itself. */ - public UriFolderJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public UriFolderJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -96,22 +95,6 @@ public UriFolderJobInput withDescription(String description) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (uri() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property uri in model UriFolderJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UriFolderJobInput.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java index 1a9474aec429..a88b98796500 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -21,15 +21,20 @@ public final class UriFolderJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.URI_FOLDER; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* - * Output Asset Delivery Mode. + * Output data delivery mode enums. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of UriFolderJobOutput class. */ @@ -47,27 +52,27 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the UriFolderJobOutput object itself. */ - public UriFolderJobOutput withUri(String uri) { - this.uri = uri; + public UriFolderJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } /** - * Get the mode property: Output Asset Delivery Mode. + * Get the mode property: Output data delivery mode enums. * * @return the mode value. */ @@ -76,7 +81,7 @@ public OutputDeliveryMode mode() { } /** - * Set the mode property: Output Asset Delivery Mode. + * Set the mode property: Output data delivery mode enums. * * @param mode the mode value to set. * @return the UriFolderJobOutput object itself. @@ -87,22 +92,32 @@ public UriFolderJobOutput withMode(OutputDeliveryMode mode) { } /** - * {@inheritDoc} + * Get the uri property: Output Asset URI. + * + * @return the uri value. */ - @Override - public UriFolderJobOutput withDescription(String description) { - super.withDescription(description); - return this; + public String uri() { + return this.uri; } /** - * Validates the instance. + * Set the uri property: Output Asset URI. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param uri the uri value to set. + * @return the UriFolderJobOutput object itself. + */ + public UriFolderJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + + /** + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); + public UriFolderJobOutput withDescription(String description) { + super.withDescription(description); + return this; } /** @@ -113,8 +128,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +153,12 @@ public static UriFolderJobOutput fromJson(JsonReader jsonReader) throws IOExcept deserializedUriFolderJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedUriFolderJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFolderJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedUriFolderJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedUriFolderJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedUriFolderJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java index 7ba869f98e85..f84397bc0f0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java new file mode 100644 index 000000000000..b5b702e28897 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import java.util.List; + +/** + * An immutable client-side representation of UsageAndQuotaDetails. + */ +public interface UsageAndQuotaDetails { + /** + * Gets the modelCollection property: Model collection name. + * + * @return the modelCollection value. + */ + String modelCollection(); + + /** + * Gets the quota property: The total number of quota. + * + * @return the quota value. + */ + Long quota(); + + /** + * Gets the usageDetails property: Usage details for each deployment. + * + * @return the usageDetails value. + */ + List usageDetails(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner object. + * + * @return the inner object. + */ + UsageAndQuotaDetailsInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java index a93cbc5c3571..4bd910e3296e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -29,7 +29,7 @@ public final class UsageName implements JsonSerializable { /** * Creates an instance of UsageName class. */ - public UsageName() { + private UsageName() { } /** @@ -50,14 +50,6 @@ public String localizedValue() { return this.localizedValue; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java index 19c10a736702..bf7d9c6abd6c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java index ac79b69d00ed..9db4beee4c79 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,7 +14,7 @@ public interface Usages { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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. @@ -26,7 +26,7 @@ public interface Usages { /** * Gets the current usage information as well as limits for AML resources for given subscription and location. * - * @param location The location for which resource usage is queried. + * @param location The location 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java index 3f489592a3cb..2331e80c7e80 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ */ public final class UseStl extends ExpandableStringEnum { /** - * Static value None for UseStl. + * No stl decomposition. */ public static final UseStl NONE = fromString("None"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java index 414e4693e2a6..b1acaf6ff597 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -18,16 +17,22 @@ @Fluent public final class UserAccountCredentials implements JsonSerializable { /* + * User name. + * * Name of the administrator user account which can be used to SSH to nodes. */ private String adminUsername; /* + * SSH public key. + * * SSH public key of the administrator user account. */ private String adminUserSshPublicKey; /* + * Password. + * * Password of the administrator user account. */ private String adminUserPassword; @@ -39,7 +44,9 @@ public UserAccountCredentials() { } /** - * Get the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. + * Get the adminUsername property: User name. + * + * Name of the administrator user account which can be used to SSH to nodes. * * @return the adminUsername value. */ @@ -48,7 +55,9 @@ public String adminUsername() { } /** - * Set the adminUsername property: Name of the administrator user account which can be used to SSH to nodes. + * Set the adminUsername property: User name. + * + * Name of the administrator user account which can be used to SSH to nodes. * * @param adminUsername the adminUsername value to set. * @return the UserAccountCredentials object itself. @@ -59,7 +68,9 @@ public UserAccountCredentials withAdminUsername(String adminUsername) { } /** - * Get the adminUserSshPublicKey property: SSH public key of the administrator user account. + * Get the adminUserSshPublicKey property: SSH public key. + * + * SSH public key of the administrator user account. * * @return the adminUserSshPublicKey value. */ @@ -68,7 +79,9 @@ public String adminUserSshPublicKey() { } /** - * Set the adminUserSshPublicKey property: SSH public key of the administrator user account. + * Set the adminUserSshPublicKey property: SSH public key. + * + * SSH public key of the administrator user account. * * @param adminUserSshPublicKey the adminUserSshPublicKey value to set. * @return the UserAccountCredentials object itself. @@ -79,7 +92,9 @@ public UserAccountCredentials withAdminUserSshPublicKey(String adminUserSshPubli } /** - * Get the adminUserPassword property: Password of the administrator user account. + * Get the adminUserPassword property: Password. + * + * Password of the administrator user account. * * @return the adminUserPassword value. */ @@ -88,7 +103,9 @@ public String adminUserPassword() { } /** - * Set the adminUserPassword property: Password of the administrator user account. + * Set the adminUserPassword property: Password. + * + * Password of the administrator user account. * * @param adminUserPassword the adminUserPassword value to set. * @return the UserAccountCredentials object itself. @@ -98,21 +115,6 @@ public UserAccountCredentials withAdminUserPassword(String adminUserPassword) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (adminUsername() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property adminUsername in model UserAccountCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UserAccountCredentials.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java index b667345fc50b..5913b5770ce5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.UUID; /** * User assigned identity properties. @@ -20,12 +19,12 @@ public final class UserAssignedIdentity implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.principalId = reader.getString(); } else if ("clientId".equals(fieldName)) { - deserializedUserAssignedIdentity.clientId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + deserializedUserAssignedIdentity.clientId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java deleted file mode 100644 index de673e1f3855..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedAcrAccount.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 UserCreatedAcrAccount model. - */ -@Fluent -public final class UserCreatedAcrAccount implements JsonSerializable { - /* - * ARM ResourceId of a resource - */ - private ArmResourceId armResourceId; - - /** - * Creates an instance of UserCreatedAcrAccount class. - */ - public UserCreatedAcrAccount() { - } - - /** - * Get the armResourceId property: ARM ResourceId of a resource. - * - * @return the armResourceId value. - */ - public ArmResourceId armResourceId() { - return this.armResourceId; - } - - /** - * Set the armResourceId property: ARM ResourceId of a resource. - * - * @param armResourceId the armResourceId value to set. - * @return the UserCreatedAcrAccount object itself. - */ - public UserCreatedAcrAccount withArmResourceId(ArmResourceId armResourceId) { - this.armResourceId = armResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (armResourceId() != null) { - armResourceId().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("armResourceId", this.armResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserCreatedAcrAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserCreatedAcrAccount 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 UserCreatedAcrAccount. - */ - public static UserCreatedAcrAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserCreatedAcrAccount deserializedUserCreatedAcrAccount = new UserCreatedAcrAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("armResourceId".equals(fieldName)) { - deserializedUserCreatedAcrAccount.armResourceId = ArmResourceId.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUserCreatedAcrAccount; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java deleted file mode 100644 index 0845b3254b45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserCreatedStorageAccount.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 UserCreatedStorageAccount model. - */ -@Fluent -public final class UserCreatedStorageAccount implements JsonSerializable { - /* - * ARM ResourceId of a resource - */ - private ArmResourceId armResourceId; - - /** - * Creates an instance of UserCreatedStorageAccount class. - */ - public UserCreatedStorageAccount() { - } - - /** - * Get the armResourceId property: ARM ResourceId of a resource. - * - * @return the armResourceId value. - */ - public ArmResourceId armResourceId() { - return this.armResourceId; - } - - /** - * Set the armResourceId property: ARM ResourceId of a resource. - * - * @param armResourceId the armResourceId value to set. - * @return the UserCreatedStorageAccount object itself. - */ - public UserCreatedStorageAccount withArmResourceId(ArmResourceId armResourceId) { - this.armResourceId = armResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (armResourceId() != null) { - armResourceId().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("armResourceId", this.armResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserCreatedStorageAccount from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserCreatedStorageAccount 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 UserCreatedStorageAccount. - */ - public static UserCreatedStorageAccount fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserCreatedStorageAccount deserializedUserCreatedStorageAccount = new UserCreatedStorageAccount(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("armResourceId".equals(fieldName)) { - deserializedUserCreatedStorageAccount.armResourceId = ArmResourceId.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUserCreatedStorageAccount; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java index ea36d31e153e..fe742ababd05 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,16 +36,6 @@ public IdentityConfigurationType identityType() { return this.identityType; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java index 8877b608e63c..797540f32162 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -30,16 +30,6 @@ public final class UsernamePasswordAuthTypeWorkspaceConnectionProperties extends */ private WorkspaceConnectionUsernamePassword credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,20 @@ public WorkspaceConnectionUsernamePassword credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. - */ - @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; - } - - /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); return this; } @@ -128,8 +107,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withIsSharedToAll(B * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -137,8 +116,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String t * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -146,8 +125,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withMetadata(Map sharedUserList) { - super.withSharedUserList(sharedUserList); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +134,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withSharedUserList( * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + super.withSharedUserList(sharedUserList); return this; } @@ -164,22 +143,19 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String va * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * {@inheritDoc} */ @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } + public UsernamePasswordAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); + return this; } /** @@ -189,15 +165,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -224,31 +202,37 @@ public static UsernamePasswordAuthTypeWorkspaceConnectionProperties fromJson(Jso deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties .withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java index 901828b9bb87..5994deb5c97e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * OS type - * * Operating system type used by the VM. */ public final class VMPriceOSType extends ExpandableStringEnum { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java index 9238b23803a2..0bc558d9d904 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * VM tier - * * The type of the VM. */ public final class VMTier extends ExpandableStringEnum { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java index f38129e5f772..5232e2049085 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,22 +12,22 @@ */ public final class ValidationMetricType extends ExpandableStringEnum { /** - * Static value None for ValidationMetricType. + * No metric. */ public static final ValidationMetricType NONE = fromString("None"); /** - * Static value Coco for ValidationMetricType. + * Coco metric. */ public static final ValidationMetricType COCO = fromString("Coco"); /** - * Static value Voc for ValidationMetricType. + * Voc metric. */ public static final ValidationMetricType VOC = fromString("Voc"); /** - * Static value CocoVoc for ValidationMetricType. + * CocoVoc metric. */ public static final ValidationMetricType COCO_VOC = fromString("CocoVoc"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.java deleted file mode 100644 index 38e4b67e45df..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.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.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * format for the workspace connection value. - */ -public final class ValueFormat extends ExpandableStringEnum { - /** - * Static value JSON for ValueFormat. - */ - public static final ValueFormat JSON = fromString("JSON"); - - /** - * Creates a new instance of ValueFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ValueFormat() { - } - - /** - * Creates or finds a ValueFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValueFormat. - */ - public static ValueFormat fromString(String name) { - return fromString(name, ValueFormat.class); - } - - /** - * Gets known ValueFormat values. - * - * @return known ValueFormat values. - */ - public static Collection values() { - return values(ValueFormat.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java index 976a0b7576b7..63ed0b836020 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class VirtualMachine extends Compute { */ private VirtualMachineSchemaProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of VirtualMachine class. */ @@ -91,58 +64,6 @@ public VirtualMachine withProperties(VirtualMachineSchemaProperties properties) return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.provisioningErrors; - } - - /** - * Get the isAttachedCompute property: Indicating whether the compute was provisioned by user and brought from - * outside if true, or machine learning service provisioned it if false. - * - * @return the isAttachedCompute value. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -179,19 +100,6 @@ public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ @@ -225,23 +133,23 @@ public static VirtualMachine fromJson(JsonReader jsonReader) throws IOException if ("computeLocation".equals(fieldName)) { deserializedVirtualMachine.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedVirtualMachine.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedVirtualMachine.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedVirtualMachine.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedVirtualMachine.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedVirtualMachine.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedVirtualMachine.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedVirtualMachine.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedVirtualMachine.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedVirtualMachine.provisioningErrors = provisioningErrors; + deserializedVirtualMachine.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedVirtualMachine.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedVirtualMachine.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedVirtualMachine.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java index 4c26378b85de..9f7ddd6ab2ee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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; @@ -48,20 +47,6 @@ public VirtualMachineImage withId(String id) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model VirtualMachineImage")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineImage.class); - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java deleted file mode 100644 index e138d3304576..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 VirtualMachineSchema model. - */ -@Fluent -public class VirtualMachineSchema implements JsonSerializable { - /* - * The properties property. - */ - private VirtualMachineSchemaProperties properties; - - /** - * Creates an instance of VirtualMachineSchema class. - */ - public VirtualMachineSchema() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public VirtualMachineSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the VirtualMachineSchema object itself. - */ - public VirtualMachineSchema withProperties(VirtualMachineSchemaProperties properties) { - this.properties = properties; - 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.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSchema 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 VirtualMachineSchema. - */ - public static VirtualMachineSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSchema deserializedVirtualMachineSchema = new VirtualMachineSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedVirtualMachineSchema.properties = VirtualMachineSchemaProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java index 8e6a7a887e1b..1b1fcb000e56 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -172,17 +172,6 @@ public VirtualMachineSchemaProperties withIsNotebookInstanceCompute(Boolean isNo return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java index a83c8ed0eb09..28a5adb3d724 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -14,7 +14,7 @@ /** * Secrets related to a Machine Learning compute based on AKS. */ -@Fluent +@Immutable public final class VirtualMachineSecrets extends ComputeSecretsInner { /* * The type of compute @@ -29,7 +29,7 @@ public final class VirtualMachineSecrets extends ComputeSecretsInner { /** * Creates an instance of VirtualMachineSecrets class. */ - public VirtualMachineSecrets() { + private VirtualMachineSecrets() { } /** @@ -51,30 +51,6 @@ public VirtualMachineSshCredentials administratorAccount() { return this.administratorAccount; } - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSecrets object itself. - */ - public VirtualMachineSecrets withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java deleted file mode 100644 index 36e593c1553e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 VirtualMachineSecretsSchema model. - */ -@Fluent -public class VirtualMachineSecretsSchema implements JsonSerializable { - /* - * Admin credentials for virtual machine. - */ - private VirtualMachineSshCredentials administratorAccount; - - /** - * Creates an instance of VirtualMachineSecretsSchema class. - */ - public VirtualMachineSecretsSchema() { - } - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSecretsSchema object itself. - */ - public VirtualMachineSecretsSchema withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("administratorAccount", this.administratorAccount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of VirtualMachineSecretsSchema from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of VirtualMachineSecretsSchema 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 VirtualMachineSecretsSchema. - */ - public static VirtualMachineSecretsSchema fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - VirtualMachineSecretsSchema deserializedVirtualMachineSecretsSchema = new VirtualMachineSecretsSchema(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("administratorAccount".equals(fieldName)) { - deserializedVirtualMachineSecretsSchema.administratorAccount - = VirtualMachineSshCredentials.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedVirtualMachineSecretsSchema; - }); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java index 16c7cd03dd41..0ba9710ebb42 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,59 +15,81 @@ /** * Describes the properties of a VM size. */ -@Fluent +@Immutable public final class VirtualMachineSize implements JsonSerializable { /* + * Virtual Machine size name + * * The name of the virtual machine size. */ private String name; /* + * Virtual Machine family name + * * The family name of the virtual machine size. */ private String family; /* + * Number of vPUs + * * The number of vCPUs supported by the virtual machine size. */ private Integer vCPUs; /* + * Number of gPUs + * * The number of gPUs supported by the virtual machine size. */ private Integer gpus; /* + * OS VHD Disk size + * * The OS VHD disk size, in MB, allowed by the virtual machine size. */ private Integer osVhdSizeMB; /* + * Resource volume size + * * The resource volume size, in MB, allowed by the virtual machine size. */ private Integer maxResourceVolumeMB; /* + * Memory size + * * The amount of memory, in GB, supported by the virtual machine size. */ private Double memoryGB; /* + * Low priority capable + * * Specifies if the virtual machine size supports low priority VMs. */ private Boolean lowPriorityCapable; /* + * Premium IO supported + * * Specifies if the virtual machine size supports premium IO. */ private Boolean premiumIO; /* + * Estimated VM prices + * * The estimated price information for using a VM. */ private EstimatedVMPrices estimatedVMPrices; /* + * Supported Compute Types + * * Specifies the compute types supported by the virtual machine size. */ private List supportedComputeTypes; @@ -75,11 +97,13 @@ public final class VirtualMachineSize implements JsonSerializable supportedComputeTypes() { return this.supportedComputeTypes; } - /** - * Set the supportedComputeTypes property: Specifies the compute types supported by the virtual machine size. - * - * @param supportedComputeTypes the supportedComputeTypes value to set. - * @return the VirtualMachineSize object itself. - */ - public VirtualMachineSize withSupportedComputeTypes(List supportedComputeTypes) { - this.supportedComputeTypes = supportedComputeTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (estimatedVMPrices() != null) { - estimatedVMPrices().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java index 12fcd41fc97a..9a375d10d3de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java index 64fff606cc2c..7d3d2680d34f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -14,7 +14,7 @@ public interface VirtualMachineSizes { /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. @@ -26,7 +26,7 @@ public interface VirtualMachineSizes { /** * Returns supported VM Sizes in a location. * - * @param location The location upon which virtual-machine-sizes is queried. + * @param location The location 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java index dc74b7811d46..82bd870cd5af 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -122,14 +122,6 @@ public VirtualMachineSshCredentials withPrivateKeyData(String privateKeyData) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java index 5752ee71ae0f..b199d58119a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java index feb8f9f5cb4c..e6c4d16bcfae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,11 +12,13 @@ import java.io.IOException; /** - * Describes the volume configuration for the container. + * The VolumeDefinition model. */ @Fluent public final class VolumeDefinition implements JsonSerializable { /* + * Type of Volume Definition + * * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe */ private VolumeDefinitionType type; @@ -63,7 +65,9 @@ public VolumeDefinition() { } /** - * Get the type property: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + * Get the type property: Type of Volume Definition + * + * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. * * @return the type value. */ @@ -72,7 +76,9 @@ public VolumeDefinitionType type() { } /** - * Set the type property: Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. + * Set the type property: Type of Volume Definition + * + * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. * * @param type the type value to set. * @return the VolumeDefinition object itself. @@ -222,23 +228,6 @@ public VolumeDefinition withTmpfs(TmpfsOptions tmpfs) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (bind() != null) { - bind().validate(); - } - if (volume() != null) { - volume().validate(); - } - if (tmpfs() != null) { - tmpfs().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java index 531e3e662723..c6fed82253d2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -8,8 +8,6 @@ import java.util.Collection; /** - * Type of Volume Definition - * * Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe. */ public final class VolumeDefinitionType extends ExpandableStringEnum { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java index 3dd898251bce..907ac709e7e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Describes the volume options for the container. + * The VolumeOptions model. */ @Fluent public final class VolumeOptions implements JsonSerializable { @@ -47,14 +47,6 @@ public VolumeOptions withNocopy(Boolean nocopy) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java new file mode 100644 index 000000000000..54817112c690 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java @@ -0,0 +1,419 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The VulnerabilityDetails model. + */ +@Fluent +public final class VulnerabilityDetails implements JsonSerializable { + /* + * CVE id. + */ + private String cve; + + /* + * CVE url. + */ + private String cveUrl; + + /* + * DueDate for vulnerability. Provider data or PublishDate + 30 days. + */ + private OffsetDateTime dueDate; + + /* + * Vulnerability ID. + */ + private String id; + + /* + * Dependency details. + */ + private List packageDetails; + + /* + * Indicates if there is a known patch for vulnerability. + */ + private Boolean patchable; + + /* + * Vulnerability ID from provider. + */ + private String providerId; + + /* + * Vulnerability publish date. + */ + private OffsetDateTime publishDate; + + /* + * Vulnerability Risk value. + */ + private VulnerabilityRisk risk; + + /* + * Vulnerability description. + */ + private String solution; + + /* + * Vulnerability name. + */ + private String title; + + /* + * Vendor vulnerability ID (USN, GH Advisory, etc). + */ + private String vendorId; + + /* + * Vendor vulnerability url. + */ + private String vendorUrl; + + /** + * Creates an instance of VulnerabilityDetails class. + */ + public VulnerabilityDetails() { + } + + /** + * Get the cve property: CVE id. + * + * @return the cve value. + */ + public String cve() { + return this.cve; + } + + /** + * Set the cve property: CVE id. + * + * @param cve the cve value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withCve(String cve) { + this.cve = cve; + return this; + } + + /** + * Get the cveUrl property: CVE url. + * + * @return the cveUrl value. + */ + public String cveUrl() { + return this.cveUrl; + } + + /** + * Set the cveUrl property: CVE url. + * + * @param cveUrl the cveUrl value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withCveUrl(String cveUrl) { + this.cveUrl = cveUrl; + return this; + } + + /** + * Get the dueDate property: DueDate for vulnerability. Provider data or PublishDate + 30 days. + * + * @return the dueDate value. + */ + public OffsetDateTime dueDate() { + return this.dueDate; + } + + /** + * Set the dueDate property: DueDate for vulnerability. Provider data or PublishDate + 30 days. + * + * @param dueDate the dueDate value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withDueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + return this; + } + + /** + * Get the id property: Vulnerability ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the packageDetails property: Dependency details. + * + * @return the packageDetails value. + */ + public List packageDetails() { + return this.packageDetails; + } + + /** + * Set the packageDetails property: Dependency details. + * + * @param packageDetails the packageDetails value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withPackageDetails(List packageDetails) { + this.packageDetails = packageDetails; + return this; + } + + /** + * Get the patchable property: Indicates if there is a known patch for vulnerability. + * + * @return the patchable value. + */ + public Boolean patchable() { + return this.patchable; + } + + /** + * Set the patchable property: Indicates if there is a known patch for vulnerability. + * + * @param patchable the patchable value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withPatchable(Boolean patchable) { + this.patchable = patchable; + return this; + } + + /** + * Get the providerId property: Vulnerability ID from provider. + * + * @return the providerId value. + */ + public String providerId() { + return this.providerId; + } + + /** + * Set the providerId property: Vulnerability ID from provider. + * + * @param providerId the providerId value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withProviderId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Get the publishDate property: Vulnerability publish date. + * + * @return the publishDate value. + */ + public OffsetDateTime publishDate() { + return this.publishDate; + } + + /** + * Set the publishDate property: Vulnerability publish date. + * + * @param publishDate the publishDate value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withPublishDate(OffsetDateTime publishDate) { + this.publishDate = publishDate; + return this; + } + + /** + * Get the risk property: Vulnerability Risk value. + * + * @return the risk value. + */ + public VulnerabilityRisk risk() { + return this.risk; + } + + /** + * Set the risk property: Vulnerability Risk value. + * + * @param risk the risk value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withRisk(VulnerabilityRisk risk) { + this.risk = risk; + return this; + } + + /** + * Get the solution property: Vulnerability description. + * + * @return the solution value. + */ + public String solution() { + return this.solution; + } + + /** + * Set the solution property: Vulnerability description. + * + * @param solution the solution value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withSolution(String solution) { + this.solution = solution; + return this; + } + + /** + * Get the title property: Vulnerability name. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Vulnerability name. + * + * @param title the title value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the vendorId property: Vendor vulnerability ID (USN, GH Advisory, etc). + * + * @return the vendorId value. + */ + public String vendorId() { + return this.vendorId; + } + + /** + * Set the vendorId property: Vendor vulnerability ID (USN, GH Advisory, etc). + * + * @param vendorId the vendorId value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withVendorId(String vendorId) { + this.vendorId = vendorId; + return this; + } + + /** + * Get the vendorUrl property: Vendor vulnerability url. + * + * @return the vendorUrl value. + */ + public String vendorUrl() { + return this.vendorUrl; + } + + /** + * Set the vendorUrl property: Vendor vulnerability url. + * + * @param vendorUrl the vendorUrl value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withVendorUrl(String vendorUrl) { + this.vendorUrl = vendorUrl; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("cve", this.cve); + jsonWriter.writeStringField("cveUrl", this.cveUrl); + jsonWriter.writeStringField("dueDate", + this.dueDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.dueDate)); + jsonWriter.writeArrayField("packageDetails", this.packageDetails, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("patchable", this.patchable); + jsonWriter.writeStringField("providerId", this.providerId); + jsonWriter.writeStringField("publishDate", + this.publishDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.publishDate)); + jsonWriter.writeStringField("risk", this.risk == null ? null : this.risk.toString()); + jsonWriter.writeStringField("solution", this.solution); + jsonWriter.writeStringField("title", this.title); + jsonWriter.writeStringField("vendorId", this.vendorId); + jsonWriter.writeStringField("vendorUrl", this.vendorUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityDetails 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 VulnerabilityDetails. + */ + public static VulnerabilityDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityDetails deserializedVulnerabilityDetails = new VulnerabilityDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cve".equals(fieldName)) { + deserializedVulnerabilityDetails.cve = reader.getString(); + } else if ("cveUrl".equals(fieldName)) { + deserializedVulnerabilityDetails.cveUrl = reader.getString(); + } else if ("dueDate".equals(fieldName)) { + deserializedVulnerabilityDetails.dueDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("id".equals(fieldName)) { + deserializedVulnerabilityDetails.id = reader.getString(); + } else if ("packageDetails".equals(fieldName)) { + List packageDetails = reader.readArray(reader1 -> PackageDetails.fromJson(reader1)); + deserializedVulnerabilityDetails.packageDetails = packageDetails; + } else if ("patchable".equals(fieldName)) { + deserializedVulnerabilityDetails.patchable = reader.getNullable(JsonReader::getBoolean); + } else if ("providerId".equals(fieldName)) { + deserializedVulnerabilityDetails.providerId = reader.getString(); + } else if ("publishDate".equals(fieldName)) { + deserializedVulnerabilityDetails.publishDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("risk".equals(fieldName)) { + deserializedVulnerabilityDetails.risk = VulnerabilityRisk.fromString(reader.getString()); + } else if ("solution".equals(fieldName)) { + deserializedVulnerabilityDetails.solution = reader.getString(); + } else if ("title".equals(fieldName)) { + deserializedVulnerabilityDetails.title = reader.getString(); + } else if ("vendorId".equals(fieldName)) { + deserializedVulnerabilityDetails.vendorId = reader.getString(); + } else if ("vendorUrl".equals(fieldName)) { + deserializedVulnerabilityDetails.vendorUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityDetails; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java new file mode 100644 index 000000000000..437c86616f2e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The VulnerabilityFindings model. + */ +@Fluent +public final class VulnerabilityFindings implements JsonSerializable { + /* + * AssetId (Image digest). + */ + private String assetId; + + /* + * Number of critical findings. + */ + private Integer criticalFindingsCount; + + /* + * List of vulnerability findings. + */ + private List data; + + /* + * Time the report was generated. + */ + private OffsetDateTime generatedTime; + + /* + * Number of high findings. + */ + private Integer highFindingsCount; + + /* + * Scan result date. + */ + private OffsetDateTime lastScanDate; + + /* + * Vulnerability scanner name. + */ + private String scanner; + + /* + * Data source (internal). + */ + private String source; + + /* + * Total findings count. + */ + private Integer totalFindingsCount; + + /** + * Creates an instance of VulnerabilityFindings class. + */ + public VulnerabilityFindings() { + } + + /** + * Get the assetId property: AssetId (Image digest). + * + * @return the assetId value. + */ + public String assetId() { + return this.assetId; + } + + /** + * Set the assetId property: AssetId (Image digest). + * + * @param assetId the assetId value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withAssetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get the criticalFindingsCount property: Number of critical findings. + * + * @return the criticalFindingsCount value. + */ + public Integer criticalFindingsCount() { + return this.criticalFindingsCount; + } + + /** + * Get the data property: List of vulnerability findings. + * + * @return the data value. + */ + public List data() { + return this.data; + } + + /** + * Set the data property: List of vulnerability findings. + * + * @param data the data value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withData(List data) { + this.data = data; + return this; + } + + /** + * Get the generatedTime property: Time the report was generated. + * + * @return the generatedTime value. + */ + public OffsetDateTime generatedTime() { + return this.generatedTime; + } + + /** + * Set the generatedTime property: Time the report was generated. + * + * @param generatedTime the generatedTime value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withGeneratedTime(OffsetDateTime generatedTime) { + this.generatedTime = generatedTime; + return this; + } + + /** + * Get the highFindingsCount property: Number of high findings. + * + * @return the highFindingsCount value. + */ + public Integer highFindingsCount() { + return this.highFindingsCount; + } + + /** + * Get the lastScanDate property: Scan result date. + * + * @return the lastScanDate value. + */ + public OffsetDateTime lastScanDate() { + return this.lastScanDate; + } + + /** + * Set the lastScanDate property: Scan result date. + * + * @param lastScanDate the lastScanDate value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withLastScanDate(OffsetDateTime lastScanDate) { + this.lastScanDate = lastScanDate; + return this; + } + + /** + * Get the scanner property: Vulnerability scanner name. + * + * @return the scanner value. + */ + public String scanner() { + return this.scanner; + } + + /** + * Set the scanner property: Vulnerability scanner name. + * + * @param scanner the scanner value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withScanner(String scanner) { + this.scanner = scanner; + return this; + } + + /** + * Get the source property: Data source (internal). + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Data source (internal). + * + * @param source the source value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the totalFindingsCount property: Total findings count. + * + * @return the totalFindingsCount value. + */ + public Integer totalFindingsCount() { + return this.totalFindingsCount; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("assetId", this.assetId); + jsonWriter.writeArrayField("data", this.data, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("generatedTime", + this.generatedTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.generatedTime)); + jsonWriter.writeStringField("lastScanDate", + this.lastScanDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastScanDate)); + jsonWriter.writeStringField("scanner", this.scanner); + jsonWriter.writeStringField("source", this.source); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityFindings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityFindings 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 VulnerabilityFindings. + */ + public static VulnerabilityFindings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityFindings deserializedVulnerabilityFindings = new VulnerabilityFindings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("assetId".equals(fieldName)) { + deserializedVulnerabilityFindings.assetId = reader.getString(); + } else if ("criticalFindingsCount".equals(fieldName)) { + deserializedVulnerabilityFindings.criticalFindingsCount = reader.getNullable(JsonReader::getInt); + } else if ("data".equals(fieldName)) { + List data + = reader.readArray(reader1 -> VulnerabilityDetails.fromJson(reader1)); + deserializedVulnerabilityFindings.data = data; + } else if ("generatedTime".equals(fieldName)) { + deserializedVulnerabilityFindings.generatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("highFindingsCount".equals(fieldName)) { + deserializedVulnerabilityFindings.highFindingsCount = reader.getNullable(JsonReader::getInt); + } else if ("lastScanDate".equals(fieldName)) { + deserializedVulnerabilityFindings.lastScanDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("scanner".equals(fieldName)) { + deserializedVulnerabilityFindings.scanner = reader.getString(); + } else if ("source".equals(fieldName)) { + deserializedVulnerabilityFindings.source = reader.getString(); + } else if ("totalFindingsCount".equals(fieldName)) { + deserializedVulnerabilityFindings.totalFindingsCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityFindings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java new file mode 100644 index 000000000000..196024b51de6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for VulnerabilityRisk. + */ +public final class VulnerabilityRisk extends ExpandableStringEnum { + /** + * Static value UNKNOWN for VulnerabilityRisk. + */ + public static final VulnerabilityRisk UNKNOWN = fromString("UNKNOWN"); + + /** + * Static value CRITICAL for VulnerabilityRisk. + */ + public static final VulnerabilityRisk CRITICAL = fromString("CRITICAL"); + + /** + * Static value HIGH for VulnerabilityRisk. + */ + public static final VulnerabilityRisk HIGH = fromString("HIGH"); + + /** + * Static value MEDIUM for VulnerabilityRisk. + */ + public static final VulnerabilityRisk MEDIUM = fromString("MEDIUM"); + + /** + * Static value LOW for VulnerabilityRisk. + */ + public static final VulnerabilityRisk LOW = fromString("LOW"); + + /** + * Creates a new instance of VulnerabilityRisk value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VulnerabilityRisk() { + } + + /** + * Creates or finds a VulnerabilityRisk from its string representation. + * + * @param name a name to look for. + * @return the corresponding VulnerabilityRisk. + */ + public static VulnerabilityRisk fromString(String name) { + return fromString(name, VulnerabilityRisk.class); + } + + /** + * Gets known VulnerabilityRisk values. + * + * @return known VulnerabilityRisk values. + */ + public static Collection values() { + return values(VulnerabilityRisk.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java index d651cec6663b..3919809e65bb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -61,14 +61,6 @@ public Webhook withEventType(String eventType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java index cd619bcfcb41..ed343c78ab59 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java index 61743ceadefa..7985edd81114 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,37 +12,37 @@ */ public final class WeekDay extends ExpandableStringEnum { /** - * Static value Monday for WeekDay. + * Monday weekday. */ public static final WeekDay MONDAY = fromString("Monday"); /** - * Static value Tuesday for WeekDay. + * Tuesday weekday. */ public static final WeekDay TUESDAY = fromString("Tuesday"); /** - * Static value Wednesday for WeekDay. + * Wednesday weekday. */ public static final WeekDay WEDNESDAY = fromString("Wednesday"); /** - * Static value Thursday for WeekDay. + * Thursday weekday. */ public static final WeekDay THURSDAY = fromString("Thursday"); /** - * Static value Friday for WeekDay. + * Friday weekday. */ public static final WeekDay FRIDAY = fromString("Friday"); /** - * Static value Saturday for WeekDay. + * Saturday weekday. */ public static final WeekDay SATURDAY = fromString("Saturday"); /** - * Static value Sunday for WeekDay. + * Sunday weekday. */ public static final WeekDay SUNDAY = fromString("Sunday"); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java index 6b1658e955b3..7b97668e34b4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -39,7 +39,7 @@ public interface Workspace { String type(); /** - * Gets the identity property: The identity of the resource. + * Gets the identity property: The managed service identities assigned to this resource. * * @return the identity value. */ @@ -53,25 +53,26 @@ public interface Workspace { String kind(); /** - * Gets the location property: Specifies the location of the resource. + * Gets the location property: The location property. * * @return the location value. */ String location(); /** - * Gets the tags property: Contains resource tags defined as key/value pairs. + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. * - * @return the tags value. + * @return the sku value. */ - Map tags(); + Sku sku(); /** - * Gets the sku property: The sku of the workspace. + * Gets the tags property: The tags property. * - * @return the sku value. + * @return the tags value. */ - Sku sku(); + Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -81,40 +82,48 @@ public interface Workspace { SystemData systemData(); /** - * Gets the workspaceId property: The immutable id associated with this workspace. + * Gets the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - String workspaceId(); + String agentsEndpointUri(); /** - * Gets the description property: The description of this workspace. + * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. * - * @return the description value. + * @return the allowPublicAccessWhenBehindVnet value. */ - String description(); + Boolean allowPublicAccessWhenBehindVnet(); /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * Gets the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - String friendlyName(); + Boolean allowRoleAssignmentOnRG(); /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - String keyVault(); + String applicationInsights(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * Gets the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - String applicationInsights(); + List associatedWorkspaces(); + + /** + * Gets the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + List containerRegistries(); /** * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. @@ -124,12 +133,11 @@ public interface Workspace { String containerRegistry(); /** - * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * Gets the description property: The description of this workspace. * - * @return the storageAccount value. + * @return the description value. */ - String storageAccount(); + String description(); /** * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning @@ -140,42 +148,76 @@ public interface Workspace { String discoveryUrl(); /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. + * Gets the enableDataIsolation property: The enableDataIsolation property. * - * @return the provisioningState value. + * @return the enableDataIsolation value. */ - ProvisioningState provisioningState(); + Boolean enableDataIsolation(); + + /** + * Gets the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. + * + * @return the enableServiceSideCmkEncryption value. + */ + Boolean enableServiceSideCmkEncryption(); + + /** + * Gets the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. + * + * @return the enableSimplifiedCmk value. + */ + Boolean enableSimplifiedCmk(); /** - * Gets the encryption property: The encryption settings of Azure ML workspace. + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + Boolean enableSoftwareBillOfMaterials(); + + /** + * Gets the encryption property: The encryption property. * * @return the encryption value. */ EncryptionProperty encryption(); /** - * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Gets the existingWorkspaces property: The existingWorkspaces property. * - * @return the hbiWorkspace value. + * @return the existingWorkspaces value. */ - Boolean hbiWorkspace(); + List existingWorkspaces(); /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Gets the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the featureStoreSettings value. */ - String serviceProvisionedResourceGroup(); + FeatureStoreSettings featureStoreSettings(); /** - * Gets the privateLinkCount property: Count of private connections in the workspace. + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the privateLinkCount value. + * @return the friendlyName value. */ - Integer privateLinkCount(); + String friendlyName(); + + /** + * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. + * + * @return the hbiWorkspace value. + */ + Boolean hbiWorkspace(); + + /** + * Gets the hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. + */ + String hubResourceId(); /** * Gets the imageBuildCompute property: The compute name for image build. @@ -185,54 +227,55 @@ public interface Workspace { String imageBuildCompute(); /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the ipAllowlist value. */ - Boolean allowPublicAccessWhenBehindVnet(); + List ipAllowlist(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. * - * @return the publicNetworkAccess value. + * @return the keyVault value. */ - PublicNetworkAccess publicNetworkAccess(); + String keyVault(); /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * Gets the keyVaults property: The keyVaults property. * - * @return the privateEndpointConnections value. + * @return the keyVaults value. */ - List privateEndpointConnections(); + List keyVaults(); /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the managedNetwork property: The managedNetwork property. * - * @return the serverlessComputeSettings value. + * @return the managedNetwork value. */ - ServerlessComputeSettings serverlessComputeSettings(); + ManagedNetworkSettings managedNetwork(); /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. * - * @return the sharedPrivateLinkResources value. + * @return the mlFlowTrackingUri value. */ - List sharedPrivateLinkResources(); + String mlFlowTrackingUri(); /** - * Gets the notebookInfo property: The notebook info of Azure ML workspace. + * Gets the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the notebookInfo value. + * @return the networkAcls value. */ - NotebookResourceInfo notebookInfo(); + NetworkAcls networkAcls(); /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the notebookInfo property: The notebook info of Azure ML workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the notebookInfo value. */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); + NotebookResourceInfo notebookInfo(); /** * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the @@ -243,70 +286,123 @@ public interface Workspace { String primaryUserAssignedIdentity(); /** - * Gets the tenantId property: The tenant id associated with this workspace. + * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the tenantId value. + * @return the privateEndpointConnections value. */ - String tenantId(); + List privateEndpointConnections(); /** - * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Gets the privateLinkCount property: Count of private connections in the workspace. * - * @return the storageHnsEnabled value. + * @return the privateLinkCount value. */ - Boolean storageHnsEnabled(); + Integer privateLinkCount(); /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * Gets the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the mlFlowTrackingUri value. + * @return the provisionNetworkNow value. */ - String mlFlowTrackingUri(); + Boolean provisionNetworkNow(); /** - * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. * - * @return the v1LegacyMode value. + * @return the provisioningState value. */ - Boolean v1LegacyMode(); + ProvisioningState provisioningState(); /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the managedNetwork value. + * @return the publicNetworkAccess value. */ - ManagedNetworkSettings managedNetwork(); + PublicNetworkAccess publicNetworkAccess(); /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the featureStoreSettings value. + * @return the serverlessComputeSettings value. */ - FeatureStoreSettings featureStoreSettings(); + ServerlessComputeSettings serverlessComputeSettings(); /** - * Gets the associatedWorkspaces property: The associatedWorkspaces property. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the associatedWorkspaces value. + * @return the serviceManagedResourcesSettings value. */ - List associatedWorkspaces(); + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the enableDataIsolation property: The enableDataIsolation property. + * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. * - * @return the enableDataIsolation value. + * @return the serviceProvisionedResourceGroup value. */ - Boolean enableDataIsolation(); + String serviceProvisionedResourceGroup(); /** - * Gets the hubResourceId property: The hubResourceId property. + * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * - * @return the hubResourceId value. + * @return the sharedPrivateLinkResources value. */ - String hubResourceId(); + List sharedPrivateLinkResources(); + + /** + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + Integer softDeleteRetentionInDays(); + + /** + * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @return the storageAccount value. + */ + String storageAccount(); + + /** + * Gets the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + List storageAccounts(); + + /** + * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) + * enabled. + * + * @return the storageHnsEnabled value. + */ + Boolean storageHnsEnabled(); + + /** + * Gets the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + SystemDatastoresAuthMode systemDatastoresAuthMode(); + + /** + * Gets the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + Boolean v1LegacyMode(); /** * Gets the workspaceHubConfig property: WorkspaceHub's configuration object. @@ -315,6 +411,13 @@ public interface Workspace { */ WorkspaceHubConfig workspaceHubConfig(); + /** + * Gets the workspaceId property: The immutable id associated with this workspace. + * + * @return the workspaceId value. + */ + String workspaceId(); + /** * Gets the region of the resource. * @@ -379,17 +482,23 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, DefinitionStages.WithKeyVault, DefinitionStages.WithApplicationInsights, - DefinitionStages.WithContainerRegistry, DefinitionStages.WithStorageAccount, - DefinitionStages.WithDiscoveryUrl, DefinitionStages.WithEncryption, DefinitionStages.WithHbiWorkspace, - DefinitionStages.WithImageBuildCompute, DefinitionStages.WithAllowPublicAccessWhenBehindVnet, + DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithAllowPublicAccessWhenBehindVnet, + DefinitionStages.WithAllowRoleAssignmentOnRG, DefinitionStages.WithApplicationInsights, + DefinitionStages.WithAssociatedWorkspaces, DefinitionStages.WithContainerRegistries, + DefinitionStages.WithContainerRegistry, DefinitionStages.WithDescription, DefinitionStages.WithDiscoveryUrl, + DefinitionStages.WithEnableDataIsolation, DefinitionStages.WithEnableServiceSideCmkEncryption, + DefinitionStages.WithEnableSimplifiedCmk, DefinitionStages.WithEnableSoftwareBillOfMaterials, + DefinitionStages.WithEncryption, DefinitionStages.WithExistingWorkspaces, + DefinitionStages.WithFeatureStoreSettings, DefinitionStages.WithFriendlyName, + DefinitionStages.WithHbiWorkspace, DefinitionStages.WithHubResourceId, + DefinitionStages.WithImageBuildCompute, DefinitionStages.WithIpAllowlist, DefinitionStages.WithKeyVault, + DefinitionStages.WithKeyVaults, DefinitionStages.WithManagedNetwork, DefinitionStages.WithNetworkAcls, + DefinitionStages.WithPrimaryUserAssignedIdentity, DefinitionStages.WithProvisionNetworkNow, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithServerlessComputeSettings, - DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity, DefinitionStages.WithV1LegacyMode, - DefinitionStages.WithManagedNetwork, DefinitionStages.WithFeatureStoreSettings, - DefinitionStages.WithAssociatedWorkspaces, DefinitionStages.WithEnableDataIsolation, - DefinitionStages.WithHubResourceId, DefinitionStages.WithWorkspaceHubConfig { + DefinitionStages.WithServiceManagedResourcesSettings, DefinitionStages.WithSharedPrivateLinkResources, + DefinitionStages.WithSoftDeleteRetentionInDays, DefinitionStages.WithStorageAccount, + DefinitionStages.WithStorageAccounts, DefinitionStages.WithSystemDatastoresAuthMode, + DefinitionStages.WithV1LegacyMode, DefinitionStages.WithWorkspaceHubConfig { /** * Executes the create request. * @@ -413,7 +522,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Specifies the location of the resource. + * @param location The location property. * @return the next definition stage. */ WithCreate withRegion(Region location); @@ -421,7 +530,7 @@ interface WithLocation { /** * Specifies the region for the resource. * - * @param location Specifies the location of the resource. + * @param location The location property. * @return the next definition stage. */ WithCreate withRegion(String location); @@ -432,9 +541,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. + * Specifies the tags property: The tags property.. * - * @param tags Contains resource tags defined as key/value pairs. + * @param tags The tags property. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -445,9 +554,9 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the identity property: The managed service identities assigned to this resource.. * - * @param identity The identity of the resource. + * @param identity The managed service identities assigned to this resource. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); @@ -471,67 +580,84 @@ interface WithKind { */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. * - * @param sku The sku of the workspace. + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ WithCreate withSku(Sku sku); } /** - * The stage of the Workspace definition allowing to specify description. + * The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. */ - interface WithDescription { + interface WithAllowPublicAccessWhenBehindVnet { /** - * Specifies the description property: The description of this workspace.. + * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public + * access when behind VNet.. * - * @param description The description of this workspace. + * @param allowPublicAccessWhenBehindVnet The flag to indicate whether to allow public access when behind + * VNet. * @return the next definition stage. */ - WithCreate withDescription(String description); + WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); } /** - * The stage of the Workspace definition allowing to specify friendlyName. + * The stage of the Workspace definition allowing to specify allowRoleAssignmentOnRG. */ - interface WithFriendlyName { + interface WithAllowRoleAssignmentOnRG { /** - * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. + * Specifies the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment + * for the workspace MSI on resource group level.. * - * @param friendlyName The friendly name for this workspace. This name in mutable. + * @param allowRoleAssignmentOnRG The flag to indicate whether we will do role assignment for the workspace + * MSI on resource group level. * @return the next definition stage. */ - WithCreate withFriendlyName(String friendlyName); + WithCreate withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG); } /** - * The stage of the Workspace definition allowing to specify keyVault. + * The stage of the Workspace definition allowing to specify applicationInsights. */ - interface WithKeyVault { + interface WithApplicationInsights { /** - * Specifies the keyVault property: ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created. + * Specifies the applicationInsights property: ARM id of the application insights associated with this + * workspace.. * - * @param keyVault ARM id of the key vault associated with this workspace. This cannot be changed once the - * workspace has been created. + * @param applicationInsights ARM id of the application insights associated with this workspace. * @return the next definition stage. */ - WithCreate withKeyVault(String keyVault); + WithCreate withApplicationInsights(String applicationInsights); } /** - * The stage of the Workspace definition allowing to specify applicationInsights. + * The stage of the Workspace definition allowing to specify associatedWorkspaces. */ - interface WithApplicationInsights { + interface WithAssociatedWorkspaces { /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. + * Specifies the associatedWorkspaces property: The associatedWorkspaces property.. * - * @param applicationInsights ARM id of the application insights associated with this workspace. + * @param associatedWorkspaces The associatedWorkspaces property. * @return the next definition stage. */ - WithCreate withApplicationInsights(String applicationInsights); + WithCreate withAssociatedWorkspaces(List associatedWorkspaces); + } + + /** + * The stage of the Workspace definition allowing to specify containerRegistries. + */ + interface WithContainerRegistries { + /** + * Specifies the containerRegistries property: The containerRegistries property.. + * + * @param containerRegistries The containerRegistries property. + * @return the next definition stage. + */ + WithCreate withContainerRegistries(List containerRegistries); } /** @@ -549,18 +675,16 @@ interface WithContainerRegistry { } /** - * The stage of the Workspace definition allowing to specify storageAccount. + * The stage of the Workspace definition allowing to specify description. */ - interface WithStorageAccount { + interface WithDescription { /** - * Specifies the storageAccount property: ARM id of the storage account associated with this workspace. This - * cannot be changed once the workspace has been created. + * Specifies the description property: The description of this workspace.. * - * @param storageAccount ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * @param description The description of this workspace. * @return the next definition stage. */ - WithCreate withStorageAccount(String storageAccount); + WithCreate withDescription(String description); } /** @@ -578,19 +702,113 @@ interface WithDiscoveryUrl { WithCreate withDiscoveryUrl(String discoveryUrl); } + /** + * The stage of the Workspace definition allowing to specify enableDataIsolation. + */ + interface WithEnableDataIsolation { + /** + * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * + * @param enableDataIsolation The enableDataIsolation property. + * @return the next definition stage. + */ + WithCreate withEnableDataIsolation(Boolean enableDataIsolation); + } + + /** + * The stage of the Workspace definition allowing to specify enableServiceSideCmkEncryption. + */ + interface WithEnableServiceSideCmkEncryption { + /** + * Specifies the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property.. + * + * @param enableServiceSideCmkEncryption The enableServiceSideCMKEncryption property. + * @return the next definition stage. + */ + WithCreate withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption); + } + + /** + * The stage of the Workspace definition allowing to specify enableSimplifiedCmk. + */ + interface WithEnableSimplifiedCmk { + /** + * Specifies the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this + * workspace.. + * + * @param enableSimplifiedCmk Flag to tell if simplified CMK should be enabled for this workspace. + * @return the next definition stage. + */ + WithCreate withEnableSimplifiedCmk(Boolean enableSimplifiedCmk); + } + + /** + * The stage of the Workspace definition allowing to specify enableSoftwareBillOfMaterials. + */ + interface WithEnableSoftwareBillOfMaterials { + /** + * Specifies the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be + * enabled for this workspace.. + * + * @param enableSoftwareBillOfMaterials Flag to tell if SoftwareBillOfMaterials should be enabled for this + * workspace. + * @return the next definition stage. + */ + WithCreate withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials); + } + /** * The stage of the Workspace definition allowing to specify encryption. */ interface WithEncryption { /** - * Specifies the encryption property: The encryption settings of Azure ML workspace.. + * Specifies the encryption property: The encryption property.. * - * @param encryption The encryption settings of Azure ML workspace. + * @param encryption The encryption property. * @return the next definition stage. */ WithCreate withEncryption(EncryptionProperty encryption); } + /** + * The stage of the Workspace definition allowing to specify existingWorkspaces. + */ + interface WithExistingWorkspaces { + /** + * Specifies the existingWorkspaces property: The existingWorkspaces property.. + * + * @param existingWorkspaces The existingWorkspaces property. + * @return the next definition stage. + */ + WithCreate withExistingWorkspaces(List existingWorkspaces); + } + + /** + * The stage of the Workspace definition allowing to specify featureStoreSettings. + */ + interface WithFeatureStoreSettings { + /** + * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * + * @param featureStoreSettings Settings for feature store type workspace. + * @return the next definition stage. + */ + WithCreate withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + } + + /** + * The stage of the Workspace definition allowing to specify friendlyName. + */ + interface WithFriendlyName { + /** + * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. + * + * @param friendlyName The friendly name for this workspace. This name in mutable. + * @return the next definition stage. + */ + WithCreate withFriendlyName(String friendlyName); + } + /** * The stage of the Workspace definition allowing to specify hbiWorkspace. */ @@ -606,6 +824,19 @@ interface WithHbiWorkspace { WithCreate withHbiWorkspace(Boolean hbiWorkspace); } + /** + * The stage of the Workspace definition allowing to specify hubResourceId. + */ + interface WithHubResourceId { + /** + * Specifies the hubResourceId property: The hubResourceId property.. + * + * @param hubResourceId The hubResourceId property. + * @return the next definition stage. + */ + WithCreate withHubResourceId(String hubResourceId); + } + /** * The stage of the Workspace definition allowing to specify imageBuildCompute. */ @@ -620,73 +851,70 @@ interface WithImageBuildCompute { } /** - * The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. + * The stage of the Workspace definition allowing to specify ipAllowlist. */ - interface WithAllowPublicAccessWhenBehindVnet { + interface WithIpAllowlist { /** - * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public - * access when behind VNet.. + * Specifies the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace.. * - * @param allowPublicAccessWhenBehindVnet The flag to indicate whether to allow public access when behind - * VNet. + * @param ipAllowlist The list of IPv4 addresses that are allowed to access the workspace. * @return the next definition stage. */ - WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); + WithCreate withIpAllowlist(List ipAllowlist); } /** - * The stage of the Workspace definition allowing to specify publicNetworkAccess. + * The stage of the Workspace definition allowing to specify keyVault. */ - interface WithPublicNetworkAccess { + interface WithKeyVault { /** - * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. + * Specifies the keyVault property: ARM id of the key vault associated with this workspace. This cannot be + * changed once the workspace has been created. * - * @param publicNetworkAccess Whether requests from Public Network are allowed. + * @param keyVault ARM id of the key vault associated with this workspace. This cannot be changed once the + * workspace has been created. * @return the next definition stage. */ - WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + WithCreate withKeyVault(String keyVault); } /** - * The stage of the Workspace definition allowing to specify serverlessComputeSettings. + * The stage of the Workspace definition allowing to specify keyVaults. */ - interface WithServerlessComputeSettings { + interface WithKeyVaults { /** - * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the - * workspace. + * Specifies the keyVaults property: The keyVaults property.. * - * @param serverlessComputeSettings Settings for serverless compute created in the workspace. + * @param keyVaults The keyVaults property. * @return the next definition stage. */ - WithCreate withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + WithCreate withKeyVaults(List keyVaults); } /** - * The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. + * The stage of the Workspace definition allowing to specify managedNetwork. */ - interface WithSharedPrivateLinkResources { + interface WithManagedNetwork { /** - * Specifies the sharedPrivateLinkResources property: The list of shared private link resources in this - * workspace.. + * Specifies the managedNetwork property: The managedNetwork property.. * - * @param sharedPrivateLinkResources The list of shared private link resources in this workspace. + * @param managedNetwork The managedNetwork property. * @return the next definition stage. */ - WithCreate withSharedPrivateLinkResources(List sharedPrivateLinkResources); + WithCreate withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); } /** - * The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. + * The stage of the Workspace definition allowing to specify networkAcls. */ - interface WithServiceManagedResourcesSettings { + interface WithNetworkAcls { /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * Specifies the networkAcls property: A set of rules governing the network accessibility of the workspace.. * - * @param serviceManagedResourcesSettings The service managed resource settings. + * @param networkAcls A set of rules governing the network accessibility of the workspace. * @return the next definition stage. */ - WithCreate - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); + WithCreate withNetworkAcls(NetworkAcls networkAcls); } /** @@ -705,82 +933,142 @@ interface WithPrimaryUserAssignedIdentity { } /** - * The stage of the Workspace definition allowing to specify v1LegacyMode. + * The stage of the Workspace definition allowing to specify provisionNetworkNow. */ - interface WithV1LegacyMode { + interface WithProvisionNetworkNow { /** - * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided - * by the v2 API.. + * Specifies the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the + * default Options when creating a Workspace with the managed VNet enabled, or else it does nothing.. * - * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + * @param provisionNetworkNow Set to trigger the provisioning of the managed VNet with the default Options + * when creating a Workspace with the managed VNet enabled, or else it does nothing. * @return the next definition stage. */ - WithCreate withV1LegacyMode(Boolean v1LegacyMode); + WithCreate withProvisionNetworkNow(Boolean provisionNetworkNow); + } + + /** + * The stage of the Workspace definition allowing to specify publicNetworkAccess. + */ + interface WithPublicNetworkAccess { + /** + * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. + * + * @param publicNetworkAccess Whether requests from Public Network are allowed. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + } + + /** + * The stage of the Workspace definition allowing to specify serverlessComputeSettings. + */ + interface WithServerlessComputeSettings { + /** + * Specifies the serverlessComputeSettings property: Settings for serverless compute in a workspace. + * + * @param serverlessComputeSettings Settings for serverless compute in a workspace. + * @return the next definition stage. + */ + WithCreate withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + } + + /** + * The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. + */ + interface WithServiceManagedResourcesSettings { + /** + * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * + * @param serviceManagedResourcesSettings The service managed resource settings. + * @return the next definition stage. + */ + WithCreate + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); + } + + /** + * The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. + */ + interface WithSharedPrivateLinkResources { + /** + * Specifies the sharedPrivateLinkResources property: The list of shared private link resources in this + * workspace.. + * + * @param sharedPrivateLinkResources The list of shared private link resources in this workspace. + * @return the next definition stage. + */ + WithCreate withSharedPrivateLinkResources(List sharedPrivateLinkResources); } /** - * The stage of the Workspace definition allowing to specify managedNetwork. + * The stage of the Workspace definition allowing to specify softDeleteRetentionInDays. */ - interface WithManagedNetwork { + interface WithSoftDeleteRetentionInDays { /** - * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. + * Specifies the softDeleteRetentionInDays property: Retention time in days after workspace get soft + * deleted.. * - * @param managedNetwork Managed Network settings for a machine learning workspace. + * @param softDeleteRetentionInDays Retention time in days after workspace get soft deleted. * @return the next definition stage. */ - WithCreate withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); + WithCreate withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); } /** - * The stage of the Workspace definition allowing to specify featureStoreSettings. + * The stage of the Workspace definition allowing to specify storageAccount. */ - interface WithFeatureStoreSettings { + interface WithStorageAccount { /** - * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * Specifies the storageAccount property: ARM id of the storage account associated with this workspace. This + * cannot be changed once the workspace has been created. * - * @param featureStoreSettings Settings for feature store type workspace. + * @param storageAccount ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. * @return the next definition stage. */ - WithCreate withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + WithCreate withStorageAccount(String storageAccount); } /** - * The stage of the Workspace definition allowing to specify associatedWorkspaces. + * The stage of the Workspace definition allowing to specify storageAccounts. */ - interface WithAssociatedWorkspaces { + interface WithStorageAccounts { /** - * Specifies the associatedWorkspaces property: The associatedWorkspaces property.. + * Specifies the storageAccounts property: The storageAccounts property.. * - * @param associatedWorkspaces The associatedWorkspaces property. + * @param storageAccounts The storageAccounts property. * @return the next definition stage. */ - WithCreate withAssociatedWorkspaces(List associatedWorkspaces); + WithCreate withStorageAccounts(List storageAccounts); } /** - * The stage of the Workspace definition allowing to specify enableDataIsolation. + * The stage of the Workspace definition allowing to specify systemDatastoresAuthMode. */ - interface WithEnableDataIsolation { + interface WithSystemDatastoresAuthMode { /** - * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * Specifies the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores + * of the workspace.. * - * @param enableDataIsolation The enableDataIsolation property. + * @param systemDatastoresAuthMode The auth mode used for accessing the system datastores of the workspace. * @return the next definition stage. */ - WithCreate withEnableDataIsolation(Boolean enableDataIsolation); + WithCreate withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode); } /** - * The stage of the Workspace definition allowing to specify hubResourceId. + * The stage of the Workspace definition allowing to specify v1LegacyMode. */ - interface WithHubResourceId { + interface WithV1LegacyMode { /** - * Specifies the hubResourceId property: The hubResourceId property.. + * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided + * by the v2 API.. * - * @param hubResourceId The hubResourceId property. + * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. * @return the next definition stage. */ - WithCreate withHubResourceId(String hubResourceId); + WithCreate withV1LegacyMode(Boolean v1LegacyMode); } /** @@ -807,13 +1095,16 @@ interface WithWorkspaceHubConfig { /** * The template for Workspace update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity, - UpdateStages.WithDescription, UpdateStages.WithFriendlyName, UpdateStages.WithImageBuildCompute, - UpdateStages.WithServiceManagedResourcesSettings, UpdateStages.WithPrimaryUserAssignedIdentity, - UpdateStages.WithServerlessComputeSettings, UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithApplicationInsights, UpdateStages.WithContainerRegistry, UpdateStages.WithFeatureStoreSettings, - UpdateStages.WithManagedNetwork, UpdateStages.WithEnableDataIsolation, UpdateStages.WithV1LegacyMode, - UpdateStages.WithEncryption { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, + UpdateStages.WithAllowRoleAssignmentOnRG, UpdateStages.WithApplicationInsights, + UpdateStages.WithContainerRegistry, UpdateStages.WithDescription, UpdateStages.WithEnableDataIsolation, + UpdateStages.WithEnableSoftwareBillOfMaterials, UpdateStages.WithEncryption, + UpdateStages.WithFeatureStoreSettings, UpdateStages.WithFriendlyName, UpdateStages.WithImageBuildCompute, + UpdateStages.WithIpAllowlist, UpdateStages.WithManagedNetwork, UpdateStages.WithNetworkAcls, + UpdateStages.WithPrimaryUserAssignedIdentity, UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithServerlessComputeSettings, UpdateStages.WithServiceManagedResourcesSettings, + UpdateStages.WithSoftDeleteRetentionInDays, UpdateStages.WithSystemDatastoresAuthMode, + UpdateStages.WithV1LegacyMode { /** * Executes the update request. * @@ -847,30 +1138,73 @@ interface WithTags { Update withTags(Map tags); } + /** + * The stage of the Workspace update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The identity property.. + * + * @param identity The identity property. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + /** * The stage of the Workspace update allowing to specify sku. */ interface WithSku { /** - * Specifies the sku property: The sku of the workspace.. + * Specifies the sku property: Optional. This field is required to be implemented by the RP because AML is + * supporting more than one tier. * - * @param sku The sku of the workspace. + * @param sku Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * @return the next definition stage. */ Update withSku(Sku sku); } /** - * The stage of the Workspace update allowing to specify identity. + * The stage of the Workspace update allowing to specify allowRoleAssignmentOnRG. */ - interface WithIdentity { + interface WithAllowRoleAssignmentOnRG { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property.. * - * @param identity The identity of the resource. + * @param allowRoleAssignmentOnRG The allowRoleAssignmentOnRG property. * @return the next definition stage. */ - Update withIdentity(ManagedServiceIdentity identity); + Update withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG); + } + + /** + * The stage of the Workspace update allowing to specify applicationInsights. + */ + interface WithApplicationInsights { + /** + * Specifies the applicationInsights property: ARM id of the application insights associated with this + * workspace.. + * + * @param applicationInsights ARM id of the application insights associated with this workspace. + * @return the next definition stage. + */ + Update withApplicationInsights(String applicationInsights); + } + + /** + * The stage of the Workspace update allowing to specify containerRegistry. + */ + interface WithContainerRegistry { + /** + * Specifies the containerRegistry property: ARM id of the container registry associated with this + * workspace.. + * + * @param containerRegistry ARM id of the container registry associated with this workspace. + * @return the next definition stage. + */ + Update withContainerRegistry(String containerRegistry); } /** @@ -886,14 +1220,68 @@ interface WithDescription { Update withDescription(String description); } + /** + * The stage of the Workspace update allowing to specify enableDataIsolation. + */ + interface WithEnableDataIsolation { + /** + * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * + * @param enableDataIsolation The enableDataIsolation property. + * @return the next definition stage. + */ + Update withEnableDataIsolation(Boolean enableDataIsolation); + } + + /** + * The stage of the Workspace update allowing to specify enableSoftwareBillOfMaterials. + */ + interface WithEnableSoftwareBillOfMaterials { + /** + * Specifies the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be + * enabled for this workspace. + * + * @param enableSoftwareBillOfMaterials Flag to tell if SoftwareBillOfMaterials should be enabled for this + * workspace. + * @return the next definition stage. + */ + Update withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials); + } + + /** + * The stage of the Workspace update allowing to specify encryption. + */ + interface WithEncryption { + /** + * Specifies the encryption property: The encryption property.. + * + * @param encryption The encryption property. + * @return the next definition stage. + */ + Update withEncryption(EncryptionUpdateProperties encryption); + } + + /** + * The stage of the Workspace update allowing to specify featureStoreSettings. + */ + interface WithFeatureStoreSettings { + /** + * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * + * @param featureStoreSettings Settings for feature store type workspace. + * @return the next definition stage. + */ + Update withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + } + /** * The stage of the Workspace update allowing to specify friendlyName. */ interface WithFriendlyName { /** - * Specifies the friendlyName property: The friendly name for this workspace.. + * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @param friendlyName The friendly name for this workspace. + * @param friendlyName The friendly name for this workspace. This name in mutable. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); @@ -913,125 +1301,124 @@ interface WithImageBuildCompute { } /** - * The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. + * The stage of the Workspace update allowing to specify ipAllowlist. */ - interface WithServiceManagedResourcesSettings { + interface WithIpAllowlist { /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * Specifies the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace.. * - * @param serviceManagedResourcesSettings The service managed resource settings. + * @param ipAllowlist The list of IPv4 addresses that are allowed to access the workspace. * @return the next definition stage. */ - Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); + Update withIpAllowlist(List ipAllowlist); } /** - * The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. + * The stage of the Workspace update allowing to specify managedNetwork. */ - interface WithPrimaryUserAssignedIdentity { + interface WithManagedNetwork { /** - * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that - * represents the workspace identity.. + * Specifies the managedNetwork property: The managedNetwork property.. * - * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. + * @param managedNetwork The managedNetwork property. * @return the next definition stage. */ - Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); + Update withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); } /** - * The stage of the Workspace update allowing to specify serverlessComputeSettings. + * The stage of the Workspace update allowing to specify networkAcls. */ - interface WithServerlessComputeSettings { + interface WithNetworkAcls { /** - * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the - * workspace. + * Specifies the networkAcls property: A set of rules governing the network accessibility of the workspace.. * - * @param serverlessComputeSettings Settings for serverless compute created in the workspace. + * @param networkAcls A set of rules governing the network accessibility of the workspace. * @return the next definition stage. */ - Update withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + Update withNetworkAcls(NetworkAcls networkAcls); } /** - * The stage of the Workspace update allowing to specify publicNetworkAccess. + * The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. */ - interface WithPublicNetworkAccess { + interface WithPrimaryUserAssignedIdentity { /** - * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. + * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that + * represents the workspace identity.. * - * @param publicNetworkAccess Whether requests from Public Network are allowed. + * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace + * identity. * @return the next definition stage. */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); } /** - * The stage of the Workspace update allowing to specify applicationInsights. + * The stage of the Workspace update allowing to specify publicNetworkAccess. */ - interface WithApplicationInsights { + interface WithPublicNetworkAccess { /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. + * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. * - * @param applicationInsights ARM id of the application insights associated with this workspace. + * @param publicNetworkAccess Whether requests from Public Network are allowed. * @return the next definition stage. */ - Update withApplicationInsights(String applicationInsights); + Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); } /** - * The stage of the Workspace update allowing to specify containerRegistry. + * The stage of the Workspace update allowing to specify serverlessComputeSettings. */ - interface WithContainerRegistry { + interface WithServerlessComputeSettings { /** - * Specifies the containerRegistry property: ARM id of the container registry associated with this - * workspace.. + * Specifies the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param containerRegistry ARM id of the container registry associated with this workspace. + * @param serverlessComputeSettings Settings for serverless compute in a workspace. * @return the next definition stage. */ - Update withContainerRegistry(String containerRegistry); + Update withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); } /** - * The stage of the Workspace update allowing to specify featureStoreSettings. + * The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. */ - interface WithFeatureStoreSettings { + interface WithServiceManagedResourcesSettings { /** - * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. * - * @param featureStoreSettings Settings for feature store type workspace. + * @param serviceManagedResourcesSettings The service managed resource settings. * @return the next definition stage. */ - Update withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); } /** - * The stage of the Workspace update allowing to specify managedNetwork. + * The stage of the Workspace update allowing to specify softDeleteRetentionInDays. */ - interface WithManagedNetwork { + interface WithSoftDeleteRetentionInDays { /** - * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. + * Specifies the softDeleteRetentionInDays property: Retention time in days after workspace get soft + * deleted.. * - * @param managedNetwork Managed Network settings for a machine learning workspace. + * @param softDeleteRetentionInDays Retention time in days after workspace get soft deleted. * @return the next definition stage. */ - Update withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); + Update withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); } /** - * The stage of the Workspace update allowing to specify enableDataIsolation. + * The stage of the Workspace update allowing to specify systemDatastoresAuthMode. */ - interface WithEnableDataIsolation { + interface WithSystemDatastoresAuthMode { /** - * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * Specifies the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores + * of the workspace.. * - * @param enableDataIsolation The enableDataIsolation property. + * @param systemDatastoresAuthMode The auth mode used for accessing the system datastores of the workspace. * @return the next definition stage. */ - Update withEnableDataIsolation(Boolean enableDataIsolation); + Update withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode); } /** @@ -1047,19 +1434,6 @@ interface WithV1LegacyMode { */ Update withV1LegacyMode(Boolean v1LegacyMode); } - - /** - * The stage of the Workspace update allowing to specify encryption. - */ - interface WithEncryption { - /** - * Specifies the encryption property: The encryption property.. - * - * @param encryption The encryption property. - * @return the next definition stage. - */ - Update withEncryption(EncryptionUpdateProperties encryption); - } } /** @@ -1089,14 +1463,14 @@ interface WithEncryption { /** * Diagnose workspace setup issue. * - * @param parameters The parameter of diagnosing workspace health. + * @param body The parameter of diagnosing workspace health. * @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. */ - DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context); + DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters body, Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and @@ -1121,27 +1495,27 @@ interface WithEncryption { ListWorkspaceKeysResult listKeys(); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * + * @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 azure Machine Learning Workspace notebook access token along with {@link Response}. */ - void resyncKeys(); + Response listNotebookAccessTokenWithResponse(Context context); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * - * @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 azure Machine Learning Workspace notebook access token. */ - void resyncKeys(Context context); + NotebookAccessTokenResult listNotebookAccessToken(); /** - * return notebook access token and refresh token. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1149,74 +1523,74 @@ interface WithEncryption { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response listNotebookAccessTokenWithResponse(Context context); + Response listNotebookKeysWithResponse(Context context); /** - * return notebook access token and refresh token. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @throws com.azure.core.management.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. */ - NotebookAccessTokenResult listNotebookAccessToken(); + ListNotebookKeysResult listNotebookKeys(); /** - * Prepare a notebook. + * Lists keys of Azure Machine Learning Workspace's storage account. * + * @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. + * @return the response body along with {@link Response}. */ - NotebookResourceInfo prepareNotebook(); + Response listStorageAccountKeysWithResponse(Context context); /** - * Prepare a notebook. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @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. */ - NotebookResourceInfo prepareNotebook(Context context); + ListStorageAccountKeysResult listStorageAccountKeys(); /** - * List storage account keys of a workspace. + * Prepare Azure Machine Learning Workspace's notebook resource. * - * @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}. + * @return the response. */ - Response listStorageAccountKeysWithResponse(Context context); + NotebookResourceInfo prepareNotebook(); /** - * List storage account keys of a workspace. + * Prepare Azure Machine Learning Workspace's notebook resource. * + * @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. */ - ListStorageAccountKeysResult listStorageAccountKeys(); + NotebookResourceInfo prepareNotebook(Context context); /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * - * @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 listNotebookKeysWithResponse(Context context); + void resyncKeys(); /** - * List keys of a notebook. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * + * @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. */ - ListNotebookKeysResult listNotebookKeys(); + void resyncKeys(Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java index 263d51da4983..864a6bf60605 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -72,14 +72,6 @@ public WorkspaceConnectionAccessKey withSecretAccessKey(String secretAccessKey) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java index 8ef9051a7165..8c0206ccbb02 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The WorkspaceConnectionAccountKey model. + * Account key object for workspace connection credential. */ @Fluent public final class WorkspaceConnectionAccountKey implements JsonSerializable { @@ -47,14 +47,6 @@ public WorkspaceConnectionAccountKey withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java index 68ca9ba9b279..ff5ddbefa881 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -47,14 +47,6 @@ public WorkspaceConnectionApiKey withKey(String key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java index 8868888c833f..dfab6ef54bd4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,14 +17,14 @@ @Fluent public final class WorkspaceConnectionManagedIdentity implements JsonSerializable { /* - * The resourceId property. + * The clientId property. */ - private String resourceId; + private String clientId; /* - * The clientId property. + * The resourceId property. */ - private String clientId; + private String resourceId; /** * Creates an instance of WorkspaceConnectionManagedIdentity class. @@ -32,26 +32,6 @@ public final class WorkspaceConnectionManagedIdentity implements JsonSerializabl public WorkspaceConnectionManagedIdentity() { } - /** - * Get the resourceId property: The resourceId property. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The resourceId property. - * - * @param resourceId the resourceId value to set. - * @return the WorkspaceConnectionManagedIdentity object itself. - */ - public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - /** * Get the clientId property: The clientId property. * @@ -73,11 +53,23 @@ public WorkspaceConnectionManagedIdentity withClientId(String clientId) { } /** - * Validates the instance. + * Get the resourceId property: The resourceId property. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the resourceId value. */ - public void validate() { + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The resourceId property. + * + * @param resourceId the resourceId value to set. + * @return the WorkspaceConnectionManagedIdentity object itself. + */ + public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; } /** @@ -86,8 +78,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeStringField("resourceId", this.resourceId); return jsonWriter.writeEndObject(); } @@ -107,10 +99,10 @@ public static WorkspaceConnectionManagedIdentity fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("resourceId".equals(fieldName)) { - deserializedWorkspaceConnectionManagedIdentity.resourceId = reader.getString(); - } else if ("clientId".equals(fieldName)) { + if ("clientId".equals(fieldName)) { deserializedWorkspaceConnectionManagedIdentity.clientId = reader.getString(); + } else if ("resourceId".equals(fieldName)) { + deserializedWorkspaceConnectionManagedIdentity.resourceId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java index bf543303d6e9..55caa69db358 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -10,8 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Objects; -import java.util.UUID; /** * ClientId and ClientSecret are required. Other properties are optional @@ -27,7 +25,7 @@ public final class WorkspaceConnectionOAuth2 implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedWorkspaceConnectionOAuth2.clientId = reader.getString(); } else if ("clientSecret".equals(fieldName)) { deserializedWorkspaceConnectionOAuth2.clientSecret = reader.getString(); } else if ("developerToken".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java index 9dbd7d76251c..3714d95a172e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -48,14 +48,6 @@ public WorkspaceConnectionPersonalAccessToken withPat(String pat) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java index 23ddc5256403..a792f9e77ab3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -36,6 +36,11 @@ public class WorkspaceConnectionPropertiesV2 implements JsonSerializable metadata; /* - * Store user metadata for this connection + * The peRequirement property. */ - private Map metadata; + private ManagedPERequirement peRequirement; + + /* + * The peStatus property. + */ + private ManagedPEStatus peStatus; /* * The sharedUserList property. @@ -67,14 +77,14 @@ public class WorkspaceConnectionPropertiesV2 implements JsonSerializable sharedUserList; /* - * Value details of the workspace connection. + * The target property. */ - private String value; + private String target; /* - * format for the workspace connection value + * The useWorkspaceManagedIdentity property. */ - private ValueFormat valueFormat; + private Boolean useWorkspaceManagedIdentity; /** * Creates an instance of WorkspaceConnectionPropertiesV2 class. @@ -131,6 +141,26 @@ WorkspaceConnectionPropertiesV2 withCreatedByWorkspaceArmId(String createdByWork return this; } + /** + * Get the error property: The error property. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * Set the error property: The error property. + * + * @param error the error value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withError(String error) { + this.error = error; + return this; + } + /** * Get the expiryTime property: The expiryTime property. * @@ -192,42 +222,62 @@ public WorkspaceConnectionPropertiesV2 withIsSharedToAll(Boolean isSharedToAll) } /** - * Get the target property: The target property. + * Get the metadata property: Store user metadata for this connection. * - * @return the target value. + * @return the metadata value. */ - public String target() { - return this.target; + public Map metadata() { + return this.metadata; } /** - * Set the target property: The target property. + * Set the metadata property: Store user metadata for this connection. * - * @param target the target value to set. + * @param metadata the metadata value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withTarget(String target) { - this.target = target; + public WorkspaceConnectionPropertiesV2 withMetadata(Map metadata) { + this.metadata = metadata; return this; } /** - * Get the metadata property: Store user metadata for this connection. + * Get the peRequirement property: The peRequirement property. * - * @return the metadata value. + * @return the peRequirement value. */ - public Map metadata() { - return this.metadata; + public ManagedPERequirement peRequirement() { + return this.peRequirement; } /** - * Set the metadata property: Store user metadata for this connection. + * Set the peRequirement property: The peRequirement property. * - * @param metadata the metadata value to set. + * @param peRequirement the peRequirement value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withMetadata(Map metadata) { - this.metadata = metadata; + public WorkspaceConnectionPropertiesV2 withPeRequirement(ManagedPERequirement peRequirement) { + this.peRequirement = peRequirement; + return this; + } + + /** + * Get the peStatus property: The peStatus property. + * + * @return the peStatus value. + */ + public ManagedPEStatus peStatus() { + return this.peStatus; + } + + /** + * Set the peStatus property: The peStatus property. + * + * @param peStatus the peStatus value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withPeStatus(ManagedPEStatus peStatus) { + this.peStatus = peStatus; return this; } @@ -252,53 +302,45 @@ public WorkspaceConnectionPropertiesV2 withSharedUserList(List sharedUse } /** - * Get the value property: Value details of the workspace connection. + * Get the target property: The target property. * - * @return the value value. + * @return the target value. */ - public String value() { - return this.value; + public String target() { + return this.target; } /** - * Set the value property: Value details of the workspace connection. + * Set the target property: The target property. * - * @param value the value value to set. + * @param target the target value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withValue(String value) { - this.value = value; + public WorkspaceConnectionPropertiesV2 withTarget(String target) { + this.target = target; return this; } /** - * Get the valueFormat property: format for the workspace connection value. + * Get the useWorkspaceManagedIdentity property: The useWorkspaceManagedIdentity property. * - * @return the valueFormat value. + * @return the useWorkspaceManagedIdentity value. */ - public ValueFormat valueFormat() { - return this.valueFormat; + public Boolean useWorkspaceManagedIdentity() { + return this.useWorkspaceManagedIdentity; } /** - * Set the valueFormat property: format for the workspace connection value. + * Set the useWorkspaceManagedIdentity property: The useWorkspaceManagedIdentity property. * - * @param valueFormat the valueFormat value to set. + * @param useWorkspaceManagedIdentity the useWorkspaceManagedIdentity value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; + public WorkspaceConnectionPropertiesV2 withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + this.useWorkspaceManagedIdentity = useWorkspaceManagedIdentity; return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ @@ -307,15 +349,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString()); + jsonWriter.writeStringField("error", this.error); jsonWriter.writeStringField("expiryTime", this.expiryTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiryTime)); jsonWriter.writeBooleanField("isSharedToAll", this.isSharedToAll); - jsonWriter.writeStringField("target", this.target); jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", this.peRequirement == null ? null : this.peRequirement.toString()); + jsonWriter.writeStringField("peStatus", this.peStatus == null ? null : this.peStatus.toString()); jsonWriter.writeArrayField("sharedUserList", this.sharedUserList, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("valueFormat", this.valueFormat == null ? null : this.valueFormat.toString()); + jsonWriter.writeStringField("target", this.target); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", this.useWorkspaceManagedIdentity); return jsonWriter.writeEndObject(); } @@ -343,17 +387,7 @@ public static WorkspaceConnectionPropertiesV2 fromJson(JsonReader jsonReader) th } } // Use the discriminator value to determine which subtype should be deserialized. - if ("PAT".equals(discriminatorValue)) { - return PatAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("SAS".equals(discriminatorValue)) { - return SasAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("UsernamePassword".equals(discriminatorValue)) { - return UsernamePasswordAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("None".equals(discriminatorValue)) { - return NoneAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("ManagedIdentity".equals(discriminatorValue)) { - return ManagedIdentityAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("AAD".equals(discriminatorValue)) { + if ("AAD".equals(discriminatorValue)) { return AadAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("AccessKey".equals(discriminatorValue)) { return AccessKeyAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); @@ -363,10 +397,20 @@ public static WorkspaceConnectionPropertiesV2 fromJson(JsonReader jsonReader) th return ApiKeyAuthWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("CustomKeys".equals(discriminatorValue)) { return CustomKeysWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("ManagedIdentity".equals(discriminatorValue)) { + return ManagedIdentityAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("None".equals(discriminatorValue)) { + return NoneAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("OAuth2".equals(discriminatorValue)) { return OAuth2AuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("PAT".equals(discriminatorValue)) { + return PATAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("SAS".equals(discriminatorValue)) { + return SasAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("ServicePrincipal".equals(discriminatorValue)) { return ServicePrincipalAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("UsernamePassword".equals(discriminatorValue)) { + return UsernamePasswordAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -390,6 +434,8 @@ static WorkspaceConnectionPropertiesV2 fromJsonKnownDiscriminator(JsonReader jso = ConnectionCategory.fromString(reader.getString()); } else if ("createdByWorkspaceArmId".equals(fieldName)) { deserializedWorkspaceConnectionPropertiesV2.createdByWorkspaceArmId = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.error = reader.getString(); } else if ("expiryTime".equals(fieldName)) { deserializedWorkspaceConnectionPropertiesV2.expiryTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); @@ -398,19 +444,23 @@ static WorkspaceConnectionPropertiesV2 fromJsonKnownDiscriminator(JsonReader jso } else if ("isSharedToAll".equals(fieldName)) { deserializedWorkspaceConnectionPropertiesV2.isSharedToAll = reader.getNullable(JsonReader::getBoolean); - } else if ("target".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.target = reader.getString(); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedWorkspaceConnectionPropertiesV2.metadata = metadata; + } else if ("peRequirement".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.peRequirement + = ManagedPERequirement.fromString(reader.getString()); + } else if ("peStatus".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.peStatus + = ManagedPEStatus.fromString(reader.getString()); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedWorkspaceConnectionPropertiesV2.sharedUserList = sharedUserList; - } else if ("value".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.value = reader.getString(); - } else if ("valueFormat".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.valueFormat - = ValueFormat.fromString(reader.getString()); + } else if ("target".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.target = reader.getString(); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.useWorkspaceManagedIdentity + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java index b5033785919a..ecdb5b09b2b6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -48,6 +48,13 @@ public interface WorkspaceConnectionPropertiesV2BasicResource { */ SystemData systemData(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner * com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner object. @@ -81,7 +88,7 @@ interface WithParentResource { * Specifies resourceGroupName, workspaceName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @return the next definition stage. */ WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); @@ -123,6 +130,52 @@ interface WithCreate { } } + /** + * Begins update for the WorkspaceConnectionPropertiesV2BasicResource resource. + * + * @return the stage of resource update. + */ + WorkspaceConnectionPropertiesV2BasicResource.Update update(); + + /** + * The template for WorkspaceConnectionPropertiesV2BasicResource update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + WorkspaceConnectionPropertiesV2BasicResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + WorkspaceConnectionPropertiesV2BasicResource apply(Context context); + } + + /** + * The WorkspaceConnectionPropertiesV2BasicResource update stages. + */ + interface UpdateStages { + /** + * The stage of the WorkspaceConnectionPropertiesV2BasicResource update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: The properties that the machine learning workspace connection will be + * updated with.. + * + * @param properties The properties that the machine learning workspace connection will be updated with. + * @return the next definition stage. + */ + Update withProperties(WorkspaceConnectionPropertiesV2 properties); + } + } + /** * Refreshes the resource to sync with Azure. * @@ -145,7 +198,8 @@ interface WithCreate { * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ Response listSecretsWithResponse(Context context); @@ -154,7 +208,26 @@ interface WithCreate { * * @throws com.azure.core.management.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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ WorkspaceConnectionPropertiesV2BasicResource listSecrets(); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @throws com.azure.core.management.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 testConnection(); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param body Workspace Connection object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void testConnection(WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java index 0f05a562276f..27437a3f88c0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -98,14 +98,6 @@ public WorkspaceConnectionServicePrincipal withTenantId(String tenantId) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java index f323a4d2b92b..470f5cb58a93 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -48,14 +48,6 @@ public WorkspaceConnectionSharedAccessSignature withSas(String sas) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java new file mode 100644 index 000000000000..5bc039452a23 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 properties that the machine learning workspace connection will be updated with. + */ +@Fluent +public final class WorkspaceConnectionUpdateParameter implements JsonSerializable { + /* + * The properties that the machine learning workspace connection will be updated with. + */ + private WorkspaceConnectionPropertiesV2 properties; + + /** + * Creates an instance of WorkspaceConnectionUpdateParameter class. + */ + public WorkspaceConnectionUpdateParameter() { + } + + /** + * Get the properties property: The properties that the machine learning workspace connection will be updated with. + * + * @return the properties value. + */ + public WorkspaceConnectionPropertiesV2 properties() { + return this.properties; + } + + /** + * Set the properties property: The properties that the machine learning workspace connection will be updated with. + * + * @param properties the properties value to set. + * @return the WorkspaceConnectionUpdateParameter object itself. + */ + public WorkspaceConnectionUpdateParameter withProperties(WorkspaceConnectionPropertiesV2 properties) { + this.properties = properties; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceConnectionUpdateParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceConnectionUpdateParameter 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 WorkspaceConnectionUpdateParameter. + */ + public static WorkspaceConnectionUpdateParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceConnectionUpdateParameter deserializedWorkspaceConnectionUpdateParameter + = new WorkspaceConnectionUpdateParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedWorkspaceConnectionUpdateParameter.properties + = WorkspaceConnectionPropertiesV2.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceConnectionUpdateParameter; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java index 6f9aa0d5ce36..b7984fe2adc6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -17,11 +17,6 @@ @Fluent public final class WorkspaceConnectionUsernamePassword implements JsonSerializable { - /* - * The username property. - */ - private String username; - /* * The password property. */ @@ -32,30 +27,15 @@ public final class WorkspaceConnectionUsernamePassword */ private String securityToken; - /** - * Creates an instance of WorkspaceConnectionUsernamePassword class. - */ - public WorkspaceConnectionUsernamePassword() { - } - - /** - * Get the username property: The username property. - * - * @return the username value. + /* + * The username property. */ - public String username() { - return this.username; - } + private String username; /** - * Set the username property: The username property. - * - * @param username the username value to set. - * @return the WorkspaceConnectionUsernamePassword object itself. + * Creates an instance of WorkspaceConnectionUsernamePassword class. */ - public WorkspaceConnectionUsernamePassword withUsername(String username) { - this.username = username; - return this; + public WorkspaceConnectionUsernamePassword() { } /** @@ -101,11 +81,23 @@ public WorkspaceConnectionUsernamePassword withSecurityToken(String securityToke } /** - * Validates the instance. + * Get the username property: The username property. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username property. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @param username the username value to set. + * @return the WorkspaceConnectionUsernamePassword object itself. */ - public void validate() { + public WorkspaceConnectionUsernamePassword withUsername(String username) { + this.username = username; + return this; } /** @@ -114,9 +106,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); jsonWriter.writeStringField("password", this.password); jsonWriter.writeStringField("securityToken", this.securityToken); + jsonWriter.writeStringField("username", this.username); return jsonWriter.writeEndObject(); } @@ -136,12 +128,12 @@ public static WorkspaceConnectionUsernamePassword fromJson(JsonReader jsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("username".equals(fieldName)) { - deserializedWorkspaceConnectionUsernamePassword.username = reader.getString(); - } else if ("password".equals(fieldName)) { + if ("password".equals(fieldName)) { deserializedWorkspaceConnectionUsernamePassword.password = reader.getString(); } else if ("securityToken".equals(fieldName)) { deserializedWorkspaceConnectionUsernamePassword.securityToken = reader.getString(); + } else if ("username".equals(fieldName)) { + deserializedWorkspaceConnectionUsernamePassword.username = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java index 8cb1ea5814cb..4105e1e431a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java @@ -1,51 +1,53 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; /** * Resource collection API of WorkspaceConnections. */ public interface WorkspaceConnections { /** - * The get operation. + * Lists machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ Response getWithResponse(String resourceGroupName, String workspaceName, String connectionName, Context context); /** - * The get operation. + * Lists machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, String connectionName); /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,10 +59,10 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName Context context); /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -69,44 +71,53 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName); /** - * The list operation. + * List all the available machine learning workspaces connections under the specified workspace. + * + * Lists all the available machine learning workspaces connections under the specified workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param target Target of the workspace connection. * @param category Category of the workspace connection. + * @param includeAll query parameter that indicates if get connection call should return both connections and + * datastores. * @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 paginated response with {@link PagedIterable}. + * @return paged collection of WorkspaceConnectionPropertiesV2BasicResource items as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String workspaceName, - String target, String category, Context context); + String target, String category, Boolean includeAll, Context context); /** * List all the secrets of a machine learning workspaces connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String connectionName, Context context); @@ -115,41 +126,70 @@ Response listSecretsWithResponse(S * List all the secrets of a machine learning workspaces connections. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param connectionName Friendly name of the workspace connection. * @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. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type. */ WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupName, String workspaceName, String connectionName); /** - * The get operation. + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @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 testConnection(String resourceGroupName, String workspaceName, String connectionName); + + /** + * Test machine learning workspaces connections under the specified workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param connectionName Friendly name of the workspace connection. + * @param body Workspace Connection object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); + + /** + * Lists machine learning workspaces connections by name. * * @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 response body along with {@link Response}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ WorkspaceConnectionPropertiesV2BasicResource getById(String id); /** - * The get operation. + * Lists machine learning workspaces connections by name. * * @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 response body along with {@link Response}. + * @return concrete proxy resource types can be created by aliasing this type using a specific property type along + * with {@link Response}. */ Response getByIdWithResponse(String id, Context context); /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -159,7 +199,7 @@ WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupNam void deleteById(String id); /** - * The delete operation. + * Delete machine learning workspaces connections by name. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java index 3e150cf9c965..34e043dbe884 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -15,7 +15,7 @@ public interface WorkspaceFeatures { * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -27,7 +27,7 @@ public interface WorkspaceFeatures { * Lists all enabled features for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java index b28e29616d6a..097e6ed55dcc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -73,14 +73,6 @@ public WorkspaceHubConfig withDefaultWorkspaceResourceGroup(String defaultWorksp return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java new file mode 100644 index 000000000000..4fc2f3a04be2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java @@ -0,0 +1,93 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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 Private Endpoint resource. + */ +@Immutable +public final class WorkspacePrivateEndpointResource implements JsonSerializable { + /* + * e.g. + * /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{ + * privateEndpointName} + */ + private String id; + + /* + * The subnetId that the private endpoint is connected to. + */ + private String subnetArmId; + + /** + * Creates an instance of WorkspacePrivateEndpointResource class. + */ + public WorkspacePrivateEndpointResource() { + } + + /** + * Get the id property: e.g. + * /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the subnetArmId property: The subnetId that the private endpoint is connected to. + * + * @return the subnetArmId value. + */ + public String subnetArmId() { + return this.subnetArmId; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspacePrivateEndpointResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspacePrivateEndpointResource 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 WorkspacePrivateEndpointResource. + */ + public static WorkspacePrivateEndpointResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspacePrivateEndpointResource deserializedWorkspacePrivateEndpointResource + = new WorkspacePrivateEndpointResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkspacePrivateEndpointResource.id = reader.getString(); + } else if ("subnetArmId".equals(fieldName)) { + deserializedWorkspacePrivateEndpointResource.subnetArmId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspacePrivateEndpointResource; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java index 1bbaf7348fa1..10599c0e1988 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -12,40 +12,48 @@ */ public interface WorkspaceProperties { /** - * Gets the workspaceId property: The immutable id associated with this workspace. + * Gets the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - String workspaceId(); + String agentsEndpointUri(); /** - * Gets the description property: The description of this workspace. + * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. * - * @return the description value. + * @return the allowPublicAccessWhenBehindVnet value. */ - String description(); + Boolean allowPublicAccessWhenBehindVnet(); /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * Gets the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - String friendlyName(); + Boolean allowRoleAssignmentOnRG(); /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - String keyVault(); + String applicationInsights(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * Gets the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - String applicationInsights(); + List associatedWorkspaces(); + + /** + * Gets the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + List containerRegistries(); /** * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. @@ -55,12 +63,11 @@ public interface WorkspaceProperties { String containerRegistry(); /** - * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * Gets the description property: The description of this workspace. * - * @return the storageAccount value. + * @return the description value. */ - String storageAccount(); + String description(); /** * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning @@ -71,42 +78,76 @@ public interface WorkspaceProperties { String discoveryUrl(); /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. + * Gets the enableDataIsolation property: The enableDataIsolation property. * - * @return the provisioningState value. + * @return the enableDataIsolation value. */ - ProvisioningState provisioningState(); + Boolean enableDataIsolation(); + + /** + * Gets the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. + * + * @return the enableServiceSideCmkEncryption value. + */ + Boolean enableServiceSideCmkEncryption(); + + /** + * Gets the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. + * + * @return the enableSimplifiedCmk value. + */ + Boolean enableSimplifiedCmk(); /** - * Gets the encryption property: The encryption settings of Azure ML workspace. + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + Boolean enableSoftwareBillOfMaterials(); + + /** + * Gets the encryption property: The encryption property. * * @return the encryption value. */ EncryptionProperty encryption(); /** - * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Gets the existingWorkspaces property: The existingWorkspaces property. * - * @return the hbiWorkspace value. + * @return the existingWorkspaces value. */ - Boolean hbiWorkspace(); + List existingWorkspaces(); /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Gets the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the featureStoreSettings value. */ - String serviceProvisionedResourceGroup(); + FeatureStoreSettings featureStoreSettings(); /** - * Gets the privateLinkCount property: Count of private connections in the workspace. + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the privateLinkCount value. + * @return the friendlyName value. */ - Integer privateLinkCount(); + String friendlyName(); + + /** + * Gets the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. + * + * @return the hbiWorkspace value. + */ + Boolean hbiWorkspace(); + + /** + * Gets the hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. + */ + String hubResourceId(); /** * Gets the imageBuildCompute property: The compute name for image build. @@ -116,54 +157,55 @@ public interface WorkspaceProperties { String imageBuildCompute(); /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the ipAllowlist value. */ - Boolean allowPublicAccessWhenBehindVnet(); + List ipAllowlist(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once + * the workspace has been created. * - * @return the publicNetworkAccess value. + * @return the keyVault value. */ - PublicNetworkAccess publicNetworkAccess(); + String keyVault(); /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * Gets the keyVaults property: The keyVaults property. * - * @return the privateEndpointConnections value. + * @return the keyVaults value. */ - List privateEndpointConnections(); + List keyVaults(); /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the managedNetwork property: The managedNetwork property. * - * @return the serverlessComputeSettings value. + * @return the managedNetwork value. */ - ServerlessComputeSettings serverlessComputeSettings(); + ManagedNetworkSettings managedNetwork(); /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. * - * @return the sharedPrivateLinkResources value. + * @return the mlFlowTrackingUri value. */ - List sharedPrivateLinkResources(); + String mlFlowTrackingUri(); /** - * Gets the notebookInfo property: The notebook info of Azure ML workspace. + * Gets the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the notebookInfo value. + * @return the networkAcls value. */ - NotebookResourceInfo notebookInfo(); + NetworkAcls networkAcls(); /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the notebookInfo property: The notebook info of Azure ML workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the notebookInfo value. */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); + NotebookResourceInfo notebookInfo(); /** * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the @@ -174,70 +216,123 @@ public interface WorkspaceProperties { String primaryUserAssignedIdentity(); /** - * Gets the tenantId property: The tenant id associated with this workspace. + * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the tenantId value. + * @return the privateEndpointConnections value. */ - String tenantId(); + List privateEndpointConnections(); /** - * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Gets the privateLinkCount property: Count of private connections in the workspace. * - * @return the storageHnsEnabled value. + * @return the privateLinkCount value. */ - Boolean storageHnsEnabled(); + Integer privateLinkCount(); /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * Gets the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the mlFlowTrackingUri value. + * @return the provisionNetworkNow value. */ - String mlFlowTrackingUri(); + Boolean provisionNetworkNow(); /** - * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. * - * @return the v1LegacyMode value. + * @return the provisioningState value. */ - Boolean v1LegacyMode(); + ProvisioningState provisioningState(); /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the managedNetwork value. + * @return the publicNetworkAccess value. */ - ManagedNetworkSettings managedNetwork(); + PublicNetworkAccess publicNetworkAccess(); /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the featureStoreSettings value. + * @return the serverlessComputeSettings value. */ - FeatureStoreSettings featureStoreSettings(); + ServerlessComputeSettings serverlessComputeSettings(); /** - * Gets the associatedWorkspaces property: The associatedWorkspaces property. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the associatedWorkspaces value. + * @return the serviceManagedResourcesSettings value. */ - List associatedWorkspaces(); + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the enableDataIsolation property: The enableDataIsolation property. + * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP + * in customer subscription if the workspace is CMK workspace. * - * @return the enableDataIsolation value. + * @return the serviceProvisionedResourceGroup value. */ - Boolean enableDataIsolation(); + String serviceProvisionedResourceGroup(); /** - * Gets the hubResourceId property: The hubResourceId property. + * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * - * @return the hubResourceId value. + * @return the sharedPrivateLinkResources value. */ - String hubResourceId(); + List sharedPrivateLinkResources(); + + /** + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. + * + * @return the softDeleteRetentionInDays value. + */ + Integer softDeleteRetentionInDays(); + + /** + * Gets the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be + * changed once the workspace has been created. + * + * @return the storageAccount value. + */ + String storageAccount(); + + /** + * Gets the storageAccounts property: The storageAccounts property. + * + * @return the storageAccounts value. + */ + List storageAccounts(); + + /** + * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) + * enabled. + * + * @return the storageHnsEnabled value. + */ + Boolean storageHnsEnabled(); + + /** + * Gets the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + SystemDatastoresAuthMode systemDatastoresAuthMode(); + + /** + * Gets the tenantId property: The tenant id associated with this workspace. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * API. + * + * @return the v1LegacyMode value. + */ + Boolean v1LegacyMode(); /** * Gets the workspaceHubConfig property: WorkspaceHub's configuration object. @@ -246,6 +341,13 @@ public interface WorkspaceProperties { */ WorkspaceHubConfig workspaceHubConfig(); + /** + * Gets the workspaceId property: The immutable id associated with this workspace. + * + * @return the workspaceId value. + */ + String workspaceId(); + /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner object. * diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java index 08fc15798bd3..f5f378c54a9e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java @@ -1,15 +1,37 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; +import java.util.List; /** * An immutable client-side representation of WorkspacePropertiesUpdateParameters. */ public interface WorkspacePropertiesUpdateParameters { + /** + * Gets the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @return the allowRoleAssignmentOnRG value. + */ + Boolean allowRoleAssignmentOnRG(); + + /** + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * + * @return the applicationInsights value. + */ + String applicationInsights(); + + /** + * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. + * + * @return the containerRegistry value. + */ + String containerRegistry(); + /** * Gets the description property: The description of this workspace. * @@ -18,7 +40,36 @@ public interface WorkspacePropertiesUpdateParameters { String description(); /** - * Gets the friendlyName property: The friendly name for this workspace. + * Gets the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. + */ + Boolean enableDataIsolation(); + + /** + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + Boolean enableSoftwareBillOfMaterials(); + + /** + * Gets the encryption property: The encryption property. + * + * @return the encryption value. + */ + EncryptionUpdateProperties encryption(); + + /** + * Gets the featureStoreSettings property: Settings for feature store type workspace. + * + * @return the featureStoreSettings value. + */ + FeatureStoreSettings featureStoreSettings(); + + /** + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. * * @return the friendlyName value. */ @@ -32,68 +83,69 @@ public interface WorkspacePropertiesUpdateParameters { String imageBuildCompute(); /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the ipAllowlist value. */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); + List ipAllowlist(); /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Gets the managedNetwork property: The managedNetwork property. * - * @return the primaryUserAssignedIdentity value. + * @return the managedNetwork value. */ - String primaryUserAssignedIdentity(); + ManagedNetworkSettings managedNetwork(); /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the serverlessComputeSettings value. + * @return the networkAcls value. */ - ServerlessComputeSettings serverlessComputeSettings(); + NetworkAcls networkAcls(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @return the publicNetworkAccess value. + * @return the primaryUserAssignedIdentity value. */ - PublicNetworkAccess publicNetworkAccess(); + String primaryUserAssignedIdentity(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the applicationInsights value. + * @return the publicNetworkAccess value. */ - String applicationInsights(); + PublicNetworkAccess publicNetworkAccess(); /** - * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the containerRegistry value. + * @return the serverlessComputeSettings value. */ - String containerRegistry(); + ServerlessComputeSettings serverlessComputeSettings(); /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the featureStoreSettings value. + * @return the serviceManagedResourcesSettings value. */ - FeatureStoreSettings featureStoreSettings(); + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @return the managedNetwork value. + * @return the softDeleteRetentionInDays value. */ - ManagedNetworkSettings managedNetwork(); + Integer softDeleteRetentionInDays(); /** - * Gets the enableDataIsolation property: The enableDataIsolation property. + * Gets the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @return the enableDataIsolation value. + * @return the systemDatastoresAuthMode value. */ - Boolean enableDataIsolation(); + SystemDatastoresAuthMode systemDatastoresAuthMode(); /** * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 @@ -103,13 +155,6 @@ public interface WorkspacePropertiesUpdateParameters { */ Boolean v1LegacyMode(); - /** - * Gets the encryption property: The encryption property. - * - * @return the encryption value. - */ - EncryptionUpdateProperties encryption(); - /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner * object. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java index ab58bf322a01..fae3b2d232c1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java @@ -1,508 +1,187 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; -import java.io.IOException; +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner; +import java.util.List; import java.util.Map; /** - * The parameters for updating a machine learning workspace. + * An immutable client-side representation of WorkspaceUpdateParameters. */ -@Fluent -public final class WorkspaceUpdateParameters implements JsonSerializable { - /* - * The resource tags for the machine learning workspace. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * The properties that the machine learning workspace will be updated with. - */ - private WorkspacePropertiesUpdateParametersInner innerProperties; - - /** - * Creates an instance of WorkspaceUpdateParameters class. - */ - public WorkspaceUpdateParameters() { - } - +public interface WorkspaceUpdateParameters { /** - * Get the tags property: The resource tags for the machine learning workspace. + * Gets the identity property: The identity property. * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The resource tags for the machine learning workspace. - * - * @param tags the tags value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the identity value. */ - public WorkspaceUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } + ManagedServiceIdentity identity(); /** - * Get the sku property: The sku of the workspace. + * Gets the sku property: Optional. This field is required to be implemented by the RP because AML is supporting + * more than one tier. * * @return the sku value. */ - public Sku sku() { - return this.sku; - } + Sku sku(); /** - * Set the sku property: The sku of the workspace. + * Gets the tags property: The resource tags for the machine learning workspace. * - * @param sku the sku value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the tags value. */ - public WorkspaceUpdateParameters withSku(Sku sku) { - this.sku = sku; - return this; - } + Map tags(); /** - * Get the identity property: The identity of the resource. + * Gets the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. * - * @return the identity value. + * @return the allowRoleAssignmentOnRG value. */ - public ManagedServiceIdentity identity() { - return this.identity; - } + Boolean allowRoleAssignmentOnRG(); /** - * Set the identity property: The identity of the resource. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @param identity the identity value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the applicationInsights value. */ - public WorkspaceUpdateParameters withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } + String applicationInsights(); /** - * Get the innerProperties property: The properties that the machine learning workspace will be updated with. + * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. * - * @return the innerProperties value. + * @return the containerRegistry value. */ - private WorkspacePropertiesUpdateParametersInner innerProperties() { - return this.innerProperties; - } + String containerRegistry(); /** - * Get the description property: The description of this workspace. + * Gets the description property: The description of this workspace. * * @return the description value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withDescription(description); - return this; - } + String description(); /** - * Get the friendlyName property: The friendly name for this workspace. + * Gets the enableDataIsolation property: The enableDataIsolation property. * - * @return the friendlyName value. + * @return the enableDataIsolation value. */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); - } + Boolean enableDataIsolation(); /** - * Set the friendlyName property: The friendly name for this workspace. + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @param friendlyName the friendlyName value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the enableSoftwareBillOfMaterials value. */ - public WorkspaceUpdateParameters withFriendlyName(String friendlyName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withFriendlyName(friendlyName); - return this; - } + Boolean enableSoftwareBillOfMaterials(); /** - * Get the imageBuildCompute property: The compute name for image build. + * Gets the encryption property: The encryption property. * - * @return the imageBuildCompute value. + * @return the encryption value. */ - public String imageBuildCompute() { - return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); - } + EncryptionUpdateProperties encryption(); /** - * Set the imageBuildCompute property: The compute name for image build. + * Gets the featureStoreSettings property: Settings for feature store type workspace. * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the featureStoreSettings value. */ - public WorkspaceUpdateParameters withImageBuildCompute(String imageBuildCompute) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withImageBuildCompute(imageBuildCompute); - return this; - } + FeatureStoreSettings featureStoreSettings(); /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the serviceManagedResourcesSettings value. + * @return the friendlyName value. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); - } + String friendlyName(); /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the imageBuildCompute property: The compute name for image build. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the imageBuildCompute value. */ - public WorkspaceUpdateParameters - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); - return this; - } + String imageBuildCompute(); /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the primaryUserAssignedIdentity value. + * @return the ipAllowlist value. */ - public String primaryUserAssignedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); - } + List ipAllowlist(); /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Gets the managedNetwork property: The managedNetwork property. * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the managedNetwork value. */ - public WorkspaceUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - return this; - } + ManagedNetworkSettings managedNetwork(); /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the serverlessComputeSettings value. + * @return the networkAcls value. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); - } + NetworkAcls networkAcls(); /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the primaryUserAssignedIdentity value. */ - public WorkspaceUpdateParameters - withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); - return this; - } + String primaryUserAssignedIdentity(); /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. * * @return the publicNetworkAccess value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); - } + PublicNetworkAccess publicNetworkAccess(); /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withApplicationInsights(String applicationInsights) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withApplicationInsights(applicationInsights); - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withContainerRegistry(String containerRegistry) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withContainerRegistry(containerRegistry); - return this; - } - - /** - * Get the featureStoreSettings property: Settings for feature store type workspace. - * - * @return the featureStoreSettings value. - */ - public FeatureStoreSettings featureStoreSettings() { - return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); - } - - /** - * Set the featureStoreSettings property: Settings for feature store type workspace. - * - * @param featureStoreSettings the featureStoreSettings value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the serverlessComputeSettings value. */ - public WorkspaceUpdateParameters withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withFeatureStoreSettings(featureStoreSettings); - return this; - } + ServerlessComputeSettings serverlessComputeSettings(); /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the managedNetwork value. + * @return the serviceManagedResourcesSettings value. */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); - } + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @param managedNetwork the managedNetwork value to set. - * @return the WorkspaceUpdateParameters object itself. + * @return the softDeleteRetentionInDays value. */ - public WorkspaceUpdateParameters withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withManagedNetwork(managedNetwork); - return this; - } + Integer softDeleteRetentionInDays(); /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Gets the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @return the enableDataIsolation value. + * @return the systemDatastoresAuthMode value. */ - public Boolean enableDataIsolation() { - return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); - } + SystemDatastoresAuthMode systemDatastoresAuthMode(); /** - * Set the enableDataIsolation property: The enableDataIsolation property. - * - * @param enableDataIsolation the enableDataIsolation value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withEnableDataIsolation(Boolean enableDataIsolation) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withEnableDataIsolation(enableDataIsolation); - return this; - } - - /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 + * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 * API. * * @return the v1LegacyMode value. */ - public Boolean v1LegacyMode() { - return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); - } - - /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @param v1LegacyMode the v1LegacyMode value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withV1LegacyMode(Boolean v1LegacyMode) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withV1LegacyMode(v1LegacyMode); - return this; - } - - /** - * Get the encryption property: The encryption property. - * - * @return the encryption value. - */ - public EncryptionUpdateProperties encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); - } - - /** - * Set the encryption property: The encryption property. - * - * @param encryption the encryption value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withEncryption(EncryptionUpdateProperties encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() != null) { - sku().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } + Boolean v1LegacyMode(); /** - * Reads an instance of WorkspaceUpdateParameters from the JsonReader. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner object. * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkspaceUpdateParameters 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 WorkspaceUpdateParameters. + * @return the inner object. */ - public static WorkspaceUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkspaceUpdateParameters deserializedWorkspaceUpdateParameters = new WorkspaceUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkspaceUpdateParameters.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedWorkspaceUpdateParameters.sku = Sku.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedWorkspaceUpdateParameters.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedWorkspaceUpdateParameters.innerProperties - = WorkspacePropertiesUpdateParametersInner.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkspaceUpdateParameters; - }); - } + WorkspaceUpdateParametersInner innerModel(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java index f80403ae6d76..bcfafa238007 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.models; @@ -16,7 +16,7 @@ public interface Workspaces { * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -29,7 +29,7 @@ public interface Workspaces { * Gets the properties of the specified machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -41,7 +41,7 @@ public interface Workspaces { * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -52,7 +52,7 @@ public interface Workspaces { * Deletes a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @param forceToPurge Flag to indicate delete is a purge request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,8 +68,7 @@ public interface Workspaces { * @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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -77,21 +76,46 @@ public interface Workspaces { * Lists all the available machine learning workspaces under the specified resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param kind Kind of workspace. * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String kind, String skip, + String aiCapabilities, Context context); + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Workspace list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Lists all the available machine learning workspaces under the specified subscription. + * + * @param kind Kind of workspace. + * @param skip Continuation token for pagination. + * @param aiCapabilities The aiCapabilities 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 of a Workspace list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String kind, String skip, String aiCapabilities, Context context); /** * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -103,23 +127,23 @@ public interface Workspaces { * Diagnose workspace setup issue. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. + * @param workspaceName Azure Machine Learning Workspace Name. + * @param body The parameter of diagnosing workspace health. * @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. */ - DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context); + DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters body, + Context context); /** * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -134,7 +158,7 @@ Response listKeysWithResponse(String resourceGroupName, * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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. @@ -143,181 +167,158 @@ Response listKeysWithResponse(String resourceGroupName, ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName); /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. + * Get Azure Machine Learning Workspace notebook access token. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @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 resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 azure Machine Learning Workspace notebook access token along with {@link Response}. */ - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified 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 result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(); + Response listNotebookAccessTokenWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Lists all the available machine learning workspaces under the specified subscription. + * Get Azure Machine Learning Workspace notebook access token. * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with - * {@link PagedIterable}. + * @return azure Machine Learning Workspace notebook access token. */ - PagedIterable list(String skip, Context context); + NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); /** - * return notebook access token and refresh token. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ - Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context); + Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, + Context context); /** - * return notebook access token and refresh token. + * Lists keys of Azure Machine Learning Workspaces notebook. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); + ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); /** - * Prepare a notebook. + * Lists keys of Azure Machine Learning Workspace's storage account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. + * @return the response body along with {@link Response}. */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); + Response listStorageAccountKeysWithResponse(String resourceGroupName, + String workspaceName, Context context); /** - * Prepare a notebook. + * Lists keys of Azure Machine Learning Workspace's storage account. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); + ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); /** - * List storage account keys of a workspace. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response body along with {@link Response}. */ - Response listStorageAccountKeysWithResponse(String resourceGroupName, + Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, String workspaceName, Context context); /** - * List storage account keys of a workspace. + * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ - ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); + ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); /** - * List keys of a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the response. */ - Response listNotebookKeysWithResponse(String resourceGroupName, String workspaceName, - Context context); + NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); /** - * List keys of a notebook. + * Prepare Azure Machine Learning Workspace's notebook resource. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ - ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); + NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. + * @param workspaceName Azure Machine Learning Workspace Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. */ - Response listOutboundNetworkDependenciesEndpointsWithResponse(String resourceGroupName, - String workspaceName, Context context); + void resyncKeys(String resourceGroupName, String workspaceName); /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. + * Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and + * password for container registry. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param workspaceName Azure Machine Learning Workspace 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 response. */ - ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); + void resyncKeys(String resourceGroupName, String workspaceName, Context context); /** * Gets the properties of the specified machine learning workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java index 3d3d39fb944c..dcac687bfe9b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureMachineLearningWorkspaces. + * Package containing the data models for MachineLearning. * These APIs allow end users to operate on Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java index 2f8911b54f4f..fc6a60ed7e89 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for AzureMachineLearningWorkspaces. + * Package containing the classes for MachineLearning. * These APIs allow end users to operate on Azure Machine Learning Workspace resources. */ package com.azure.resourcemanager.machinelearning; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java index 76d4252f4689..39a953f8cb5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.machinelearning { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.machinelearning.fluent.models to com.azure.core; opens com.azure.resourcemanager.machinelearning.models to com.azure.core; + opens com.azure.resourcemanager.machinelearning.implementation.models to com.azure.core; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json new file mode 100644 index 000000000000..0e902ad1047d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.MachineLearningServices":"2026-05-15-preview"},"crossLanguagePackageId":"Microsoft.MachineLearningServices","crossLanguageVersion":"1dcab8754b9f","crossLanguageDefinitions":{"com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient":"Microsoft.MachineLearningServices.BatchDeployments","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.BatchDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.BatchDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginUpdate":"Microsoft.MachineLearningServices.BatchDeployments.update","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.BatchDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.delete":"Microsoft.MachineLearningServices.BatchDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.get":"Microsoft.MachineLearningServices.BatchDeployments.get","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.BatchDeployments.get","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.list":"Microsoft.MachineLearningServices.BatchDeployments.list","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.update":"Microsoft.MachineLearningServices.BatchDeployments.update","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient":"Microsoft.MachineLearningServices.BatchEndpoints","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.BatchEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.delete":"Microsoft.MachineLearningServices.BatchEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.get":"Microsoft.MachineLearningServices.BatchEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.BatchEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.list":"Microsoft.MachineLearningServices.BatchEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.listKeys":"Microsoft.MachineLearningServices.BatchEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.BatchEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.update":"Microsoft.MachineLearningServices.BatchEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient":"Microsoft.MachineLearningServices.CapabilityHosts","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.beginDelete":"Microsoft.MachineLearningServices.CapabilityHosts.delete","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.createOrUpdate":"Microsoft.MachineLearningServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.delete":"Microsoft.MachineLearningServices.CapabilityHosts.delete","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.get":"Microsoft.MachineLearningServices.CapabilityHosts.get","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.getWithResponse":"Microsoft.MachineLearningServices.CapabilityHosts.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient":"Microsoft.MachineLearningServices.CodeContainers","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.delete":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.get":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.getWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.list":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient":"Microsoft.MachineLearningServices.CodeVersions","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.beginPublish":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.delete":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.get":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.list":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.publish":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient":"Microsoft.MachineLearningServices.ComponentContainers","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.delete":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.get":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.list":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient":"Microsoft.MachineLearningServices.ComponentVersions","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.beginPublish":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.delete":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.get":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.list":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.publish":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComputesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComputeResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginDelete":"Microsoft.MachineLearningServices.ComputeResources.delete","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginResize":"Microsoft.MachineLearningServices.ComputeResources.resize","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginRestart":"Microsoft.MachineLearningServices.ComputeResources.restart","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginStart":"Microsoft.MachineLearningServices.ComputeResources.start","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginStop":"Microsoft.MachineLearningServices.ComputeResources.stop","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginUpdate":"Microsoft.MachineLearningServices.ComputeResources.update","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.createOrUpdate":"Microsoft.MachineLearningServices.ComputeResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.delete":"Microsoft.MachineLearningServices.ComputeResources.delete","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.get":"Microsoft.MachineLearningServices.ComputeResources.get","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getAllowedResizeSizes":"Microsoft.MachineLearningServices.ComputeResources.getAllowedResizeSizes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getAllowedResizeSizesWithResponse":"Microsoft.MachineLearningServices.ComputeResources.getAllowedResizeSizes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getWithResponse":"Microsoft.MachineLearningServices.ComputeResources.get","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.list":"Microsoft.MachineLearningServices.ComputeResources.list","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listKeys":"Microsoft.MachineLearningServices.ComputeResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listKeysWithResponse":"Microsoft.MachineLearningServices.ComputeResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listNodes":"Microsoft.MachineLearningServices.ComputeResources.listNodes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.resize":"Microsoft.MachineLearningServices.ComputeResources.resize","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.restart":"Microsoft.MachineLearningServices.ComputeResources.restart","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.start":"Microsoft.MachineLearningServices.ComputeResources.start","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.stop":"Microsoft.MachineLearningServices.ComputeResources.stop","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.update":"Microsoft.MachineLearningServices.ComputeResources.update","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateCustomServices":"Microsoft.MachineLearningServices.ComputeResources.updateCustomServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateCustomServicesWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateCustomServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateDataMounts":"Microsoft.MachineLearningServices.ComputeResources.updateDataMounts","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateDataMountsWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateDataMounts","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateIdleShutdownSetting":"Microsoft.MachineLearningServices.ComputeResources.updateIdleShutdownSetting","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateIdleShutdownSettingWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateIdleShutdownSetting","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.addBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.addBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginAddBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.addBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginCreate":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginDelete":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginDeleteBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.deleteBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.create":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.delete":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.deleteBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.deleteBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.get":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.getWithResponse":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient.list":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.beginCreate":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.beginDelete":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.create":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.delete":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.get":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.getWithResponse":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient.list":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.beginCreate":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.beginDelete":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.create":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.delete":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.get":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.getWithResponse":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient.list":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.beginCreateOrUpdateDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.createOrUpdateDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.beginDeleteDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.deleteDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.createOrUpdateDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.createOrUpdateDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.deleteDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.deleteDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getAllModels":"Microsoft.MachineLearningServices.Workspaces.getAllModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getAllModelsWithResponse":"Microsoft.MachineLearningServices.Workspaces.getAllModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.getDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getDeploymentWithResponse":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.getDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getModels":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.getModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.listDeployments":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.listDeployments","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient":"Microsoft.MachineLearningServices.DataContainers","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.DataContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.delete":"Microsoft.MachineLearningServices.DataContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.get":"Microsoft.MachineLearningServices.DataContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.getWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.list":"Microsoft.MachineLearningServices.DataContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient":"Microsoft.MachineLearningServices.DataVersions","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.beginPublish":"Microsoft.MachineLearningServices.DataVersions.publish","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.DataVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.DataVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.delete":"Microsoft.MachineLearningServices.DataVersions.delete","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.DataVersions.delete","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.get":"Microsoft.MachineLearningServices.DataVersions.get","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.DataVersions.get","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.list":"Microsoft.MachineLearningServices.DataVersions.list","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.publish":"Microsoft.MachineLearningServices.DataVersions.publish","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient":"Microsoft.MachineLearningServices.Datastores","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.createOrUpdate":"Microsoft.MachineLearningServices.Datastores.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.Datastores.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.delete":"Microsoft.MachineLearningServices.Datastores.delete","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.deleteWithResponse":"Microsoft.MachineLearningServices.Datastores.delete","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.get":"Microsoft.MachineLearningServices.Datastores.get","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.getWithResponse":"Microsoft.MachineLearningServices.Datastores.get","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.list":"Microsoft.MachineLearningServices.Datastores.list","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.listSecrets":"Microsoft.MachineLearningServices.Datastores.listSecrets","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.listSecretsWithResponse":"Microsoft.MachineLearningServices.Datastores.listSecrets","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient":"Microsoft.MachineLearningServices.EndpointDeployment","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EndpointDeployment.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.EndpointDeployment.delete","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.EndpointDeployment.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.delete":"Microsoft.MachineLearningServices.EndpointDeployment.delete","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.get":"Microsoft.MachineLearningServices.EndpointDeployment.get","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.getInWorkspace":"Microsoft.MachineLearningServices.Workspaces.getInWorkspace","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.EndpointDeployment.get","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.list":"Microsoft.MachineLearningServices.EndpointDeployment.list","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.get":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.getModels":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.getModels","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.list":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.listKeys":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.regenerateKeysWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient":"Microsoft.MachineLearningServices.EnvironmentContainers","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.delete":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.get":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.list":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient":"Microsoft.MachineLearningServices.EnvironmentVersions","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.beginPublish":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.delete":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.get":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.list":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.publish":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient":"Microsoft.MachineLearningServices.Features","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.get":"Microsoft.MachineLearningServices.Features.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.getWithResponse":"Microsoft.MachineLearningServices.Features.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.list":"Microsoft.MachineLearningServices.Features.list","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient":"Microsoft.MachineLearningServices.FeaturesetContainers","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturesetContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.beginDelete":"Microsoft.MachineLearningServices.FeaturesetContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturesetContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.delete":"Microsoft.MachineLearningServices.FeaturesetContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.getEntity":"Microsoft.MachineLearningServices.FeaturesetContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.getEntityWithResponse":"Microsoft.MachineLearningServices.FeaturesetContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.list":"Microsoft.MachineLearningServices.FeaturesetContainers.list","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient":"Microsoft.MachineLearningServices.FeaturesetVersions","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.backfill":"Microsoft.MachineLearningServices.FeaturesetVersions.backfill","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginBackfill":"Microsoft.MachineLearningServices.FeaturesetVersions.backfill","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturesetVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginDelete":"Microsoft.MachineLearningServices.FeaturesetVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturesetVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.delete":"Microsoft.MachineLearningServices.FeaturesetVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.get":"Microsoft.MachineLearningServices.FeaturesetVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.FeaturesetVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.list":"Microsoft.MachineLearningServices.FeaturesetVersions.list","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.beginDelete":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.delete":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.getEntity":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.getEntityWithResponse":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.list":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.list","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.beginDelete":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.delete":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.get":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.list":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.list","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient":"Microsoft.MachineLearningServices.InferenceEndpoints","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.InferenceEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.delete":"Microsoft.MachineLearningServices.InferenceEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.get":"Microsoft.MachineLearningServices.InferenceEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.InferenceEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.list":"Microsoft.MachineLearningServices.InferenceEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.update":"Microsoft.MachineLearningServices.InferenceEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient":"Microsoft.MachineLearningServices.InferenceGroups","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferenceGroups.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginDelete":"Microsoft.MachineLearningServices.InferenceGroups.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginModifyDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.modifyDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginUpdate":"Microsoft.MachineLearningServices.InferenceGroups.update","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferenceGroups.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.delete":"Microsoft.MachineLearningServices.InferenceGroups.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.get":"Microsoft.MachineLearningServices.InferenceGroups.get","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getDeltaModelsStatusAsync":"Microsoft.MachineLearningServices.InferenceGroups.getDeltaModelsStatusAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getDeltaModelsStatusAsyncWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.getDeltaModelsStatusAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getStatus":"Microsoft.MachineLearningServices.InferenceGroups.getStatus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getStatusWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.getStatus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.get","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.list":"Microsoft.MachineLearningServices.InferenceGroups.list","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.listDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.listDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.listSkus":"Microsoft.MachineLearningServices.InferenceGroups.listSkus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.modifyDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.modifyDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.update":"Microsoft.MachineLearningServices.InferenceGroups.update","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient":"Microsoft.MachineLearningServices.InferencePools","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferencePools.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginDelete":"Microsoft.MachineLearningServices.InferencePools.delete","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginUpdate":"Microsoft.MachineLearningServices.InferencePools.update","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferencePools.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.delete":"Microsoft.MachineLearningServices.InferencePools.delete","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.get":"Microsoft.MachineLearningServices.InferencePools.get","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.getWithResponse":"Microsoft.MachineLearningServices.InferencePools.get","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.list":"Microsoft.MachineLearningServices.InferencePools.list","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.update":"Microsoft.MachineLearningServices.InferencePools.update","com.azure.resourcemanager.machinelearning.fluent.JobsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.JobsClient.beginCancel":"Microsoft.MachineLearningServices.JobBases.cancel","com.azure.resourcemanager.machinelearning.fluent.JobsClient.beginDelete":"Microsoft.MachineLearningServices.JobBases.delete","com.azure.resourcemanager.machinelearning.fluent.JobsClient.cancel":"Microsoft.MachineLearningServices.JobBases.cancel","com.azure.resourcemanager.machinelearning.fluent.JobsClient.createOrUpdate":"Microsoft.MachineLearningServices.JobBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.JobsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.JobBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.JobsClient.delete":"Microsoft.MachineLearningServices.JobBases.delete","com.azure.resourcemanager.machinelearning.fluent.JobsClient.get":"Microsoft.MachineLearningServices.JobBases.get","com.azure.resourcemanager.machinelearning.fluent.JobsClient.getWithResponse":"Microsoft.MachineLearningServices.JobBases.get","com.azure.resourcemanager.machinelearning.fluent.JobsClient.list":"Microsoft.MachineLearningServices.JobBases.list","com.azure.resourcemanager.machinelearning.fluent.MachineLearningManagementClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient.beginProvisionManagedNetwork":"Microsoft.MachineLearningServices.Workspaces.provisionManagedNetwork","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient.provisionManagedNetwork":"Microsoft.MachineLearningServices.Workspaces.provisionManagedNetwork","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.beginPatch":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.beginPut":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.get":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.getWithResponse":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.list":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.patch":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.put":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.beginDelete":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.createOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.delete":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.get":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.getWithResponse":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.list":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient":"Microsoft.MachineLearningServices.MarketplaceSubscriptions","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.beginDelete":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.delete","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.createOrUpdate":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.delete":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.delete","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.get":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.get","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.getWithResponse":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.get","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.list":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.list","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient":"Microsoft.MachineLearningServices.ModelContainers","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.delete":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.get":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.list":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient":"Microsoft.MachineLearningServices.ModelVersions","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.beginPublish":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.delete":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.get":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.list":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.publish":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient":"Microsoft.MachineLearningServices.OnlineDeployments","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.OnlineDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.update","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.delete":"Microsoft.MachineLearningServices.OnlineDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.get":"Microsoft.MachineLearningServices.OnlineDeployments.get","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getLogs":"Microsoft.MachineLearningServices.OnlineDeployments.getLogs","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getLogsWithResponse":"Microsoft.MachineLearningServices.OnlineDeployments.getLogs","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.OnlineDeployments.get","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.list":"Microsoft.MachineLearningServices.OnlineDeployments.list","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.listSkus":"Microsoft.MachineLearningServices.OnlineDeployments.listSkus","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.update":"Microsoft.MachineLearningServices.OnlineDeployments.update","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient":"Microsoft.MachineLearningServices.OnlineEndpoints","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.OnlineEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginRegenerateKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.delete":"Microsoft.MachineLearningServices.OnlineEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.get":"Microsoft.MachineLearningServices.OnlineEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getToken":"Microsoft.MachineLearningServices.OnlineEndpoints.getToken","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getTokenWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.getToken","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.list":"Microsoft.MachineLearningServices.OnlineEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.listKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.update":"Microsoft.MachineLearningServices.OnlineEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.OperationsClient":"Microsoft.MachineLearningServices.Operations","com.azure.resourcemanager.machinelearning.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.beginDelete":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.createOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.delete":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.get":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.getWithResponse":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.list":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient.post":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.post","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.getAvailable":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.getAvailable","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.getAvailableWithResponse":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.getAvailable","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.list":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.listAvailable":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.listAvailable","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient":"Microsoft.MachineLearningServices.PrivateEndpointConnections","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.MachineLearningServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.MachineLearningServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.MachineLearningServices.PrivateEndpointConnections.get","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.get","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.MachineLearningServices.PrivateEndpointConnections.list","com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient.list":"Microsoft.MachineLearningServices.Workspaces.privateLinkResourcesList","com.azure.resourcemanager.machinelearning.fluent.QuotasClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.list":"Microsoft.MachineLearningServices.QuotasOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.update":"Microsoft.MachineLearningServices.QuotasOperationGroup.update","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.updateWithResponse":"Microsoft.MachineLearningServices.QuotasOperationGroup.update","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient":"Microsoft.MachineLearningServices.RaiPolicy","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.beginCreate":"Microsoft.MachineLearningServices.RaiPolicy.create","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.beginDelete":"Microsoft.MachineLearningServices.RaiPolicy.delete","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.create":"Microsoft.MachineLearningServices.RaiPolicy.create","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.delete":"Microsoft.MachineLearningServices.RaiPolicy.delete","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.get":"Microsoft.MachineLearningServices.RaiPolicy.get","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.getWithResponse":"Microsoft.MachineLearningServices.RaiPolicy.get","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient.list":"Microsoft.MachineLearningServices.RaiPolicy.list","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient":"Microsoft.MachineLearningServices.Registries","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Registries.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginDelete":"Microsoft.MachineLearningServices.Registries.delete","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginRemoveRegions":"Microsoft.MachineLearningServices.Registries.removeRegions","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.createOrUpdate":"Microsoft.MachineLearningServices.Registries.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.delete":"Microsoft.MachineLearningServices.Registries.delete","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.getByResourceGroup":"Microsoft.MachineLearningServices.Registries.get","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.getByResourceGroupWithResponse":"Microsoft.MachineLearningServices.Registries.get","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.list":"Microsoft.MachineLearningServices.Registries.listBySubscription","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.listByResourceGroup":"Microsoft.MachineLearningServices.Registries.list","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.removeRegions":"Microsoft.MachineLearningServices.Registries.removeRegions","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.update":"Microsoft.MachineLearningServices.Registries.update","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.updateWithResponse":"Microsoft.MachineLearningServices.Registries.update","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CodeContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.beginDelete":"Microsoft.MachineLearningServices.CodeContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.delete":"Microsoft.MachineLearningServices.CodeContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.get":"Microsoft.MachineLearningServices.CodeContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.getWithResponse":"Microsoft.MachineLearningServices.CodeContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.list":"Microsoft.MachineLearningServices.CodeContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CodeVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.beginDelete":"Microsoft.MachineLearningServices.CodeVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.CodeVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.CodeVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.delete":"Microsoft.MachineLearningServices.CodeVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.get":"Microsoft.MachineLearningServices.CodeVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.CodeVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.list":"Microsoft.MachineLearningServices.CodeVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComponentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.beginDelete":"Microsoft.MachineLearningServices.ComponentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.delete":"Microsoft.MachineLearningServices.ComponentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.get":"Microsoft.MachineLearningServices.ComponentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.list":"Microsoft.MachineLearningServices.ComponentContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComponentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.beginDelete":"Microsoft.MachineLearningServices.ComponentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.delete":"Microsoft.MachineLearningServices.ComponentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.get":"Microsoft.MachineLearningServices.ComponentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.list":"Microsoft.MachineLearningServices.ComponentVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.DataContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.beginDelete":"Microsoft.MachineLearningServices.DataContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.DataContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.delete":"Microsoft.MachineLearningServices.DataContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.get":"Microsoft.MachineLearningServices.DataContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.getWithResponse":"Microsoft.MachineLearningServices.DataContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.list":"Microsoft.MachineLearningServices.DataContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient.getBlobReferenceSas":"Microsoft.MachineLearningServices.Registries.getBlobReferenceSAS","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient.getBlobReferenceSasWithResponse":"Microsoft.MachineLearningServices.Registries.getBlobReferenceSAS","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.DataVersionBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.beginDelete":"Microsoft.MachineLearningServices.DataVersionBases.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.DataVersionBases.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.DataVersionBases.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.DataVersionBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.delete":"Microsoft.MachineLearningServices.DataVersionBases.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.get":"Microsoft.MachineLearningServices.DataVersionBases.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.DataVersionBases.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.list":"Microsoft.MachineLearningServices.DataVersionBases.list","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.beginDelete":"Microsoft.MachineLearningServices.EnvironmentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.delete":"Microsoft.MachineLearningServices.EnvironmentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.get":"Microsoft.MachineLearningServices.EnvironmentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.list":"Microsoft.MachineLearningServices.EnvironmentContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.beginDelete":"Microsoft.MachineLearningServices.EnvironmentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.delete":"Microsoft.MachineLearningServices.EnvironmentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.get":"Microsoft.MachineLearningServices.EnvironmentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.list":"Microsoft.MachineLearningServices.EnvironmentVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ModelContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.beginDelete":"Microsoft.MachineLearningServices.ModelContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.delete":"Microsoft.MachineLearningServices.ModelContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.get":"Microsoft.MachineLearningServices.ModelContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ModelContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.list":"Microsoft.MachineLearningServices.ModelContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ModelVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.beginDelete":"Microsoft.MachineLearningServices.ModelVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.ModelVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.ModelVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.delete":"Microsoft.MachineLearningServices.ModelVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.get":"Microsoft.MachineLearningServices.ModelVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ModelVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.list":"Microsoft.MachineLearningServices.ModelVersions.list","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient":"Microsoft.MachineLearningServices.Schedules","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Schedules.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.beginDelete":"Microsoft.MachineLearningServices.Schedules.delete","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.createOrUpdate":"Microsoft.MachineLearningServices.Schedules.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.delete":"Microsoft.MachineLearningServices.Schedules.delete","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.get":"Microsoft.MachineLearningServices.Schedules.get","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.getWithResponse":"Microsoft.MachineLearningServices.Schedules.get","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.list":"Microsoft.MachineLearningServices.Schedules.list","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient":"Microsoft.MachineLearningServices.ServerlessEndpoints","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.ServerlessEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginRegenerateKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.delete":"Microsoft.MachineLearningServices.ServerlessEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.get":"Microsoft.MachineLearningServices.ServerlessEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.ServerlessEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.list":"Microsoft.MachineLearningServices.ServerlessEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.listKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.ServerlessEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.update":"Microsoft.MachineLearningServices.ServerlessEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.UsagesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.UsagesClient.list":"Microsoft.MachineLearningServices.UsagesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient.list":"Microsoft.MachineLearningServices.VirtualMachineSizesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient.listWithResponse":"Microsoft.MachineLearningServices.VirtualMachineSizesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.beginTestConnection":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.testConnection","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.create":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.createWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.delete":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.get":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.getWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.list":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.list","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.listSecrets":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.listSecrets","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.listSecretsWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.listSecrets","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.testConnection":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.testConnection","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.update":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.updateWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient.list":"Microsoft.MachineLearningServices.Workspaces.list","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient":"Microsoft.MachineLearningServices.Workspaces","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Workspaces.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginDelete":"Microsoft.MachineLearningServices.Workspaces.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginDiagnose":"Microsoft.MachineLearningServices.Workspaces.diagnose","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginPrepareNotebook":"Microsoft.MachineLearningServices.Workspaces.prepareNotebook","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginResyncKeys":"Microsoft.MachineLearningServices.Workspaces.resyncKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginUpdate":"Microsoft.MachineLearningServices.Workspaces.update","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.createOrUpdate":"Microsoft.MachineLearningServices.Workspaces.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.delete":"Microsoft.MachineLearningServices.Workspaces.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.diagnose":"Microsoft.MachineLearningServices.Workspaces.diagnose","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.getByResourceGroup":"Microsoft.MachineLearningServices.Workspaces.get","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.getByResourceGroupWithResponse":"Microsoft.MachineLearningServices.Workspaces.get","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.list":"Microsoft.MachineLearningServices.Workspaces.listBySubscription","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listByResourceGroup":"Microsoft.MachineLearningServices.Workspaces.listByResourceGroup","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listKeys":"Microsoft.MachineLearningServices.Workspaces.listKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookAccessToken":"Microsoft.MachineLearningServices.Workspaces.listNotebookAccessToken","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookAccessTokenWithResponse":"Microsoft.MachineLearningServices.Workspaces.listNotebookAccessToken","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookKeys":"Microsoft.MachineLearningServices.Workspaces.listNotebookKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listNotebookKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listOutboundNetworkDependenciesEndpoints":"Microsoft.MachineLearningServices.Workspaces.listOutboundNetworkDependenciesEndpoints","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listOutboundNetworkDependenciesEndpointsWithResponse":"Microsoft.MachineLearningServices.Workspaces.listOutboundNetworkDependenciesEndpoints","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listStorageAccountKeys":"Microsoft.MachineLearningServices.Workspaces.listStorageAccountKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listStorageAccountKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listStorageAccountKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.prepareNotebook":"Microsoft.MachineLearningServices.Workspaces.prepareNotebook","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.resyncKeys":"Microsoft.MachineLearningServices.Workspaces.resyncKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.update":"Microsoft.MachineLearningServices.Workspaces.update","com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner":"Microsoft.MachineLearningServices.AccountApiKeys","com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner":"Microsoft.MachineLearningServices.AmlUserFeature","com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner":"Microsoft.MachineLearningServices.AvailableQuota","com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner":"Microsoft.MachineLearningServices.BatchDeployment","com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner":"Microsoft.MachineLearningServices.BatchEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner":"Microsoft.MachineLearningServices.CapabilityHost","com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties":"Microsoft.MachineLearningServices.ClusterUpdateProperties","com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner":"Microsoft.MachineLearningServices.CodeContainer","com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner":"Microsoft.MachineLearningServices.CodeVersion","com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner":"Microsoft.MachineLearningServices.ComponentContainer","com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner":"Microsoft.MachineLearningServices.ComponentVersion","com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner":"Microsoft.MachineLearningServices.ComputeResource","com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner":"Microsoft.MachineLearningServices.ComputeSecrets","com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner":"Microsoft.MachineLearningServices.DataContainer","com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner":"Microsoft.MachineLearningServices.DataVersionBase","com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner":"Microsoft.MachineLearningServices.Datastore","com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner":"Microsoft.MachineLearningServices.DatastoreSecrets","com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner":"Microsoft.MachineLearningServices.DeltaModelStatusResponse","com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner":"Microsoft.MachineLearningServices.DeploymentLogs","com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner":"Microsoft.MachineLearningServices.DiagnoseResponseResult","com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner":"Microsoft.MachineLearningServices.EndpointAuthKeys","com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner":"Microsoft.MachineLearningServices.EndpointAuthToken","com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner":"Microsoft.MachineLearningServices.EndpointKeys","com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner":"Microsoft.MachineLearningServices.EndpointModelProperties","com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner":"Microsoft.MachineLearningServices.EndpointModels","com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner":"Microsoft.MachineLearningServices.EndpointPropertiesBase","com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner":"Microsoft.MachineLearningServices.EnvironmentContainer","com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner":"Microsoft.MachineLearningServices.EnvironmentVersion","com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner":"Microsoft.MachineLearningServices.ExternalFQDNResponse","com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner":"Microsoft.MachineLearningServices.Feature","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner":"Microsoft.MachineLearningServices.FeaturesetContainer","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner":"Microsoft.MachineLearningServices.FeaturesetVersionBackfillResponse","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner":"Microsoft.MachineLearningServices.FeaturesetVersion","com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner":"Microsoft.MachineLearningServices.FeaturestoreEntityContainer","com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner":"Microsoft.MachineLearningServices.FeaturestoreEntityVersion","com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner":"Microsoft.MachineLearningServices.GetBlobReferenceSASResponseDto","com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner":"Microsoft.MachineLearningServices.GroupStatus","com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner":"Microsoft.MachineLearningServices.InferenceEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner":"Microsoft.MachineLearningServices.InferenceGroup","com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner":"Microsoft.MachineLearningServices.InferencePool","com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner":"Microsoft.MachineLearningServices.JobBase","com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner":"Microsoft.MachineLearningServices.ListNotebookKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner":"Microsoft.MachineLearningServices.ListStorageAccountKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner":"Microsoft.MachineLearningServices.ListWorkspaceKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner":"Microsoft.MachineLearningServices.ManagedNetworkProvisionStatus","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner":"Microsoft.MachineLearningServices.ManagedNetworkSettingsBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner":"Microsoft.MachineLearningServices.ManagedNetworkSettings","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner":"Microsoft.MachineLearningServices.MarketplaceSubscription","com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner":"Microsoft.MachineLearningServices.ModelContainer","com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner":"Microsoft.MachineLearningServices.ModelVersion","com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner":"Microsoft.MachineLearningServices.NotebookAccessTokenResult","com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner":"Microsoft.MachineLearningServices.NotebookResourceInfo","com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner":"Microsoft.MachineLearningServices.OnlineDeployment","com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner":"Microsoft.MachineLearningServices.OnlineEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner":"Microsoft.MachineLearningServices.OutboundRuleBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner":"Microsoft.MachineLearningServices.PendingUploadResponseDto","com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner":"Microsoft.MachineLearningServices.PrivateEndpointConnection","com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties":"Microsoft.MachineLearningServices.PrivateEndpointConnectionProperties","com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner":"Microsoft.MachineLearningServices.PrivateLinkResource","com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties":"Microsoft.MachineLearningServices.PrivateLinkResourceProperties","com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner":"Microsoft.MachineLearningServices.Registry","com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties":"Microsoft.MachineLearningServices.RegistryPrivateEndpointConnectionProperties","com.azure.resourcemanager.machinelearning.fluent.models.RegistryProperties":"Microsoft.MachineLearningServices.RegistryProperties","com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner":"Microsoft.MachineLearningServices.ResourceQuota","com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner":"Microsoft.MachineLearningServices.Schedule","com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner":"Microsoft.MachineLearningServices.ServerlessEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty":"Microsoft.MachineLearningServices.SharedPrivateLinkResourceProperty","com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner":"Microsoft.MachineLearningServices.SkuResource","com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner":"Microsoft.MachineLearningServices.UpdateWorkspaceQuotasResult","com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner":"Microsoft.MachineLearningServices.UsageAndQuotaDetails","com.azure.resourcemanager.machinelearning.fluent.models.UsageInner":"Microsoft.MachineLearningServices.Usage","com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner":"Microsoft.MachineLearningServices.VirtualMachineSizeListResult","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResource","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner":"Microsoft.MachineLearningServices.Workspace","com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner":"Microsoft.MachineLearningServices.WorkspaceProperties","com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner":"Microsoft.MachineLearningServices.WorkspacePropertiesUpdateParameters","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner":"Microsoft.MachineLearningServices.WorkspaceUpdateParameters","com.azure.resourcemanager.machinelearning.implementation.MachineLearningManagementClientBuilder":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.implementation.models.AmlComputeNodesInformation":"Microsoft.MachineLearningServices.AmlComputeNodesInformation","com.azure.resourcemanager.machinelearning.implementation.models.AvailableQuotaArmPaginatedResult":"Microsoft.MachineLearningServices.AvailableQuotaArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.BatchDeploymentTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.BatchDeploymentTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.BatchEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.BatchEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.CodeContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.CodeContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.CodeVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.CodeVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ComponentContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ComponentContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ComponentVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ComponentVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DataContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DataContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DataVersionBaseResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DataVersionBaseResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DatastoreResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DatastoreResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EndpointResourcePropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EnvironmentContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EnvironmentVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeatureResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeatureResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturesetContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturesetVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturestoreEntityContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturestoreEntityVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferenceEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferenceEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferenceGroupTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferenceGroupTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferencePoolTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferencePoolTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.JobBaseResourceArmPaginatedResult":"Microsoft.MachineLearningServices.JobBaseResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ListAmlUserFeatureResult":"Microsoft.MachineLearningServices.ListAmlUserFeatureResult","com.azure.resourcemanager.machinelearning.implementation.models.ListUsagesResult":"Microsoft.MachineLearningServices.ListUsagesResult","com.azure.resourcemanager.machinelearning.implementation.models.ListWorkspaceQuotas":"Microsoft.MachineLearningServices.ListWorkspaceQuotas","com.azure.resourcemanager.machinelearning.implementation.models.ManagedNetworkListResult":"Microsoft.MachineLearningServices.ManagedNetworkListResult","com.azure.resourcemanager.machinelearning.implementation.models.MarketplaceSubscriptionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.MarketplaceSubscriptionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ModelContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ModelContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ModelVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ModelVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OnlineDeploymentTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.OnlineDeploymentTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OnlineEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.OnlineEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.machinelearning.implementation.models.OutboundRuleListResult":"Microsoft.MachineLearningServices.OutboundRuleListResult","com.azure.resourcemanager.machinelearning.implementation.models.PaginatedComputeResourcesList":"Microsoft.MachineLearningServices.PaginatedComputeResourcesList","com.azure.resourcemanager.machinelearning.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.MachineLearningServices.PrivateEndpointConnectionListResult","com.azure.resourcemanager.machinelearning.implementation.models.PrivateLinkResourceListResult":"Microsoft.MachineLearningServices.PrivateLinkResourceListResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RegistryTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RegistryTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ScheduleResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ScheduleResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ServerlessEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ServerlessEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.SkuResourceArmPaginatedResult":"Microsoft.MachineLearningServices.SkuResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.StringArmPaginatedResult":"Microsoft.MachineLearningServices.StringArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.UsageAndQuotaDetailsArmPaginatedResult":"Microsoft.MachineLearningServices.UsageAndQuotaDetailsArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.machinelearning.models.AKS":"Microsoft.MachineLearningServices.AKS","com.azure.resourcemanager.machinelearning.models.AKSComputeSecrets":"Microsoft.MachineLearningServices.AksComputeSecrets","com.azure.resourcemanager.machinelearning.models.AKSNetworkingConfiguration":"Microsoft.MachineLearningServices.AksNetworkingConfiguration","com.azure.resourcemanager.machinelearning.models.AKSSchemaProperties":"Microsoft.MachineLearningServices.AKSSchemaProperties","com.azure.resourcemanager.machinelearning.models.AadAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AADAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AccessKeyAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccountKeyAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AccountKeyAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials":"Microsoft.MachineLearningServices.AccountKeyDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets":"Microsoft.MachineLearningServices.AccountKeyDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.AcrDetails":"Microsoft.MachineLearningServices.AcrDetails","com.azure.resourcemanager.machinelearning.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo":"Microsoft.MachineLearningServices.ActualCapacityInfo","com.azure.resourcemanager.machinelearning.models.AllFeatures":"Microsoft.MachineLearningServices.AllFeatures","com.azure.resourcemanager.machinelearning.models.AllNodes":"Microsoft.MachineLearningServices.AllNodes","com.azure.resourcemanager.machinelearning.models.AllocationState":"Microsoft.MachineLearningServices.AllocationState","com.azure.resourcemanager.machinelearning.models.AllowedContentLevel":"Microsoft.MachineLearningServices.AllowedContentLevel","com.azure.resourcemanager.machinelearning.models.AmlCompute":"Microsoft.MachineLearningServices.AmlCompute","com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation":"Microsoft.MachineLearningServices.AmlComputeNodeInformation","com.azure.resourcemanager.machinelearning.models.AmlComputeProperties":"Microsoft.MachineLearningServices.AmlComputeProperties","com.azure.resourcemanager.machinelearning.models.AmlToken":"Microsoft.MachineLearningServices.AmlToken","com.azure.resourcemanager.machinelearning.models.AmlTokenComputeIdentity":"Microsoft.MachineLearningServices.AmlTokenComputeIdentity","com.azure.resourcemanager.machinelearning.models.AnonymousAccessCredential":"Microsoft.MachineLearningServices.AnonymousAccessCredential","com.azure.resourcemanager.machinelearning.models.ApiKeyAuthWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ApiKeyAuthWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy":"Microsoft.MachineLearningServices.ApplicationSharingPolicy","com.azure.resourcemanager.machinelearning.models.ArmResourceId":"Microsoft.MachineLearningServices.ArmResourceId","com.azure.resourcemanager.machinelearning.models.AssetBase":"Microsoft.MachineLearningServices.AssetBase","com.azure.resourcemanager.machinelearning.models.AssetContainer":"Microsoft.MachineLearningServices.AssetContainer","com.azure.resourcemanager.machinelearning.models.AssetProvisioningState":"Microsoft.MachineLearningServices.AssetProvisioningState","com.azure.resourcemanager.machinelearning.models.AssetReferenceBase":"Microsoft.MachineLearningServices.AssetReferenceBase","com.azure.resourcemanager.machinelearning.models.AssignedUser":"Microsoft.MachineLearningServices.AssignedUser","com.azure.resourcemanager.machinelearning.models.AuthMode":"Microsoft.MachineLearningServices.AuthMode","com.azure.resourcemanager.machinelearning.models.AutoForecastHorizon":"Microsoft.MachineLearningServices.AutoForecastHorizon","com.azure.resourcemanager.machinelearning.models.AutoMLJob":"Microsoft.MachineLearningServices.AutoMLJob","com.azure.resourcemanager.machinelearning.models.AutoMLVertical":"Microsoft.MachineLearningServices.AutoMLVertical","com.azure.resourcemanager.machinelearning.models.AutoNCrossValidations":"Microsoft.MachineLearningServices.AutoNCrossValidations","com.azure.resourcemanager.machinelearning.models.AutoPauseProperties":"Microsoft.MachineLearningServices.AutoPauseProperties","com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting":"Microsoft.MachineLearningServices.AutoRebuildSetting","com.azure.resourcemanager.machinelearning.models.AutoScaleProperties":"Microsoft.MachineLearningServices.AutoScaleProperties","com.azure.resourcemanager.machinelearning.models.AutoSeasonality":"Microsoft.MachineLearningServices.AutoSeasonality","com.azure.resourcemanager.machinelearning.models.AutoTargetLags":"Microsoft.MachineLearningServices.AutoTargetLags","com.azure.resourcemanager.machinelearning.models.AutoTargetRollingWindowSize":"Microsoft.MachineLearningServices.AutoTargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.Autosave":"Microsoft.MachineLearningServices.Autosave","com.azure.resourcemanager.machinelearning.models.AvailableQuotaProperties":"Microsoft.MachineLearningServices.AvailableQuotaProperties","com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore":"Microsoft.MachineLearningServices.AzureBlobDatastore","com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore":"Microsoft.MachineLearningServices.AzureDataLakeGen1Datastore","com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore":"Microsoft.MachineLearningServices.AzureDataLakeGen2Datastore","com.azure.resourcemanager.machinelearning.models.AzureDevOpsWebhook":"Microsoft.MachineLearningServices.AzureDevOpsWebhook","com.azure.resourcemanager.machinelearning.models.AzureFileDatastore":"Microsoft.MachineLearningServices.AzureFileDatastore","com.azure.resourcemanager.machinelearning.models.AzureOpenAiFineTuning":"Microsoft.MachineLearningServices.AzureOpenAiFineTuning","com.azure.resourcemanager.machinelearning.models.AzureOpenAiHyperParameters":"Microsoft.MachineLearningServices.AzureOpenAiHyperParameters","com.azure.resourcemanager.machinelearning.models.BanditPolicy":"Microsoft.MachineLearningServices.BanditPolicy","com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfiguration":"Microsoft.MachineLearningServices.BatchDeploymentConfiguration","com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfigurationType":"Microsoft.MachineLearningServices.BatchDeploymentConfigurationType","com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties":"Microsoft.MachineLearningServices.BatchDeploymentProperties","com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults":"Microsoft.MachineLearningServices.BatchEndpointDefaults","com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties":"Microsoft.MachineLearningServices.BatchEndpointProperties","com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel":"Microsoft.MachineLearningServices.BatchLoggingLevel","com.azure.resourcemanager.machinelearning.models.BatchOutputAction":"Microsoft.MachineLearningServices.BatchOutputAction","com.azure.resourcemanager.machinelearning.models.BatchPipelineComponentDeploymentConfiguration":"Microsoft.MachineLearningServices.BatchPipelineComponentDeploymentConfiguration","com.azure.resourcemanager.machinelearning.models.BatchRetrySettings":"Microsoft.MachineLearningServices.BatchRetrySettings","com.azure.resourcemanager.machinelearning.models.BayesianSamplingAlgorithm":"Microsoft.MachineLearningServices.BayesianSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.BillingCurrency":"Microsoft.MachineLearningServices.BillingCurrency","com.azure.resourcemanager.machinelearning.models.BindOptions":"Microsoft.MachineLearningServices.BindOptions","com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto":"Microsoft.MachineLearningServices.BlobReferenceForConsumptionDto","com.azure.resourcemanager.machinelearning.models.BlockedTransformers":"Microsoft.MachineLearningServices.BlockedTransformers","com.azure.resourcemanager.machinelearning.models.BuildContext":"Microsoft.MachineLearningServices.BuildContext","com.azure.resourcemanager.machinelearning.models.Caching":"Microsoft.MachineLearningServices.Caching","com.azure.resourcemanager.machinelearning.models.CapabilityHostKind":"Microsoft.MachineLearningServices.CapabilityHostKind","com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties":"Microsoft.MachineLearningServices.CapabilityHostProperties","com.azure.resourcemanager.machinelearning.models.CapabilityHostProvisioningState":"Microsoft.MachineLearningServices.CapabilityHostProvisioningState","com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetric":"Microsoft.MachineLearningServices.CategoricalDataDriftMetric","com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetricThreshold":"Microsoft.MachineLearningServices.CategoricalDataDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetric":"Microsoft.MachineLearningServices.CategoricalDataQualityMetric","com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetricThreshold":"Microsoft.MachineLearningServices.CategoricalDataQualityMetricThreshold","com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetric":"Microsoft.MachineLearningServices.CategoricalPredictionDriftMetric","com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetricThreshold":"Microsoft.MachineLearningServices.CategoricalPredictionDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.CertificateDatastoreCredentials":"Microsoft.MachineLearningServices.CertificateDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.CertificateDatastoreSecrets":"Microsoft.MachineLearningServices.CertificateDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.Classification":"Microsoft.MachineLearningServices.Classification","com.azure.resourcemanager.machinelearning.models.ClassificationModels":"Microsoft.MachineLearningServices.ClassificationModels","com.azure.resourcemanager.machinelearning.models.ClassificationMultilabelPrimaryMetrics":"Microsoft.MachineLearningServices.ClassificationMultilabelPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics":"Microsoft.MachineLearningServices.ClassificationPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings":"Microsoft.MachineLearningServices.ClassificationTrainingSettings","com.azure.resourcemanager.machinelearning.models.ClusterPurpose":"Microsoft.MachineLearningServices.ClusterPurpose","com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters":"Microsoft.MachineLearningServices.ClusterUpdateParameters","com.azure.resourcemanager.machinelearning.models.CodeConfiguration":"Microsoft.MachineLearningServices.CodeConfiguration","com.azure.resourcemanager.machinelearning.models.CodeContainerProperties":"Microsoft.MachineLearningServices.CodeContainerProperties","com.azure.resourcemanager.machinelearning.models.CodeVersionProperties":"Microsoft.MachineLearningServices.CodeVersionProperties","com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku":"Microsoft.MachineLearningServices.CognitiveServicesSku","com.azure.resourcemanager.machinelearning.models.Collection":"Microsoft.MachineLearningServices.Collection","com.azure.resourcemanager.machinelearning.models.ColumnTransformer":"Microsoft.MachineLearningServices.ColumnTransformer","com.azure.resourcemanager.machinelearning.models.CommandJob":"Microsoft.MachineLearningServices.CommandJob","com.azure.resourcemanager.machinelearning.models.CommandJobLimits":"Microsoft.MachineLearningServices.CommandJobLimits","com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties":"Microsoft.MachineLearningServices.ComponentContainerProperties","com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties":"Microsoft.MachineLearningServices.ComponentVersionProperties","com.azure.resourcemanager.machinelearning.models.Compute":"Microsoft.MachineLearningServices.Compute","com.azure.resourcemanager.machinelearning.models.ComputeInstance":"Microsoft.MachineLearningServices.ComputeInstance","com.azure.resourcemanager.machinelearning.models.ComputeInstanceApplication":"Microsoft.MachineLearningServices.ComputeInstanceApplication","com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType":"Microsoft.MachineLearningServices.ComputeInstanceAuthorizationType","com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings":"Microsoft.MachineLearningServices.ComputeInstanceAutologgerSettings","com.azure.resourcemanager.machinelearning.models.ComputeInstanceConnectivityEndpoints":"Microsoft.MachineLearningServices.ComputeInstanceConnectivityEndpoints","com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer":"Microsoft.MachineLearningServices.ComputeInstanceContainer","com.azure.resourcemanager.machinelearning.models.ComputeInstanceCreatedBy":"Microsoft.MachineLearningServices.ComputeInstanceCreatedBy","com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataDisk":"Microsoft.MachineLearningServices.ComputeInstanceDataDisk","com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount":"Microsoft.MachineLearningServices.ComputeInstanceDataMount","com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo":"Microsoft.MachineLearningServices.ComputeInstanceEnvironmentInfo","com.azure.resourcemanager.machinelearning.models.ComputeInstanceLastOperation":"Microsoft.MachineLearningServices.ComputeInstanceLastOperation","com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties":"Microsoft.MachineLearningServices.ComputeInstanceProperties","com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings":"Microsoft.MachineLearningServices.ComputeInstanceSshSettings","com.azure.resourcemanager.machinelearning.models.ComputeInstanceState":"Microsoft.MachineLearningServices.ComputeInstanceState","com.azure.resourcemanager.machinelearning.models.ComputeInstanceVersion":"Microsoft.MachineLearningServices.ComputeInstanceVersion","com.azure.resourcemanager.machinelearning.models.ComputePowerAction":"Microsoft.MachineLearningServices.ComputePowerAction","com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency":"Microsoft.MachineLearningServices.ComputeRecurrenceFrequency","com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule":"Microsoft.MachineLearningServices.ComputeRecurrenceSchedule","com.azure.resourcemanager.machinelearning.models.ComputeRuntimeDto":"Microsoft.MachineLearningServices.ComputeRuntimeDto","com.azure.resourcemanager.machinelearning.models.ComputeSchedules":"Microsoft.MachineLearningServices.ComputeSchedules","com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule":"Microsoft.MachineLearningServices.ComputeStartStopSchedule","com.azure.resourcemanager.machinelearning.models.ComputeTriggerType":"Microsoft.MachineLearningServices.ComputeTriggerType","com.azure.resourcemanager.machinelearning.models.ComputeType":"Microsoft.MachineLearningServices.ComputeType","com.azure.resourcemanager.machinelearning.models.ComputeWeekDay":"Microsoft.MachineLearningServices.ComputeWeekDay","com.azure.resourcemanager.machinelearning.models.ConnectionAuthType":"Microsoft.MachineLearningServices.ConnectionAuthType","com.azure.resourcemanager.machinelearning.models.ConnectionCategory":"Microsoft.MachineLearningServices.ConnectionCategory","com.azure.resourcemanager.machinelearning.models.ConnectionGroup":"Microsoft.MachineLearningServices.ConnectionGroup","com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements":"Microsoft.MachineLearningServices.ContainerResourceRequirements","com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings":"Microsoft.MachineLearningServices.ContainerResourceSettings","com.azure.resourcemanager.machinelearning.models.ContainerType":"Microsoft.MachineLearningServices.ContainerType","com.azure.resourcemanager.machinelearning.models.ContentSafety":"Microsoft.MachineLearningServices.ContentSafety","com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.ContentSafetyEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointResourceProperties":"Microsoft.MachineLearningServices.ContentSafetyEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel":"Microsoft.MachineLearningServices.ContentSafetyLevel","com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus":"Microsoft.MachineLearningServices.ContentSafetyStatus","com.azure.resourcemanager.machinelearning.models.CosmosDbSettings":"Microsoft.MachineLearningServices.CosmosDbSettings","com.azure.resourcemanager.machinelearning.models.CreateMonitorAction":"Microsoft.MachineLearningServices.CreateMonitorAction","com.azure.resourcemanager.machinelearning.models.CredentialsType":"Microsoft.MachineLearningServices.CredentialsType","com.azure.resourcemanager.machinelearning.models.Cron":"Microsoft.MachineLearningServices.Cron","com.azure.resourcemanager.machinelearning.models.CronTrigger":"Microsoft.MachineLearningServices.CronTrigger","com.azure.resourcemanager.machinelearning.models.CustomForecastHorizon":"Microsoft.MachineLearningServices.CustomForecastHorizon","com.azure.resourcemanager.machinelearning.models.CustomKeys":"Microsoft.MachineLearningServices.CustomKeys","com.azure.resourcemanager.machinelearning.models.CustomKeysWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.CustomKeysWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.CustomMetricThreshold":"Microsoft.MachineLearningServices.CustomMetricThreshold","com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning":"Microsoft.MachineLearningServices.CustomModelFineTuning","com.azure.resourcemanager.machinelearning.models.CustomModelJobInput":"Microsoft.MachineLearningServices.CustomModelJobInput","com.azure.resourcemanager.machinelearning.models.CustomModelJobOutput":"Microsoft.MachineLearningServices.CustomModelJobOutput","com.azure.resourcemanager.machinelearning.models.CustomMonitoringSignal":"Microsoft.MachineLearningServices.CustomMonitoringSignal","com.azure.resourcemanager.machinelearning.models.CustomNCrossValidations":"Microsoft.MachineLearningServices.CustomNCrossValidations","com.azure.resourcemanager.machinelearning.models.CustomSeasonality":"Microsoft.MachineLearningServices.CustomSeasonality","com.azure.resourcemanager.machinelearning.models.CustomService":"Microsoft.MachineLearningServices.CustomService","com.azure.resourcemanager.machinelearning.models.CustomTargetLags":"Microsoft.MachineLearningServices.CustomTargetLags","com.azure.resourcemanager.machinelearning.models.CustomTargetRollingWindowSize":"Microsoft.MachineLearningServices.CustomTargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus":"Microsoft.MachineLearningServices.DataAvailabilityStatus","com.azure.resourcemanager.machinelearning.models.DataCollectionMode":"Microsoft.MachineLearningServices.DataCollectionMode","com.azure.resourcemanager.machinelearning.models.DataCollector":"Microsoft.MachineLearningServices.DataCollector","com.azure.resourcemanager.machinelearning.models.DataContainerProperties":"Microsoft.MachineLearningServices.DataContainerProperties","com.azure.resourcemanager.machinelearning.models.DataDriftMetricThresholdBase":"Microsoft.MachineLearningServices.DataDriftMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.DataDriftMonitoringSignal":"Microsoft.MachineLearningServices.DataDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.DataFactory":"Microsoft.MachineLearningServices.DataFactory","com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType":"Microsoft.MachineLearningServices.DataGenerationTaskType","com.azure.resourcemanager.machinelearning.models.DataGenerationType":"Microsoft.MachineLearningServices.DataGenerationType","com.azure.resourcemanager.machinelearning.models.DataGenerationVertical":"Microsoft.MachineLearningServices.DataGenerationVertical","com.azure.resourcemanager.machinelearning.models.DataLakeAnalytics":"Microsoft.MachineLearningServices.DataLakeAnalytics","com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties":"Microsoft.MachineLearningServices.DataLakeAnalyticsSchemaProperties","com.azure.resourcemanager.machinelearning.models.DataPathAssetReference":"Microsoft.MachineLearningServices.DataPathAssetReference","com.azure.resourcemanager.machinelearning.models.DataQualityMetricThresholdBase":"Microsoft.MachineLearningServices.DataQualityMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.DataQualityMonitoringSignal":"Microsoft.MachineLearningServices.DataQualityMonitoringSignal","com.azure.resourcemanager.machinelearning.models.DataReferenceCredential":"Microsoft.MachineLearningServices.DataReferenceCredential","com.azure.resourcemanager.machinelearning.models.DataReferenceCredentialType":"Microsoft.MachineLearningServices.DataReferenceCredentialType","com.azure.resourcemanager.machinelearning.models.DataType":"Microsoft.MachineLearningServices.DataType","com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties":"Microsoft.MachineLearningServices.DataVersionBaseProperties","com.azure.resourcemanager.machinelearning.models.Databricks":"Microsoft.MachineLearningServices.Databricks","com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets":"Microsoft.MachineLearningServices.DatabricksComputeSecrets","com.azure.resourcemanager.machinelearning.models.DatabricksProperties":"Microsoft.MachineLearningServices.DatabricksProperties","com.azure.resourcemanager.machinelearning.models.DatasetReference":"Microsoft.MachineLearningServices.DatasetReference","com.azure.resourcemanager.machinelearning.models.DatastoreCredentials":"Microsoft.MachineLearningServices.DatastoreCredentials","com.azure.resourcemanager.machinelearning.models.DatastoreProperties":"Microsoft.MachineLearningServices.DatastoreProperties","com.azure.resourcemanager.machinelearning.models.DatastoreType":"Microsoft.MachineLearningServices.DatastoreType","com.azure.resourcemanager.machinelearning.models.DefaultActionType":"Microsoft.MachineLearningServices.DefaultActionType","com.azure.resourcemanager.machinelearning.models.DefaultResourceProvisioningState":"Microsoft.MachineLearningServices.DefaultResourceProvisioningState","com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings":"Microsoft.MachineLearningServices.DefaultScaleSettings","com.azure.resourcemanager.machinelearning.models.DeltaModelCurrentState":"Microsoft.MachineLearningServices.DeltaModelCurrentState","com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest":"Microsoft.MachineLearningServices.DeltaModelListRequest","com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest":"Microsoft.MachineLearningServices.DeltaModelModifyRequest","com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest":"Microsoft.MachineLearningServices.DeltaModelStatusRequest","com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest":"Microsoft.MachineLearningServices.DeploymentLogsRequest","com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption":"Microsoft.MachineLearningServices.DeploymentModelVersionUpgradeOption","com.azure.resourcemanager.machinelearning.models.DeploymentProvisioningState":"Microsoft.MachineLearningServices.DeploymentProvisioningState","com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration":"Microsoft.MachineLearningServices.DeploymentResourceConfiguration","com.azure.resourcemanager.machinelearning.models.DestinationAsset":"Microsoft.MachineLearningServices.DestinationAsset","com.azure.resourcemanager.machinelearning.models.DiagnoseRequestProperties":"Microsoft.MachineLearningServices.DiagnoseRequestProperties","com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue":"Microsoft.MachineLearningServices.DiagnoseResponseResultValue","com.azure.resourcemanager.machinelearning.models.DiagnoseResult":"Microsoft.MachineLearningServices.DiagnoseResult","com.azure.resourcemanager.machinelearning.models.DiagnoseResultLevel":"Microsoft.MachineLearningServices.DiagnoseResultLevel","com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters":"Microsoft.MachineLearningServices.DiagnoseWorkspaceParameters","com.azure.resourcemanager.machinelearning.models.DistillationJob":"Microsoft.MachineLearningServices.DistillationJob","com.azure.resourcemanager.machinelearning.models.DistributionConfiguration":"Microsoft.MachineLearningServices.DistributionConfiguration","com.azure.resourcemanager.machinelearning.models.DistributionType":"Microsoft.MachineLearningServices.DistributionType","com.azure.resourcemanager.machinelearning.models.Docker":"Microsoft.MachineLearningServices.Docker","com.azure.resourcemanager.machinelearning.models.DockerCredential":"Microsoft.MachineLearningServices.DockerCredential","com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy":"Microsoft.MachineLearningServices.EarlyTerminationPolicy","com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicyType":"Microsoft.MachineLearningServices.EarlyTerminationPolicyType","com.azure.resourcemanager.machinelearning.models.EgressPublicNetworkAccessType":"Microsoft.MachineLearningServices.EgressPublicNetworkAccessType","com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType":"Microsoft.MachineLearningServices.EmailNotificationEnableType","com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultUpdateProperties":"Microsoft.MachineLearningServices.EncryptionKeyVaultUpdateProperties","com.azure.resourcemanager.machinelearning.models.EncryptionProperty":"Microsoft.MachineLearningServices.EncryptionProperty","com.azure.resourcemanager.machinelearning.models.EncryptionStatus":"Microsoft.MachineLearningServices.EncryptionStatus","com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties":"Microsoft.MachineLearningServices.EncryptionUpdateProperties","com.azure.resourcemanager.machinelearning.models.Endpoint":"Microsoft.MachineLearningServices.Endpoint","com.azure.resourcemanager.machinelearning.models.EndpointAuthMode":"Microsoft.MachineLearningServices.EndpointAuthMode","com.azure.resourcemanager.machinelearning.models.EndpointComputeType":"Microsoft.MachineLearningServices.EndpointComputeType","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel":"Microsoft.MachineLearningServices.EndpointDeploymentModel","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentPropertiesBase":"Microsoft.MachineLearningServices.EndpointDeploymentPropertiesBase","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.EndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties":"Microsoft.MachineLearningServices.EndpointModelDeprecationProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuCapacityProperties":"Microsoft.MachineLearningServices.EndpointModelSkuCapacityProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuProperties":"Microsoft.MachineLearningServices.EndpointModelSkuProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitRulePatternProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitRulePatternProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitRuleProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitRuleProperties","com.azure.resourcemanager.machinelearning.models.EndpointProvisioningState":"Microsoft.MachineLearningServices.EndpointProvisioningState","com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties":"Microsoft.MachineLearningServices.EndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction":"Microsoft.MachineLearningServices.EndpointScheduleAction","com.azure.resourcemanager.machinelearning.models.EndpointType":"Microsoft.MachineLearningServices.EndpointType","com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties":"Microsoft.MachineLearningServices.EnvironmentContainerProperties","com.azure.resourcemanager.machinelearning.models.EnvironmentType":"Microsoft.MachineLearningServices.EnvironmentType","com.azure.resourcemanager.machinelearning.models.EnvironmentVariable":"Microsoft.MachineLearningServices.EnvironmentVariable","com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType":"Microsoft.MachineLearningServices.EnvironmentVariableType","com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties":"Microsoft.MachineLearningServices.EnvironmentVersionProperties","com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice":"Microsoft.MachineLearningServices.EstimatedVMPrice","com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices":"Microsoft.MachineLearningServices.EstimatedVMPrices","com.azure.resourcemanager.machinelearning.models.FeatureAttributionDriftMonitoringSignal":"Microsoft.MachineLearningServices.FeatureAttributionDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetric":"Microsoft.MachineLearningServices.FeatureAttributionMetric","com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold":"Microsoft.MachineLearningServices.FeatureAttributionMetricThreshold","com.azure.resourcemanager.machinelearning.models.FeatureDataType":"Microsoft.MachineLearningServices.FeatureDataType","com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode":"Microsoft.MachineLearningServices.FeatureImportanceMode","com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings":"Microsoft.MachineLearningServices.FeatureImportanceSettings","com.azure.resourcemanager.machinelearning.models.FeatureLags":"Microsoft.MachineLearningServices.FeatureLags","com.azure.resourcemanager.machinelearning.models.FeatureProperties":"Microsoft.MachineLearningServices.FeatureProperties","com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings":"Microsoft.MachineLearningServices.FeatureStoreSettings","com.azure.resourcemanager.machinelearning.models.FeatureSubset":"Microsoft.MachineLearningServices.FeatureSubset","com.azure.resourcemanager.machinelearning.models.FeatureWindow":"Microsoft.MachineLearningServices.FeatureWindow","com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties":"Microsoft.MachineLearningServices.FeaturesetContainerProperties","com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification":"Microsoft.MachineLearningServices.FeaturesetSpecification","com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest":"Microsoft.MachineLearningServices.FeaturesetVersionBackfillRequest","com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties":"Microsoft.MachineLearningServices.FeaturesetVersionProperties","com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties":"Microsoft.MachineLearningServices.FeaturestoreEntityContainerProperties","com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties":"Microsoft.MachineLearningServices.FeaturestoreEntityVersionProperties","com.azure.resourcemanager.machinelearning.models.FeaturizationMode":"Microsoft.MachineLearningServices.FeaturizationMode","com.azure.resourcemanager.machinelearning.models.FeaturizationSettings":"Microsoft.MachineLearningServices.FeaturizationSettings","com.azure.resourcemanager.machinelearning.models.FineTuningJob":"Microsoft.MachineLearningServices.FineTuningJob","com.azure.resourcemanager.machinelearning.models.FineTuningTaskType":"Microsoft.MachineLearningServices.FineTuningTaskType","com.azure.resourcemanager.machinelearning.models.FineTuningVertical":"Microsoft.MachineLearningServices.FineTuningVertical","com.azure.resourcemanager.machinelearning.models.FinetuningDetails":"Microsoft.MachineLearningServices.FinetuningDetails","com.azure.resourcemanager.machinelearning.models.FirewallSku":"Microsoft.MachineLearningServices.FirewallSku","com.azure.resourcemanager.machinelearning.models.FixedInputData":"Microsoft.MachineLearningServices.FixedInputData","com.azure.resourcemanager.machinelearning.models.FlavorData":"Microsoft.MachineLearningServices.FlavorData","com.azure.resourcemanager.machinelearning.models.ForecastHorizon":"Microsoft.MachineLearningServices.ForecastHorizon","com.azure.resourcemanager.machinelearning.models.ForecastHorizonMode":"Microsoft.MachineLearningServices.ForecastHorizonMode","com.azure.resourcemanager.machinelearning.models.Forecasting":"Microsoft.MachineLearningServices.Forecasting","com.azure.resourcemanager.machinelearning.models.ForecastingModels":"Microsoft.MachineLearningServices.ForecastingModels","com.azure.resourcemanager.machinelearning.models.ForecastingPrimaryMetrics":"Microsoft.MachineLearningServices.ForecastingPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ForecastingSettings":"Microsoft.MachineLearningServices.ForecastingSettings","com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings":"Microsoft.MachineLearningServices.ForecastingTrainingSettings","com.azure.resourcemanager.machinelearning.models.FqdnEndpoint":"Microsoft.MachineLearningServices.FqdnEndpoint","com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail":"Microsoft.MachineLearningServices.FqdnEndpointDetail","com.azure.resourcemanager.machinelearning.models.FqdnEndpoints":"Microsoft.MachineLearningServices.FqdnEndpoints","com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag":"Microsoft.MachineLearningServices.FqdnEndpointsPropertyBag","com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule":"Microsoft.MachineLearningServices.FqdnOutboundRule","com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto":"Microsoft.MachineLearningServices.GetBlobReferenceForConsumptionDto","com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto":"Microsoft.MachineLearningServices.GetBlobReferenceSASRequestDto","com.azure.resourcemanager.machinelearning.models.Goal":"Microsoft.MachineLearningServices.Goal","com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm":"Microsoft.MachineLearningServices.GridSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.GroupEnvironmentConfiguration":"Microsoft.MachineLearningServices.GroupEnvironmentConfiguration","com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration":"Microsoft.MachineLearningServices.GroupModelConfiguration","com.azure.resourcemanager.machinelearning.models.HDInsight":"Microsoft.MachineLearningServices.HDInsight","com.azure.resourcemanager.machinelearning.models.HDInsightProperties":"Microsoft.MachineLearningServices.HDInsightProperties","com.azure.resourcemanager.machinelearning.models.IPRule":"Microsoft.MachineLearningServices.IPRule","com.azure.resourcemanager.machinelearning.models.IdAssetReference":"Microsoft.MachineLearningServices.IdAssetReference","com.azure.resourcemanager.machinelearning.models.IdentityConfiguration":"Microsoft.MachineLearningServices.IdentityConfiguration","com.azure.resourcemanager.machinelearning.models.IdentityConfigurationType":"Microsoft.MachineLearningServices.IdentityConfigurationType","com.azure.resourcemanager.machinelearning.models.IdentityForCmk":"Microsoft.MachineLearningServices.IdentityForCmk","com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting":"Microsoft.MachineLearningServices.IdleShutdownSetting","com.azure.resourcemanager.machinelearning.models.Image":"Microsoft.MachineLearningServices.Image","com.azure.resourcemanager.machinelearning.models.ImageClassification":"Microsoft.MachineLearningServices.ImageClassification","com.azure.resourcemanager.machinelearning.models.ImageClassificationMultilabel":"Microsoft.MachineLearningServices.ImageClassificationMultilabel","com.azure.resourcemanager.machinelearning.models.ImageDetails":"Microsoft.MachineLearningServices.ImageDetails","com.azure.resourcemanager.machinelearning.models.ImageInfo":"Microsoft.MachineLearningServices.ImageInfo","com.azure.resourcemanager.machinelearning.models.ImageInstanceSegmentation":"Microsoft.MachineLearningServices.ImageInstanceSegmentation","com.azure.resourcemanager.machinelearning.models.ImageLimitSettings":"Microsoft.MachineLearningServices.ImageLimitSettings","com.azure.resourcemanager.machinelearning.models.ImageMetadata":"Microsoft.MachineLearningServices.ImageMetadata","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings":"Microsoft.MachineLearningServices.ImageModelDistributionSettings","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification":"Microsoft.MachineLearningServices.ImageModelDistributionSettingsClassification","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection":"Microsoft.MachineLearningServices.ImageModelDistributionSettingsObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageModelSettings":"Microsoft.MachineLearningServices.ImageModelSettings","com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification":"Microsoft.MachineLearningServices.ImageModelSettingsClassification","com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection":"Microsoft.MachineLearningServices.ImageModelSettingsObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageObjectDetection":"Microsoft.MachineLearningServices.ImageObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageSweepSettings":"Microsoft.MachineLearningServices.ImageSweepSettings","com.azure.resourcemanager.machinelearning.models.ImageType":"Microsoft.MachineLearningServices.ImageType","com.azure.resourcemanager.machinelearning.models.IndexColumn":"Microsoft.MachineLearningServices.IndexColumn","com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties":"Microsoft.MachineLearningServices.InferenceContainerProperties","com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties":"Microsoft.MachineLearningServices.InferenceEndpointProperties","com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties":"Microsoft.MachineLearningServices.InferenceGroupProperties","com.azure.resourcemanager.machinelearning.models.InferencePoolProperties":"Microsoft.MachineLearningServices.InferencePoolProperties","com.azure.resourcemanager.machinelearning.models.InputDeliveryMode":"Microsoft.MachineLearningServices.InputDeliveryMode","com.azure.resourcemanager.machinelearning.models.InstanceSegmentationPrimaryMetrics":"Microsoft.MachineLearningServices.InstanceSegmentationPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema":"Microsoft.MachineLearningServices.InstanceTypeSchema","com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources":"Microsoft.MachineLearningServices.InstanceTypeSchemaResources","com.azure.resourcemanager.machinelearning.models.IsolationMode":"Microsoft.MachineLearningServices.IsolationMode","com.azure.resourcemanager.machinelearning.models.JobBaseProperties":"Microsoft.MachineLearningServices.JobBaseProperties","com.azure.resourcemanager.machinelearning.models.JobInput":"Microsoft.MachineLearningServices.JobInput","com.azure.resourcemanager.machinelearning.models.JobInputType":"Microsoft.MachineLearningServices.JobInputType","com.azure.resourcemanager.machinelearning.models.JobLimits":"Microsoft.MachineLearningServices.JobLimits","com.azure.resourcemanager.machinelearning.models.JobLimitsType":"Microsoft.MachineLearningServices.JobLimitsType","com.azure.resourcemanager.machinelearning.models.JobOutput":"Microsoft.MachineLearningServices.JobOutput","com.azure.resourcemanager.machinelearning.models.JobOutputType":"Microsoft.MachineLearningServices.JobOutputType","com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration":"Microsoft.MachineLearningServices.JobResourceConfiguration","com.azure.resourcemanager.machinelearning.models.JobResources":"Microsoft.MachineLearningServices.JobResources","com.azure.resourcemanager.machinelearning.models.JobScheduleAction":"Microsoft.MachineLearningServices.JobScheduleAction","com.azure.resourcemanager.machinelearning.models.JobService":"Microsoft.MachineLearningServices.JobService","com.azure.resourcemanager.machinelearning.models.JobStatus":"Microsoft.MachineLearningServices.JobStatus","com.azure.resourcemanager.machinelearning.models.JobTier":"Microsoft.MachineLearningServices.JobTier","com.azure.resourcemanager.machinelearning.models.JobType":"Microsoft.MachineLearningServices.JobType","com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig":"Microsoft.MachineLearningServices.JupyterKernelConfig","com.azure.resourcemanager.machinelearning.models.KeyType":"Microsoft.MachineLearningServices.KeyType","com.azure.resourcemanager.machinelearning.models.KeyVaultProperties":"Microsoft.MachineLearningServices.KeyVaultProperties","com.azure.resourcemanager.machinelearning.models.Kubernetes":"Microsoft.MachineLearningServices.Kubernetes","com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment":"Microsoft.MachineLearningServices.KubernetesOnlineDeployment","com.azure.resourcemanager.machinelearning.models.KubernetesProperties":"Microsoft.MachineLearningServices.KubernetesProperties","com.azure.resourcemanager.machinelearning.models.LabelGeneration":"Microsoft.MachineLearningServices.LabelGeneration","com.azure.resourcemanager.machinelearning.models.LakeHouseArtifact":"Microsoft.MachineLearningServices.LakeHouseArtifact","com.azure.resourcemanager.machinelearning.models.LearningRateScheduler":"Microsoft.MachineLearningServices.LearningRateScheduler","com.azure.resourcemanager.machinelearning.models.ListViewType":"Microsoft.MachineLearningServices.ListViewType","com.azure.resourcemanager.machinelearning.models.LiteralJobInput":"Microsoft.MachineLearningServices.LiteralJobInput","com.azure.resourcemanager.machinelearning.models.LoadBalancerType":"Microsoft.MachineLearningServices.LoadBalancerType","com.azure.resourcemanager.machinelearning.models.LogVerbosity":"Microsoft.MachineLearningServices.LogVerbosity","com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput":"Microsoft.MachineLearningServices.MLFlowModelJobInput","com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput":"Microsoft.MachineLearningServices.MLFlowModelJobOutput","com.azure.resourcemanager.machinelearning.models.MLTableData":"Microsoft.MachineLearningServices.MLTableData","com.azure.resourcemanager.machinelearning.models.MLTableJobInput":"Microsoft.MachineLearningServices.MLTableJobInput","com.azure.resourcemanager.machinelearning.models.MLTableJobOutput":"Microsoft.MachineLearningServices.MLTableJobOutput","com.azure.resourcemanager.machinelearning.models.ManagedComputeIdentity":"Microsoft.MachineLearningServices.ManagedComputeIdentity","com.azure.resourcemanager.machinelearning.models.ManagedIdentity":"Microsoft.MachineLearningServices.ManagedIdentity","com.azure.resourcemanager.machinelearning.models.ManagedIdentityAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ManagedIdentityAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ManagedIdentityCredential":"Microsoft.MachineLearningServices.ManagedIdentityCredential","com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind":"Microsoft.MachineLearningServices.ManagedNetworkKind","com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions":"Microsoft.MachineLearningServices.ManagedNetworkProvisionOptions","com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisioningState":"Microsoft.MachineLearningServices.ManagedNetworkProvisioningState","com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx":"Microsoft.MachineLearningServices.ManagedNetworkSettingsEx","com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties":"Microsoft.MachineLearningServices.ManagedNetworkSettingsProperties","com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus":"Microsoft.MachineLearningServices.ManagedNetworkStatus","com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment":"Microsoft.MachineLearningServices.ManagedOnlineDeployment","com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.ManagedOnlineEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointResourceProperties":"Microsoft.MachineLearningServices.ManagedOnlineEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ManagedPERequirement":"Microsoft.MachineLearningServices.ManagedPERequirement","com.azure.resourcemanager.machinelearning.models.ManagedPEStatus":"Microsoft.MachineLearningServices.ManagedPEStatus","com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities":"Microsoft.MachineLearningServices.ManagedResourceGroupAssignedIdentities","com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings":"Microsoft.MachineLearningServices.ManagedResourceGroupSettings","com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.machinelearning.models.MarketplacePlan":"Microsoft.MachineLearningServices.MarketplacePlan","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties":"Microsoft.MachineLearningServices.MarketplaceSubscriptionProperties","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProvisioningState":"Microsoft.MachineLearningServices.MarketplaceSubscriptionProvisioningState","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionStatus":"Microsoft.MachineLearningServices.MarketplaceSubscriptionStatus","com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource":"Microsoft.MachineLearningServices.MaterializationComputeResource","com.azure.resourcemanager.machinelearning.models.MaterializationSettings":"Microsoft.MachineLearningServices.MaterializationSettings","com.azure.resourcemanager.machinelearning.models.MaterializationStoreType":"Microsoft.MachineLearningServices.MaterializationStoreType","com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy":"Microsoft.MachineLearningServices.MedianStoppingPolicy","com.azure.resourcemanager.machinelearning.models.MlflowAutologger":"Microsoft.MachineLearningServices.MlflowAutologger","com.azure.resourcemanager.machinelearning.models.ModelContainerProperties":"Microsoft.MachineLearningServices.ModelContainerProperties","com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus":"Microsoft.MachineLearningServices.ModelLifecycleStatus","com.azure.resourcemanager.machinelearning.models.ModelProvider":"Microsoft.MachineLearningServices.ModelProvider","com.azure.resourcemanager.machinelearning.models.ModelSettings":"Microsoft.MachineLearningServices.ModelSettings","com.azure.resourcemanager.machinelearning.models.ModelSize":"Microsoft.MachineLearningServices.ModelSize","com.azure.resourcemanager.machinelearning.models.ModelTaskType":"Microsoft.MachineLearningServices.ModelTaskType","com.azure.resourcemanager.machinelearning.models.ModelVersionProperties":"Microsoft.MachineLearningServices.ModelVersionProperties","com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase":"Microsoft.MachineLearningServices.MonitorComputeConfigurationBase","com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityBase":"Microsoft.MachineLearningServices.MonitorComputeIdentityBase","com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityType":"Microsoft.MachineLearningServices.MonitorComputeIdentityType","com.azure.resourcemanager.machinelearning.models.MonitorComputeType":"Microsoft.MachineLearningServices.MonitorComputeType","com.azure.resourcemanager.machinelearning.models.MonitorDefinition":"Microsoft.MachineLearningServices.MonitorDefinition","com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings":"Microsoft.MachineLearningServices.MonitorEmailNotificationSettings","com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings":"Microsoft.MachineLearningServices.MonitorNotificationSettings","com.azure.resourcemanager.machinelearning.models.MonitorServerlessSparkCompute":"Microsoft.MachineLearningServices.MonitorServerlessSparkCompute","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType":"Microsoft.MachineLearningServices.MonitoringFeatureDataType","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase":"Microsoft.MachineLearningServices.MonitoringFeatureFilterBase","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterType":"Microsoft.MachineLearningServices.MonitoringFeatureFilterType","com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase":"Microsoft.MachineLearningServices.MonitoringInputDataBase","com.azure.resourcemanager.machinelearning.models.MonitoringInputDataType":"Microsoft.MachineLearningServices.MonitoringInputDataType","com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType":"Microsoft.MachineLearningServices.MonitoringNotificationType","com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase":"Microsoft.MachineLearningServices.MonitoringSignalBase","com.azure.resourcemanager.machinelearning.models.MonitoringSignalType":"Microsoft.MachineLearningServices.MonitoringSignalType","com.azure.resourcemanager.machinelearning.models.MonitoringTarget":"Microsoft.MachineLearningServices.MonitoringTarget","com.azure.resourcemanager.machinelearning.models.MonitoringThreshold":"Microsoft.MachineLearningServices.MonitoringThreshold","com.azure.resourcemanager.machinelearning.models.MountAction":"Microsoft.MachineLearningServices.MountAction","com.azure.resourcemanager.machinelearning.models.MountMode":"Microsoft.MachineLearningServices.MountMode","com.azure.resourcemanager.machinelearning.models.MountState":"Microsoft.MachineLearningServices.MountState","com.azure.resourcemanager.machinelearning.models.Mpi":"Microsoft.MachineLearningServices.Mpi","com.azure.resourcemanager.machinelearning.models.NCrossValidations":"Microsoft.MachineLearningServices.NCrossValidations","com.azure.resourcemanager.machinelearning.models.NCrossValidationsMode":"Microsoft.MachineLearningServices.NCrossValidationsMode","com.azure.resourcemanager.machinelearning.models.Network":"Microsoft.MachineLearningServices.Network","com.azure.resourcemanager.machinelearning.models.NetworkAcls":"Microsoft.MachineLearningServices.NetworkAcls","com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings":"Microsoft.MachineLearningServices.NlpVerticalFeaturizationSettings","com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings":"Microsoft.MachineLearningServices.NlpVerticalLimitSettings","com.azure.resourcemanager.machinelearning.models.NodeState":"Microsoft.MachineLearningServices.NodeState","com.azure.resourcemanager.machinelearning.models.NodeStateCounts":"Microsoft.MachineLearningServices.NodeStateCounts","com.azure.resourcemanager.machinelearning.models.Nodes":"Microsoft.MachineLearningServices.Nodes","com.azure.resourcemanager.machinelearning.models.NodesValueType":"Microsoft.MachineLearningServices.NodesValueType","com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.NoneAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.NoneDatastoreCredentials":"Microsoft.MachineLearningServices.NoneDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.NotebookPreparationError":"Microsoft.MachineLearningServices.NotebookPreparationError","com.azure.resourcemanager.machinelearning.models.NotificationSetting":"Microsoft.MachineLearningServices.NotificationSetting","com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetric":"Microsoft.MachineLearningServices.NumericalDataDriftMetric","com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetricThreshold":"Microsoft.MachineLearningServices.NumericalDataDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetric":"Microsoft.MachineLearningServices.NumericalDataQualityMetric","com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetricThreshold":"Microsoft.MachineLearningServices.NumericalDataQualityMetricThreshold","com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetric":"Microsoft.MachineLearningServices.NumericalPredictionDriftMetric","com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetricThreshold":"Microsoft.MachineLearningServices.NumericalPredictionDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.OAuth2AuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.OAuth2AuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ObjectDetectionPrimaryMetrics":"Microsoft.MachineLearningServices.ObjectDetectionPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.Objective":"Microsoft.MachineLearningServices.Objective","com.azure.resourcemanager.machinelearning.models.OneLakeArtifact":"Microsoft.MachineLearningServices.OneLakeArtifact","com.azure.resourcemanager.machinelearning.models.OneLakeArtifactType":"Microsoft.MachineLearningServices.OneLakeArtifactType","com.azure.resourcemanager.machinelearning.models.OneLakeDatastore":"Microsoft.MachineLearningServices.OneLakeDatastore","com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties":"Microsoft.MachineLearningServices.OnlineDeploymentProperties","com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties":"Microsoft.MachineLearningServices.OnlineEndpointProperties","com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings":"Microsoft.MachineLearningServices.OnlineRequestSettings","com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings":"Microsoft.MachineLearningServices.OnlineScaleSettings","com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.OpenAIEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties":"Microsoft.MachineLearningServices.OpenAIEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.OperatingSystemType":"Microsoft.MachineLearningServices.OperatingSystemType","com.azure.resourcemanager.machinelearning.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.machinelearning.models.OperationName":"Microsoft.MachineLearningServices.OperationName","com.azure.resourcemanager.machinelearning.models.OperationStatus":"Microsoft.MachineLearningServices.OperationStatus","com.azure.resourcemanager.machinelearning.models.OperationTrigger":"Microsoft.MachineLearningServices.OperationTrigger","com.azure.resourcemanager.machinelearning.models.OrderString":"Microsoft.MachineLearningServices.OrderString","com.azure.resourcemanager.machinelearning.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.machinelearning.models.OsPatchingStatus":"Microsoft.MachineLearningServices.OsPatchingStatus","com.azure.resourcemanager.machinelearning.models.OsType":"Microsoft.MachineLearningServices.OsType","com.azure.resourcemanager.machinelearning.models.OutboundRule":"Microsoft.MachineLearningServices.OutboundRule","com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode":"Microsoft.MachineLearningServices.OutputDeliveryMode","com.azure.resourcemanager.machinelearning.models.OutputPathAssetReference":"Microsoft.MachineLearningServices.OutputPathAssetReference","com.azure.resourcemanager.machinelearning.models.PATAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.PATAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.PTUDeploymentUsage":"Microsoft.MachineLearningServices.PTUDeploymentUsage","com.azure.resourcemanager.machinelearning.models.PackageDetails":"Microsoft.MachineLearningServices.PackageDetails","com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment":"Microsoft.MachineLearningServices.PartialBatchDeployment","com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties":"Microsoft.MachineLearningServices.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties","com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity":"Microsoft.MachineLearningServices.PartialManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResource":"Microsoft.MachineLearningServices.PartialMinimalTrackedResource","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithIdentity","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithSku","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithSkuAndIdentity","com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource":"Microsoft.MachineLearningServices.PartialRegistryPartialTrackedResource","com.azure.resourcemanager.machinelearning.models.PartialSku":"Microsoft.MachineLearningServices.PartialSku","com.azure.resourcemanager.machinelearning.models.Password":"Microsoft.MachineLearningServices.Password","com.azure.resourcemanager.machinelearning.models.PatchStatus":"Microsoft.MachineLearningServices.PatchStatus","com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialDto":"Microsoft.MachineLearningServices.PendingUploadCredentialDto","com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialType":"Microsoft.MachineLearningServices.PendingUploadCredentialType","com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto":"Microsoft.MachineLearningServices.PendingUploadRequestDto","com.azure.resourcemanager.machinelearning.models.PendingUploadType":"Microsoft.MachineLearningServices.PendingUploadType","com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings":"Microsoft.MachineLearningServices.PersonalComputeInstanceSettings","com.azure.resourcemanager.machinelearning.models.PipelineJob":"Microsoft.MachineLearningServices.PipelineJob","com.azure.resourcemanager.machinelearning.models.PoolProvisioningState":"Microsoft.MachineLearningServices.PoolProvisioningState","com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase":"Microsoft.MachineLearningServices.PredictionDriftMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.PredictionDriftMonitoringSignal":"Microsoft.MachineLearningServices.PredictionDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState":"Microsoft.MachineLearningServices.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.machinelearning.models.PrivateEndpointDestination":"Microsoft.MachineLearningServices.PrivateEndpointDestination","com.azure.resourcemanager.machinelearning.models.PrivateEndpointOutboundRule":"Microsoft.MachineLearningServices.PrivateEndpointOutboundRule","com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource":"Microsoft.MachineLearningServices.PrivateEndpointResource","com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus":"Microsoft.MachineLearningServices.EndpointServiceConnectionStatus","com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState":"Microsoft.MachineLearningServices.PrivateLinkServiceConnectionState","com.azure.resourcemanager.machinelearning.models.ProbeSettings":"Microsoft.MachineLearningServices.ProbeSettings","com.azure.resourcemanager.machinelearning.models.PromptSettings":"Microsoft.MachineLearningServices.PromptSettings","com.azure.resourcemanager.machinelearning.models.PropertiesBase":"Microsoft.MachineLearningServices.PropertiesBase","com.azure.resourcemanager.machinelearning.models.Protocol":"Microsoft.MachineLearningServices.Protocol","com.azure.resourcemanager.machinelearning.models.ProvisioningState":"Microsoft.MachineLearningServices.ProvisioningState","com.azure.resourcemanager.machinelearning.models.ProvisioningStatus":"Microsoft.MachineLearningServices.ProvisioningStatus","com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess":"Microsoft.MachineLearningServices.PublicNetworkAccessType","com.azure.resourcemanager.machinelearning.models.PyTorch":"Microsoft.MachineLearningServices.PyTorch","com.azure.resourcemanager.machinelearning.models.QueueSettings":"Microsoft.MachineLearningServices.QueueSettings","com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties":"Microsoft.MachineLearningServices.QuotaBaseProperties","com.azure.resourcemanager.machinelearning.models.QuotaUnit":"Microsoft.MachineLearningServices.QuotaUnit","com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters":"Microsoft.MachineLearningServices.QuotaUpdateParameters","com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig":"Microsoft.MachineLearningServices.RaiBlocklistConfig","com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest":"Microsoft.MachineLearningServices.RaiBlocklistItemBulkRequest","com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties":"Microsoft.MachineLearningServices.RaiBlocklistItemProperties","com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties":"Microsoft.MachineLearningServices.RaiBlocklistProperties","com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter":"Microsoft.MachineLearningServices.RaiPolicyContentFilter","com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource":"Microsoft.MachineLearningServices.RaiPolicyContentSource","com.azure.resourcemanager.machinelearning.models.RaiPolicyMode":"Microsoft.MachineLearningServices.RaiPolicyMode","com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties":"Microsoft.MachineLearningServices.RaiPolicyProperties","com.azure.resourcemanager.machinelearning.models.RaiPolicyType":"Microsoft.MachineLearningServices.RaiPolicyType","com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm":"Microsoft.MachineLearningServices.RandomSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithmRule":"Microsoft.MachineLearningServices.RandomSamplingAlgorithmRule","com.azure.resourcemanager.machinelearning.models.Ray":"Microsoft.MachineLearningServices.Ray","com.azure.resourcemanager.machinelearning.models.Recurrence":"Microsoft.MachineLearningServices.Recurrence","com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency":"Microsoft.MachineLearningServices.RecurrenceFrequency","com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule":"Microsoft.MachineLearningServices.RecurrenceSchedule","com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger":"Microsoft.MachineLearningServices.RecurrenceTrigger","com.azure.resourcemanager.machinelearning.models.ReferenceType":"Microsoft.MachineLearningServices.ReferenceType","com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest":"Microsoft.MachineLearningServices.RegenerateEndpointKeysRequest","com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent":"Microsoft.MachineLearningServices.RegenerateServiceAccountKeyContent","com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult":"Microsoft.MachineLearningServices.RegistryListCredentialsResult","com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity":"Microsoft.MachineLearningServices.RegistryPartialManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection":"Microsoft.MachineLearningServices.RegistryPrivateEndpointConnection","com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState":"Microsoft.MachineLearningServices.RegistryPrivateLinkServiceConnectionState","com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails":"Microsoft.MachineLearningServices.RegistryRegionArmDetails","com.azure.resourcemanager.machinelearning.models.Regression":"Microsoft.MachineLearningServices.Regression","com.azure.resourcemanager.machinelearning.models.RegressionModels":"Microsoft.MachineLearningServices.RegressionModels","com.azure.resourcemanager.machinelearning.models.RegressionPrimaryMetrics":"Microsoft.MachineLearningServices.RegressionPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings":"Microsoft.MachineLearningServices.RegressionTrainingSettings","com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess":"Microsoft.MachineLearningServices.RemoteLoginPortPublicAccess","com.azure.resourcemanager.machinelearning.models.RequestConfiguration":"Microsoft.MachineLearningServices.RequestConfiguration","com.azure.resourcemanager.machinelearning.models.RequestLogging":"Microsoft.MachineLearningServices.RequestLogging","com.azure.resourcemanager.machinelearning.models.ResizeSchema":"Microsoft.MachineLearningServices.ResizeSchema","com.azure.resourcemanager.machinelearning.models.ResourceBase":"Microsoft.MachineLearningServices.ResourceBase","com.azure.resourcemanager.machinelearning.models.ResourceConfiguration":"Microsoft.MachineLearningServices.ResourceConfiguration","com.azure.resourcemanager.machinelearning.models.ResourceId":"Microsoft.MachineLearningServices.ResourceId","com.azure.resourcemanager.machinelearning.models.ResourceName":"Microsoft.MachineLearningServices.ResourceName","com.azure.resourcemanager.machinelearning.models.RollingInputData":"Microsoft.MachineLearningServices.RollingInputData","com.azure.resourcemanager.machinelearning.models.RollingRateType":"Microsoft.MachineLearningServices.RollingRateType","com.azure.resourcemanager.machinelearning.models.Route":"Microsoft.MachineLearningServices.Route","com.azure.resourcemanager.machinelearning.models.RuleAction":"Microsoft.MachineLearningServices.RuleAction","com.azure.resourcemanager.machinelearning.models.RuleCategory":"Microsoft.MachineLearningServices.RuleCategory","com.azure.resourcemanager.machinelearning.models.RuleStatus":"Microsoft.MachineLearningServices.RuleStatus","com.azure.resourcemanager.machinelearning.models.RuleType":"Microsoft.MachineLearningServices.RuleType","com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm":"Microsoft.MachineLearningServices.SamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType":"Microsoft.MachineLearningServices.SamplingAlgorithmType","com.azure.resourcemanager.machinelearning.models.SasAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.SASAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.SasCredential":"Microsoft.MachineLearningServices.SASCredential","com.azure.resourcemanager.machinelearning.models.SasCredentialDto":"Microsoft.MachineLearningServices.SASCredentialDto","com.azure.resourcemanager.machinelearning.models.SasDatastoreCredentials":"Microsoft.MachineLearningServices.SasDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.SasDatastoreSecrets":"Microsoft.MachineLearningServices.SasDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.ScaleSettings":"Microsoft.MachineLearningServices.ScaleSettings","com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation":"Microsoft.MachineLearningServices.ScaleSettingsInformation","com.azure.resourcemanager.machinelearning.models.ScaleType":"Microsoft.MachineLearningServices.ScaleType","com.azure.resourcemanager.machinelearning.models.ScaleUnitConfiguration":"Microsoft.MachineLearningServices.ScaleUnitConfiguration","com.azure.resourcemanager.machinelearning.models.ScheduleActionBase":"Microsoft.MachineLearningServices.ScheduleActionBase","com.azure.resourcemanager.machinelearning.models.ScheduleActionType":"Microsoft.MachineLearningServices.ScheduleActionType","com.azure.resourcemanager.machinelearning.models.ScheduleBase":"Microsoft.MachineLearningServices.ScheduleBase","com.azure.resourcemanager.machinelearning.models.ScheduleListViewType":"Microsoft.MachineLearningServices.ScheduleListViewType","com.azure.resourcemanager.machinelearning.models.ScheduleProperties":"Microsoft.MachineLearningServices.ScheduleProperties","com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState":"Microsoft.MachineLearningServices.ScheduleProvisioningState","com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningStatus":"Microsoft.MachineLearningServices.ScheduleProvisioningStatus","com.azure.resourcemanager.machinelearning.models.ScheduleStatus":"Microsoft.MachineLearningServices.ScheduleStatus","com.azure.resourcemanager.machinelearning.models.ScriptReference":"Microsoft.MachineLearningServices.ScriptReference","com.azure.resourcemanager.machinelearning.models.ScriptsToExecute":"Microsoft.MachineLearningServices.ScriptsToExecute","com.azure.resourcemanager.machinelearning.models.Seasonality":"Microsoft.MachineLearningServices.Seasonality","com.azure.resourcemanager.machinelearning.models.SeasonalityMode":"Microsoft.MachineLearningServices.SeasonalityMode","com.azure.resourcemanager.machinelearning.models.SecretExpiry":"Microsoft.MachineLearningServices.SecretExpiry","com.azure.resourcemanager.machinelearning.models.SecretsType":"Microsoft.MachineLearningServices.SecretsType","com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings":"Microsoft.MachineLearningServices.ServerlessComputeSettings","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation":"Microsoft.MachineLearningServices.ServerlessEndpointCapacityReservation","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointContentSafety":"Microsoft.MachineLearningServices.ServerlessEndpointContentSafety","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointInferenceEndpoint":"Microsoft.MachineLearningServices.ServerlessEndpointInferenceEndpoint","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointModelSettings":"Microsoft.MachineLearningServices.ServerlessEndpointModelSettings","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties":"Microsoft.MachineLearningServices.ServerlessEndpointProperties","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointResourceProperties":"Microsoft.MachineLearningServices.ServerlessEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointState":"Microsoft.MachineLearningServices.ServerlessEndpointState","com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpoint":"Microsoft.MachineLearningServices.ServerlessInferenceEndpoint","com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode":"Microsoft.MachineLearningServices.ServerlessInferenceEndpointAuthMode","com.azure.resourcemanager.machinelearning.models.ServerlessOffer":"Microsoft.MachineLearningServices.ServerlessOffer","com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName":"Microsoft.MachineLearningServices.ServiceAccountKeyName","com.azure.resourcemanager.machinelearning.models.ServiceDataAccessAuthIdentity":"Microsoft.MachineLearningServices.ServiceDataAccessAuthIdentity","com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings":"Microsoft.MachineLearningServices.ServiceManagedResourcesSettings","com.azure.resourcemanager.machinelearning.models.ServicePrincipalAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ServicePrincipalAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials":"Microsoft.MachineLearningServices.ServicePrincipalDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets":"Microsoft.MachineLearningServices.ServicePrincipalDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.ServiceTagDestination":"Microsoft.MachineLearningServices.ServiceTagDestination","com.azure.resourcemanager.machinelearning.models.ServiceTagOutboundRule":"Microsoft.MachineLearningServices.ServiceTagOutboundRule","com.azure.resourcemanager.machinelearning.models.SetupScripts":"Microsoft.MachineLearningServices.SetupScripts","com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource":"Microsoft.MachineLearningServices.SharedPrivateLinkResource","com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration":"Microsoft.MachineLearningServices.ShortSeriesHandlingConfiguration","com.azure.resourcemanager.machinelearning.models.Sku":"Azure.ResourceManager.CommonTypes.Sku","com.azure.resourcemanager.machinelearning.models.SkuCapacity":"Microsoft.MachineLearningServices.SkuCapacity","com.azure.resourcemanager.machinelearning.models.SkuScaleType":"Microsoft.MachineLearningServices.SkuScaleType","com.azure.resourcemanager.machinelearning.models.SkuSetting":"Microsoft.MachineLearningServices.SkuSetting","com.azure.resourcemanager.machinelearning.models.SkuTier":"Azure.ResourceManager.CommonTypes.SkuTier","com.azure.resourcemanager.machinelearning.models.SourceType":"Microsoft.MachineLearningServices.SourceType","com.azure.resourcemanager.machinelearning.models.SparkJob":"Microsoft.MachineLearningServices.SparkJob","com.azure.resourcemanager.machinelearning.models.SparkJobEntry":"Microsoft.MachineLearningServices.SparkJobEntry","com.azure.resourcemanager.machinelearning.models.SparkJobEntryType":"Microsoft.MachineLearningServices.SparkJobEntryType","com.azure.resourcemanager.machinelearning.models.SparkJobPythonEntry":"Microsoft.MachineLearningServices.SparkJobPythonEntry","com.azure.resourcemanager.machinelearning.models.SparkJobScalaEntry":"Microsoft.MachineLearningServices.SparkJobScalaEntry","com.azure.resourcemanager.machinelearning.models.SparkResourceConfiguration":"Microsoft.MachineLearningServices.SparkResourceConfiguration","com.azure.resourcemanager.machinelearning.models.SpeechEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.SpeechEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.SpeechEndpointResourceProperties":"Microsoft.MachineLearningServices.SpeechEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.SshPublicAccess":"Microsoft.MachineLearningServices.SshPublicAccess","com.azure.resourcemanager.machinelearning.models.SslConfigStatus":"Microsoft.MachineLearningServices.SslConfigStatus","com.azure.resourcemanager.machinelearning.models.SslConfiguration":"Microsoft.MachineLearningServices.SslConfiguration","com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings":"Microsoft.MachineLearningServices.StackEnsembleSettings","com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType":"Microsoft.MachineLearningServices.StackMetaLearnerType","com.azure.resourcemanager.machinelearning.models.StaticInputData":"Microsoft.MachineLearningServices.StaticInputData","com.azure.resourcemanager.machinelearning.models.Status":"Microsoft.MachineLearningServices.Status","com.azure.resourcemanager.machinelearning.models.StochasticOptimizer":"Microsoft.MachineLearningServices.StochasticOptimizer","com.azure.resourcemanager.machinelearning.models.StorageAccountDetails":"Microsoft.MachineLearningServices.StorageAccountDetails","com.azure.resourcemanager.machinelearning.models.StorageAccountType":"Microsoft.MachineLearningServices.StorageAccountType","com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair":"Microsoft.MachineLearningServices.StringStringKeyValuePair","com.azure.resourcemanager.machinelearning.models.SweepJob":"Microsoft.MachineLearningServices.SweepJob","com.azure.resourcemanager.machinelearning.models.SweepJobLimits":"Microsoft.MachineLearningServices.SweepJobLimits","com.azure.resourcemanager.machinelearning.models.SynapseSpark":"Microsoft.MachineLearningServices.SynapseSpark","com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties":"Microsoft.MachineLearningServices.SynapseSparkProperties","com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount":"Microsoft.MachineLearningServices.SystemCreatedAcrAccount","com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount":"Microsoft.MachineLearningServices.SystemCreatedStorageAccount","com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode":"Microsoft.MachineLearningServices.SystemDatastoresAuthMode","com.azure.resourcemanager.machinelearning.models.SystemService":"Microsoft.MachineLearningServices.SystemService","com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings":"Microsoft.MachineLearningServices.TableVerticalFeaturizationSettings","com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings":"Microsoft.MachineLearningServices.TableVerticalLimitSettings","com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction":"Microsoft.MachineLearningServices.TargetAggregationFunction","com.azure.resourcemanager.machinelearning.models.TargetLags":"Microsoft.MachineLearningServices.TargetLags","com.azure.resourcemanager.machinelearning.models.TargetLagsMode":"Microsoft.MachineLearningServices.TargetLagsMode","com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize":"Microsoft.MachineLearningServices.TargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSizeMode":"Microsoft.MachineLearningServices.TargetRollingWindowSizeMode","com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings":"Microsoft.MachineLearningServices.TargetUtilizationScaleSettings","com.azure.resourcemanager.machinelearning.models.TaskType":"Microsoft.MachineLearningServices.TaskType","com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint":"Microsoft.MachineLearningServices.TeacherModelEndpoint","com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings":"Microsoft.MachineLearningServices.TeacherModelEndpointRequestSettings","com.azure.resourcemanager.machinelearning.models.TeacherModelSettings":"Microsoft.MachineLearningServices.TeacherModelSettings","com.azure.resourcemanager.machinelearning.models.TensorFlow":"Microsoft.MachineLearningServices.TensorFlow","com.azure.resourcemanager.machinelearning.models.TextClassification":"Microsoft.MachineLearningServices.TextClassification","com.azure.resourcemanager.machinelearning.models.TextClassificationMultilabel":"Microsoft.MachineLearningServices.TextClassificationMultilabel","com.azure.resourcemanager.machinelearning.models.TextNer":"Microsoft.MachineLearningServices.TextNer","com.azure.resourcemanager.machinelearning.models.TmpfsOptions":"Microsoft.MachineLearningServices.TmpfsOptions","com.azure.resourcemanager.machinelearning.models.TopNFeaturesByAttribution":"Microsoft.MachineLearningServices.TopNFeaturesByAttribution","com.azure.resourcemanager.machinelearning.models.TrainingSettings":"Microsoft.MachineLearningServices.TrainingSettings","com.azure.resourcemanager.machinelearning.models.TrialComponent":"Microsoft.MachineLearningServices.TrialComponent","com.azure.resourcemanager.machinelearning.models.TriggerBase":"Microsoft.MachineLearningServices.TriggerBase","com.azure.resourcemanager.machinelearning.models.TriggerType":"Microsoft.MachineLearningServices.TriggerType","com.azure.resourcemanager.machinelearning.models.TritonModelJobInput":"Microsoft.MachineLearningServices.TritonModelJobInput","com.azure.resourcemanager.machinelearning.models.TritonModelJobOutput":"Microsoft.MachineLearningServices.TritonModelJobOutput","com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy":"Microsoft.MachineLearningServices.TruncationSelectionPolicy","com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction":"Microsoft.MachineLearningServices.UnderlyingResourceAction","com.azure.resourcemanager.machinelearning.models.UnitOfMeasure":"Microsoft.MachineLearningServices.UnitOfMeasure","com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas":"Microsoft.MachineLearningServices.UpdateWorkspaceQuotas","com.azure.resourcemanager.machinelearning.models.UriFileDataVersion":"Microsoft.MachineLearningServices.UriFileDataVersion","com.azure.resourcemanager.machinelearning.models.UriFileJobInput":"Microsoft.MachineLearningServices.UriFileJobInput","com.azure.resourcemanager.machinelearning.models.UriFileJobOutput":"Microsoft.MachineLearningServices.UriFileJobOutput","com.azure.resourcemanager.machinelearning.models.UriFolderDataVersion":"Microsoft.MachineLearningServices.UriFolderDataVersion","com.azure.resourcemanager.machinelearning.models.UriFolderJobInput":"Microsoft.MachineLearningServices.UriFolderJobInput","com.azure.resourcemanager.machinelearning.models.UriFolderJobOutput":"Microsoft.MachineLearningServices.UriFolderJobOutput","com.azure.resourcemanager.machinelearning.models.UsageName":"Microsoft.MachineLearningServices.UsageName","com.azure.resourcemanager.machinelearning.models.UsageUnit":"Microsoft.MachineLearningServices.UsageUnit","com.azure.resourcemanager.machinelearning.models.UseStl":"Microsoft.MachineLearningServices.UseStl","com.azure.resourcemanager.machinelearning.models.UserAccountCredentials":"Microsoft.MachineLearningServices.UserAccountCredentials","com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.machinelearning.models.UserIdentity":"Microsoft.MachineLearningServices.UserIdentity","com.azure.resourcemanager.machinelearning.models.UsernamePasswordAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.UsernamePasswordAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.VMPriceOSType":"Microsoft.MachineLearningServices.VMPriceOSType","com.azure.resourcemanager.machinelearning.models.VMTier":"Microsoft.MachineLearningServices.VMTier","com.azure.resourcemanager.machinelearning.models.ValidationMetricType":"Microsoft.MachineLearningServices.ValidationMetricType","com.azure.resourcemanager.machinelearning.models.VirtualMachine":"Microsoft.MachineLearningServices.VirtualMachine","com.azure.resourcemanager.machinelearning.models.VirtualMachineImage":"Microsoft.MachineLearningServices.VirtualMachineImage","com.azure.resourcemanager.machinelearning.models.VirtualMachineSchemaProperties":"Microsoft.MachineLearningServices.VirtualMachineSchemaProperties","com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets":"Microsoft.MachineLearningServices.VirtualMachineSecrets","com.azure.resourcemanager.machinelearning.models.VirtualMachineSize":"Microsoft.MachineLearningServices.VirtualMachineSize","com.azure.resourcemanager.machinelearning.models.VirtualMachineSshCredentials":"Microsoft.MachineLearningServices.VirtualMachineSshCredentials","com.azure.resourcemanager.machinelearning.models.VmPriority":"Microsoft.MachineLearningServices.VmPriority","com.azure.resourcemanager.machinelearning.models.VolumeDefinition":"Microsoft.MachineLearningServices.VolumeDefinition","com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType":"Microsoft.MachineLearningServices.VolumeDefinitionType","com.azure.resourcemanager.machinelearning.models.VolumeOptions":"Microsoft.MachineLearningServices.VolumeOptions","com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails":"Microsoft.MachineLearningServices.VulnerabilityDetails","com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings":"Microsoft.MachineLearningServices.VulnerabilityFindings","com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk":"Microsoft.MachineLearningServices.VulnerabilityRisk","com.azure.resourcemanager.machinelearning.models.Webhook":"Microsoft.MachineLearningServices.Webhook","com.azure.resourcemanager.machinelearning.models.WebhookType":"Microsoft.MachineLearningServices.WebhookType","com.azure.resourcemanager.machinelearning.models.WeekDay":"Microsoft.MachineLearningServices.WeekDay","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey":"Microsoft.MachineLearningServices.WorkspaceConnectionAccessKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccountKey":"Microsoft.MachineLearningServices.WorkspaceConnectionAccountKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionApiKey":"Microsoft.MachineLearningServices.WorkspaceConnectionApiKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionManagedIdentity":"Microsoft.MachineLearningServices.WorkspaceConnectionManagedIdentity","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionOAuth2":"Microsoft.MachineLearningServices.WorkspaceConnectionOAuth2","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPersonalAccessToken":"Microsoft.MachineLearningServices.WorkspaceConnectionPersonalAccessToken","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionServicePrincipal":"Microsoft.MachineLearningServices.WorkspaceConnectionServicePrincipal","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionSharedAccessSignature":"Microsoft.MachineLearningServices.WorkspaceConnectionSharedAccessSignature","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter":"Microsoft.MachineLearningServices.WorkspaceConnectionUpdateParameter","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUsernamePassword":"Microsoft.MachineLearningServices.WorkspaceConnectionUsernamePassword","com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig":"Microsoft.MachineLearningServices.WorkspaceHubConfig","com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource":"Microsoft.MachineLearningServices.WorkspacePrivateEndpointResource"},"generatedFiles":["src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/MachineLearningManagementClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PTUQuotasClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AvailableQuotaInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointDeploymentResourcePropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageAndQuotaDetailsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AmlComputeNodesInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AvailableQuotaArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchDeploymentTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataVersionBaseResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DatastoreResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeatureResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceGroupTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferencePoolTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/JobBaseResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListAmlUserFeatureResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListUsagesResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListWorkspaceQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ManagedNetworkListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/MarketplaceSubscriptionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OutboundRuleListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PaginatedComputeResourcesList.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RegistryTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ScheduleResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/SkuResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/StringArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/UsageAndQuotaDetailsArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHost.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItems.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPoliciesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafety.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelFineTuning.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistillationJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FinetuningDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java","src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IPRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LabelGeneration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkKind.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsEx.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRulesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PATAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PTUDeploymentUsage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PTUQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PromptSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPoliciesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StringStringKeyValuePair.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpointRequestSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java","src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json index 9b9cea98e6ae..2eb11f840f70 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-machinelearning/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsClientImpl$BatchDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsClientImpl$BatchEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.CodeContainersClientImpl$CodeContainersService"],["com.azure.resourcemanager.machinelearning.implementation.CodeVersionsClientImpl$CodeVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.ComponentContainersClientImpl$ComponentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ComponentVersionsClientImpl$ComponentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.ComputesClientImpl$ComputesService"],["com.azure.resourcemanager.machinelearning.implementation.DataContainersClientImpl$DataContainersService"],["com.azure.resourcemanager.machinelearning.implementation.DataVersionsClientImpl$DataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.DatastoresClientImpl$DatastoresService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersClientImpl$EnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsClientImpl$EnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesClientImpl$FeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersClientImpl$FeaturesetContainersService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetVersionsClientImpl$FeaturesetVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityContainersClientImpl$FeaturestoreEntityContainersService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityVersionsClientImpl$FeaturestoreEntityVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesClientImpl$ManagedNetworkSettingsRulesService"],["com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsClientImpl$MarketplaceSubscriptionsService"],["com.azure.resourcemanager.machinelearning.implementation.ModelContainersClientImpl$ModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ModelVersionsClientImpl$ModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsClientImpl$OnlineDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsClientImpl$OnlineEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.machinelearning.implementation.QuotasClientImpl$QuotasService"],["com.azure.resourcemanager.machinelearning.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersClientImpl$RegistryCodeContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsClientImpl$RegistryCodeVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryComponentContainersClientImpl$RegistryComponentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryComponentVersionsClientImpl$RegistryComponentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataContainersClientImpl$RegistryDataContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataReferencesClientImpl$RegistryDataReferencesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsClientImpl$RegistryDataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersClientImpl$RegistryEnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsClientImpl$RegistryEnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersClientImpl$RegistryModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsClientImpl$RegistryModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.SchedulesClientImpl$SchedulesService"],["com.azure.resourcemanager.machinelearning.implementation.ServerlessEndpointsClientImpl$ServerlessEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsClientImpl$WorkspaceConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceFeaturesClientImpl$WorkspaceFeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspacesClientImpl$WorkspacesService"]] \ No newline at end of file +[["com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsClientImpl$BatchDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsClientImpl$BatchEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.CapabilityHostsClientImpl$CapabilityHostsService"],["com.azure.resourcemanager.machinelearning.implementation.CodeContainersClientImpl$CodeContainersService"],["com.azure.resourcemanager.machinelearning.implementation.CodeVersionsClientImpl$CodeVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.ComponentContainersClientImpl$ComponentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ComponentVersionsClientImpl$ComponentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.ComputesClientImpl$ComputesService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsClientImpl$ConnectionRaiBlocklistItemsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsOperationsClientImpl$ConnectionRaiBlocklistItemsOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistsClientImpl$ConnectionRaiBlocklistsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistsOperationsClientImpl$ConnectionRaiBlocklistsOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPoliciesClientImpl$ConnectionRaiPoliciesService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPoliciesOperationsClientImpl$ConnectionRaiPoliciesOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionsClientImpl$ConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.DataContainersClientImpl$DataContainersService"],["com.azure.resourcemanager.machinelearning.implementation.DataVersionsClientImpl$DataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.DatastoresClientImpl$DatastoresService"],["com.azure.resourcemanager.machinelearning.implementation.EndpointDeploymentsClientImpl$EndpointDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.EndpointsClientImpl$EndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersClientImpl$EnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsClientImpl$EnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesClientImpl$FeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersClientImpl$FeaturesetContainersService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetVersionsClientImpl$FeaturesetVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityContainersClientImpl$FeaturestoreEntityContainersService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturestoreEntityVersionsClientImpl$FeaturestoreEntityVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.InferenceEndpointsClientImpl$InferenceEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.InferenceGroupsClientImpl$InferenceGroupsService"],["com.azure.resourcemanager.machinelearning.implementation.InferencePoolsClientImpl$InferencePoolsService"],["com.azure.resourcemanager.machinelearning.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsOperationsClientImpl$ManagedNetworkSettingsOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesClientImpl$ManagedNetworkSettingsRulesService"],["com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsClientImpl$MarketplaceSubscriptionsService"],["com.azure.resourcemanager.machinelearning.implementation.ModelContainersClientImpl$ModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ModelVersionsClientImpl$ModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsClientImpl$OnlineDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsClientImpl$OnlineEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.machinelearning.implementation.OutboundRulesClientImpl$OutboundRulesService"],["com.azure.resourcemanager.machinelearning.implementation.OutboundRulesOperationsClientImpl$OutboundRulesOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.PTUQuotasClientImpl$PTUQuotasService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.machinelearning.implementation.QuotasClientImpl$QuotasService"],["com.azure.resourcemanager.machinelearning.implementation.RaiPoliciesClientImpl$RaiPoliciesService"],["com.azure.resourcemanager.machinelearning.implementation.RaiPoliciesOperationsClientImpl$RaiPoliciesOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistriesClientImpl$RegistriesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersClientImpl$RegistryCodeContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsClientImpl$RegistryCodeVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryComponentContainersClientImpl$RegistryComponentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryComponentVersionsClientImpl$RegistryComponentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataContainersClientImpl$RegistryDataContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataReferencesClientImpl$RegistryDataReferencesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsClientImpl$RegistryDataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersClientImpl$RegistryEnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsClientImpl$RegistryEnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersClientImpl$RegistryModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsClientImpl$RegistryModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.SchedulesClientImpl$SchedulesService"],["com.azure.resourcemanager.machinelearning.implementation.ServerlessEndpointsClientImpl$ServerlessEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsClientImpl$WorkspaceConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceFeaturesClientImpl$WorkspaceFeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspacesClientImpl$WorkspacesService"]] \ No newline at end of file diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/azure-resourcemanager-machinelearning.properties b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/azure-resourcemanager-machinelearning.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/azure-resourcemanager-machinelearning.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java index 5fb9abdf6b82..76264d6dee2e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -28,9 +28,7 @@ */ public final class BatchDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Deployment. @@ -43,19 +41,19 @@ public static void createOrUpdateWorkspaceBatchDeployment( .define("testDeploymentName") .withRegion("string") .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new BatchDeploymentProperties().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new BatchDeploymentProperties() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) + .withProperties(mapOf("string", "string")) .withCompute("string") .withErrorThreshold(1) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M"))) - .withMiniBatchSize(1L) .withLoggingLevel(BatchLoggingLevel.INFO) - .withModel(new IdAssetReference().withAssetId("string")) .withMaxConcurrencyPerInstance(1) + .withMiniBatchSize(1L) + .withModel(new IdAssetReference().withAssetId("string")) .withOutputAction(BatchOutputAction.SUMMARY_ONLY) .withOutputFileName("string") .withResources(new DeploymentResourceConfiguration().withInstanceCount(1) @@ -63,11 +61,12 @@ public static void createOrUpdateWorkspaceBatchDeployment( .withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", Object.class, - SerializerEncoding.JSON))))) + SerializerEncoding.JSON)))) + .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java index 06c92f473d55..157efba25bf3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class BatchDeploymentsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/delete.json */ /** * Sample code: Delete Workspace Batch Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java index c7444157d51a..ad7c11752cc5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class BatchDeploymentsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/get.json */ /** * Sample code: Get Workspace Batch Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java index f3574ad675fd..c307787806f2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class BatchDeploymentsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/list.json */ /** * Sample code: List Workspace Batch Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java index 6eae68c89735..25c3379494ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class BatchDeploymentsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchDeployment/update.json */ /** * Sample code: Update Workspace Batch Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java index c4a73d58e430..8a818ddc4db7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -20,9 +20,7 @@ */ public final class BatchEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Endpoint. @@ -35,14 +33,14 @@ public final class BatchEndpointsCreateOrUpdateSamples { .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new BatchEndpointProperties().withDescription("string") + .withProperties(new BatchEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java index 8503ee1bbc3d..4deb720e901d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class BatchEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/delete.json */ /** * Sample code: Delete Workspace Batch Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java index 60c40b868032..b8b369c96a66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class BatchEndpointsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/get.json */ /** * Sample code: Get Workspace Batch Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java index 989994a98661..70a47f22eafd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class BatchEndpointsListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Batch Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java index 73cf262f6eb2..c11e24e88a8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class BatchEndpointsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/list.json */ /** * Sample code: List Workspace Batch Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java index eab2df210e2c..7f69f6c886e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,9 +18,7 @@ */ public final class BatchEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/BatchEndpoint/update.json */ /** * Sample code: Update Workspace Batch Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..927e28753dae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; +import java.util.Arrays; + +/** + * Samples for CapabilityHosts CreateOrUpdate. + */ +public final class CapabilityHostsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/CapabilityHost/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .define("capabilityHostName") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new CapabilityHostProperties() + .withAcaEnvironmentConnections(Arrays.asList("sampleAcaEnvironmentConnection")) + .withAiServicesConnections(Arrays.asList("sampleAIServiceConnection")) + .withCustomerSubnet( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroups/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet") + .withStorageConnections(Arrays.asList("sampleStorageConnection")) + .withThreadStorageConnections(Arrays.asList("sampleThreadStorageConnection")) + .withVectorStoreConnections(Arrays.asList("sampleVectorStoreConnection"))) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.java new file mode 100644 index 000000000000..add0dad8533f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for CapabilityHosts Delete. + */ +public final class CapabilityHostsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/CapabilityHost/delete.json + */ + /** + * Sample code: Delete CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .delete("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.java new file mode 100644 index 000000000000..d5c63dcb0217 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for CapabilityHosts Get. + */ +public final class CapabilityHostsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/CapabilityHost/get.json + */ + /** + * Sample code: Get CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .getWithResponse("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java index bae016098686..b45351cfb5b0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class CodeContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java index b5e12705aa1d..1a1bb129e6ee 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class CodeContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/delete.json */ /** * Sample code: Delete Workspace Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java index 201e70303316..b34aec880ca7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class CodeContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/get.json */ /** * Sample code: Get Workspace Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java index 7d6cbc2ab729..18158dff02fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class CodeContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeContainer/list.json */ /** * Sample code: List Workspace Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java index a27755b88618..26c54fddd121 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrGetStartPendingUploadSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class CodeVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Workspace Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java index 6d789a13b24b..14c12e1e289a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class CodeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Version. @@ -28,8 +26,8 @@ public final class CodeVersionsCreateOrUpdateSamples { .define("string") .withExistingCode("test-rg", "my-aml-workspace", "string") .withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")) .create(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java index 9a59e05bc323..3377a36393f1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class CodeVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/delete.json */ /** * Sample code: Delete Workspace Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java index ccf5e5db61c4..19ae07ca5733 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class CodeVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/get.json */ /** * Sample code: Get Workspace Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java index 50c9ac2415fb..ab36766ab18b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class CodeVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/list.json */ /** * Sample code: List Workspace Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java index 4a584602e6e8..71a729319cfe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class CodeVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/CodeVersion/publish.json */ /** * Sample code: Publish Workspace Code Version. @@ -24,9 +22,9 @@ public final class CodeVersionsPublishSamples { publishWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java index 5353abcb80db..73abf52d5c5f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class ComponentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Container. @@ -28,8 +26,8 @@ public static void createOrUpdateWorkspaceComponentContainer( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))) + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java index f233a499cc6c..39bfcd799af9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComponentContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/delete.json */ /** * Sample code: Delete Workspace Component Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java index 52b21f5d04df..cedf85cf5ab5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComponentContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/get.json */ /** * Sample code: Get Workspace Component Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java index b899b529d462..ff570b004ba7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComponentContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentContainer/list.json */ /** * Sample code: List Workspace Component Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java index 07a972a658f4..e84f7dd37e80 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,9 +16,7 @@ */ public final class ComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Version. @@ -31,8 +29,8 @@ public static void createOrUpdateWorkspaceComponentVersion( .define("string") .withExistingComponent("test-rg", "my-aml-workspace", "string") .withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java index 67fe02db7ccb..cf6cecf79bdf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComponentVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/delete.json */ /** * Sample code: Delete Workspace Component Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java index c836b72d4a0f..255750c0acef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComponentVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/get.json */ /** * Sample code: Get Workspace Component Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java index 907bfd41d4b4..2734454932ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComponentVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/list.json */ /** * Sample code: List Workspace Component Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java index 671c520395c4..761aa8799140 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class ComponentVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ComponentVersion/publish.json */ /** * Sample code: Publish Workspace Component Version. @@ -24,9 +22,9 @@ public final class ComponentVersionsPublishSamples { publishWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java index ade306d1c991..8c6366845fb5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.Aks; -import com.azure.resourcemanager.machinelearning.models.AksSchemaProperties; +import com.azure.resourcemanager.machinelearning.models.AKS; +import com.azure.resourcemanager.machinelearning.models.AKSSchemaProperties; import com.azure.resourcemanager.machinelearning.models.AmlCompute; import com.azure.resourcemanager.machinelearning.models.AmlComputeProperties; import com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy; import com.azure.resourcemanager.machinelearning.models.AssignedUser; import com.azure.resourcemanager.machinelearning.models.ComputeInstance; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings; import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; @@ -29,8 +30,10 @@ import com.azure.resourcemanager.machinelearning.models.ImageType; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; +import com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig; import com.azure.resourcemanager.machinelearning.models.Kubernetes; import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; +import com.azure.resourcemanager.machinelearning.models.MlflowAutologger; import com.azure.resourcemanager.machinelearning.models.OsType; import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; import com.azure.resourcemanager.machinelearning.models.Protocol; @@ -53,50 +56,44 @@ */ public final class ComputeCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAKSCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/AKSCompute.json */ /** - * Sample code: Create an AKS Compute. + * Sample code: Update an AKS Compute. * * @param manager Entry point to MachineLearningManager. */ - public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new Aks()) + .withProperties(new AKS().withDescription("some compute") + .withResourceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") + .withProperties(new AKSSchemaProperties().withAgentCount(4))) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AKSCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/BasicAKSCompute.json */ /** - * Sample code: Update an AKS Compute. + * Sample code: Create an AKS Compute. * * @param manager Entry point to MachineLearningManager. */ - public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new Aks().withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AksSchemaProperties().withAgentCount(4))) + .withProperties(new AKS()) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/KubernetesCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -122,9 +119,7 @@ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning. } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. @@ -156,9 +151,7 @@ public static void createAnComputeInstanceComputeWithSchedules( } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAmlCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -185,9 +178,7 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstance.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -204,26 +195,35 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6") .withSubnet(new ResourceId().withId("test-subnet-resource-id")) .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) + .withAutologgerSettings( + new ComputeInstanceAutologgerSettings().withMlflowAutologger(MlflowAutologger.ENABLED)) .withSshSettings(new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withCustomServices(Arrays.asList(new CustomService().withName("rstudio") + .withCustomServices(Arrays.asList(new CustomService().withName("rstudio-workbench") .withImage(new Image().withType(ImageType.DOCKER) - .withReference("ghcr.io/azure/rocker-rstudio-ml-verse:latest") + .withReference("ghcr.io/azure/rstudio-workbench:latest") .withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("test_variable", + .withEnvironmentVariables(mapOf("RSP_LICENSE", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("test_value") + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") .withAdditionalProperties(mapOf()))) .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) .withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP) .withName("connect") .withTarget(8787) - .withPublished(8787))) + .withPublished(4444))) .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("/home/azureuser/cloudfiles") - .withTarget("/home/azureuser/cloudfiles"))) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withKernel(new JupyterKernelConfig().withArgv(Arrays.asList("option1", "option2", "option3")) + .withDisplayName("TestKernel") + .withLanguage("python")) .withAdditionalProperties(mapOf()))) .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) + .withEnableOSPatching(true) + .withEnableRootAccess(true) + .withEnableSSO(true) + .withReleaseQuotaOnStop(true) .withPersonalComputeInstanceSettings(new PersonalComputeInstanceSettings() .withAssignedUser(new AssignedUser().withObjectId("00000000-0000-0000-0000-000000000000") .withTenantId("00000000-0000-0000-0000-000000000000"))))) @@ -231,9 +231,7 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -252,9 +250,7 @@ public static void createAnComputeInstanceComputeWithMinimalInputs( } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AmlCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -274,9 +270,7 @@ public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.M } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java index 3f79c372a349..a9ff69c8b826 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class ComputeDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/delete.json + * x-ms-original-file: 2026-05-15-preview/Compute/delete.json */ /** * Sample code: Delete Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.java new file mode 100644 index 000000000000..8ff451c4af83 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Compute GetAllowedResizeSizes. + */ +public final class ComputeGetAllowedResizeSizesSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Compute/getAllowedVMSizesForResize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .getAllowedResizeSizesWithResponse("testrg123", "workspaces123", "compute123", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java index e5faf9f2527b..a6b2297b5f33 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComputeGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AKSCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -24,39 +22,33 @@ public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.Mach } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/KubernetesCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/ComputeInstance.json */ /** - * Sample code: Get a Kubernetes Compute. + * Sample code: Get an ComputeInstance. * * @param manager Entry point to MachineLearningManager. */ - public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/ComputeInstance.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/KubernetesCompute.json */ /** - * Sample code: Get an ComputeInstance. + * Sample code: Get a Kubernetes Compute. * * @param manager Entry point to MachineLearningManager. */ - public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.computes() .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AmlCompute.json + * x-ms-original-file: 2026-05-15-preview/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java index d0fb89edfa07..efa45d214373 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComputeListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java index ec498b55c38c..8e0b5c4d0865 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComputeListNodesSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listNodes.json + * x-ms-original-file: 2026-05-15-preview/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java index ed57fd9e9949..329f5721272c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComputeListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/list.json + * x-ms-original-file: 2026-05-15-preview/Compute/list.json */ /** * Sample code: Get Computes. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java new file mode 100644 index 000000000000..6e284ed99016 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; + +/** + * Samples for Compute Resize. + */ +public final class ComputeResizeSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Compute/resize.json + */ + /** + * Sample code: List VM Sizes. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .resize("testrg123", "workspaces123", "compute123", new ResizeSchema().withTargetVMSize("Standard_DS11_v2"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java index c6b4e49c3411..147787fdef06 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComputeRestartSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/restart.json + * x-ms-original-file: 2026-05-15-preview/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java index 583d315d644a..0ff57010a52b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComputeStartSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/start.json + * x-ms-original-file: 2026-05-15-preview/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java index 7731bc4a61e8..d90700cc9726 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ComputeStopSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/stop.json + * x-ms-original-file: 2026-05-15-preview/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java new file mode 100644 index 000000000000..c811d57cce2e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; +import com.azure.resourcemanager.machinelearning.models.Protocol; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Compute UpdateCustomServices. + */ +public final class ComputeUpdateCustomServicesSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Compute/updateCustomServices.json + */ + /** + * Sample code: Update Custom Services. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateCustomServices(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .updateCustomServicesWithResponse("testrg123", "workspaces123", "compute123", + Arrays.asList(new CustomService().withName("rstudio-workbench") + .withImage(new Image().withType(ImageType.DOCKER) + .withReference("ghcr.io/azure/rstudio-workbench:latest") + .withAdditionalProperties(mapOf())) + .withEnvironmentVariables(mapOf("RSP_LICENSE", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX") + .withAdditionalProperties(mapOf()))) + .withDocker(new Docker().withPrivileged(true).withAdditionalProperties(mapOf())) + .withEndpoints(Arrays.asList(new Endpoint().withProtocol(Protocol.HTTP) + .withName("connect") + .withTarget(8787) + .withPublished(4444))) + .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("/mnt/azureuser/") + .withTarget("/home/testuser/"))) + .withAdditionalProperties(mapOf())), + com.azure.core.util.Context.NONE); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.java new file mode 100644 index 000000000000..fdd3b4159fa2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.MountAction; +import com.azure.resourcemanager.machinelearning.models.MountMode; +import com.azure.resourcemanager.machinelearning.models.SourceType; +import java.util.Arrays; + +/** + * Samples for Compute UpdateDataMounts. + */ +public final class ComputeUpdateDataMountsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Compute/updateDataMounts.json + */ + /** + * Sample code: Update Data Mounts. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateDataMounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .updateDataMountsWithResponse("testrg123", "workspaces123", "compute123", + Arrays.asList(new ComputeInstanceDataMount().withSource( + "azureml://subscriptions/some-sub/resourcegroups/some-rg/workspaces/some-ws/data/some-data-asset-name/versions/some-data-asset-version") + .withSourceType(SourceType.URI) + .withMountName("hello") + .withMountAction(MountAction.MOUNT) + .withMountMode(MountMode.READ_ONLY) + .withMountPath("/some/random/path/on/host")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java new file mode 100644 index 000000000000..7b323e297aa4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; + +/** + * Samples for Compute UpdateIdleShutdownSetting. + */ +public final class ComputeUpdateIdleShutdownSettingSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Compute/updateIdleShutdownSetting.json + */ + /** + * Sample code: Update idle shutdown setting of ComputeInstance. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateIdleShutdownSettingOfComputeInstance( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.computes() + .updateIdleShutdownSettingWithResponse("testrg123", "workspaces123", "compute123", + new IdleShutdownSetting().withIdleTimeBeforeShutdown("PT120M"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java index a21805726381..bb455e16f33c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class ComputeUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/patch.json + * x-ms-original-file: 2026-05-15-preview/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionCreateOrUpdateDeploymentSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionCreateOrUpdateDeploymentSamples.java new file mode 100644 index 000000000000..cb36ce7e5223 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionCreateOrUpdateDeploymentSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; + +/** + * Samples for Connection CreateOrUpdateDeployment. + */ +public final class ConnectionCreateOrUpdateDeploymentSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/createDeployment.json + */ + /** + * Sample code: Create Azure OpenAI Connection Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createAzureOpenAIConnectionDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .createOrUpdateDeployment("resourceGroup-1", "testworkspace", "testConnection", "text-davinci-003", + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel(new EndpointDeploymentModel().withFormat("OpenAI") + .withName("text-davinci-003") + .withVersion("1")) + .withVersionUpgradeOption( + DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionDeleteDeploymentSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionDeleteDeploymentSamples.java new file mode 100644 index 000000000000..1dd66f00f72e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionDeleteDeploymentSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Connection DeleteDeployment. + */ +public final class ConnectionDeleteDeploymentSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/deleteDeployment.json + */ + /** + * Sample code: Delete Azure OpenAI Connection Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteAzureOpenAIConnectionDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .deleteDeployment("test-rg", "aml-workspace-name", "testConnection", "testDeploymentName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.java new file mode 100644 index 000000000000..26f7c2242511 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Connection GetAllModels. + */ +public final class ConnectionGetAllModelsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/listConnectionModels.json + */ + /** + * Sample code: Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getModelsUnderTheAzureMLWorkspaceForAllAzureOpenAIConnectionsThatTheUserCanDeploy( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getAllModelsWithResponse("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetDeploymentSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetDeploymentSamples.java new file mode 100644 index 000000000000..ba9856389acf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetDeploymentSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Connection GetDeployment. + */ +public final class ConnectionGetDeploymentSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/getDeployment.json + */ + /** + * Sample code: Get Azure OpenAI Connection Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAzureOpenAIConnectionDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getDeploymentWithResponse("resourceGroup-1", "testworkspace", "testConnection", "text-davinci-003", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetModelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetModelsSamples.java new file mode 100644 index 000000000000..df94d82bcd8c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetModelsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Connection GetModels. + */ +public final class ConnectionGetModelsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/getModels.json + */ + /** + * Sample code: Get Azure OpenAI Connection Models. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAzureOpenAIConnectionModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getModels("test-rg", "aml-workspace-name", "testConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.java new file mode 100644 index 000000000000..db6426aee890 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Connection ListDeployments. + */ +public final class ConnectionListDeploymentsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/listDeployments.json + */ + /** + * Sample code: List Azure OpenAI Connection Deployments. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listAzureOpenAIConnectionDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .listDeployments("resourceGroup-1", "testworkspace", "testConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistCreateSamples.java new file mode 100644 index 000000000000..68b94be344a4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistCreateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; + +/** + * Samples for ConnectionRaiBlocklist Create. + */ +public final class ConnectionRaiBlocklistCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/create.json + */ + /** + * Sample code: Create Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .define("raiBlocklistName") + .withExistingConnection("test-rg", "aml-workspace-name", "testConnection") + .withProperties(new RaiBlocklistProperties().withDescription("Basic blocklist description")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistDeleteSamples.java new file mode 100644 index 000000000000..e27388d60de2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiBlocklist Delete. + */ +public final class ConnectionRaiBlocklistDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/delete.json + */ + /** + * Sample code: Delete Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistGetSamples.java new file mode 100644 index 000000000000..f9fe0df3a129 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiBlocklist Get. + */ +public final class ConnectionRaiBlocklistGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/get.json + */ + /** + * Sample code: Get Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.java new file mode 100644 index 000000000000..2f4027b65056 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import java.util.Arrays; + +/** + * Samples for ConnectionRaiBlocklistItem AddBulk. + */ +public final class ConnectionRaiBlocklistItemAddBulkSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/addBulk.json + */ + /** + * Sample code: Create Bulk Rai Blocklist Items. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createBulkRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .addBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + Arrays.asList( + new RaiBlocklistItemBulkRequest().withName("myblocklistitem1") + .withProperties( + new RaiBlocklistItemProperties().withIsRegex(true).withPattern("^[a-z0-9_-]{2,16}$")), + new RaiBlocklistItemBulkRequest().withName("myblocklistitem2") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("blockwords"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.java new file mode 100644 index 000000000000..94120be5fdbc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; + +/** + * Samples for ConnectionRaiBlocklistItem Create. + */ +public final class ConnectionRaiBlocklistItemCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/create.json + */ + /** + * Sample code: Create RaiBlocklist Item. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .define("raiBlocklistItemName") + .withExistingRaiBlocklist("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("Pattern To Block")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java new file mode 100644 index 000000000000..fda07e53ab61 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import java.util.Arrays; + +/** + * Samples for ConnectionRaiBlocklistItem DeleteBulk. + */ +public final class ConnectionRaiBlocklistItemDeleteBulkSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/deleteBulk.json + */ + /** + * Sample code: Delete Bulk Rai Blocklist Items. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteBulkRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .deleteBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + Arrays.asList("myblocklistitem1", "myblocklistitem2"), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteSamples.java new file mode 100644 index 000000000000..c1e88feace8e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiBlocklistItem Delete. + */ +public final class ConnectionRaiBlocklistItemDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/delete.json + */ + /** + * Sample code: Delete RaiBlocklist Item. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", "raiBlocklistItemName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.java new file mode 100644 index 000000000000..0502eb86cd67 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiBlocklistItem Get. + */ +public final class ConnectionRaiBlocklistItemGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/get.json + */ + /** + * Sample code: Get Rai RaiBlocklist Item. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getRaiRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + "raiBlocklistItemName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.java new file mode 100644 index 000000000000..6b86b18d04f0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiBlocklistItemsOperation List. + */ +public final class ConnectionRaiBlocklistItemsOperationListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklistItem/list.json + */ + /** + * Sample code: List RaiBlocklist Items. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItemsOperations() + .list("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationListSamples.java new file mode 100644 index 000000000000..4ef9a585a3cb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiBlocklistsOperation List. + */ +public final class ConnectionRaiBlocklistsOperationListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiBlocklist/list.json + */ + /** + * Sample code: List Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistsOperations() + .list("test-rg", "aml-workspace-name", "testConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationListSamples.java new file mode 100644 index 000000000000..83e9acdb09ec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiPoliciesOperation List. + */ +public final class ConnectionRaiPoliciesOperationListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/list.json + */ + /** + * Sample code: List Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPoliciesOperations() + .list("test-rg", "aml-workspace-name", "testConnection", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyCreateSamples.java new file mode 100644 index 000000000000..519c472356c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyCreateSamples.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; + +/** + * Samples for ConnectionRaiPolicy Create. + */ +public final class ConnectionRaiPolicyCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/create.json + */ + /** + * Sample code: Create Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .create("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + new RaiPolicyPropertiesBasicResourceInner().withProperties(new RaiPolicyProperties() + .withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyDeleteSamples.java new file mode 100644 index 000000000000..6af35f58e8d6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiPolicy Delete. + */ +public final class ConnectionRaiPolicyDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/delete.json + */ + /** + * Sample code: Delete Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyGetSamples.java new file mode 100644 index 000000000000..90481bbe0285 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ConnectionRaiPolicy Get. + */ +public final class ConnectionRaiPolicyGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/RaiPolicy/get.json + */ + /** + * Sample code: Get Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java index 2f06e50e8ec3..b0b622cbde10 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class DataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Data Container. @@ -29,8 +27,8 @@ public final class DataContainersCreateOrUpdateSamples { .define("datacontainer123") .withExistingWorkspace("testrg123", "workspace123") .withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withProperties(mapOf("properties1", "value1", "properties2", "value2")) + .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDataType(DataType.fromString("UriFile"))) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java index bab9d03cc317..9f77f743c63c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DataContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/delete.json */ /** * Sample code: Delete Workspace Data Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java index c1e4a7cf069e..44913419a52d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DataContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/get.json */ /** * Sample code: Get Workspace Data Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java index 0a1b2aad4e41..4643e7db0b85 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DataContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataContainer/list.json */ /** * Sample code: List Workspace Data Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java index 5848152474d8..2e59b04bb1b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class DataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Data Version Base. @@ -26,10 +24,10 @@ public static void createOrUpdateWorkspaceDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataVersions() .define("string") - .withExistingData("test-rg", "my-aml-workspace", "string") + .withExistingDatum("test-rg", "my-aml-workspace", "string") .withProperties(new UriFileDataVersion().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withDataUri("string")) .create(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java index fde0f26ab3da..fce9a96295af 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DataVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/delete.json */ /** * Sample code: Delete Workspace Data Version Base. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java index 49ee47564ac6..aebcc4675356 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DataVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/get.json */ /** * Sample code: Get Workspace Data Version Base. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java index bdb29955a794..54c0c5f3b471 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DataVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/list.json */ /** * Sample code: List Workspace Data Version Base. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java index dea270455a33..78576357ba73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class DataVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/DataVersionBase/publish.json */ /** * Sample code: Publish Workspace Data Version Base. @@ -24,9 +22,9 @@ public final class DataVersionsPublishSamples { publishWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java index 996818977188..bb720b1eb5f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,16 +14,13 @@ import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; import java.util.HashMap; import java.util.Map; -import java.util.UUID; /** * Samples for Datastores CreateOrUpdate. */ public final class DatastoresCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). @@ -38,19 +35,17 @@ public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( .withProperties(new AzureDataLakeGen1Datastore().withDescription("string") .withTags(mapOf("string", "string")) .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") + .withClientId("00000000-1111-2222-3333-444444444444") .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) + .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) + .withTenantId("00000000-1111-2222-3333-444444444444")) .withStoreName("string")) .withSkipValidation(false) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). @@ -65,22 +60,20 @@ public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( .withProperties(new AzureDataLakeGen2Datastore().withDescription("string") .withTags(mapOf("string", "string")) .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") + .withClientId("00000000-1111-2222-3333-444444444444") .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withFilesystem("string") + .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) + .withTenantId("00000000-1111-2222-3333-444444444444")) .withAccountName("string") .withEndpoint("string") + .withFilesystem("string") .withProtocol("string")) .withSkipValidation(false) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). @@ -105,9 +98,7 @@ public static void createOrUpdateDatastoreAzureBlobWAccountKey( } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). @@ -124,8 +115,8 @@ public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( .withCredentials(new AccountKeyDatastoreCredentials() .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) .withAccountName("string") - .withFileShareName("string") .withEndpoint("string") + .withFileShareName("string") .withProtocol("string")) .withSkipValidation(false) .create(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java index 0d06f750abe2..3a86f2b99793 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DatastoresDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/delete.json + * x-ms-original-file: 2026-05-15-preview/Datastore/delete.json */ /** * Sample code: Delete datastore. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java index 303e65dd90d1..f7563ba330b2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class DatastoresGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/get.json + * x-ms-original-file: 2026-05-15-preview/Datastore/get.json */ /** * Sample code: Get datastore. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java index 116ae1358472..77418c37c444 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class DatastoresListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/list.json + * x-ms-original-file: 2026-05-15-preview/Datastore/list.json */ /** * Sample code: List datastores. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java index fbff23456a49..41e92293e1db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; + /** * Samples for Datastores ListSecrets. */ public final class DatastoresListSecretsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/listSecrets.json + * x-ms-original-file: 2026-05-15-preview/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. @@ -20,6 +20,8 @@ public final class DatastoresListSecretsSamples { */ public static void getDatastoreSecrets(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.datastores() - .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", + new SecretExpiry().withExpirableSecret(false).withExpireAfterHours(1), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointCreateOrUpdateSamples.java new file mode 100644 index 000000000000..3bf1e044140d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties; + +/** + * Samples for Endpoint CreateOrUpdate. + */ +public final class EndpointCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/create.json + */ + /** + * Sample code: Create Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .define("Azure.OpenAI") + .withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties(new OpenAIEndpointResourceProperties().withAssociatedResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.CognitiveService/account/account-1") + .withName("Azure.OpenAI")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.java new file mode 100644 index 000000000000..fc209fd36c8b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; + +/** + * Samples for EndpointDeployment CreateOrUpdate. + */ +public final class EndpointDeploymentCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/create.json + */ + /** + * Sample code: Create Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .define("text-davinci-003") + .withExistingEndpoint("resourceGroup-1", "testworkspace", "Azure.OpenAI") + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel( + new EndpointDeploymentModel().withFormat("OpenAI").withName("text-davinci-003").withVersion("1")) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.java new file mode 100644 index 000000000000..d2bc6c38b089 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for EndpointDeployment Delete. + */ +public final class EndpointDeploymentDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/delete.json + */ + /** + * Sample code: Delete Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "testDeploymentName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.java new file mode 100644 index 000000000000..8654ff49a8eb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetInWorkspaceSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for EndpointDeployment GetInWorkspace. + */ +public final class EndpointDeploymentGetInWorkspaceSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/getInWorkspace.json + */ + /** + * Sample code: Get Endpoint Deployments In Workspace. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getEndpointDeploymentsInWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .getInWorkspace("resourceGroup-1", "testworkspace", null, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.java new file mode 100644 index 000000000000..08f7d99e865f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for EndpointDeployment Get. + */ +public final class EndpointDeploymentGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/get.json + */ + /** + * Sample code: Get Endpoint Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpointDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .getWithResponse("resourceGroup-1", "testworkspace", "Azure.OpenAI", "text-davinci-003", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.java new file mode 100644 index 000000000000..4ce1df61ecd5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for EndpointDeployment List. + */ +public final class EndpointDeploymentListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/Deployment/getDeployments.json + */ + /** + * Sample code: Get Endpoint Deployments. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getEndpointDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpointDeployments() + .list("resourceGroup-1", "testworkspace", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.java new file mode 100644 index 000000000000..5c91e4140ab4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetModelsSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Endpoint GetModels. + */ +public final class EndpointGetModelsSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/getModels.json + */ + /** + * Sample code: Get Endpoint Models. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpointModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .getModels("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.java new file mode 100644 index 000000000000..812c660a330c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Endpoint Get. + */ +public final class EndpointGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/get.json + */ + /** + * Sample code: Get Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.java new file mode 100644 index 000000000000..77bbce37e512 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListKeysSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for Endpoint ListKeys. + */ +public final class EndpointListKeysSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/listKeys.json + */ + /** + * Sample code: List Endpoint Keys. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .listKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java new file mode 100644 index 000000000000..c7b9e918015c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.EndpointType; + +/** + * Samples for Endpoint List. + */ +public final class EndpointListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/list.json + */ + /** + * Sample code: List Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .list("test-rg", "aml-workspace-name", EndpointType.AZURE_OPEN_AI, null, null, null, "skip_string", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.java new file mode 100644 index 000000000000..61fe3b0e4eaa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent; +import com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName; + +/** + * Samples for Endpoint RegenerateKeys. + */ +public final class EndpointRegenerateKeysSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/regenerateKey.json + */ + /** + * Sample code: Regenerate Endpoint Keys. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + regenerateEndpointKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.endpoints() + .regenerateKeysWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", + new RegenerateServiceAccountKeyContent().withKeyName(ServiceAccountKeyName.KEY1), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java index e247c99ce7fa..a30a1e5fb1e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class EnvironmentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Environment Container. @@ -28,9 +26,9 @@ public static void createOrUpdateWorkspaceEnvironmentContainer( .define("testEnvironment") .withExistingWorkspace("testrg123", "testworkspace") .withProperties(new EnvironmentContainerProperties().withDescription("string") - .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java index f1d0f352b809..a3185f3f8523 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class EnvironmentContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/delete.json */ /** * Sample code: Delete Workspace Environment Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java index 0a4e3d8be7f4..3bc31e77148e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class EnvironmentContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/get.json */ /** * Sample code: Get Workspace Environment Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java index 5e7fa63a1092..40834a6839a4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class EnvironmentContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentContainer/list.json */ /** * Sample code: List Workspace Environment Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java index 82cd4de87f59..71e8a43a38f6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,9 +16,7 @@ */ public final class EnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Environment Version. @@ -31,14 +29,14 @@ public static void createOrUpdateWorkspaceEnvironmentVersion( .define("string") .withExistingEnvironment("test-rg", "my-aml-workspace", "string") .withProperties(new EnvironmentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") .withBuild(new BuildContext().withContextUri( "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") .withInferenceConfig( new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) .withReadinessRoute(new Route().withPath("string").withPort(1)) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java index 412d60573bdf..0d126b65b42f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class EnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/delete.json */ /** * Sample code: Delete Workspace Environment Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java index 289043d8fb9a..0c8a277f080c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class EnvironmentVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/get.json */ /** * Sample code: Get Workspace Environment Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java index 72e5668bc711..39267d8ebfb5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class EnvironmentVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/list.json */ /** * Sample code: List Workspace Environment Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java index ad60e007c4f4..8b60598760e7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class EnvironmentVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/EnvironmentVersion/publish.json */ /** * Sample code: Publish Workspace Environment Version. @@ -24,9 +22,9 @@ public final class EnvironmentVersionsPublishSamples { publishWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java index 7d2372bebf65..0a3a0a0011d9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturesGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/get.json + * x-ms-original-file: 2026-05-15-preview/Feature/get.json */ /** * Sample code: Get Feature. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java index 88754e3799cb..1abe1bb07d21 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/list.json + * x-ms-original-file: 2026-05-15-preview/Feature/list.json */ /** * Sample code: List Feature. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java index 7d37a501db9d..8e2a710a91fe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class FeaturesetContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featureset Container. @@ -28,8 +26,8 @@ public static void createOrUpdateWorkspaceFeaturesetContainer( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new FeaturesetContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false)) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java index 9575c34ce336..b49cc23329b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturesetContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/delete.json */ /** * Sample code: Delete Workspace Featureset Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java index 22ec1d806e0f..95706c83fc9c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturesetContainersGetEntitySamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/getEntity.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/getEntity.json */ /** * Sample code: GetEntity Workspace Featureset Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java index f585cdb2c8e1..203ff4f573cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class FeaturesetContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetContainer/list.json */ /** * Sample code: List Workspace Featureset Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java index 948db8be1384..e3c631544969 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillSamples.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; import com.azure.resourcemanager.machinelearning.models.FeatureWindow; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; import java.time.OffsetDateTime; import java.util.Arrays; @@ -18,9 +18,7 @@ */ public final class FeaturesetVersionsBackfillSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/backfill.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/backfill.json */ /** * Sample code: Backfill Workspace Featureset Version. @@ -31,16 +29,17 @@ public final class FeaturesetVersionsBackfillSamples { backfillWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.featuresetVersions() .backfill("test-rg", "my-aml-workspace", "string", "string", - new FeaturesetVersionBackfillRequest().withDisplayName("string") - .withDescription("string") - .withFeatureWindow(new FeatureWindow() - .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) - .withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) + new FeaturesetVersionBackfillRequest() .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE)) + .withDescription("string") + .withDisplayName("string") + .withFeatureWindow( + new FeatureWindow().withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) + .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) .withJobId("string") - .withTags(mapOf("string", "string")) .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string")), + .withSparkConfiguration(mapOf("string", "string")) + .withTags(mapOf("string", "string")), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java index 9765d26856f5..97425471f621 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -24,9 +24,7 @@ */ public final class FeaturesetVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featureset Version. @@ -39,28 +37,29 @@ public static void createOrUpdateWorkspaceFeaturesetVersion( .define("string") .withExistingFeatureset("test-rg", "my-aml-workspace", "string") .withProperties(new FeaturesetVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) + .withIsArchived(false) + .withEntities(Arrays.asList("string")) + .withMaterializationSettings(new MaterializationSettings() + .withNotification( + new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) + .withEmails(Arrays.asList("string"))) + .withResource(new MaterializationComputeResource().withInstanceType("string")) + .withSchedule(new RecurrenceTrigger().withEndTime("string") + .withStartTime("string") + .withTimeZone("string") + .withFrequency(RecurrenceFrequency.DAY) + .withInterval(1) + .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1)) + .withMinutes(Arrays.asList(1)) + .withMonthDays(Arrays.asList(1)) + .withWeekDays(Arrays.asList(WeekDay.MONDAY)))) + .withSparkConfiguration(mapOf("string", "string")) + .withStoreType(MaterializationStoreType.ONLINE)) .withSpecification(new FeaturesetSpecification().withPath("string")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("string") - .withStartTime("string") - .withTimeZone("string") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(1) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1)) - .withMinutes(Arrays.asList(1)) - .withWeekDays(Arrays.asList(WeekDay.MONDAY)) - .withMonthDays(Arrays.asList(1)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("string")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED))) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string"))) - .withStage("string") - .withEntities(Arrays.asList("string"))) + .withStage("string")) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java index 48a4b01aa8e5..1339c8fdee0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturesetVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/delete.json */ /** * Sample code: Delete Workspace Featureset Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java index 059e017be1ea..10fba2e4c3c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturesetVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/get.json */ /** * Sample code: Get Workspace Featureset Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java index d44a4673c733..ffa8bdcd5164 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class FeaturesetVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturesetVersion/list.json */ /** * Sample code: List Workspace Featureset Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java index 3dca0b60ead7..49904676e789 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class FeaturestoreEntityContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. @@ -28,8 +26,8 @@ public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new FeaturestoreEntityContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false)) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java index 8ea6a8bb35b6..aaae22560012 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturestoreEntityContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/delete.json */ /** * Sample code: Delete Workspace Featurestore Entity Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java index 657178baa01f..c338df3b3395 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturestoreEntityContainersGetEntitySamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/getEntity.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/getEntity.json */ /** * Sample code: GetEntity Workspace Featurestore Entity Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java index 51852e6c654c..cbf30dd12a06 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class FeaturestoreEntityContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityContainer/list.json */ /** * Sample code: List Workspace Featurestore Entity Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java index df724c33bd15..75e2d934b076 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,9 +16,7 @@ */ public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. @@ -32,12 +30,12 @@ public static void createOrUpdateWorkspaceFeaturestoreEntityVersion( .withExistingFeaturestoreEntity("test-rg", "my-aml-workspace", "string") .withProperties( new FeaturestoreEntityVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) + .withIsArchived(false) .withIndexColumns(Arrays - .asList(new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("string")))) + .asList(new IndexColumn().withColumnName("string").withDataType(FeatureDataType.DATETIME)))) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java index 260d6d2592a6..d5595ce53b80 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturestoreEntityVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/delete.json */ /** * Sample code: Delete Workspace Featurestore Entity Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java index 92c8afc6ee90..e7077bb05147 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class FeaturestoreEntityVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/get.json */ /** * Sample code: Get Workspace Featurestore Entity Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java index 86fdd78399a8..0956c25c4869 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class FeaturestoreEntityVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/FeaturestoreEntityVersion/list.json */ /** * Sample code: List Workspace Featurestore Entity Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..480a9dc680e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsCreateOrUpdateSamples.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.AuthMode; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.RequestConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferenceEndpoints CreateOrUpdate. + */ +public final class InferenceEndpointsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceInferenceEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .define("testEndpointName") + .withRegion("string") + .withExistingInferencePool("test-rg1", "my-aml-workspace", "string") + .withProperties(new InferenceEndpointProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withAuthMode(AuthMode.AAD) + .withGroupName("string") + .withRequestConfiguration(new RequestConfiguration().withMaxConcurrentRequestsPerInstance(1) + .withRequestTimeout(Duration.parse("PT5M")))) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku(new Sku().withName("string") + .withTier(SkuTier.STANDARD) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.java new file mode 100644 index 000000000000..9db3f5b6f1c5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferenceEndpoints Delete. + */ +public final class InferenceEndpointsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/delete.json + */ + /** + * Sample code: Delete Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .delete("test-rg", "my-aml-workspace", "string", "testEndpointName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.java new file mode 100644 index 000000000000..5a6677869780 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferenceEndpoints Get. + */ +public final class InferenceEndpointsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/get.json + */ + /** + * Sample code: Get Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .getWithResponse("test-rg", "my-aml-workspace", "string", "testEndpointName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java new file mode 100644 index 000000000000..1e6e32a7110d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * Samples for InferenceEndpoints List. + */ +public final class InferenceEndpointsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/list.json + */ + /** + * Sample code: List Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", OrderString.CREATED_AT_ASC, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java new file mode 100644 index 000000000000..1632771a2bfc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferenceEndpoints Update. + */ +public final class InferenceEndpointsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceEndpoint/update.json + */ + /** + * Sample code: Update Workspace Inference Endpoint. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceInferenceEndpoint( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.inferenceEndpoints() + .update("test-rg", "my-aml-workspace", "string", "testEndpointName", + mapOf("tags", SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)), + com.azure.core.util.Context.NONE); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..565e30d99c45 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.GroupEnvironmentConfiguration; +import com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration; +import com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ProbeSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferenceGroups CreateOrUpdate. + */ +public final class InferenceGroupsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceInferenceGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .define("string") + .withRegion("string") + .withExistingInferencePool("test-rg", "my-aml-workspace", "string") + .withProperties(new InferenceGroupProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withEnvironmentConfiguration(new GroupEnvironmentConfiguration() + .withEnvironmentId("azureml://registries/test-registry/models/enginefeed/versions/1") + .withEnvironmentVariables(Arrays + .asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) + .withReadinessProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) + .withStartupProbe(new ProbeSettings().withFailureThreshold(1) + .withInitialDelay(Duration.parse("PT5M")) + .withPeriod(Duration.parse("PT5M")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M")))) + .withModelConfiguration(new GroupModelConfiguration() + .withModelId("azureml://registries/test-registry/models/modelabc/versions/1")) + .withNodeSkuType("string") + .withScaleUnitSize(1)) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku(new Sku().withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.java new file mode 100644 index 000000000000..2043e82500f0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferenceGroups Delete. + */ +public final class InferenceGroupsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/delete.json + */ + /** + * Sample code: Delete Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncSamples.java new file mode 100644 index 000000000000..42ff0b37fb91 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import java.util.Arrays; + +/** + * Samples for InferenceGroups GetDeltaModelsStatusAsync. + */ +public final class InferenceGroupsGetDeltaModelsStatusAsyncSamples { + /* + * x-ms-original-file: 2026-05-15-preview/InferenceGroup/getDeltaModelsStatusAsync.json + */ + /** + * Sample code: GetDeltaModelsStatusAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getDeltaModelsStatusAsyncInferenceGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getDeltaModelsStatusAsyncWithResponse("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelStatusRequest().withDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetSamples.java new file mode 100644 index 000000000000..6c67988ebfbc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferenceGroups Get. + */ +public final class InferenceGroupsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/get.json + */ + /** + * Sample code: Get Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusSamples.java new file mode 100644 index 000000000000..b4da5d2599ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferenceGroups GetStatus. + */ +public final class InferenceGroupsGetStatusSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/getStatus.json + */ + /** + * Sample code: GetStatus Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getStatusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getStatusWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListDeltaModelsAsyncSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListDeltaModelsAsyncSamples.java new file mode 100644 index 000000000000..66c42f7e8c40 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListDeltaModelsAsyncSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest; + +/** + * Samples for InferenceGroups ListDeltaModelsAsync. + */ +public final class InferenceGroupsListDeltaModelsAsyncSamples { + /* + * x-ms-original-file: 2026-05-15-preview/InferenceGroup/listDeltaModelsAsync.json + */ + /** + * Sample code: ListDeltaModelsAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .listDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelListRequest().withCount(-1) + .withSkipToken("fakeTokenPlaceholder") + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.java new file mode 100644 index 000000000000..0c1f98c48d0a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * Samples for InferenceGroups List. + */ +public final class InferenceGroupsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/list.json + */ + /** + * Sample code: List Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .list("test-rg", "my-aml-workspace", "string", 1, null, "string", "string", OrderString.CREATED_AT_DESC, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.java new file mode 100644 index 000000000000..2702b8b3ce84 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferenceGroups ListSkus. + */ +public final class InferenceGroupsListSkusSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/listSkus.json + */ + /** + * Sample code: ListSkus Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listSkusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .listSkus("test-rg", "my-aml-workspace", "string", "string", 1, null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsModifyDeltaModelsAsyncSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsModifyDeltaModelsAsyncSamples.java new file mode 100644 index 000000000000..8f0b75c56f54 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsModifyDeltaModelsAsyncSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import java.util.Arrays; + +/** + * Samples for InferenceGroups ModifyDeltaModelsAsync. + */ +public final class InferenceGroupsModifyDeltaModelsAsyncSamples { + /* + * x-ms-original-file: 2026-05-15-preview/InferenceGroup/modifyDeltaModelsAsync.json + */ + /** + * Sample code: ModifyDeltaModelsAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + modifyDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .modifyDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelModifyRequest().withAddDeltaModels(Arrays.asList("string")) + .withRemoveDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.java new file mode 100644 index 000000000000..f7138000e2c7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.InferenceGroup; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferenceGroups Update. + */ +public final class InferenceGroupsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferenceGroup/update.json + */ + /** + * Sample code: Update Workspace Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + updateWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + InferenceGroup resource = manager.inferenceGroups() + .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withSku(new PartialSku().withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.STANDARD)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..4c2bd7c4c9ea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.ScaleUnitConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferencePools CreateOrUpdate. + */ +public final class InferencePoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools() + .define("string") + .withRegion("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new InferencePoolProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringStringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withScaleUnitConfiguration(new ScaleUnitConfiguration().withDisablePublicEgress(false) + .withRegistries(Arrays.asList("string", "registryName1")))) + .withTags(mapOf()) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") + .withSku(new Sku().withName("string") + .withTier(SkuTier.FREE) + .withSize("string") + .withFamily("string") + .withCapacity(1)) + .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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.java new file mode 100644 index 000000000000..62e420958a27 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferencePools Delete. + */ +public final class InferencePoolsDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/delete.json + */ + /** + * Sample code: Delete Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetSamples.java new file mode 100644 index 000000000000..a582f7323ad7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for InferencePools Get. + */ +public final class InferencePoolsGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/get.json + */ + /** + * Sample code: Get Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools() + .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java new file mode 100644 index 000000000000..69293f1dfc65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.OrderString; + +/** + * Samples for InferencePools List. + */ +public final class InferencePoolsListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/list.json + */ + /** + * Sample code: List Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools() + .list("test-rg", "my-aml-workspace", 1, null, "string", "string", OrderString.UPDATED_AT_ASC, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java new file mode 100644 index 000000000000..f446e49e098f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.PartialSku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for InferencePools Update. + */ +public final class InferencePoolsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Workspace/InferencePool/update.json + */ + /** + * Sample code: Update Workspace Inference Pool. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void updateWorkspaceInferencePool( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + InferencePool resource = manager.inferencePools() + .getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withSku(new PartialSku().withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.STANDARD)) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java index b088c953d6ab..162c58b0e989 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class JobsCancelSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/cancel.json + * x-ms-original-file: 2026-05-15-preview/Job/cancel.json */ /** * Sample code: Cancel Job. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java index 0b075fc721a1..925a9ad9a28d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,25 +10,41 @@ import com.azure.resourcemanager.machinelearning.models.AutoMLJob; import com.azure.resourcemanager.machinelearning.models.CommandJob; import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; +import com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning; +import com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType; +import com.azure.resourcemanager.machinelearning.models.DistillationJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.FinetuningDetails; import com.azure.resourcemanager.machinelearning.models.Goal; import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; import com.azure.resourcemanager.machinelearning.models.ImageClassification; import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; +import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobResources; import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.JobTier; +import com.azure.resourcemanager.machinelearning.models.LabelGeneration; import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; +import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; import com.azure.resourcemanager.machinelearning.models.Mpi; import com.azure.resourcemanager.machinelearning.models.Objective; import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.PipelineJob; +import com.azure.resourcemanager.machinelearning.models.QueueSettings; +import com.azure.resourcemanager.machinelearning.models.Ray; import com.azure.resourcemanager.machinelearning.models.SweepJob; import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint; import com.azure.resourcemanager.machinelearning.models.TensorFlow; import com.azure.resourcemanager.machinelearning.models.TrialComponent; +import com.azure.resourcemanager.machinelearning.models.UriFileJobInput; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; @@ -41,9 +57,70 @@ */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/createOrUpdateRayDistribution.json + */ + /** + * Sample code: CreateOrUpdate Command Job With Ray Distribution. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateCommandJobWithRayDistribution( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new CommandJob().withDescription("Ray distributed command job") + .withTags(mapOf("string", "string")) + .withComputeId("string") + .withDisplayName("ray-multi-node-job") + .withExperimentName("ray-experiment") + .withIdentity(new AmlToken()) + .withCodeId("fakeTokenPlaceholder") + .withCommand("python train.py") + .withDistribution(new Ray().withPort(6379).withIncludeDashboard(true).withDashboardPort(8265)) + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withResources(new JobResourceConfiguration().withInstanceCount(2) + .withInstanceType("string") + .withProperties(mapOf()))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/DistillationJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Distillation Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateDistillationJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new DistillationJob().withComputeId("gpu-compute") + .withExperimentName("llm-finetuning") + .withDataGenerationDetails( + new LabelGeneration().withDataGenerationTaskType(DataGenerationTaskType.CONVERSATION) + .withTeacherModelEndpoint( + new TeacherModelEndpoint().withEndpointName("newfinetuneinttesting-jbuob")) + .withTrainingData(new UriFileJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11"))) + .withFinetuningDetails(new FinetuningDetails() + .withStudentModel(new MLFlowModelJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Meta-Llama-3.1-8B-Instruct/versions/1"))) + .withOutputs(mapOf("string", + new MLFlowModelJobOutput().withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.STANDARD)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("Standard_NC6")))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -56,43 +133,41 @@ public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelear .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new AutoMLJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") + .withIdentity(new AmlToken()) + .withIsArchived(false) .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIsArchived(false) - .withIdentity(new AmlToken()) + .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) + .withOutputs(mapOf("string", + new UriFileJobOutput().withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) .withResources(new JobResourceConfiguration().withInstanceCount(1) .withInstanceType("string") .withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad\":null}", Object.class, SerializerEncoding.JSON)))) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withTaskDetails(new ImageClassification().withTrainingData(new MLTableJobInput().withUri("string")) - .withTargetColumnName("string") + .withTaskDetails(new ImageClassification().withTargetColumnName("string") + .withTrainingData(new MLTableJobInput().withUri("string")) .withModelSettings(new ImageModelSettingsClassification().withValidationCropSize(2)) .withSearchSpace(Arrays.asList( new ImageModelDistributionSettingsClassification().withValidationCropSize("choice(2, 360)"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2))) - .withOutputs(mapOf("string", - new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT)))) + .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -105,29 +180,29 @@ public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearn .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new SweepJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") + .withEarlyTermination(new MedianStoppingPolicy().withDelayEvaluation(1).withEvaluationInterval(1)) + .withLimits(new SweepJobLimits().withMaxConcurrentTrials(1) + .withMaxTotalTrials(1) + .withTrialTimeout(Duration.parse("PT1S"))) + .withObjective(new Objective().withGoal(Goal.MINIMIZE).withPrimaryMetric("string")) + .withSamplingAlgorithm(new GridSamplingAlgorithm()) .withSearchSpace(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"string\":{}}", Object.class, SerializerEncoding.JSON)) - .withSamplingAlgorithm(new GridSamplingAlgorithm()) - .withLimits(new SweepJobLimits().withMaxTotalTrials(1) - .withMaxConcurrentTrials(1) - .withTrialTimeout(Duration.parse("PT1S"))) - .withEarlyTermination(new MedianStoppingPolicy().withEvaluationInterval(1).withDelayEvaluation(1)) - .withObjective(new Objective().withPrimaryMetric("string").withGoal(Goal.MINIMIZE)) .withTrial(new TrialComponent().withCodeId("fakeTokenPlaceholder") .withCommand("string") + .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withResources(new JobResourceConfiguration().withInstanceCount(1) .withInstanceType("string") .withProperties(mapOf("string", @@ -138,9 +213,7 @@ public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearn } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -153,30 +226,58 @@ public static void createOrUpdatePipelineJob( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new PipelineJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) .withOutputs(mapOf("string", new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.UPLOAD)))) + .withMode(OutputDeliveryMode.UPLOAD) + .withUri("string"))) + .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{}", Object.class, SerializerEncoding.JSON))) .create(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Job/FineTuningJob/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .define("string") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new FineTuningJob().withComputeId("gpu-compute") + .withExperimentName("llm-finetuning") + .withFineTuningDetails(new CustomModelFineTuning() + .withModel(new MLFlowModelJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11")) + .withTaskType(FineTuningTaskType.TEXT_COMPLETION) + .withTrainingData(new UriFileJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("azureml://registries/azureml-meta/models/Llama-2-7b/versions/11"))) + .withOutputs(mapOf("string", + new MLFlowModelJobOutput().withDescription("string") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.STANDARD)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("Standard_NC6")))) + .create(); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -189,34 +290,35 @@ public static void createOrUpdateCommandJob( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new CommandJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") + .withIdentity(new AmlToken()) + .withParentJobName("ParentRun") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIdentity(new AmlToken()) - .withResources(new JobResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, - SerializerEncoding.JSON)))) .withCodeId("fakeTokenPlaceholder") .withCommand("string") + .withDistribution(new TensorFlow().withParameterServerCount(1).withWorkerCount(1)) .withEnvironmentId("string") + .withEnvironmentVariables(mapOf("string", "string")) .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) + .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) .withOutputs(mapOf("string", new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT))) - .withDistribution(new TensorFlow().withWorkerCount(1).withParameterServerCount(1)) - .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) - .withEnvironmentVariables(mapOf("string", "string"))) + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withResources(new JobResourceConfiguration().withInstanceCount(1) + .withInstanceType("string") + .withProperties(mapOf("string", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, + SerializerEncoding.JSON))))) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java index 06c963d241c3..a609ddc28276 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/delete.json + * x-ms-original-file: 2026-05-15-preview/Job/delete.json */ /** * Sample code: Delete Job. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java index 1577e8c5a9e1..53493a79dc45 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class JobsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -23,9 +21,19 @@ public static void getCommandJob(com.azure.resourcemanager.machinelearning.Machi } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/DistillationJob/get.json + */ + /** + * Sample code: Get Distillation Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getDistillationJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -37,9 +45,7 @@ public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.Machin } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -51,9 +57,7 @@ public static void getSweepJob(com.azure.resourcemanager.machinelearning.Machine } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/get.json + * x-ms-original-file: 2026-05-15-preview/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. @@ -63,4 +67,16 @@ public static void getSweepJob(com.azure.resourcemanager.machinelearning.Machine public static void getPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/FineTuningJob/get.json + */ + /** + * Sample code: Get FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java index 96283b6c8e09..14cb79bca623 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java @@ -1,17 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.models.ListViewType; + /** * Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/list.json + * x-ms-original-file: 2026-05-15-preview/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -25,9 +25,7 @@ public static void listCommandJob(com.azure.resourcemanager.machinelearning.Mach } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/list.json + * x-ms-original-file: 2026-05-15-preview/Job/PipelineJob/list.json */ /** * Sample code: List Pipeline Job. @@ -41,9 +39,21 @@ public static void listPipelineJob(com.azure.resourcemanager.machinelearning.Mac } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/list.json + * x-ms-original-file: 2026-05-15-preview/Job/FineTuningJob/list.json + */ + /** + * Sample code: List FineTuning Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listFineTuningJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ALL, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/SweepJob/list.json */ /** * Sample code: List Sweep Job. @@ -57,9 +67,7 @@ public static void listSweepJob(com.azure.resourcemanager.machinelearning.Machin } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/list.json + * x-ms-original-file: 2026-05-15-preview/Job/AutoMLJob/list.json */ /** * Sample code: List AutoML Job. @@ -70,4 +78,18 @@ public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.Machi manager.jobs() .list("test-rg", "my-aml-workspace", null, null, null, null, null, com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-05-15-preview/Job/DistillationJob/list.json + */ + /** + * Sample code: List Distillation Job. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listDistillationJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.jobs() + .list("test-rg", "my-aml-workspace", null, "string", "string", ListViewType.ALL, null, + com.azure.core.util.Context.NONE); + } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java index fe00570a7558..3ca69892a2cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/provision.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/provision.json */ /** * Sample code: Provision ManagedNetwork. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationGetSamples.java new file mode 100644 index 000000000000..f0c7da1d2d6c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ManagedNetworkSettingsOperation Get. + */ +public final class ManagedNetworkSettingsOperationGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/getManagedNetworkV2.json + */ + /** + * Sample code: Get ManagedNetworkSettings. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsOperations() + .getWithResponse("test-rg", "aml-workspace-name", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationListSamples.java new file mode 100644 index 000000000000..790226982fa0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for ManagedNetworkSettingsOperation List. + */ +public final class ManagedNetworkSettingsOperationListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/listManagedNetworkV2.json + */ + /** + * Sample code: List ManagedNetworkSettings. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsOperations() + .list("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPatchSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPatchSamples.java new file mode 100644 index 000000000000..29d218f918e5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPatchSamples.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedNetworkSettingsOperation Patch. + */ +public final class ManagedNetworkSettingsOperationPatchSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/patchManagedNetworkV2.json + */ + /** + * Sample code: Patch ManagedNetworkSettings. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + patchManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + ManagedNetworkSettingsPropertiesBasicResource resource = manager.managedNetworkSettingsOperations() + .getWithResponse("test-rg", "aml-workspace-name", "default", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ManagedNetworkSettingsProperties() + .withManagedNetwork(new ManagedNetworkSettingsEx().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("rule_name_1", + new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withDestination("destination_endpoint"))) + .withFirewallSku(FirewallSku.STANDARD))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPutSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPutSamples.java new file mode 100644 index 000000000000..597ce0d83d28 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationPutSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ManagedNetworkSettingsOperation Put. + */ +public final class ManagedNetworkSettingsOperationPutSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json + */ + /** + * Sample code: Put ManagedNetworkSettings. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + putManagedNetworkSettings(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.managedNetworkSettingsOperations() + .define("default") + .withExistingWorkspace("test-rg", "aml-workspace-name") + .withProperties(new ManagedNetworkSettingsProperties() + .withManagedNetwork(new ManagedNetworkSettingsEx().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("rule_name_1", + new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withDestination("destination_endpoint"))) + .withFirewallSku(FirewallSku.STANDARD))) + .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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java index ddd8e88b1351..f004e729c857 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/createOrUpdateRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/createOrUpdateRule.json */ /** * Sample code: CreateOrUpdate ManagedNetworkSettingsRule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java index a90f21df55ff..3bd170064149 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ManagedNetworkSettingsRuleDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/deleteRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/deleteRule.json */ /** * Sample code: Delete ManagedNetworkSettingsRule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java index 1ccacdcb5e9f..6a02c7780902 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ManagedNetworkSettingsRuleGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/getRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/getRule.json */ /** * Sample code: Get ManagedNetworkSettingsRule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java index 2f19211ab7b5..0ff4c69c3fcf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRuleListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ManagedNetworkSettingsRuleListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/listRule.json + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/listRule.json */ /** * Sample code: List ManagedNetworkSettingsRule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java index 6c2429d5bb83..72f1a7faae63 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class MarketplaceSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Marketplace Subscription. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java index 4fa5c22d7102..cfe2a8582771 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class MarketplaceSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/delete.json */ /** * Sample code: Delete Workspace Marketplace Subscription. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java index 243cf647cdc2..a42193b5e6b7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class MarketplaceSubscriptionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/get.json */ /** * Sample code: Get Workspace Marketplace Subscription. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java index 346d0fe46a83..79142ef51cdf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class MarketplaceSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/MarketplaceSubscription/list.json */ /** * Sample code: List Workspace Marketplace Subscription. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java index 12628a6fbc3e..c9a759f4cab6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,9 +13,7 @@ */ public final class ModelContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java index b9a5dac8d512..92b6896d2d1c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ModelContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/delete.json */ /** * Sample code: Delete Workspace Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java index 2835c3d7abce..52e7aa0ec86f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ModelContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/get.json */ /** * Sample code: Get Workspace Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java index 22a403b08f35..cb20422f783c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ModelContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelContainer/list.json */ /** * Sample code: List Workspace Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java index 05f0b164b294..a5bc5d8fdc3b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class ModelVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Version. @@ -29,8 +27,8 @@ public final class ModelVersionsCreateOrUpdateSamples { .define("string") .withExistingModel("test-rg", "my-aml-workspace", "string") .withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java index 81d7fee23d4e..731e85e17351 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ModelVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/delete.json */ /** * Sample code: Delete Workspace Model Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java index a7ebce68fb46..f698a4c2de67 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ModelVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/get.json */ /** * Sample code: Get Workspace Model Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java index dde491a5bc15..7342162ebee0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ModelVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/list.json */ /** * Sample code: List Workspace Model Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java index dad0ce4285f3..2bff1b295e7b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class ModelVersionsPublishSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/publish.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ModelVersion/publish.json */ /** * Sample code: Publish Workspace Model Version. @@ -24,9 +22,9 @@ public final class ModelVersionsPublishSamples { publishWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java index b21db6a8c226..8e17e527f5f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -26,9 +26,7 @@ */ public final class OnlineDeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -41,34 +39,35 @@ public static void createOrUpdateKubernetesOnlineDeployment( .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new KubernetesOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new KubernetesOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withInstanceType("string") + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT5M"))) .withModel("string") + .withModelMountPath("string") + .withRequestSettings(new OnlineRequestSettings().withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings()) .withContainerResourceRequirements(new ContainerResourceRequirements() - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")) .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")))) + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")) + .withContainerResourceRequests( + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -78,9 +77,7 @@ public static void createOrUpdateKubernetesOnlineDeployment( } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. @@ -93,34 +90,35 @@ public static void createOrUpdateManagedOnlineDeployment( .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new ManagedOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new ManagedOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT2S")) + .withTimeout(Duration.parse("PT5M"))) + .withModel("string") + .withModelMountPath("string") + .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) + .withInitialDelay(Duration.parse("PT1S")) .withPeriod(Duration.parse("PT10S")) - .withInitialDelay(Duration.parse("PT1S"))) - .withInstanceType("string") - .withModel("string")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT2S"))) + .withRequestSettings(new OnlineRequestSettings().withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings())) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java index 76577d8486dd..6f7ff22e7624 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineDeploymentsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineDeployment/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineDeployment/delete.json */ /** * Sample code: Delete Workspace Online Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java index 77f5fa60698b..4c425b80fc92 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class OnlineDeploymentsGetLogsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/getLogs.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java index f883224d2527..44fb1ab8ee2e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineDeploymentsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -26,9 +24,7 @@ public final class OnlineDeploymentsGetSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java index 2327d527e2bd..1a314681c8cb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineDeploymentsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/list.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java index f9c82cad08a9..a9f40aba54bf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineDeploymentsListSkusSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -26,9 +24,7 @@ public final class OnlineDeploymentsListSkusSamples { } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java index cf33e07fcbeb..4a6845285fe5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,9 +15,7 @@ */ public final class OnlineDeploymentsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -32,18 +30,16 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * x-ms-original-file: 2026-05-15-preview/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -58,11 +54,11 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java index ba5238faf74a..3471949e099e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -19,9 +19,7 @@ */ public final class OnlineEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Online Endpoint. @@ -34,15 +32,15 @@ public static void createOrUpdateWorkspaceOnlineEndpoint( .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new OnlineEndpointProperties().withDescription("string") + .withProperties(new OnlineEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withCompute("string") .withTraffic(mapOf("string", 1))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java index 98fe3c6eac61..51ad4caadf68 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/delete.json */ /** * Sample code: Delete Workspace Online Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java index 166c01c35334..fe04d935080e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineEndpointsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/get.json */ /** * Sample code: Get Workspace Online Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java index ced9eb79c111..2577d5c57e9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineEndpointsGetTokenSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/getToken.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/getToken.json */ /** * Sample code: GetToken Workspace Online Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java index f588f47ec28c..c378e653080d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OnlineEndpointsListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Online Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java index c38212d46e73..1d375affbea9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class OnlineEndpointsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/list.json */ /** * Sample code: List Workspace Online Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java index 02405cfeda2b..83ba123178fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class OnlineEndpointsRegenerateKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/regenerateKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Online Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java index da734f187c6b..702b6815b008 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,9 +18,7 @@ */ public final class OnlineEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/OnlineEndpoint/update.json */ /** * Sample code: Update Workspace Online Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java index 1de8bcc4511a..bde95b7a6491 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/operationsList.json + * x-ms-original-file: 2026-05-15-preview/Workspace/operationsList.json */ /** * Sample code: OperationsList. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e06453b03a68 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; + +/** + * Samples for OutboundRule CreateOrUpdate. + */ +public final class OutboundRuleCreateOrUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/createOrUpdateRuleV2.json + */ + /** + * Sample code: CreateOrUpdate OutboundRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateOutboundRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules() + .createOrUpdate("test-rg", "aml-workspace-name", "default", "rule_name_1", + new OutboundRuleBasicResourceInner() + .withProperties(new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withStatus(RuleStatus.ACTIVE) + .withDestination("destination_endpoint")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleDeleteSamples.java new file mode 100644 index 000000000000..4a6717e443f1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for OutboundRule Delete. + */ +public final class OutboundRuleDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/deleteRuleV2.json + */ + /** + * Sample code: Delete OutboundRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteOutboundRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules() + .delete("test-rg", "aml-workspace-name", "default", "rule-name", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleGetSamples.java new file mode 100644 index 000000000000..8d84de5076d4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for OutboundRule Get. + */ +public final class OutboundRuleGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/getRuleV2.json + */ + /** + * Sample code: Get OutboundRule. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getOutboundRule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules() + .getWithResponse("test-rg", "aml-workspace-name", "default", "name_of_the_fqdn_rule", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListSamples.java new file mode 100644 index 000000000000..785dc4f3e4d7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for OutboundRule List. + */ +public final class OutboundRuleListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/listRuleV2.json + */ + /** + * Sample code: List OutboundRules. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listOutboundRules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRules().list("test-rg", "aml-workspace-name", "default", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesOperationPostSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesOperationPostSamples.java new file mode 100644 index 000000000000..4b348c9a47a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesOperationPostSamples.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for OutboundRulesOperation Post. + */ +public final class OutboundRulesOperationPostSamples { + /* + * x-ms-original-file: 2026-05-15-preview/ManagedNetwork/postOutboundRulesV2.json + */ + /** + * Sample code: Post OutboundRules. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void postOutboundRules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.outboundRulesOperations() + .post("test-rg", "aml-workspace-name", "default", + new ManagedNetworkSettingsBasicResourceInner() + .withProperties(new ManagedNetworkSettingsInner().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("rule_name_1", + new FqdnOutboundRule().withCategory(RuleCategory.USER_DEFINED) + .withDestination("destination_endpoint"))) + .withFirewallSku(FirewallSku.STANDARD)), + com.azure.core.util.Context.NONE); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaGetAvailableSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaGetAvailableSamples.java new file mode 100644 index 000000000000..c7dc3b8d9ae8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaGetAvailableSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for PTUQuota GetAvailable. + */ +public final class PTUQuotaGetAvailableSamples { + /* + * x-ms-original-file: 2026-05-15-preview/PTUQuota/getAvailable.json + */ + /** + * Sample code: Get available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.pTUQuotas().getAvailableWithResponse("location", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListAvailableSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListAvailableSamples.java new file mode 100644 index 000000000000..99a5855bd09f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListAvailableSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for PTUQuota ListAvailable. + */ +public final class PTUQuotaListAvailableSamples { + /* + * x-ms-original-file: 2026-05-15-preview/PTUQuota/listAvailable.json + */ + /** + * Sample code: List available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.pTUQuotas().listAvailable("location", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListSamples.java new file mode 100644 index 000000000000..c6616e651bf8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotaListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for PTUQuota List. + */ +public final class PTUQuotaListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/PTUQuota/list.json + */ + /** + * Sample code: List MaaS PTU usage and quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listMaaSPTUUsageAndQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.pTUQuotas().list("location", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 7637883c3920..68e678b5cc98 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. @@ -27,8 +25,8 @@ public static void workspacePutPrivateEndpointConnection( .define("{privateEndpointConnectionName}") .withExistingWorkspace("rg-1234", "testworkspace") .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) + new PrivateLinkServiceConnectionState().withDescription("Auto-Approved") + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)) .create(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java index b64f4d37ef22..2f18e771bd0d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,16 +9,14 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/delete.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/delete.json */ /** - * Sample code: WorkspaceDeletePrivateEndpointConnection. + * Sample code: WorkspacePutPrivateEndpointConnection. * * @param manager Entry point to MachineLearningManager. */ - public static void workspaceDeletePrivateEndpointConnection( + public static void workspacePutPrivateEndpointConnection( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.privateEndpointConnections() .deleteWithResponse("rg-1234", "testworkspace", "{privateEndpointConnectionName}", diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java index b137954fedb3..9ac06c7ef03a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/get.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java index a87e0762b3a8..dcc33a6051d7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/list.json + * x-ms-original-file: 2026-05-15-preview/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java index 6821d71c24f1..8d7a9134b128 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateLinkResource/list.json + * x-ms-original-file: 2026-05-15-preview/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. @@ -20,6 +18,6 @@ public final class PrivateLinkResourcesListSamples { */ public static void workspaceListPrivateLinkResources(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.privateLinkResources().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java index 9b662845f970..e7545568d75e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class QuotasListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/list.json + * x-ms-original-file: 2026-05-15-preview/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java index affcf1a4cfdf..809d061e6177 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class QuotasUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/update.json + * x-ms-original-file: 2026-05-15-preview/Quota/update.json */ /** * Sample code: update quotas. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationListSamples.java new file mode 100644 index 000000000000..8ea19fa46383 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for RaiPoliciesOperation List. + */ +public final class RaiPoliciesOperationListSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/list.json + */ + /** + * Sample code: List Rai policies. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiPolicies(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPoliciesOperations() + .list("test-rg", "aml-workspace-name", "Azure.OpenAI", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyCreateSamples.java new file mode 100644 index 000000000000..8b5c2c45e28d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyCreateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; + +/** + * Samples for RaiPolicy Create. + */ +public final class RaiPolicyCreateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/create.json + */ + /** + * Sample code: Create Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .define("raiPolicyName") + .withExistingEndpoint("test-rg", "aml-workspace-name", "Azure.OpenAI") + .withProperties(new RaiPolicyProperties().withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyDeleteSamples.java new file mode 100644 index 000000000000..113fc5dcad3d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for RaiPolicy Delete. + */ +public final class RaiPolicyDeleteSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/delete.json + */ + /** + * Sample code: Delete Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyGetSamples.java new file mode 100644 index 000000000000..efda5bf11e52 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +/** + * Samples for RaiPolicy Get. + */ +public final class RaiPolicyGetSamples { + /* + * x-ms-original-file: 2026-05-15-preview/Endpoint/RaiPolicy/get.json + */ + /** + * Sample code: Get Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java index 97c56eab19df..d74d29ebef7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateSamples.java @@ -1,15 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; @@ -19,8 +19,6 @@ import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -30,9 +28,7 @@ */ public final class RegistriesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry with system created accounts. @@ -66,7 +62,7 @@ public static void createOrUpdateRegistryWithSystemCreatedAccounts( .withRegistryPrivateLinkServiceConnectionState( new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)) .withProvisioningState("string"))) .withPublicNetworkAccess("string") .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() @@ -84,55 +80,6 @@ public static void createOrUpdateRegistryWithSystemCreatedAccounts( .create(); } - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-UserCreated.json - */ - /** - * Sample code: CreateOrUpdate Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateRegistryWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries() - .define("string") - .withRegion("string") - .withExistingResourceGroup("test-rg") - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku(new Sku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .withDiscoveryUrl("string") - .withIntellectualPropertyPublisher("string") - .withManagedResourceGroup(new ArmResourceId().withResourceId("string")) - .withMlFlowRegistryUri("string") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("string") - .withLocation("string") - .withGroupIds(Arrays.asList("string")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("string")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") - .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("string"))) - .withPublicNetworkAccess("string") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails().withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("string"))))) - .withLocation("string") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails().withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("string"))))))) - .create(); - } - // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java index 605b18f560ce..93528757ea86 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/delete.json + * x-ms-original-file: 2026-05-15-preview/Registries/delete.json */ /** * Sample code: Delete Registry. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java index 5ac1ac193302..f3757dce8bc2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,24 +9,7 @@ */ public final class RegistriesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-UserCreated.json - */ - /** - * Sample code: Get Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void - getRegistryWithUserCreatedAccounts(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/get.json */ /** * Sample code: Get Registry with system created accounts. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java index 510ee99393b7..2f798d104e88 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,24 +9,7 @@ */ public final class RegistriesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-UserCreated.json - */ - /** - * Sample code: List registries with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listRegistriesWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.registries().listByResourceGroup("test-rg", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/list.json */ /** * Sample code: List registries with system created accounts. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java index 45d93209a5ce..438f741c8eea 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistriesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/listBySubscription.json + * x-ms-original-file: 2026-05-15-preview/Registries/listBySubscription.json */ /** * Sample code: List registries by subscription. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java index fe5143d1e173..8ccefb13a7dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsSamples.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; @@ -20,8 +20,6 @@ import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -31,9 +29,7 @@ */ public final class RegistriesRemoveRegionsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/removeRegions.json + * x-ms-original-file: 2026-05-15-preview/Registries/removeRegions.json */ /** * Sample code: Remove regions from registry. @@ -66,26 +62,22 @@ public final class RegistriesRemoveRegionsSamples { .withRegistryPrivateLinkServiceConnectionState( new RegistryPrivateLinkServiceConnectionState().withActionsRequired("string") .withDescription("string") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) + .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)) .withProvisioningState("string"))) .withPublicNetworkAccess("string") .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() .withAcrDetails(Arrays.asList(new AcrDetails() .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("string") .withAcrAccountSku("string") - .withArmResourceId(new ArmResourceId().withResourceId("string"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() .withArmResourceId(new ArmResourceId().withResourceId("string"))))) .withLocation("string") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails() - .withSystemCreatedStorageAccount( + .withStorageAccountDetails( + Arrays.asList(new StorageAccountDetails().withSystemCreatedStorageAccount( new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) .withArmResourceId(new ArmResourceId().withResourceId("string")) .withStorageAccountHnsEnabled(false) .withStorageAccountName("string") - .withStorageAccountType("string")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("string"))))))), + .withStorageAccountType("string")))))), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java index 32fc0e4361f4..de6d45c09f81 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistriesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,36 +18,7 @@ */ public final class RegistriesUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-UserCreated.json - */ - /** - * Sample code: Update Registry with user created accounts. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateRegistryWithUserCreatedAccounts( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Registry resource = manager.registries() - .getByResourceGroupWithResponse("test-rg", "string", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .apply(); - } - - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-SystemCreated.json + * x-ms-original-file: 2026-05-15-preview/Registries/update.json */ /** * Sample code: Update Registry with system created accounts. @@ -64,11 +35,11 @@ public static void updateRegistryWithSystemCreatedAccounts( .withIdentity( new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) .apply(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java index 3948fe8e66d1..68647c1ec0b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class RegistryCodeContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java index fddf1645491f..5bd78637ef11 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryCodeContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/delete.json */ /** * Sample code: Delete Registry Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java index 55c87a4fd3cd..b4768206c422 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryCodeContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/get.json */ /** * Sample code: Get Registry Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java index c93e32301197..1b1e13aecaef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryCodeContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeContainer/list.json */ /** * Sample code: List Registry Code Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java index 5797cfd6351e..59e118a0126a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrGetStartPendingUploadSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java index 81b813de1f16..d6b31ad76cd6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class RegistryCodeVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Version. @@ -28,8 +26,8 @@ public final class RegistryCodeVersionsCreateOrUpdateSamples { manager.registryCodeVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new CodeVersionInner().withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java index 06bf92b4951f..fbacadfd706d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryCodeVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/delete.json */ /** * Sample code: Delete Registry Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java index 03d9147a92f5..dff3caec7d5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryCodeVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/get.json */ /** * Sample code: Get Registry Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java index 6cd2872433f7..ad7c5110add7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryCodeVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/CodeVersion/list.json */ /** * Sample code: List Registry Code Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java index ae9ac890e6b7..427e8329cf03 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class RegistryComponentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Container. @@ -29,8 +27,8 @@ public static void createOrUpdateRegistryComponentContainer( .createOrUpdate("test-rg", "my-aml-registry", "string", new ComponentContainerInner() .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))), + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java index 82604e36820c..71e343dbda84 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryComponentContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/delete.json */ /** * Sample code: Delete Registry Component Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java index a69d3dc48395..f87b679ba568 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryComponentContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/get.json */ /** * Sample code: Get Registry Component Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java index 4039f905f383..4317a693102e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryComponentContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentContainer/list.json */ /** * Sample code: List Registry Component Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java index 9daa8bc433dd..adc37501b5aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,9 +17,7 @@ */ public final class RegistryComponentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Version. @@ -31,8 +29,8 @@ public static void createOrUpdateRegistryComponentVersion( manager.registryComponentVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java index ab5498d5b70c..c91bf209b3af 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryComponentVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/delete.json */ /** * Sample code: Delete Registry Component Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java index 79cfeb53d1d4..42c73df77e5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryComponentVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/get.json */ /** * Sample code: Get Registry Component Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java index 2ace72a2c328..b09b55423c07 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryComponentVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ComponentVersion/list.json */ /** * Sample code: List Registry Component Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java index f95a428f5c20..eb40a35e44a4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,9 +15,7 @@ */ public final class RegistryDataContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Container. @@ -29,8 +27,8 @@ public final class RegistryDataContainersCreateOrUpdateSamples { manager.registryDataContainers() .createOrUpdate("test-rg", "registryName", "string", new DataContainerInner().withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false) .withDataType(DataType.URI_FOLDER)), com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java index b18b5baab55a..707eda631d93 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryDataContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/delete.json */ /** * Sample code: Delete Registry Data Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java index b2c13cde5452..be21400b8ee9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryDataContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/get.json */ /** * Sample code: Get Registry Data Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java index 0a4362fe4de4..2db28706c490 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class RegistryDataContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/registryList.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataContainer/registryList.json */ /** * Sample code: RegistryList Registry Data Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java index 8f77dd21585b..8d145c2fe0f2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataReferencesGetBlobReferenceSasSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class RegistryDataReferencesGetBlobReferenceSasSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/DataReference/getBlobReferenceSAS.json + * x-ms-original-file: 2026-05-15-preview/DataReference/getBlobReferenceSAS.json */ /** * Sample code: GetBlobReferenceSAS Data Reference. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java index c54d42479df1..7e9e71672802 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrGetStartPendingUploadSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Data Version Base. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java index 576d7f848fa8..e19fb33bf962 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,9 +15,7 @@ */ public final class RegistryDataVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Version Base. @@ -29,10 +27,10 @@ public static void createOrUpdateRegistryDataVersionBase( manager.registryDataVersions() .createOrUpdate("test-rg", "registryName", "string", "string", new DataVersionBaseInner().withProperties(new MLTableData().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) + .withIsArchived(false) .withDataUri("string") .withReferencedUris(Arrays.asList("string"))), com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java index b7ce0a9f75cf..b950677678c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryDataVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/delete.json */ /** * Sample code: Delete Registry Data Version Base. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java index a5a3dbcbfda9..b9c38000ddbc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryDataVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/get.json */ /** * Sample code: Get Registry Data Version Base. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java index dc192c672fb8..deae5aae9f5f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,9 +11,7 @@ */ public final class RegistryDataVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/registryList.json + * x-ms-original-file: 2026-05-15-preview/Registry/DataVersionBase/registryList.json */ /** * Sample code: RegistryList Registry Data Version Base. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java index 518e85b26ba0..26e66978c615 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class RegistryEnvironmentContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Container. @@ -29,9 +27,9 @@ public static void createOrUpdateRegistryEnvironmentContainer( .createOrUpdate("testrg123", "testregistry", "testEnvironment", new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() .withDescription("string") - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java index c763ae823871..6bee3982c818 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryEnvironmentContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/delete.json */ /** * Sample code: Delete Registry Environment Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java index 4544a14f3b79..2765f73d06cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryEnvironmentContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/get.json */ /** * Sample code: Get Registry Environment Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java index 8c55031c2ce8..5073679d6ba8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryEnvironmentContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentContainer/list.json */ /** * Sample code: List Registry Environment Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java index f8d55faf952d..dc546653d838 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,9 +17,7 @@ */ public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Version. @@ -32,14 +30,14 @@ public static void createOrUpdateRegistryEnvironmentVersion( .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() .withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") .withBuild(new BuildContext().withContextUri( "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") .withDockerfilePath("prod/Dockerfile")) + .withCondaFile("string") + .withImage("docker.io/tensorflow/serving:latest") .withInferenceConfig( new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) .withReadinessRoute(new Route().withPath("string").withPort(1)) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java index 92d4b8e34026..2f42e25ced0e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryEnvironmentVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/delete.json */ /** * Sample code: Delete Registry Environment Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java index 21b46cad644b..42b6caed3b34 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryEnvironmentVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/get.json */ /** * Sample code: Get Registry Environment Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java index 3fc953fcd188..1a26f9f39b9b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryEnvironmentVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/EnvironmentVersion/list.json */ /** * Sample code: List Registry Environment Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java index b6531faab826..80f1e58da2ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class RegistryModelContainersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java index 08663fd5e9e8..b69f605de103 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryModelContainersDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/delete.json */ /** * Sample code: Delete Registry Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java index d0b5913c3d98..935c20391591 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryModelContainersGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/get.json */ /** * Sample code: Get Registry Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java index 5db8eb515db4..6e1e63079db2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryModelContainersListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelContainer/list.json */ /** * Sample code: List Registry Model Container. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java index f8364e1a447b..d1e51a046407 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrGetStartPendingUploadSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrGetStartPendingUpload.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Model Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java index b203ed258ad9..c29449c914c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,9 +15,7 @@ */ public final class RegistryModelVersionsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Version. @@ -29,8 +27,8 @@ public final class RegistryModelVersionsCreateOrUpdateSamples { manager.registryModelVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java index e58641c85172..c630ed8c7836 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryModelVersionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/delete.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/delete.json */ /** * Sample code: Delete Registry Model Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java index d53c83a65957..fccdcc41afda 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryModelVersionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/get.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/get.json */ /** * Sample code: Get Registry Model Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java index c9c644f3b10d..a1be57b86f2a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class RegistryModelVersionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/list.json + * x-ms-original-file: 2026-05-15-preview/Registry/ModelVersion/list.json */ /** * Sample code: List Registry Model Version. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java index cc1553834154..1a4863bbba25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,9 +18,7 @@ */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. @@ -33,18 +31,18 @@ public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearn .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ScheduleProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withAction(new EndpointScheduleAction() + .withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, + SerializerEncoding.JSON))) .withDisplayName("string") .withIsEnabled(false) .withTrigger(new CronTrigger().withEndTime("string") .withStartTime("string") .withTimeZone("string") - .withExpression("string")) - .withAction(new EndpointScheduleAction() - .withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, - SerializerEncoding.JSON)))) + .withExpression("string"))) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java index 531602b888c2..eec98fa879d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/delete.json + * x-ms-original-file: 2026-05-15-preview/Schedule/delete.json */ /** * Sample code: Delete Schedule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java index bac015b98e50..e707502afee0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class SchedulesGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/get.json + * x-ms-original-file: 2026-05-15-preview/Schedule/get.json */ /** * Sample code: Get Schedule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java index f8aa057f06b0..7e5965336c73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class SchedulesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/list.json + * x-ms-original-file: 2026-05-15-preview/Schedule/list.json */ /** * Sample code: List Schedules. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java index 21d2d0b4525d..185433468b6a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateSamples.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -22,9 +23,7 @@ */ public final class ServerlessEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/createOrUpdate.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Serverless Endpoint. @@ -37,14 +36,14 @@ public static void createOrUpdateWorkspaceServerlessEndpoint( .define("string") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("string")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) + .withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) + .withContentSafety(new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.BLOCKING) + .withContentSafetyStatus(ContentSafetyStatus.ENABLED)) + .withModelSettings(new ModelSettings().withModelId("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.STANDARD) .withSize("string") diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java index 9451dd9810cc..ebe8718943c8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ServerlessEndpointsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/delete.json */ /** * Sample code: Delete Workspace Serverless Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java index 55332d342143..839c0e5ba002 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ServerlessEndpointsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/get.json */ /** * Sample code: Get Workspace Serverless Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java index e1ae216c6ac7..2ed6e7be6528 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ServerlessEndpointsListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Serverless Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java index d0fee73469a5..46a6a1256ddf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class ServerlessEndpointsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/list.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/list.json */ /** * Sample code: List Workspace Serverless Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java index 252985f25b8e..c3beda621a46 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsRegenerateKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class ServerlessEndpointsRegenerateKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/regenerateKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Serverless Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java index 4d9507a9342e..2f5f38ea6fa4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -20,9 +20,7 @@ */ public final class ServerlessEndpointsUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/ServerlessEndpoint/update.json */ /** * Sample code: Update Workspace Serverless Endpoint. @@ -36,15 +34,15 @@ public static void updateWorkspaceServerlessEndpoint( .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.PREMIUM) - .withSize("string") - .withFamily("string") - .withCapacity(1)) .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) .withUserAssignedIdentities(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{}", Object.class, SerializerEncoding.JSON)))) + .withSku(new PartialSku().withCapacity(1) + .withFamily("string") + .withName("string") + .withSize("string") + .withTier(SkuTier.PREMIUM)) .apply(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java index d49082939225..ebad77159d53 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class UsagesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Usage/list.json + * x-ms-original-file: 2026-05-15-preview/Usage/list.json */ /** * Sample code: List Usages. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java index 578235e20d63..5b657f1b7001 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class VirtualMachineSizesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/VirtualMachineSize/list.json + * x-ms-original-file: 2026-05-15-preview/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java index f06e496ea020..e2d4b9b64541 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java @@ -1,20 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; /** * Samples for WorkspaceConnections Create. */ public final class WorkspaceConnectionsCreateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/create.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -28,6 +27,7 @@ public final class WorkspaceConnectionsCreateSamples { .withExistingWorkspace("resourceGroup-1", "workspace-1") .withProperties( new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY) + .withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")) .withTarget("www.facebook.com")) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java index 99e07c7030e3..bfbfa5059f7a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspaceConnectionsDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/delete.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java index 2f8139326149..7b3fc616adf2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspaceConnectionsGetSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/get.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java index 54c33bad1de8..2b04f951237e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspaceConnectionsListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -21,7 +19,7 @@ public final class WorkspaceConnectionsListSamples { public static void listWorkspaceConnections(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.workspaceConnections() - .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", + .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java index 7c48c51c1dec..5f3b17087d25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspaceConnectionsListSecretsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/listSecrets.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/listSecrets.json */ /** * Sample code: GetWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java new file mode 100644 index 000000000000..aa91061dff84 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; + +/** + * Samples for WorkspaceConnections TestConnection. + */ +public final class WorkspaceConnectionsTestConnectionSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/testConnection.json + */ + /** + * Sample code: TestWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + testWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.workspaceConnections() + .testConnection("resourceGroup-1", "workspace-1", "connection-1", + new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( + new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.CONTAINER_REGISTRY) + .withExpiryTime(OffsetDateTime.parse("2024-03-15T14:30:00Z")) + .withTarget("target_url")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.java new file mode 100644 index 000000000000..6e6d7c023f02 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for WorkspaceConnections Update. + */ +public final class WorkspaceConnectionsUpdateSamples { + /* + * x-ms-original-file: 2026-05-15-preview/WorkspaceConnection/update.json + */ + /** + * Sample code: UpdateWorkspaceConnection. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + updateWorkspaceConnection(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + WorkspaceConnectionPropertiesV2BasicResource resource = manager.workspaceConnections() + .getWithResponse("test-rg", "workspace-1", "connection-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new AccessKeyAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.ADLSGEN2) + .withExpiryTime(OffsetDateTime.parse("2020-01-01T00:00:00Z")) + .withMetadata(mapOf()) + .withTarget("some_string") + .withCredentials(new WorkspaceConnectionAccessKey().withAccessKeyId("fakeTokenPlaceholder") + .withSecretAccessKey("fakeTokenPlaceholder"))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java index a1437795cee4..967c015d5aec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspaceFeaturesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceFeature/list.json + * x-ms-original-file: 2026-05-15-preview/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java index 6e450329fdb2..d79b8044c8ff 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.EncryptionStatus; import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; +import com.azure.resourcemanager.machinelearning.models.KeyVaultProperties; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; @@ -22,9 +22,7 @@ */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/create.json + * x-ms-original-file: 2026-05-15-preview/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -41,29 +39,29 @@ public static void createWorkspace(com.azure.resourcemanager.machinelearning.Mac .withUserAssignedIdentities(mapOf( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", new UserAssignedIdentity()))) - .withDescription("test description") - .withFriendlyName("HelloName") - .withKeyVault( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") .withApplicationInsights( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights") .withContainerRegistry( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry") - .withStorageAccount( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") - .withEncryption(new EncryptionProperty().withStatus(EncryptionStatus.ENABLED) - .withIdentity(new IdentityForCmk().withUserAssignedIdentity( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) - .withKeyVaultProperties(new EncryptionKeyVaultProperties().withKeyVaultArmId("fakeTokenPlaceholder") + .withDescription("test description") + .withEncryption(new EncryptionProperty().withIdentity(new IdentityForCmk().withUserAssignedIdentity( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) + .withKeyVaultProperties(new KeyVaultProperties().withIdentityClientId("") .withKeyIdentifier("fakeTokenPlaceholder") - .withIdentityClientId(""))) + .withKeyVaultArmId("fakeTokenPlaceholder")) + .withStatus(EncryptionStatus.ENABLED)) + .withFriendlyName("HelloName") .withHbiWorkspace(false) + .withKeyVault( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") .withSharedPrivateLinkResources(Arrays.asList(new SharedPrivateLinkResource().withName("testdbresource") + .withGroupId("Sql") .withPrivateLinkResourceId( "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql") - .withGroupId("Sql") .withRequestMessage("Please approve") .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) + .withStorageAccount( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java index 785fbd3e9ca7..b9ee2619a86e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/delete.json + * x-ms-original-file: 2026-05-15-preview/Workspace/delete.json */ /** * Sample code: Delete Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java index d2af3a41e6c0..6d1c56470d83 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,9 +14,7 @@ */ public final class WorkspacesDiagnoseSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/diagnose.json + * x-ms-original-file: 2026-05-15-preview/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -26,15 +24,16 @@ public final class WorkspacesDiagnoseSamples { public static void diagnoseWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.workspaces() .diagnose("workspace-1234", "testworkspace", - new DiagnoseWorkspaceParameters().withValue(new DiagnoseRequestProperties().withUdr(mapOf()) - .withNsg(mapOf()) - .withResourceLock(mapOf()) - .withDnsResolution(mapOf()) - .withStorageAccount(mapOf()) - .withKeyVault(mapOf()) - .withContainerRegistry(mapOf()) - .withApplicationInsights(mapOf()) - .withOthers(mapOf())), + new DiagnoseWorkspaceParameters() + .withValue(new DiagnoseRequestProperties().withApplicationInsights(mapOf()) + .withContainerRegistry(mapOf()) + .withDnsResolution(mapOf()) + .withKeyVault(mapOf()) + .withNsg(mapOf()) + .withOthers(mapOf()) + .withResourceLock(mapOf()) + .withStorageAccount(mapOf()) + .withUdr(mapOf())), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java index 7ada38a5bcc3..8b203657e194 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/get.json + * x-ms-original-file: 2026-05-15-preview/Workspace/get.json */ /** * Sample code: Get Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java index d9ef531759b2..536ae840e887 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listByResourceGroup.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. @@ -20,6 +18,6 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void getWorkspacesByResourceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); + manager.workspaces().listByResourceGroup("workspace-1234", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java index f40eacb0c172..f42f7b3300ef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesListKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java index 1d4294bdfb10..46bc41b8b98e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesListNotebookAccessTokenSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listNotebookAccessToken.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java index b59fc17ce7c2..dbf99c7ba153 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesListNotebookKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/listKeys.json + * x-ms-original-file: 2026-05-15-preview/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java index 30c9aae061c1..9cc03de8df46 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ExternalFQDN/get.json + * x-ms-original-file: 2026-05-15-preview/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java index 3f53b0bfd5bd..2351dfb71ab4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesListSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listBySubscription.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. @@ -20,6 +18,6 @@ public final class WorkspacesListSamples { */ public static void getWorkspacesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); + manager.workspaces().list(null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java index 01e342c2fc7b..97ee29eff729 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesListStorageAccountKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listStorageAccountKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java index 269407da1cc2..1406dd716c29 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesPrepareNotebookSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/prepare.json + * x-ms-original-file: 2026-05-15-preview/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java index dd194c1daed9..682ca0a8871a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,7 @@ */ public final class WorkspacesResyncKeysSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/resyncKeys.json + * x-ms-original-file: 2026-05-15-preview/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java index 5747af6e63e0..728c327994e6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,9 +12,7 @@ */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/update.json + * x-ms-original-file: 2026-05-15-preview/Workspace/update.json */ /** * Sample code: Update Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AKSNetworkingConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AKSNetworkingConfigurationTests.java new file mode 100644 index 000000000000..e9baf26a565a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AKSNetworkingConfigurationTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.AKSNetworkingConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class AKSNetworkingConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AKSNetworkingConfiguration model = BinaryData.fromString( + "{\"subnetId\":\"quxpjhcfaara\",\"serviceCidr\":\"iovmufzgugrblwal\",\"dnsServiceIP\":\"ssnqe\",\"dockerBridgeCidr\":\"otbptg\"}") + .toObject(AKSNetworkingConfiguration.class); + Assertions.assertEquals("quxpjhcfaara", model.subnetId()); + Assertions.assertEquals("iovmufzgugrblwal", model.serviceCidr()); + Assertions.assertEquals("ssnqe", model.dnsServiceIP()); + Assertions.assertEquals("otbptg", model.dockerBridgeCidr()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AKSNetworkingConfiguration model = new AKSNetworkingConfiguration().withSubnetId("quxpjhcfaara") + .withServiceCidr("iovmufzgugrblwal") + .withDnsServiceIP("ssnqe") + .withDockerBridgeCidr("otbptg"); + model = BinaryData.fromObject(model).toObject(AKSNetworkingConfiguration.class); + Assertions.assertEquals("quxpjhcfaara", model.subnetId()); + Assertions.assertEquals("iovmufzgugrblwal", model.serviceCidr()); + Assertions.assertEquals("ssnqe", model.dnsServiceIP()); + Assertions.assertEquals("otbptg", model.dockerBridgeCidr()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java index a3381403e317..2ea90934152f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java @@ -1,13 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.AadAuthTypeWorkspaceConnectionProperties; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; @@ -18,38 +19,44 @@ public final class AadAuthTypeWorkspaceConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AadAuthTypeWorkspaceConnectionProperties model = BinaryData.fromString( - "{\"authType\":\"AAD\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"dixqbo\",\"expiryTime\":\"2021-04-26T10:17:01Z\",\"group\":\"NoSQL\",\"isSharedToAll\":false,\"target\":\"egatxgrznm\",\"metadata\":{\"bmgjymncjc\":\"mtsdixchwk\",\"cqzoofjnqjsve\":\"gair\"},\"sharedUserList\":[\"htleberpyljek\",\"fqnwjjqx\",\"wkdnjrxgkrhwiehy\"],\"value\":\"nowawonoehrguqlh\",\"valueFormat\":\"JSON\"}") + "{\"authType\":\"AAD\",\"category\":\"Zoho\",\"createdByWorkspaceArmId\":\"cucti\",\"error\":\"vis\",\"expiryTime\":\"2021-09-19T13:44:11Z\",\"group\":\"Database\",\"isSharedToAll\":true,\"metadata\":{\"grxlexoweorocrqi\":\"qququxlph\",\"tgbqpfyrv\":\"gy\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"mrgcnzhrp\",\"cxfmbzquuutqmhb\",\"qyzycgcm\"],\"target\":\"y\",\"useWorkspaceManagedIdentity\":true}") .toObject(AadAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T10:17:01Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("egatxgrznm", model.target()); - Assertions.assertEquals("mtsdixchwk", model.metadata().get("bmgjymncjc")); - Assertions.assertEquals("htleberpyljek", model.sharedUserList().get(0)); - Assertions.assertEquals("nowawonoehrguqlh", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); + Assertions.assertEquals(ConnectionCategory.ZOHO, model.category()); + Assertions.assertEquals("vis", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T13:44:11Z"), model.expiryTime()); + Assertions.assertTrue(model.isSharedToAll()); + Assertions.assertEquals("qququxlph", model.metadata().get("grxlexoweorocrqi")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.peStatus()); + Assertions.assertEquals("mrgcnzhrp", model.sharedUserList().get(0)); + Assertions.assertEquals("y", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AadAuthTypeWorkspaceConnectionProperties model - = new AadAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-04-26T10:17:01Z")) - .withIsSharedToAll(false) - .withTarget("egatxgrznm") - .withMetadata(mapOf("bmgjymncjc", "mtsdixchwk", "cqzoofjnqjsve", "gair")) - .withSharedUserList(Arrays.asList("htleberpyljek", "fqnwjjqx", "wkdnjrxgkrhwiehy")) - .withValue("nowawonoehrguqlh") - .withValueFormat(ValueFormat.JSON); + = new AadAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.ZOHO) + .withError("vis") + .withExpiryTime(OffsetDateTime.parse("2021-09-19T13:44:11Z")) + .withIsSharedToAll(true) + .withMetadata(mapOf("grxlexoweorocrqi", "qququxlph", "tgbqpfyrv", "gy")) + .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) + .withPeStatus(ManagedPEStatus.INACTIVE) + .withSharedUserList(Arrays.asList("mrgcnzhrp", "cxfmbzquuutqmhb", "qyzycgcm")) + .withTarget("y") + .withUseWorkspaceManagedIdentity(true); model = BinaryData.fromObject(model).toObject(AadAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T10:17:01Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("egatxgrznm", model.target()); - Assertions.assertEquals("mtsdixchwk", model.metadata().get("bmgjymncjc")); - Assertions.assertEquals("htleberpyljek", model.sharedUserList().get(0)); - Assertions.assertEquals("nowawonoehrguqlh", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); + Assertions.assertEquals(ConnectionCategory.ZOHO, model.category()); + Assertions.assertEquals("vis", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T13:44:11Z"), model.expiryTime()); + Assertions.assertTrue(model.isSharedToAll()); + Assertions.assertEquals("qququxlph", model.metadata().get("grxlexoweorocrqi")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.peStatus()); + Assertions.assertEquals("mrgcnzhrp", model.sharedUserList().get(0)); + Assertions.assertEquals("y", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java index 5923d941ff5b..4712e5309871 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -8,33 +8,28 @@ import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; import org.junit.jupiter.api.Assertions; public final class AcrDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AcrDetails model = BinaryData.fromString( - "{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"rgdtpeqnacyheqw\",\"acrAccountSku\":\"qq\",\"armResourceId\":{\"resourceId\":\"u\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"ozf\"}}}") + "{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pfuvglsbjjca\",\"acrAccountSku\":\"xbvtvudu\",\"armResourceId\":{\"resourceId\":\"ormrlxqtvcofudfl\"}}}") .toObject(AcrDetails.class); - Assertions.assertEquals("rgdtpeqnacyheqw", model.systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("qq", model.systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("u", model.systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("ozf", model.userCreatedAcrAccount().armResourceId().resourceId()); + Assertions.assertEquals("pfuvglsbjjca", model.systemCreatedAcrAccount().acrAccountName()); + Assertions.assertEquals("xbvtvudu", model.systemCreatedAcrAccount().acrAccountSku()); + Assertions.assertEquals("ormrlxqtvcofudfl", model.systemCreatedAcrAccount().armResourceId().resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AcrDetails model = new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("rgdtpeqnacyheqw") - .withAcrAccountSku("qq") - .withArmResourceId(new ArmResourceId().withResourceId("u"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("ozf"))); + .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("pfuvglsbjjca") + .withAcrAccountSku("xbvtvudu") + .withArmResourceId(new ArmResourceId().withResourceId("ormrlxqtvcofudfl"))); model = BinaryData.fromObject(model).toObject(AcrDetails.class); - Assertions.assertEquals("rgdtpeqnacyheqw", model.systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("qq", model.systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("u", model.systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("ozf", model.userCreatedAcrAccount().armResourceId().resourceId()); + Assertions.assertEquals("pfuvglsbjjca", model.systemCreatedAcrAccount().acrAccountName()); + Assertions.assertEquals("xbvtvudu", model.systemCreatedAcrAccount().acrAccountSku()); + Assertions.assertEquals("ormrlxqtvcofudfl", model.systemCreatedAcrAccount().armResourceId().resourceId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ActualCapacityInfoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ActualCapacityInfoTests.java new file mode 100644 index 000000000000..b60e4b329ca7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ActualCapacityInfoTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo; +import org.junit.jupiter.api.Assertions; + +public final class ActualCapacityInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ActualCapacityInfo model = BinaryData.fromString( + "{\"total\":1689730499,\"succeeded\":449342237,\"failed\":1321480925,\"outdatedSucceeded\":773939726,\"outdatedFailed\":1887532919}") + .toObject(ActualCapacityInfo.class); + Assertions.assertEquals(1689730499, model.total()); + Assertions.assertEquals(449342237, model.succeeded()); + Assertions.assertEquals(1321480925, model.failed()); + Assertions.assertEquals(773939726, model.outdatedSucceeded()); + Assertions.assertEquals(1887532919, model.outdatedFailed()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java deleted file mode 100644 index 41691600817e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AksNetworkingConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AksNetworkingConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksNetworkingConfiguration model = BinaryData.fromString( - "{\"subnetId\":\"mffngdyfcixr\",\"serviceCidr\":\"cqvhoejgoiutgwrm\",\"dnsServiceIP\":\"hpqhazyntacihn\",\"dockerBridgeCidr\":\"gmipnmliqmvlbhik\"}") - .toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("mffngdyfcixr", model.subnetId()); - Assertions.assertEquals("cqvhoejgoiutgwrm", model.serviceCidr()); - Assertions.assertEquals("hpqhazyntacihn", model.dnsServiceIp()); - Assertions.assertEquals("gmipnmliqmvlbhik", model.dockerBridgeCidr()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksNetworkingConfiguration model = new AksNetworkingConfiguration().withSubnetId("mffngdyfcixr") - .withServiceCidr("cqvhoejgoiutgwrm") - .withDnsServiceIp("hpqhazyntacihn") - .withDockerBridgeCidr("gmipnmliqmvlbhik"); - model = BinaryData.fromObject(model).toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("mffngdyfcixr", model.subnetId()); - Assertions.assertEquals("cqvhoejgoiutgwrm", model.serviceCidr()); - Assertions.assertEquals("hpqhazyntacihn", model.dnsServiceIp()); - Assertions.assertEquals("gmipnmliqmvlbhik", model.dockerBridgeCidr()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java index 960b4c98194f..93ffa1c5fdd0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java index a964c0776dfa..fe01fb50acf0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java index 88c90d480609..a4e94b5b19be 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,13 +11,7 @@ public final class AmlComputeNodeInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AmlComputeNodeInformation model = BinaryData.fromString( - "{\"nodeId\":\"nxipeil\",\"privateIpAddress\":\"zuaejxd\",\"publicIpAddress\":\"tskzbbtdzumveek\",\"port\":1792717087,\"nodeState\":\"preparing\",\"runId\":\"hkfpbs\"}") + "{\"nodeId\":\"zblxna\",\"privateIpAddress\":\"smfndcbsyhludzjk\",\"publicIpAddress\":\"vohwvprjf\",\"port\":1439333966,\"nodeState\":\"unusable\",\"runId\":\"mdtacntjn\"}") .toObject(AmlComputeNodeInformation.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodeInformation model = new AmlComputeNodeInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodeInformation.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java index 28fea97b88c3..af32a45257a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java @@ -1,23 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; +import com.azure.resourcemanager.machinelearning.implementation.models.AmlComputeNodesInformation; public final class AmlComputeNodesInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AmlComputeNodesInformation model = BinaryData.fromString( - "{\"nodes\":[{\"nodeId\":\"wrtz\",\"privateIpAddress\":\"zg\",\"publicIpAddress\":\"zmh\",\"port\":1672254683,\"nodeState\":\"running\",\"runId\":\"ts\"},{\"nodeId\":\"jcbpwxqpsrknft\",\"privateIpAddress\":\"vriuhprwmdyvx\",\"publicIpAddress\":\"ayriwwroyqbexrm\",\"port\":1486337456,\"nodeState\":\"running\",\"runId\":\"nojvknmefqsg\"},{\"nodeId\":\"ah\",\"privateIpAddress\":\"jyzhpvgq\",\"publicIpAddress\":\"j\",\"port\":391970506,\"nodeState\":\"preempted\",\"runId\":\"lmwlxkvugfhzo\"}],\"nextLink\":\"wjvzunluthnn\"}") + "{\"nodes\":[{\"nodeId\":\"bfzetjizwh\",\"privateIpAddress\":\"bm\",\"publicIpAddress\":\"vvyxtvvxnakzi\",\"port\":517649630,\"nodeState\":\"preparing\",\"runId\":\"fm\"}],\"nextLink\":\"gfwhrmvlaknujmwx\"}") .toObject(AmlComputeNodesInformation.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodesInformation model = new AmlComputeNodesInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodesInformation.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.java index dc143c2e942c..36d109ed63ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java index 4500fbd74409..bb977be1f9a0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java index 8e69984b63ba..96028f66179d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,20 +12,10 @@ public final class AmlUserFeatureInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AmlUserFeatureInner model - = BinaryData.fromString("{\"id\":\"yyyzlwhbw\",\"displayName\":\"nufzr\",\"description\":\"m\"}") + = BinaryData.fromString("{\"id\":\"obqzwjalwrso\",\"displayName\":\"c\",\"description\":\"rmvjfmrsuyd\"}") .toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("yyyzlwhbw", model.id()); - Assertions.assertEquals("nufzr", model.displayName()); - Assertions.assertEquals("m", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlUserFeatureInner model - = new AmlUserFeatureInner().withId("yyyzlwhbw").withDisplayName("nufzr").withDescription("m"); - model = BinaryData.fromObject(model).toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("yyyzlwhbw", model.id()); - Assertions.assertEquals("nufzr", model.displayName()); - Assertions.assertEquals("m", model.description()); + Assertions.assertEquals("obqzwjalwrso", model.id()); + Assertions.assertEquals("c", model.displayName()); + Assertions.assertEquals("rmvjfmrsuyd", model.description()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java index 9ab857d7bec8..872d5d077f83 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,14 @@ public final class ArmResourceIdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ArmResourceId model = BinaryData.fromString("{\"resourceId\":\"bmom\"}").toObject(ArmResourceId.class); - Assertions.assertEquals("bmom", model.resourceId()); + ArmResourceId model = BinaryData.fromString("{\"resourceId\":\"varmywdmj\"}").toObject(ArmResourceId.class); + Assertions.assertEquals("varmywdmj", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ArmResourceId model = new ArmResourceId().withResourceId("bmom"); + ArmResourceId model = new ArmResourceId().withResourceId("varmywdmj"); model = BinaryData.fromObject(model).toObject(ArmResourceId.class); - Assertions.assertEquals("bmom", model.resourceId()); + Assertions.assertEquals("varmywdmj", model.resourceId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java index 2f2ab05dd909..5af8e426a517 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,29 +14,28 @@ public final class AssetBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AssetBase model = BinaryData.fromString( - "{\"isArchived\":false,\"isAnonymous\":true,\"description\":\"jrkvfgbvfvpdbo\",\"tags\":{\"bdeibqipqk\":\"izsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"properties\":{\"zhjjklffhmouwq\":\"cjabudurgkakmo\"}}") + "{\"isAnonymous\":false,\"isArchived\":false,\"description\":\"tgp\",\"properties\":{\"igbrnjw\":\"pwjxezn\"},\"tags\":{\"saz\":\"pn\"}}") .toObject(AssetBase.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.description()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals("cjabudurgkakmo", model.properties().get("zhjjklffhmouwq")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); + Assertions.assertEquals("tgp", model.description()); + Assertions.assertEquals("pwjxezn", model.properties().get("igbrnjw")); + Assertions.assertEquals("pn", model.tags().get("saz")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AssetBase model = new AssetBase().withDescription("jrkvfgbvfvpdbo") - .withTags(mapOf("bdeibqipqk", "izsjqlhkrr", "rwkq", "hvxndzwmkrefajpj", "sjabibs", "yhgbijtjivfx", - "bjxbkzbzk", "stawfsdjpvkv")) - .withProperties(mapOf("zhjjklffhmouwq", "cjabudurgkakmo")) - .withIsArchived(false) - .withIsAnonymous(true); + AssetBase model = new AssetBase().withDescription("tgp") + .withProperties(mapOf("igbrnjw", "pwjxezn")) + .withTags(mapOf("saz", "pn")) + .withIsAnonymous(false) + .withIsArchived(false); model = BinaryData.fromObject(model).toObject(AssetBase.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.description()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals("cjabudurgkakmo", model.properties().get("zhjjklffhmouwq")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); + Assertions.assertEquals("tgp", model.description()); + Assertions.assertEquals("pwjxezn", model.properties().get("igbrnjw")); + Assertions.assertEquals("pn", model.tags().get("saz")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java index 23f553036557..3d28b013117f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,25 +14,27 @@ public final class AssetContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AssetContainer model = BinaryData.fromString( - "{\"isArchived\":true,\"latestVersion\":\"equi\",\"nextVersion\":\"xicslfao\",\"description\":\"piyylhalnswhccsp\",\"tags\":{\"oluhczbwemh\":\"ivwitqscywugg\",\"sbrgz\":\"i\",\"ggicccnxqhue\":\"wmsweypqwd\"},\"properties\":{\"ncsdtclusiyp\":\"ttlstvlzywemhz\"}}") + "{\"isArchived\":true,\"latestVersion\":\"wlxkvugfhzovaw\",\"nextVersion\":\"zunlu\",\"description\":\"nnprn\",\"properties\":{\"tskzbbtdzumveek\":\"eilpjzuaejxdu\",\"uh\":\"pwo\",\"us\":\"fpbsjyofdxl\",\"smv\":\"ttouwaboekqvkel\"},\"tags\":{\"isxyawjoyaqcslyj\":\"yjsflhhcaalnji\",\"nelixhnrztfo\":\"kiidzyex\",\"xknalaulppg\":\"hb\",\"gvpgy\":\"dtpnapnyiropuhp\"}}") .toObject(AssetContainer.class); - Assertions.assertEquals("piyylhalnswhccsp", model.description()); - Assertions.assertEquals("ivwitqscywugg", model.tags().get("oluhczbwemh")); - Assertions.assertEquals("ttlstvlzywemhz", model.properties().get("ncsdtclusiyp")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("nnprn", model.description()); + Assertions.assertEquals("eilpjzuaejxdu", model.properties().get("tskzbbtdzumveek")); + Assertions.assertEquals("yjsflhhcaalnji", model.tags().get("isxyawjoyaqcslyj")); + Assertions.assertTrue(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AssetContainer model = new AssetContainer().withDescription("piyylhalnswhccsp") - .withTags(mapOf("oluhczbwemh", "ivwitqscywugg", "sbrgz", "i", "ggicccnxqhue", "wmsweypqwd")) - .withProperties(mapOf("ncsdtclusiyp", "ttlstvlzywemhz")) + AssetContainer model = new AssetContainer().withDescription("nnprn") + .withProperties( + mapOf("tskzbbtdzumveek", "eilpjzuaejxdu", "uh", "pwo", "us", "fpbsjyofdxl", "smv", "ttouwaboekqvkel")) + .withTags(mapOf("isxyawjoyaqcslyj", "yjsflhhcaalnji", "nelixhnrztfo", "kiidzyex", "xknalaulppg", "hb", + "gvpgy", "dtpnapnyiropuhp")) .withIsArchived(true); model = BinaryData.fromObject(model).toObject(AssetContainer.class); - Assertions.assertEquals("piyylhalnswhccsp", model.description()); - Assertions.assertEquals("ivwitqscywugg", model.tags().get("oluhczbwemh")); - Assertions.assertEquals("ttlstvlzywemhz", model.properties().get("ncsdtclusiyp")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("nnprn", model.description()); + Assertions.assertEquals("eilpjzuaejxdu", model.properties().get("tskzbbtdzumveek")); + Assertions.assertEquals("yjsflhhcaalnji", model.tags().get("isxyawjoyaqcslyj")); + Assertions.assertTrue(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java deleted file mode 100644 index 3ebea634df0e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobInput; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobInput model = BinaryData.fromString("{\"uri\":\"ynosugkfhaxt\",\"mode\":\"ReadWriteMount\"}") - .toObject(AssetJobInput.class); - Assertions.assertEquals("ynosugkfhaxt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobInput model = new AssetJobInput().withUri("ynosugkfhaxt").withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(AssetJobInput.class); - Assertions.assertEquals("ynosugkfhaxt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java deleted file mode 100644 index 8550d30cc810..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobOutput model - = BinaryData.fromString("{\"uri\":\"mwgsghq\",\"mode\":\"ReadWriteMount\"}").toObject(AssetJobOutput.class); - Assertions.assertEquals("mwgsghq", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobOutput model = new AssetJobOutput().withUri("mwgsghq").withMode(OutputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(AssetJobOutput.class); - Assertions.assertEquals("mwgsghq", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java index a4292e144687..2e3e11d7369f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java index 570b61b7f59c..6ca4fa0b5f73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,17 +11,17 @@ public final class AssignedUserTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AssignedUser model = BinaryData.fromString("{\"objectId\":\"lmcskyk\",\"tenantId\":\"fuofixcnpcfykkp\"}") + AssignedUser model = BinaryData.fromString("{\"objectId\":\"rcycmwhuzymhl\",\"tenantId\":\"ih\"}") .toObject(AssignedUser.class); - Assertions.assertEquals("lmcskyk", model.objectId()); - Assertions.assertEquals("fuofixcnpcfykkp", model.tenantId()); + Assertions.assertEquals("rcycmwhuzymhl", model.objectId()); + Assertions.assertEquals("ih", model.tenantId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AssignedUser model = new AssignedUser().withObjectId("lmcskyk").withTenantId("fuofixcnpcfykkp"); + AssignedUser model = new AssignedUser().withObjectId("rcycmwhuzymhl").withTenantId("ih"); model = BinaryData.fromObject(model).toObject(AssignedUser.class); - Assertions.assertEquals("lmcskyk", model.objectId()); - Assertions.assertEquals("fuofixcnpcfykkp", model.tenantId()); + Assertions.assertEquals("rcycmwhuzymhl", model.objectId()); + Assertions.assertEquals("ih", model.tenantId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java index 44430f0e8225..44cca07a78fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java index 8a5082e2e258..1f0ad4fc98d9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -29,121 +29,133 @@ public final class AutoMLJobTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoMLJob model = BinaryData.fromString( - "{\"jobType\":\"AutoML\",\"resources\":{\"shmSize\":\"dd\",\"dockerArgs\":\"qm\",\"instanceCount\":1650398695,\"instanceType\":\"othxuarigrjd\",\"properties\":{\"pruulhg\":\"datakqhvkrbzkuastaxk\",\"izwxvs\":\"datat\",\"fxcz\":\"dataksgfyyskyekg\"}},\"environmentId\":\"cckwrtwle\",\"environmentVariables\":{\"lhpdhwynctaczcnj\":\"eszr\",\"x\":\"mbbfnv\",\"nkrtikl\":\"tzo\"},\"taskDetails\":{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ihqlcoqks\",\"mode\":\"ReadOnlyMount\",\"description\":\"hyxwbgbud\"},\"targetColumnName\":\"qdo\"},\"outputs\":{\"thojvlirknucos\":{\"jobOutputType\":\"JobOutput\",\"description\":\"qcd\"},\"pya\":{\"jobOutputType\":\"JobOutput\",\"description\":\"rdtnagzl\"}},\"queueSettings\":{\"jobTier\":\"Basic\"},\"displayName\":\"qjjtsmuydqfttka\",\"status\":\"Canceled\",\"experimentName\":\"ue\",\"services\":{\"lvqzrwtrdgscnv\":{\"jobServiceType\":\"cdcpkshloj\",\"port\":1132917743,\"endpoint\":\"zics\",\"status\":\"d\",\"errorMessage\":\"yaaknyukibxiglhp\",\"properties\":{\"z\":\"xqtejpiilhvt\",\"k\":\"agjjn\",\"f\":\"ylhyyx\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"l\":{\"jobServiceType\":\"on\",\"port\":1449590493,\"endpoint\":\"xlw\",\"status\":\"zyohxpthc\",\"errorMessage\":\"pvkvtwf\",\"properties\":{\"cdyarnggcjfwblqh\":\"obpbokhmm\",\"s\":\"kasmcolmugpyva\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"nbxqaeht\":{\"jobServiceType\":\"zxeygzvtye\",\"port\":2081188062,\"endpoint\":\"bnob\",\"status\":\"qisqsqkp\",\"errorMessage\":\"ioyj\",\"properties\":{\"qdvrdmvxyrxdh\":\"lviqcpszpmc\",\"mbtple\":\"vqojbxaotcgbz\",\"muuv\":\"oioyidoxznvgvd\",\"erxrzutylcurza\":\"awsxmrszbknimxlp\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"jmbnvynf\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"c\",\"notificationSetting\":{\"emails\":[\"glskakddi\",\"ahzllrqmtlpb\",\"xroi\"],\"emailOn\":[\"JobCompleted\"],\"webhooks\":{\"brjjtalxrdsjr\":{\"webhookType\":\"Webhook\",\"eventType\":\"fmnoiicsudy\"},\"dp\":{\"webhookType\":\"Webhook\",\"eventType\":\"luqwgusxxhd\"}}},\"description\":\"yblvtbdmvsbyi\",\"tags\":{\"jfb\":\"lqpvekmk\",\"gdusxurs\":\"tlo\",\"iqrizfwihvaan\":\"ivuxcjkcoqwczs\"},\"properties\":{\"bbaex\":\"nhjrfdmfd\",\"vmuafmc\":\"jfwtgdfkkaui\",\"vpltidajjvy\":\"fedyuep\"}}") + "{\"jobType\":\"AutoML\",\"environmentId\":\"wnf\",\"environmentVariables\":{\"zsinqbdnddb\":\"za\",\"jmyitrchwudl\":\"ozsyvrm\",\"pmnoejhqlf\":\"eeih\"},\"outputs\":{\"pgfqvmtyw\":{\"jobOutputType\":\"JobOutput\",\"description\":\"zoyrfgxkydpm\"},\"xpejpewpy\":{\"jobOutputType\":\"JobOutput\",\"description\":\"a\"},\"piatwfaujegqd\":{\"jobOutputType\":\"JobOutput\",\"description\":\"fxampqcrzgeuqx\"}},\"queueSettings\":{\"jobTier\":\"Null\"},\"resources\":{\"dockerArgs\":\"gddhjkrukizyhgs\",\"dockerArgsList\":[\"qsktxqf\",\"jbqggweeiwdhdm\"],\"shmSize\":\"gbfzu\",\"instanceCount\":1804218629,\"instanceType\":\"unmlhxdfbklcii\",\"properties\":{\"sifcuvbdujgc\":\"\\\"datajsysmvxodgwxfk\\\"\",\"dxrizagb\":\"\\\"dataxvecbbwjt\\\"\",\"b\":\"\\\"datagiarksykpgdqxw\\\"\",\"dosqkptjqg\":\"\\\"datarwiqrxhacl\\\"\"}},\"taskDetails\":{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Info\",\"targetColumnName\":\"mainwhed\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"bqwuntobuizazzel\",\"description\":\"vydjufbnk\"}},\"componentId\":\"laxp\",\"computeId\":\"jwdabalfd\",\"displayName\":\"glzfytl\",\"experimentName\":\"lqhopxouvmrs\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"notificationSetting\":{\"emailOn\":[\"JobCompleted\",\"JobFailed\"],\"emails\":[\"xfxfmyrqsd\"],\"webhooks\":{\"diuwki\":{\"webhookType\":\"Webhook\",\"eventType\":\"szanmhwgpte\"}}},\"parentJobName\":\"skw\",\"services\":{\"eojxrjn\":{\"endpoint\":\"etjygowifcqpolz\",\"errorMessage\":\"ysdgzyyb\",\"jobServiceType\":\"xlvocptvdx\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1590701693,\"properties\":{\"ghjhjvmabzzbwa\":\"lilw\"},\"status\":\"fmdafbgymqtnap\"},\"bypicdbkpdj\":{\"endpoint\":\"conxavi\",\"errorMessage\":\"eychbji\",\"jobServiceType\":\"fsgnw\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":156382694,\"properties\":{\"rfbo\":\"q\"},\"status\":\"ipmlnfyzavf\"},\"fczmnn\":{\"endpoint\":\"qh\",\"errorMessage\":\"q\",\"jobServiceType\":\"pdgonjhxs\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1505938451,\"properties\":{\"qulpt\":\"c\",\"q\":\"bvcpxtzhi\",\"s\":\"btimpkjblor\",\"musuaawja\":\"hqhud\"},\"status\":\"wj\"},\"nzuz\":{\"endpoint\":\"xyxvqban\",\"errorMessage\":\"jtgirnb\",\"jobServiceType\":\"gm\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1133753792,\"properties\":{\"ltwmpftmf\":\"y\",\"jogsyx\":\"e\",\"nrecchdidrm\":\"etamfddrvlkpzwb\",\"wmjpjbweunxcqrr\":\"hkahmjedbiucvkh\"},\"status\":\"ufoihppiybxv\"}},\"status\":\"Unknown\",\"description\":\"zc\",\"properties\":{\"ti\":\"iuzvkunhdimju\",\"gofmhxwrjlv\":\"zkaugpucdocfqpl\"},\"tags\":{\"bgikyjtkakvlbi\":\"k\"}}") .toObject(AutoMLJob.class); - Assertions.assertEquals("yblvtbdmvsbyi", model.description()); - Assertions.assertEquals("lqpvekmk", model.tags().get("jfb")); - Assertions.assertEquals("nhjrfdmfd", model.properties().get("bbaex")); - Assertions.assertEquals("qjjtsmuydqfttka", model.displayName()); - Assertions.assertEquals("ue", model.experimentName()); - Assertions.assertEquals("cdcpkshloj", model.services().get("lvqzrwtrdgscnv").jobServiceType()); - Assertions.assertEquals(1132917743, model.services().get("lvqzrwtrdgscnv").port()); - Assertions.assertEquals("zics", model.services().get("lvqzrwtrdgscnv").endpoint()); - Assertions.assertEquals("xqtejpiilhvt", model.services().get("lvqzrwtrdgscnv").properties().get("z")); - Assertions.assertEquals("jmbnvynf", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("c", model.componentId()); - Assertions.assertEquals("glskakddi", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("zc", model.description()); + Assertions.assertEquals("iuzvkunhdimju", model.properties().get("ti")); + Assertions.assertEquals("k", model.tags().get("bgikyjtkakvlbi")); + Assertions.assertEquals("laxp", model.componentId()); + Assertions.assertEquals("jwdabalfd", model.computeId()); + Assertions.assertEquals("glzfytl", model.displayName()); + Assertions.assertEquals("lqhopxouvmrs", model.experimentName()); + Assertions.assertFalse(model.isArchived()); Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("fmnoiicsudy", model.notificationSetting().webhooks().get("brjjtalxrdsjr").eventType()); - Assertions.assertEquals(1650398695, model.resources().instanceCount()); - Assertions.assertEquals("othxuarigrjd", model.resources().instanceType()); - Assertions.assertEquals("dd", model.resources().shmSize()); - Assertions.assertEquals("qm", model.resources().dockerArgs()); - Assertions.assertEquals("cckwrtwle", model.environmentId()); - Assertions.assertEquals("eszr", model.environmentVariables().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(LogVerbosity.ERROR, model.taskDetails().logVerbosity()); - Assertions.assertEquals("hyxwbgbud", model.taskDetails().trainingData().description()); - Assertions.assertEquals("ihqlcoqks", model.taskDetails().trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("qdo", model.taskDetails().targetColumnName()); - Assertions.assertEquals("qcd", model.outputs().get("thojvlirknucos").description()); - Assertions.assertEquals(JobTier.BASIC, model.queueSettings().jobTier()); + Assertions.assertEquals("xfxfmyrqsd", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("szanmhwgpte", model.notificationSetting().webhooks().get("diuwki").eventType()); + Assertions.assertEquals("skw", model.parentJobName()); + Assertions.assertEquals("etjygowifcqpolz", model.services().get("eojxrjn").endpoint()); + Assertions.assertEquals("xlvocptvdx", model.services().get("eojxrjn").jobServiceType()); + Assertions.assertEquals(1590701693, model.services().get("eojxrjn").port()); + Assertions.assertEquals("lilw", model.services().get("eojxrjn").properties().get("ghjhjvmabzzbwa")); + Assertions.assertEquals("wnf", model.environmentId()); + Assertions.assertEquals("za", model.environmentVariables().get("zsinqbdnddb")); + Assertions.assertEquals("zoyrfgxkydpm", model.outputs().get("pgfqvmtyw").description()); + Assertions.assertEquals(JobTier.NULL, model.queueSettings().jobTier()); + Assertions.assertEquals(1804218629, model.resources().instanceCount()); + Assertions.assertEquals("unmlhxdfbklcii", model.resources().instanceType()); + Assertions.assertEquals("gddhjkrukizyhgs", model.resources().dockerArgs()); + Assertions.assertEquals("qsktxqf", model.resources().dockerArgsList().get(0)); + Assertions.assertEquals("gbfzu", model.resources().shmSize()); + Assertions.assertEquals(LogVerbosity.INFO, model.taskDetails().logVerbosity()); + Assertions.assertEquals("mainwhed", model.taskDetails().targetColumnName()); + Assertions.assertEquals("vydjufbnk", model.taskDetails().trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.taskDetails().trainingData().mode()); + Assertions.assertEquals("bqwuntobuizazzel", model.taskDetails().trainingData().uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoMLJob model - = new AutoMLJob().withDescription("yblvtbdmvsbyi") - .withTags(mapOf("jfb", "lqpvekmk", "gdusxurs", "tlo", "iqrizfwihvaan", "ivuxcjkcoqwczs")) - .withProperties(mapOf("bbaex", "nhjrfdmfd", "vmuafmc", "jfwtgdfkkaui", "vpltidajjvy", "fedyuep")) - .withDisplayName("qjjtsmuydqfttka") - .withExperimentName("ue") - .withServices(mapOf("lvqzrwtrdgscnv", - new JobService().withJobServiceType("cdcpkshloj") - .withPort(1132917743) - .withEndpoint("zics") - .withProperties(mapOf("z", "xqtejpiilhvt", "k", "agjjn", "f", "ylhyyx")) - .withNodes(new Nodes()), - "l", - new JobService().withJobServiceType("on") - .withPort(1449590493) - .withEndpoint("xlw") - .withProperties(mapOf("cdyarnggcjfwblqh", "obpbokhmm", "s", "kasmcolmugpyva")) - .withNodes(new Nodes()), - "nbxqaeht", - new JobService().withJobServiceType("zxeygzvtye") - .withPort(2081188062) - .withEndpoint("bnob") - .withProperties(mapOf("qdvrdmvxyrxdh", "lviqcpszpmc", "mbtple", "vqojbxaotcgbz", "muuv", - "oioyidoxznvgvd", "erxrzutylcurza", "awsxmrszbknimxlp")) - .withNodes(new Nodes()))) - .withComputeId("jmbnvynf") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("c") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("glskakddi", "ahzllrqmtlpb", "xroi")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("brjjtalxrdsjr", new Webhook().withEventType("fmnoiicsudy"), "dp", - new Webhook().withEventType("luqwgusxxhd")))) - .withResources(new JobResourceConfiguration().withInstanceCount(1650398695) - .withInstanceType("othxuarigrjd") - .withProperties( - mapOf("pruulhg", "datakqhvkrbzkuastaxk", "izwxvs", "datat", "fxcz", "dataksgfyyskyekg")) - .withShmSize("dd") - .withDockerArgs("qm")) - .withEnvironmentId("cckwrtwle") - .withEnvironmentVariables(mapOf("lhpdhwynctaczcnj", "eszr", "x", "mbbfnv", "nkrtikl", "tzo")) - .withTaskDetails(new AutoMLVertical().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("hyxwbgbud") - .withUri("ihqlcoqks") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("qdo")) - .withOutputs(mapOf("thojvlirknucos", new JobOutput().withDescription("qcd"), "pya", - new JobOutput().withDescription("rdtnagzl"))) - .withQueueSettings(new QueueSettings().withJobTier(JobTier.BASIC)); + AutoMLJob model = new AutoMLJob().withDescription("zc") + .withProperties(mapOf("ti", "iuzvkunhdimju", "gofmhxwrjlv", "zkaugpucdocfqpl")) + .withTags(mapOf("bgikyjtkakvlbi", "k")) + .withComponentId("laxp") + .withComputeId("jwdabalfd") + .withDisplayName("glzfytl") + .withExperimentName("lqhopxouvmrs") + .withIdentity(new IdentityConfiguration()) + .withIsArchived(false) + .withNotificationSetting(new NotificationSetting() + .withEmailOn( + Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) + .withEmails(Arrays.asList("xfxfmyrqsd")) + .withWebhooks(mapOf("diuwki", new Webhook().withEventType("szanmhwgpte")))) + .withParentJobName("skw") + .withServices(mapOf("eojxrjn", + new JobService().withEndpoint("etjygowifcqpolz") + .withJobServiceType("xlvocptvdx") + .withNodes(new Nodes()) + .withPort(1590701693) + .withProperties(mapOf("ghjhjvmabzzbwa", "lilw")), + "bypicdbkpdj", + new JobService().withEndpoint("conxavi") + .withJobServiceType("fsgnw") + .withNodes(new Nodes()) + .withPort(156382694) + .withProperties(mapOf("rfbo", "q")), + "fczmnn", + new JobService().withEndpoint("qh") + .withJobServiceType("pdgonjhxs") + .withNodes(new Nodes()) + .withPort(1505938451) + .withProperties(mapOf("qulpt", "c", "q", "bvcpxtzhi", "s", "btimpkjblor", "musuaawja", "hqhud")), + "nzuz", + new JobService().withEndpoint("xyxvqban") + .withJobServiceType("gm") + .withNodes(new Nodes()) + .withPort(1133753792) + .withProperties(mapOf("ltwmpftmf", "y", "jogsyx", "e", "nrecchdidrm", "etamfddrvlkpzwb", + "wmjpjbweunxcqrr", "hkahmjedbiucvkh")))) + .withEnvironmentId("wnf") + .withEnvironmentVariables(mapOf("zsinqbdnddb", "za", "jmyitrchwudl", "ozsyvrm", "pmnoejhqlf", "eeih")) + .withOutputs(mapOf("pgfqvmtyw", new JobOutput().withDescription("zoyrfgxkydpm"), "xpejpewpy", + new JobOutput().withDescription("a"), "piatwfaujegqd", + new JobOutput().withDescription("fxampqcrzgeuqx"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.NULL)) + .withResources(new JobResourceConfiguration().withInstanceCount(1804218629) + .withInstanceType("unmlhxdfbklcii") + .withProperties(mapOf("sifcuvbdujgc", "\"datajsysmvxodgwxfk\"", "dxrizagb", "\"dataxvecbbwjt\"", "b", + "\"datagiarksykpgdqxw\"", "dosqkptjqg", "\"datarwiqrxhacl\"")) + .withDockerArgs("gddhjkrukizyhgs") + .withDockerArgsList(Arrays.asList("qsktxqf", "jbqggweeiwdhdm")) + .withShmSize("gbfzu")) + .withTaskDetails(new AutoMLVertical().withLogVerbosity(LogVerbosity.INFO) + .withTargetColumnName("mainwhed") + .withTrainingData(new MLTableJobInput().withDescription("vydjufbnk") + .withMode(InputDeliveryMode.EVAL_MOUNT) + .withUri("bqwuntobuizazzel"))); model = BinaryData.fromObject(model).toObject(AutoMLJob.class); - Assertions.assertEquals("yblvtbdmvsbyi", model.description()); - Assertions.assertEquals("lqpvekmk", model.tags().get("jfb")); - Assertions.assertEquals("nhjrfdmfd", model.properties().get("bbaex")); - Assertions.assertEquals("qjjtsmuydqfttka", model.displayName()); - Assertions.assertEquals("ue", model.experimentName()); - Assertions.assertEquals("cdcpkshloj", model.services().get("lvqzrwtrdgscnv").jobServiceType()); - Assertions.assertEquals(1132917743, model.services().get("lvqzrwtrdgscnv").port()); - Assertions.assertEquals("zics", model.services().get("lvqzrwtrdgscnv").endpoint()); - Assertions.assertEquals("xqtejpiilhvt", model.services().get("lvqzrwtrdgscnv").properties().get("z")); - Assertions.assertEquals("jmbnvynf", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("c", model.componentId()); - Assertions.assertEquals("glskakddi", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("zc", model.description()); + Assertions.assertEquals("iuzvkunhdimju", model.properties().get("ti")); + Assertions.assertEquals("k", model.tags().get("bgikyjtkakvlbi")); + Assertions.assertEquals("laxp", model.componentId()); + Assertions.assertEquals("jwdabalfd", model.computeId()); + Assertions.assertEquals("glzfytl", model.displayName()); + Assertions.assertEquals("lqhopxouvmrs", model.experimentName()); + Assertions.assertFalse(model.isArchived()); Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("fmnoiicsudy", model.notificationSetting().webhooks().get("brjjtalxrdsjr").eventType()); - Assertions.assertEquals(1650398695, model.resources().instanceCount()); - Assertions.assertEquals("othxuarigrjd", model.resources().instanceType()); - Assertions.assertEquals("dd", model.resources().shmSize()); - Assertions.assertEquals("qm", model.resources().dockerArgs()); - Assertions.assertEquals("cckwrtwle", model.environmentId()); - Assertions.assertEquals("eszr", model.environmentVariables().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(LogVerbosity.ERROR, model.taskDetails().logVerbosity()); - Assertions.assertEquals("hyxwbgbud", model.taskDetails().trainingData().description()); - Assertions.assertEquals("ihqlcoqks", model.taskDetails().trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("qdo", model.taskDetails().targetColumnName()); - Assertions.assertEquals("qcd", model.outputs().get("thojvlirknucos").description()); - Assertions.assertEquals(JobTier.BASIC, model.queueSettings().jobTier()); + Assertions.assertEquals("xfxfmyrqsd", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("szanmhwgpte", model.notificationSetting().webhooks().get("diuwki").eventType()); + Assertions.assertEquals("skw", model.parentJobName()); + Assertions.assertEquals("etjygowifcqpolz", model.services().get("eojxrjn").endpoint()); + Assertions.assertEquals("xlvocptvdx", model.services().get("eojxrjn").jobServiceType()); + Assertions.assertEquals(1590701693, model.services().get("eojxrjn").port()); + Assertions.assertEquals("lilw", model.services().get("eojxrjn").properties().get("ghjhjvmabzzbwa")); + Assertions.assertEquals("wnf", model.environmentId()); + Assertions.assertEquals("za", model.environmentVariables().get("zsinqbdnddb")); + Assertions.assertEquals("zoyrfgxkydpm", model.outputs().get("pgfqvmtyw").description()); + Assertions.assertEquals(JobTier.NULL, model.queueSettings().jobTier()); + Assertions.assertEquals(1804218629, model.resources().instanceCount()); + Assertions.assertEquals("unmlhxdfbklcii", model.resources().instanceType()); + Assertions.assertEquals("gddhjkrukizyhgs", model.resources().dockerArgs()); + Assertions.assertEquals("qsktxqf", model.resources().dockerArgsList().get(0)); + Assertions.assertEquals("gbfzu", model.resources().shmSize()); + Assertions.assertEquals(LogVerbosity.INFO, model.taskDetails().logVerbosity()); + Assertions.assertEquals("mainwhed", model.taskDetails().targetColumnName()); + Assertions.assertEquals("vydjufbnk", model.taskDetails().trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.taskDetails().trainingData().mode()); + Assertions.assertEquals("bqwuntobuizazzel", model.taskDetails().trainingData().uri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java index 3b895a713017..2e82f8ce2dae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,27 +15,27 @@ public final class AutoMLVerticalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoMLVertical model = BinaryData.fromString( - "{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"q\",\"mode\":\"ReadOnlyMount\",\"description\":\"xqwqueu\"},\"targetColumnName\":\"lztpziizevjykof\"}") + "{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Warning\",\"targetColumnName\":\"iotiffbbc\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"egxcypx\",\"description\":\"fetwi\"}}") .toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("xqwqueu", model.trainingData().description()); - Assertions.assertEquals("q", model.trainingData().uri()); + Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); + Assertions.assertEquals("iotiffbbc", model.targetColumnName()); + Assertions.assertEquals("fetwi", model.trainingData().description()); Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("lztpziizevjykof", model.targetColumnName()); + Assertions.assertEquals("egxcypx", model.trainingData().uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoMLVertical model = new AutoMLVertical().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("xqwqueu") - .withUri("q") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("lztpziizevjykof"); + AutoMLVertical model = new AutoMLVertical().withLogVerbosity(LogVerbosity.WARNING) + .withTargetColumnName("iotiffbbc") + .withTrainingData(new MLTableJobInput().withDescription("fetwi") + .withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("egxcypx")); model = BinaryData.fromObject(model).toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("xqwqueu", model.trainingData().description()); - Assertions.assertEquals("q", model.trainingData().uri()); + Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); + Assertions.assertEquals("iotiffbbc", model.targetColumnName()); + Assertions.assertEquals("fetwi", model.trainingData().description()); Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("lztpziizevjykof", model.targetColumnName()); + Assertions.assertEquals("egxcypx", model.trainingData().uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java index f53af11b7c4b..15aab41026a4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java index 41f4f6f7556f..b0195db3fbc5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,17 +11,17 @@ public final class AutoPausePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AutoPauseProperties model = BinaryData.fromString("{\"delayInMinutes\":1738803308,\"enabled\":true}") + AutoPauseProperties model = BinaryData.fromString("{\"delayInMinutes\":2118802458,\"enabled\":true}") .toObject(AutoPauseProperties.class); - Assertions.assertEquals(1738803308, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); + Assertions.assertEquals(2118802458, model.delayInMinutes()); + Assertions.assertTrue(model.enabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoPauseProperties model = new AutoPauseProperties().withDelayInMinutes(1738803308).withEnabled(true); + AutoPauseProperties model = new AutoPauseProperties().withDelayInMinutes(2118802458).withEnabled(true); model = BinaryData.fromObject(model).toObject(AutoPauseProperties.class); - Assertions.assertEquals(1738803308, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); + Assertions.assertEquals(2118802458, model.delayInMinutes()); + Assertions.assertTrue(model.enabled()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java index b38744899efd..f6baba75957a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,20 +12,20 @@ public final class AutoScalePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoScaleProperties model - = BinaryData.fromString("{\"minNodeCount\":239147193,\"enabled\":true,\"maxNodeCount\":981129054}") + = BinaryData.fromString("{\"minNodeCount\":871645942,\"enabled\":true,\"maxNodeCount\":1665244989}") .toObject(AutoScaleProperties.class); - Assertions.assertEquals(239147193, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(981129054, model.maxNodeCount()); + Assertions.assertEquals(871645942, model.minNodeCount()); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(1665244989, model.maxNodeCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AutoScaleProperties model - = new AutoScaleProperties().withMinNodeCount(239147193).withEnabled(true).withMaxNodeCount(981129054); + = new AutoScaleProperties().withMinNodeCount(871645942).withEnabled(true).withMaxNodeCount(1665244989); model = BinaryData.fromObject(model).toObject(AutoScaleProperties.class); - Assertions.assertEquals(239147193, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(981129054, model.maxNodeCount()); + Assertions.assertEquals(871645942, model.minNodeCount()); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(1665244989, model.maxNodeCount()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java index e0e0e8665c43..11b4328b9d29 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java index 127caf51febf..15f4018c99df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java index 01498e0b18d2..73c72c83328d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaArmPaginatedResultTests.java new file mode 100644 index 000000000000..9c7741232bec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaArmPaginatedResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.AvailableQuotaArmPaginatedResult; +import org.junit.jupiter.api.Assertions; + +public final class AvailableQuotaArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AvailableQuotaArmPaginatedResult model = BinaryData + .fromString( + "{\"value\":[{\"properties\":{\"total\":2035182710805451187}}],\"nextLink\":\"klsuffpxeswctlfy\"}") + .toObject(AvailableQuotaArmPaginatedResult.class); + Assertions.assertEquals(2035182710805451187L, model.value().get(0).properties().total()); + Assertions.assertEquals("klsuffpxeswctlfy", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaInnerTests.java new file mode 100644 index 000000000000..824bc07f3d39 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaInnerTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import org.junit.jupiter.api.Assertions; + +public final class AvailableQuotaInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AvailableQuotaInner model = BinaryData.fromString("{\"properties\":{\"total\":3219007734399922031}}") + .toObject(AvailableQuotaInner.class); + Assertions.assertEquals(3219007734399922031L, model.properties().total()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaPropertiesTests.java new file mode 100644 index 000000000000..d529ff5a4d55 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AvailableQuotaPropertiesTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.AvailableQuotaProperties; +import org.junit.jupiter.api.Assertions; + +public final class AvailableQuotaPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AvailableQuotaProperties model + = BinaryData.fromString("{\"total\":9020769989862593078}").toObject(AvailableQuotaProperties.class); + Assertions.assertEquals(9020769989862593078L, model.total()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.java deleted file mode 100644 index c3ab34e5349d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AzureDatastore; -import org.junit.jupiter.api.Assertions; - -public final class AzureDatastoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureDatastore model - = BinaryData.fromString("{\"subscriptionId\":\"ssgwjfkain\",\"resourceGroup\":\"uymvecvzts\"}") - .toObject(AzureDatastore.class); - Assertions.assertEquals("ssgwjfkain", model.subscriptionId()); - Assertions.assertEquals("uymvecvzts", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureDatastore model = new AzureDatastore().withSubscriptionId("ssgwjfkain").withResourceGroup("uymvecvzts"); - model = BinaryData.fromObject(model).toObject(AzureDatastore.class); - Assertions.assertEquals("ssgwjfkain", model.subscriptionId()); - Assertions.assertEquals("uymvecvzts", model.resourceGroup()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java index 92616de4fa26..2d3597d30382 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,16 +11,15 @@ public final class AzureDevOpsWebhookTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AzureDevOpsWebhook model - = BinaryData.fromString("{\"webhookType\":\"AzureDevOps\",\"eventType\":\"cvasormrexzvdu\"}") - .toObject(AzureDevOpsWebhook.class); - Assertions.assertEquals("cvasormrexzvdu", model.eventType()); + AzureDevOpsWebhook model = BinaryData.fromString("{\"webhookType\":\"AzureDevOps\",\"eventType\":\"x\"}") + .toObject(AzureDevOpsWebhook.class); + Assertions.assertEquals("x", model.eventType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureDevOpsWebhook model = new AzureDevOpsWebhook().withEventType("cvasormrexzvdu"); + AzureDevOpsWebhook model = new AzureDevOpsWebhook().withEventType("x"); model = BinaryData.fromObject(model).toObject(AzureDevOpsWebhook.class); - Assertions.assertEquals("cvasormrexzvdu", model.eventType()); + Assertions.assertEquals("x", model.eventType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiFineTuningTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiFineTuningTests.java new file mode 100644 index 000000000000..1d622d44b2d5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiFineTuningTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.AzureOpenAiFineTuning; +import com.azure.resourcemanager.machinelearning.models.AzureOpenAiHyperParameters; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.JobInput; +import org.junit.jupiter.api.Assertions; + +public final class AzureOpenAiFineTuningTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AzureOpenAiFineTuning model = BinaryData.fromString( + "{\"modelProvider\":\"AzureOpenAI\",\"hyperParameters\":{\"batchSize\":1194687245,\"learningRateMultiplier\":63.990177127512005,\"nEpochs\":245383792},\"model\":{\"jobInputType\":\"JobInput\",\"description\":\"cvsvk\"},\"taskType\":\"TextSummarization\",\"trainingData\":{\"jobInputType\":\"JobInput\",\"description\":\"jolpyoklkvuz\"},\"validationData\":{\"jobInputType\":\"JobInput\",\"description\":\"vhmlieoi\"}}") + .toObject(AzureOpenAiFineTuning.class); + Assertions.assertEquals("cvsvk", model.model().description()); + Assertions.assertEquals(FineTuningTaskType.TEXT_SUMMARIZATION, model.taskType()); + Assertions.assertEquals("jolpyoklkvuz", model.trainingData().description()); + Assertions.assertEquals("vhmlieoi", model.validationData().description()); + Assertions.assertEquals(1194687245, model.hyperParameters().batchSize()); + Assertions.assertEquals(63.990177127512005D, model.hyperParameters().learningRateMultiplier()); + Assertions.assertEquals(245383792, model.hyperParameters().nEpochs()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureOpenAiFineTuning model = new AzureOpenAiFineTuning().withModel(new JobInput().withDescription("cvsvk")) + .withTaskType(FineTuningTaskType.TEXT_SUMMARIZATION) + .withTrainingData(new JobInput().withDescription("jolpyoklkvuz")) + .withValidationData(new JobInput().withDescription("vhmlieoi")) + .withHyperParameters(new AzureOpenAiHyperParameters().withBatchSize(1194687245) + .withLearningRateMultiplier(63.990177127512005D) + .withNEpochs(245383792)); + model = BinaryData.fromObject(model).toObject(AzureOpenAiFineTuning.class); + Assertions.assertEquals("cvsvk", model.model().description()); + Assertions.assertEquals(FineTuningTaskType.TEXT_SUMMARIZATION, model.taskType()); + Assertions.assertEquals("jolpyoklkvuz", model.trainingData().description()); + Assertions.assertEquals("vhmlieoi", model.validationData().description()); + Assertions.assertEquals(1194687245, model.hyperParameters().batchSize()); + Assertions.assertEquals(63.990177127512005D, model.hyperParameters().learningRateMultiplier()); + Assertions.assertEquals(245383792, model.hyperParameters().nEpochs()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiHyperParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiHyperParametersTests.java new file mode 100644 index 000000000000..97929fcb2612 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureOpenAiHyperParametersTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.AzureOpenAiHyperParameters; +import org.junit.jupiter.api.Assertions; + +public final class AzureOpenAiHyperParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AzureOpenAiHyperParameters model = BinaryData + .fromString( + "{\"batchSize\":1423889561,\"learningRateMultiplier\":83.37863585914364,\"nEpochs\":1141326175}") + .toObject(AzureOpenAiHyperParameters.class); + Assertions.assertEquals(1423889561, model.batchSize()); + Assertions.assertEquals(83.37863585914364D, model.learningRateMultiplier()); + Assertions.assertEquals(1141326175, model.nEpochs()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AzureOpenAiHyperParameters model = new AzureOpenAiHyperParameters().withBatchSize(1423889561) + .withLearningRateMultiplier(83.37863585914364D) + .withNEpochs(1141326175); + model = BinaryData.fromObject(model).toObject(AzureOpenAiHyperParameters.class); + Assertions.assertEquals(1423889561, model.batchSize()); + Assertions.assertEquals(83.37863585914364D, model.learningRateMultiplier()); + Assertions.assertEquals(1141326175, model.nEpochs()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java index 6d5107068d57..96469e0f05ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,24 +12,24 @@ public final class BanditPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BanditPolicy model = BinaryData.fromString( - "{\"policyType\":\"Bandit\",\"slackFactor\":60.285545,\"slackAmount\":73.91734,\"evaluationInterval\":1123560800,\"delayEvaluation\":1370389329}") + "{\"policyType\":\"Bandit\",\"slackAmount\":57.73833058052216,\"slackFactor\":43.52126437970535,\"delayEvaluation\":484486985,\"evaluationInterval\":549678913}") .toObject(BanditPolicy.class); - Assertions.assertEquals(1123560800, model.evaluationInterval()); - Assertions.assertEquals(1370389329, model.delayEvaluation()); - Assertions.assertEquals(60.285545F, model.slackFactor()); - Assertions.assertEquals(73.91734F, model.slackAmount()); + Assertions.assertEquals(484486985, model.delayEvaluation()); + Assertions.assertEquals(549678913, model.evaluationInterval()); + Assertions.assertEquals(57.73833058052216D, model.slackAmount()); + Assertions.assertEquals(43.52126437970535D, model.slackFactor()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BanditPolicy model = new BanditPolicy().withEvaluationInterval(1123560800) - .withDelayEvaluation(1370389329) - .withSlackFactor(60.285545F) - .withSlackAmount(73.91734F); + BanditPolicy model = new BanditPolicy().withDelayEvaluation(484486985) + .withEvaluationInterval(549678913) + .withSlackAmount(57.73833058052216D) + .withSlackFactor(43.52126437970535D); model = BinaryData.fromObject(model).toObject(BanditPolicy.class); - Assertions.assertEquals(1123560800, model.evaluationInterval()); - Assertions.assertEquals(1370389329, model.delayEvaluation()); - Assertions.assertEquals(60.285545F, model.slackFactor()); - Assertions.assertEquals(73.91734F, model.slackAmount()); + Assertions.assertEquals(484486985, model.delayEvaluation()); + Assertions.assertEquals(549678913, model.evaluationInterval()); + Assertions.assertEquals(57.73833058052216D, model.slackAmount()); + Assertions.assertEquals(43.52126437970535D, model.slackFactor()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java index 4f6536cc925f..25177a403327 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java index 7d7c3e21175e..f27acc8be3df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.batchDeployments() - .delete("vi", "cwbqy", "clwbjgiynqryoisw", "ofvsxau", com.azure.core.util.Context.NONE); + manager.batchDeployments().delete("yhx", "uhhnrmmfzfkhfnz", "ffajh", "v", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java index a2712fe028ca..821b41df9740 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class BatchEndpointDefaultsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BatchEndpointDefaults model - = BinaryData.fromString("{\"deploymentName\":\"winhehfqpo\"}").toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("winhehfqpo", model.deploymentName()); + = BinaryData.fromString("{\"deploymentName\":\"dpyqyybxubmd\"}").toObject(BatchEndpointDefaults.class); + Assertions.assertEquals("dpyqyybxubmd", model.deploymentName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BatchEndpointDefaults model = new BatchEndpointDefaults().withDeploymentName("winhehfqpo"); + BatchEndpointDefaults model = new BatchEndpointDefaults().withDeploymentName("dpyqyybxubmd"); model = BinaryData.fromObject(model).toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("winhehfqpo", model.deploymentName()); + Assertions.assertEquals("dpyqyybxubmd", model.deploymentName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java index 2ece8ae2a253..0d37641bb2e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.batchEndpoints().delete("fxcsqmzdozktkdpc", "eohpl", "gcnbvmhvqp", com.azure.core.util.Context.NONE); + manager.batchEndpoints().delete("qvatst", "voivcktjsc", "kexybxyrc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java index 94bafbf74579..3d465a5a7922 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,27 +15,27 @@ public final class BatchPipelineComponentDeploymentConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BatchPipelineComponentDeploymentConfiguration model = BinaryData.fromString( - "{\"deploymentConfigurationType\":\"PipelineComponent\",\"componentId\":{\"referenceType\":\"Id\",\"assetId\":\"jgvhxcc\"},\"description\":\"kakmkookbputmgvm\",\"settings\":{\"ow\":\"kmlwkt\",\"ejtgzjxxl\":\"kroyrdurxflzqji\",\"lzuqloiwyayyzivr\":\"e\",\"jlei\":\"itcdqlhchwhrk\"},\"tags\":{\"nsmy\":\"fiplhx\"}}") + "{\"deploymentConfigurationType\":\"PipelineComponent\",\"componentId\":{\"referenceType\":\"Id\",\"assetId\":\"wex\"},\"description\":\"zvlazipbhpwvqsgn\",\"settings\":{\"patlbijp\":\"uzivensrpmeyyvp\",\"olmk\":\"gsksrfhf\",\"ommpvfqaw\":\"bnxwc\",\"iac\":\"fgbrtt\"},\"tags\":{\"hiqfyuttdiy\":\"exhajlfn\",\"vnwsw\":\"b\"}}") .toObject(BatchPipelineComponentDeploymentConfiguration.class); - Assertions.assertEquals("jgvhxcc", model.componentId().assetId()); - Assertions.assertEquals("kakmkookbputmgvm", model.description()); - Assertions.assertEquals("kmlwkt", model.settings().get("ow")); - Assertions.assertEquals("fiplhx", model.tags().get("nsmy")); + Assertions.assertEquals("wex", model.componentId().assetId()); + Assertions.assertEquals("zvlazipbhpwvqsgn", model.description()); + Assertions.assertEquals("uzivensrpmeyyvp", model.settings().get("patlbijp")); + Assertions.assertEquals("exhajlfn", model.tags().get("hiqfyuttdiy")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BatchPipelineComponentDeploymentConfiguration model = new BatchPipelineComponentDeploymentConfiguration() - .withComponentId(new IdAssetReference().withAssetId("jgvhxcc")) - .withDescription("kakmkookbputmgvm") + .withComponentId(new IdAssetReference().withAssetId("wex")) + .withDescription("zvlazipbhpwvqsgn") .withSettings( - mapOf("ow", "kmlwkt", "ejtgzjxxl", "kroyrdurxflzqji", "lzuqloiwyayyzivr", "e", "jlei", "itcdqlhchwhrk")) - .withTags(mapOf("nsmy", "fiplhx")); + mapOf("patlbijp", "uzivensrpmeyyvp", "olmk", "gsksrfhf", "ommpvfqaw", "bnxwc", "iac", "fgbrtt")) + .withTags(mapOf("hiqfyuttdiy", "exhajlfn", "vnwsw", "b")); model = BinaryData.fromObject(model).toObject(BatchPipelineComponentDeploymentConfiguration.class); - Assertions.assertEquals("jgvhxcc", model.componentId().assetId()); - Assertions.assertEquals("kakmkookbputmgvm", model.description()); - Assertions.assertEquals("kmlwkt", model.settings().get("ow")); - Assertions.assertEquals("fiplhx", model.tags().get("nsmy")); + Assertions.assertEquals("wex", model.componentId().assetId()); + Assertions.assertEquals("zvlazipbhpwvqsgn", model.description()); + Assertions.assertEquals("uzivensrpmeyyvp", model.settings().get("patlbijp")); + Assertions.assertEquals("exhajlfn", model.tags().get("hiqfyuttdiy")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java index 209f9e21bc4c..3eee3c508e08 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,18 @@ public final class BatchRetrySettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - BatchRetrySettings model = BinaryData.fromString("{\"maxRetries\":1662564263,\"timeout\":\"PT208H49M32S\"}") + BatchRetrySettings model = BinaryData.fromString("{\"maxRetries\":1106041304,\"timeout\":\"PT75H37M29S\"}") .toObject(BatchRetrySettings.class); - Assertions.assertEquals(1662564263, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT208H49M32S"), model.timeout()); + Assertions.assertEquals(1106041304, model.maxRetries()); + Assertions.assertEquals(Duration.parse("PT75H37M29S"), model.timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BatchRetrySettings model - = new BatchRetrySettings().withMaxRetries(1662564263).withTimeout(Duration.parse("PT208H49M32S")); + = new BatchRetrySettings().withMaxRetries(1106041304).withTimeout(Duration.parse("PT75H37M29S")); model = BinaryData.fromObject(model).toObject(BatchRetrySettings.class); - Assertions.assertEquals(1662564263, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT208H49M32S"), model.timeout()); + Assertions.assertEquals(1106041304, model.maxRetries()); + Assertions.assertEquals(Duration.parse("PT75H37M29S"), model.timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java index 96b3f9dcffaa..ccc65f5fb938 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.java index a5f75e9ec467..ffe1263b2d26 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,20 +12,19 @@ public final class BindOptionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BindOptions model - = BinaryData.fromString("{\"propagation\":\"arwp\",\"createHostPath\":true,\"selinux\":\"udoejtighsxjp\"}") + = BinaryData.fromString("{\"propagation\":\"dnjyhzfax\",\"createHostPath\":true,\"selinux\":\"u\"}") .toObject(BindOptions.class); - Assertions.assertEquals("arwp", model.propagation()); - Assertions.assertEquals(true, model.createHostPath()); - Assertions.assertEquals("udoejtighsxjp", model.selinux()); + Assertions.assertEquals("dnjyhzfax", model.propagation()); + Assertions.assertTrue(model.createHostPath()); + Assertions.assertEquals("u", model.selinux()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BindOptions model - = new BindOptions().withPropagation("arwp").withCreateHostPath(true).withSelinux("udoejtighsxjp"); + BindOptions model = new BindOptions().withPropagation("dnjyhzfax").withCreateHostPath(true).withSelinux("u"); model = BinaryData.fromObject(model).toObject(BindOptions.class); - Assertions.assertEquals("arwp", model.propagation()); - Assertions.assertEquals(true, model.createHostPath()); - Assertions.assertEquals("udoejtighsxjp", model.selinux()); + Assertions.assertEquals("dnjyhzfax", model.propagation()); + Assertions.assertTrue(model.createHostPath()); + Assertions.assertEquals("u", model.selinux()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java index 43b9ecc4b4f1..2640a4c60a31 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,17 +12,17 @@ public final class BuildContextTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BuildContext model - = BinaryData.fromString("{\"contextUri\":\"zrcxfailcfxwmdbo\",\"dockerfilePath\":\"fgsftufqob\"}") + = BinaryData.fromString("{\"contextUri\":\"ayzejnhlbkpbz\",\"dockerfilePath\":\"piljhahzvech\"}") .toObject(BuildContext.class); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.contextUri()); - Assertions.assertEquals("fgsftufqob", model.dockerfilePath()); + Assertions.assertEquals("ayzejnhlbkpbz", model.contextUri()); + Assertions.assertEquals("piljhahzvech", model.dockerfilePath()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BuildContext model = new BuildContext().withContextUri("zrcxfailcfxwmdbo").withDockerfilePath("fgsftufqob"); + BuildContext model = new BuildContext().withContextUri("ayzejnhlbkpbz").withDockerfilePath("piljhahzvech"); model = BinaryData.fromObject(model).toObject(BuildContext.class); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.contextUri()); - Assertions.assertEquals("fgsftufqob", model.dockerfilePath()); + Assertions.assertEquals("ayzejnhlbkpbz", model.contextUri()); + Assertions.assertEquals("piljhahzvech", model.dockerfilePath()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostInnerTests.java new file mode 100644 index 000000000000..44754b879fa4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostInnerTests.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostKind; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class CapabilityHostInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityHostInner model = BinaryData.fromString( + "{\"properties\":{\"acaEnvironmentConnections\":[\"tsu\",\"hxsgxj\"],\"aiServicesConnections\":[\"zrrscub\",\"wsdrnpxqwodif\",\"jxcjrmmuabwib\",\"jogjonmc\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"y\",\"provisioningState\":\"Failed\",\"storageConnections\":[\"in\"],\"threadStorageConnections\":[\"vfkakpold\",\"vevboclzh\"],\"vectorStoreConnections\":[\"n\",\"uxgvttxpnr\",\"pzaamrdixtreki\"],\"messages\":[\"yskbruff\",\"l\",\"ukkutvl\"],\"description\":\"rpq\",\"properties\":{\"yr\":\"blcouqehbhbcdszi\",\"pmbltoormkfql\":\"ndo\",\"nbmjksibjgsjjxxa\":\"xldykalsygaolnjp\",\"ad\":\"mr\"},\"tags\":{\"kgqxn\":\"egxyivpinbmhwbji\",\"znj\":\"mbk\",\"cwkdtaaw\":\"ujvaannggi\"}},\"id\":\"fe\",\"name\":\"aumrrqmbzmqkrat\",\"type\":\"nxwbjsidbirkfp\"}") + .toObject(CapabilityHostInner.class); + Assertions.assertEquals("rpq", model.properties().description()); + Assertions.assertEquals("blcouqehbhbcdszi", model.properties().properties().get("yr")); + Assertions.assertEquals("egxyivpinbmhwbji", model.properties().tags().get("kgqxn")); + Assertions.assertEquals("tsu", model.properties().acaEnvironmentConnections().get(0)); + Assertions.assertEquals("zrrscub", model.properties().aiServicesConnections().get(0)); + Assertions.assertEquals(CapabilityHostKind.AGENTS, model.properties().capabilityHostKind()); + Assertions.assertEquals("y", model.properties().customerSubnet()); + Assertions.assertEquals("in", model.properties().storageConnections().get(0)); + Assertions.assertEquals("vfkakpold", model.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("n", model.properties().vectorStoreConnections().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityHostInner model + = new CapabilityHostInner().withProperties(new CapabilityHostProperties().withDescription("rpq") + .withProperties(mapOf("yr", "blcouqehbhbcdszi", "pmbltoormkfql", "ndo", "nbmjksibjgsjjxxa", + "xldykalsygaolnjp", "ad", "mr")) + .withTags(mapOf("kgqxn", "egxyivpinbmhwbji", "znj", "mbk", "cwkdtaaw", "ujvaannggi")) + .withAcaEnvironmentConnections(Arrays.asList("tsu", "hxsgxj")) + .withAiServicesConnections(Arrays.asList("zrrscub", "wsdrnpxqwodif", "jxcjrmmuabwib", "jogjonmc")) + .withCapabilityHostKind(CapabilityHostKind.AGENTS) + .withCustomerSubnet("y") + .withStorageConnections(Arrays.asList("in")) + .withThreadStorageConnections(Arrays.asList("vfkakpold", "vevboclzh")) + .withVectorStoreConnections(Arrays.asList("n", "uxgvttxpnr", "pzaamrdixtreki"))); + model = BinaryData.fromObject(model).toObject(CapabilityHostInner.class); + Assertions.assertEquals("rpq", model.properties().description()); + Assertions.assertEquals("blcouqehbhbcdszi", model.properties().properties().get("yr")); + Assertions.assertEquals("egxyivpinbmhwbji", model.properties().tags().get("kgqxn")); + Assertions.assertEquals("tsu", model.properties().acaEnvironmentConnections().get(0)); + Assertions.assertEquals("zrrscub", model.properties().aiServicesConnections().get(0)); + Assertions.assertEquals(CapabilityHostKind.AGENTS, model.properties().capabilityHostKind()); + Assertions.assertEquals("y", model.properties().customerSubnet()); + Assertions.assertEquals("in", model.properties().storageConnections().get(0)); + Assertions.assertEquals("vfkakpold", model.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("n", model.properties().vectorStoreConnections().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostPropertiesTests.java new file mode 100644 index 000000000000..4273de078178 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostPropertiesTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostKind; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class CapabilityHostPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CapabilityHostProperties model = BinaryData.fromString( + "{\"acaEnvironmentConnections\":[\"kd\",\"ogewij\"],\"aiServicesConnections\":[\"hbguzo\",\"kyewnfnzhhhqo\",\"mffjkutycyarn\",\"oohguabzoghkt\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"z\",\"provisioningState\":\"Updating\",\"storageConnections\":[\"cnhz\",\"rottjzcfyjzptw\",\"lohap\",\"infsz\"],\"threadStorageConnections\":[\"lqdhmrjzr\",\"l\"],\"vectorStoreConnections\":[\"jb\"],\"messages\":[\"sjoqcjenkyhfqzvs\",\"xfxjelgcmpzqj\",\"hhqxuwyvcacoyviv\"],\"description\":\"izus\",\"properties\":{\"jiu\":\"lbscmnlz\",\"kxrerlniylylyfwx\":\"ehgmvflnwyv\",\"hmupgxyjtcdxabbu\":\"utgqztwh\"},\"tags\":{\"bbklqpxzuca\":\"abe\",\"dwwnl\":\"e\"}}") + .toObject(CapabilityHostProperties.class); + Assertions.assertEquals("izus", model.description()); + Assertions.assertEquals("lbscmnlz", model.properties().get("jiu")); + Assertions.assertEquals("abe", model.tags().get("bbklqpxzuca")); + Assertions.assertEquals("kd", model.acaEnvironmentConnections().get(0)); + Assertions.assertEquals("hbguzo", model.aiServicesConnections().get(0)); + Assertions.assertEquals(CapabilityHostKind.AGENTS, model.capabilityHostKind()); + Assertions.assertEquals("z", model.customerSubnet()); + Assertions.assertEquals("cnhz", model.storageConnections().get(0)); + Assertions.assertEquals("lqdhmrjzr", model.threadStorageConnections().get(0)); + Assertions.assertEquals("jb", model.vectorStoreConnections().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CapabilityHostProperties model = new CapabilityHostProperties().withDescription("izus") + .withProperties(mapOf("jiu", "lbscmnlz", "kxrerlniylylyfwx", "ehgmvflnwyv", "hmupgxyjtcdxabbu", "utgqztwh")) + .withTags(mapOf("bbklqpxzuca", "abe", "dwwnl", "e")) + .withAcaEnvironmentConnections(Arrays.asList("kd", "ogewij")) + .withAiServicesConnections(Arrays.asList("hbguzo", "kyewnfnzhhhqo", "mffjkutycyarn", "oohguabzoghkt")) + .withCapabilityHostKind(CapabilityHostKind.AGENTS) + .withCustomerSubnet("z") + .withStorageConnections(Arrays.asList("cnhz", "rottjzcfyjzptw", "lohap", "infsz")) + .withThreadStorageConnections(Arrays.asList("lqdhmrjzr", "l")) + .withVectorStoreConnections(Arrays.asList("jb")); + model = BinaryData.fromObject(model).toObject(CapabilityHostProperties.class); + Assertions.assertEquals("izus", model.description()); + Assertions.assertEquals("lbscmnlz", model.properties().get("jiu")); + Assertions.assertEquals("abe", model.tags().get("bbklqpxzuca")); + Assertions.assertEquals("kd", model.acaEnvironmentConnections().get(0)); + Assertions.assertEquals("hbguzo", model.aiServicesConnections().get(0)); + Assertions.assertEquals(CapabilityHostKind.AGENTS, model.capabilityHostKind()); + Assertions.assertEquals("z", model.customerSubnet()); + Assertions.assertEquals("cnhz", model.storageConnections().get(0)); + Assertions.assertEquals("lqdhmrjzr", model.threadStorageConnections().get(0)); + Assertions.assertEquals("jb", model.vectorStoreConnections().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..74a243a99ad8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateMockTests.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.CapabilityHost; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostKind; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class CapabilityHostsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"acaEnvironmentConnections\":[\"mbxerz\"],\"aiServicesConnections\":[\"ralw\",\"cnmrbizxqldmhzb\",\"ujdzlgyermje\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"hoqpbfjfcbweabpt\",\"provisioningState\":\"Succeeded\",\"storageConnections\":[\"uvcgvnomlc\"],\"threadStorageConnections\":[\"y\",\"huafu\",\"lop\"],\"vectorStoreConnections\":[\"sylwsmdo\"],\"messages\":[\"rgdmbgbhtpom\",\"ustkqywabhlgrrsk\"],\"description\":\"zbke\",\"properties\":{\"dxgdjudek\":\"pf\",\"zmehcdfdxthqnz\":\"xh\"},\"tags\":{\"edijdhzkwvuewe\":\"ir\"}},\"id\":\"ajelswlxdknxctg\",\"name\":\"zbcxdfsgwigyiwbw\",\"type\":\"udx\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + CapabilityHost response = manager.capabilityHosts() + .define("nduxkepgamri") + .withExistingWorkspace("myomjeflgnieeq", "dfxxx") + .withProperties(new CapabilityHostProperties().withDescription("gpkypbek") + .withProperties(mapOf("hbzmgzsytm", "doadtedxzg", "iqfstkd", "fslrxvsqsbqrqb")) + .withTags(mapOf("fkzlch", "zijxefydck", "lxnnit", "kiwpadnh", "tfrdlfewexbrvb", "ug")) + .withAcaEnvironmentConnections(Arrays.asList("terqfuterrc", "nlpfqddww", "gcqawupqkv")) + .withAiServicesConnections(Arrays.asList("ueefrxzwvcvtjd", "dagwxjafbdvpcd", "dbjzxrpxji", "aup")) + .withCapabilityHostKind(CapabilityHostKind.AGENTS) + .withCustomerSubnet("onkaqngvgjgcwwuu") + .withStorageConnections(Arrays.asList("cyznrhighnx", "gmf", "nktsvwqdarjteq", "ujmmkni")) + .withThreadStorageConnections(Arrays.asList("sttximeztasflgme")) + .withVectorStoreConnections(Arrays.asList("ohlerp", "jw", "zapybdeeagigbp", "bacpleirjrkakm"))) + .create(); + + Assertions.assertEquals("zbke", response.properties().description()); + Assertions.assertEquals("pf", response.properties().properties().get("dxgdjudek")); + Assertions.assertEquals("ir", response.properties().tags().get("edijdhzkwvuewe")); + Assertions.assertEquals("mbxerz", response.properties().acaEnvironmentConnections().get(0)); + Assertions.assertEquals("ralw", response.properties().aiServicesConnections().get(0)); + Assertions.assertEquals(CapabilityHostKind.AGENTS, response.properties().capabilityHostKind()); + Assertions.assertEquals("hoqpbfjfcbweabpt", response.properties().customerSubnet()); + Assertions.assertEquals("uvcgvnomlc", response.properties().storageConnections().get(0)); + Assertions.assertEquals("y", response.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("sylwsmdo", response.properties().vectorStoreConnections().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetWithResponseMockTests.java new file mode 100644 index 000000000000..eedb24ee3a6c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetWithResponseMockTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.CapabilityHost; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostKind; +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 CapabilityHostsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"acaEnvironmentConnections\":[\"vyhgpgjdrng\"],\"aiServicesConnections\":[\"eepukuofzwizt\"],\"capabilityHostKind\":\"Agents\",\"customerSubnet\":\"ack\",\"provisioningState\":\"Canceled\",\"storageConnections\":[\"m\"],\"threadStorageConnections\":[\"cohfksixv\",\"kpcesmurj\",\"bpnxohagcoj\",\"my\"],\"vectorStoreConnections\":[\"gmqehrqtgdipbnj\"],\"messages\":[\"yu\",\"g\",\"zsebkbfykgmwurcx\",\"jyxyunypf\"],\"description\":\"j\",\"properties\":{\"b\":\"bbncjxrwaqgmztlr\",\"airoog\":\"kwoupmqffgjsqq\"},\"tags\":{\"pmegnkrvtfb\":\"jobdqiuppavqovi\",\"r\":\"b\"}},\"id\":\"ljfate\",\"name\":\"dxqhje\",\"type\":\"hg\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + CapabilityHost response = manager.capabilityHosts() + .getWithResponse("ypksfrhiehxjou", "x", "hsbecxuvkba", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("j", response.properties().description()); + Assertions.assertEquals("bbncjxrwaqgmztlr", response.properties().properties().get("b")); + Assertions.assertEquals("jobdqiuppavqovi", response.properties().tags().get("pmegnkrvtfb")); + Assertions.assertEquals("vyhgpgjdrng", response.properties().acaEnvironmentConnections().get(0)); + Assertions.assertEquals("eepukuofzwizt", response.properties().aiServicesConnections().get(0)); + Assertions.assertEquals(CapabilityHostKind.AGENTS, response.properties().capabilityHostKind()); + Assertions.assertEquals("ack", response.properties().customerSubnet()); + Assertions.assertEquals("m", response.properties().storageConnections().get(0)); + Assertions.assertEquals("cohfksixv", response.properties().threadStorageConnections().get(0)); + Assertions.assertEquals("gmqehrqtgdipbnj", response.properties().vectorStoreConnections().get(0)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java index 42de010f2f32..84b965f244ad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,19 +14,19 @@ public final class CategoricalDataDriftMetricThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CategoricalDataDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"PearsonsChiSquaredTest\",\"threshold\":{\"value\":46.62967716667693}}") + "{\"dataType\":\"Categorical\",\"metric\":\"JensenShannonDistance\",\"threshold\":{\"value\":2.806924168842806}}") .toObject(CategoricalDataDriftMetricThreshold.class); - Assertions.assertEquals(46.62967716667693D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST, model.metric()); + Assertions.assertEquals(2.806924168842806D, model.threshold().value()); + Assertions.assertEquals(CategoricalDataDriftMetric.JENSEN_SHANNON_DISTANCE, model.metric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CategoricalDataDriftMetricThreshold model = new CategoricalDataDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(46.62967716667693D)) - .withMetric(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST); + .withThreshold(new MonitoringThreshold().withValue(2.806924168842806D)) + .withMetric(CategoricalDataDriftMetric.JENSEN_SHANNON_DISTANCE); model = BinaryData.fromObject(model).toObject(CategoricalDataDriftMetricThreshold.class); - Assertions.assertEquals(46.62967716667693D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST, model.metric()); + Assertions.assertEquals(2.806924168842806D, model.threshold().value()); + Assertions.assertEquals(CategoricalDataDriftMetric.JENSEN_SHANNON_DISTANCE, model.metric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java index 98eddd5d54f5..5a2e96f2dd96 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,19 +14,19 @@ public final class CategoricalDataQualityMetricThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CategoricalDataQualityMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"OutOfBoundsRate\",\"threshold\":{\"value\":24.67440172418167}}") + "{\"dataType\":\"Categorical\",\"metric\":\"DataTypeErrorRate\",\"threshold\":{\"value\":29.26791048799724}}") .toObject(CategoricalDataQualityMetricThreshold.class); - Assertions.assertEquals(24.67440172418167D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); + Assertions.assertEquals(29.26791048799724D, model.threshold().value()); + Assertions.assertEquals(CategoricalDataQualityMetric.DATA_TYPE_ERROR_RATE, model.metric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CategoricalDataQualityMetricThreshold model = new CategoricalDataQualityMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(24.67440172418167D)) - .withMetric(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE); + .withThreshold(new MonitoringThreshold().withValue(29.26791048799724D)) + .withMetric(CategoricalDataQualityMetric.DATA_TYPE_ERROR_RATE); model = BinaryData.fromObject(model).toObject(CategoricalDataQualityMetricThreshold.class); - Assertions.assertEquals(24.67440172418167D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); + Assertions.assertEquals(29.26791048799724D, model.threshold().value()); + Assertions.assertEquals(CategoricalDataQualityMetric.DATA_TYPE_ERROR_RATE, model.metric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java index d9da6bebfec5..cddfbd4ac807 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,19 +14,19 @@ public final class CategoricalPredictionDriftMetricThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CategoricalPredictionDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"PopulationStabilityIndex\",\"threshold\":{\"value\":29.225647005199463}}") + "{\"dataType\":\"Categorical\",\"metric\":\"PopulationStabilityIndex\",\"threshold\":{\"value\":8.767772999254975}}") .toObject(CategoricalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(29.225647005199463D, model.threshold().value()); + Assertions.assertEquals(8.767772999254975D, model.threshold().value()); Assertions.assertEquals(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CategoricalPredictionDriftMetricThreshold model = new CategoricalPredictionDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(29.225647005199463D)) + .withThreshold(new MonitoringThreshold().withValue(8.767772999254975D)) .withMetric(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX); model = BinaryData.fromObject(model).toObject(CategoricalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(29.225647005199463D, model.threshold().value()); + Assertions.assertEquals(8.767772999254975D, model.threshold().value()); Assertions.assertEquals(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java index cca76ae955bf..e31554a7ba6c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -30,180 +30,173 @@ public final class ClassificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Classification model = BinaryData.fromString( - "{\"taskType\":\"Classification\",\"primaryMetric\":\"NormMacroRecall\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"XGBoostClassifier\",\"RandomForest\",\"KNN\"],\"blockedTrainingAlgorithms\":[\"MultinomialNaiveBayes\",\"GradientBoosting\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":20.84074496097085,\"stackMetaLearnerKWargs\":\"dataczd\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT27H37M10S\",\"enableModelExplainability\":true,\"enableDnnTraining\":false},\"positiveLabel\":\"sstciv\",\"limitSettings\":{\"maxTrials\":636720393,\"trialTimeout\":\"PT55H19M43S\",\"timeout\":\"PT42H27M16S\",\"maxConcurrentTrials\":1561472375,\"maxCoresPerTrial\":1179315377,\"exitScore\":20.777247401023292,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"xrkemjpequlrl\",\"audgjtfbclakkucd\",\"wnhczbutou\"],\"weightColumnName\":\"jtirjwayhicqq\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"v\",\"mode\":\"ReadOnlyMount\",\"description\":\"lvlize\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"biabvnsrgekz\",\"mode\":\"EvalMount\",\"description\":\"dyfhb\"},\"validationDataSize\":71.86910773602595,\"testDataSize\":54.066554814118874,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"LabelEncoder\",\"NaiveBayes\",\"WordEmbedding\",\"HashOneHotEncoder\"],\"columnNameAndTypes\":{\"jrz\":\"qjsgyzst\",\"iitt\":\"rknsfdrlduyeh\",\"csozjv\":\"gyuqwrldaxurfqa\"},\"transformerParams\":{\"ttoztj\":[{\"fields\":[\"gbnvt\",\"o\"],\"parameters\":\"dataalzyxwhoeamo\"},{\"fields\":[\"doey\",\"fpnimtwuuhaueg\"],\"parameters\":\"datawmnfeubtzjyrkwfu\"},{\"fields\":[\"hrrk\",\"umnqdurhzzfopu\"],\"parameters\":\"dataqusvwlujopwnib\"}],\"feapdrbzyvbsuadu\":[{\"fields\":[\"qvfmwcad\",\"tgctxe\"],\"parameters\":\"datavgwy\"},{\"fields\":[\"elfnzzryiz\"],\"parameters\":\"dataxgdebxl\"},{\"fields\":[\"no\",\"irhpfabenq\"],\"parameters\":\"datamwmgewayxfl\"},{\"fields\":[\"pjs\"],\"parameters\":\"datahemhcucsqsnxfbx\"}],\"aqufqizjvppwoo\":[{\"fields\":[\"kaxpfobkzhmh\",\"dqltdel\",\"qrojadhfztlray\",\"rkgzkyhudbkuw\"],\"parameters\":\"dataqxlcweakfecjvx\"}],\"cwlo\":[{\"fields\":[\"yjmjjxizxpxhnzls\",\"ekcttgzkjtyqpdwa\",\"egh\"],\"parameters\":\"dataldsvc\"},{\"fields\":[\"iahuqymjzucw\",\"mejjqhddwvmq\"],\"parameters\":\"datayookyfozkbnzxby\"},{\"fields\":[\"pgaixwrgrkkderf\",\"swqi\",\"wepwoggg\"],\"parameters\":\"datawnxhtf\"},{\"fields\":[\"bsudzpgchzpgfqu\",\"jdjxhzghgo\",\"kynrceqavf\",\"bdfmm\"],\"parameters\":\"datadnajuopjyyqmkwlh\"}]},\"enableDnnFeaturization\":false,\"datasetLanguage\":\"kluxxrwzobuzmsxg\"},\"logVerbosity\":\"NotSet\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"dtkwppth\",\"mode\":\"EvalDownload\",\"description\":\"rmimrljdpoqfxyem\"},\"targetColumnName\":\"ftb\"}") + "{\"taskType\":\"Classification\",\"cvSplitColumnNames\":[\"zox\",\"dxqlfrolq\",\"wnk\"],\"featurizationSettings\":{\"blockedTransformers\":[\"HashOneHotEncoder\"],\"columnNameAndTypes\":{\"tnlmsoodtmvecdhd\":\"ahwkxjjm\",\"zxvlgsrgkrfizrp\":\"swcrptveaj\"},\"enableDnnFeaturization\":false,\"mode\":\"Auto\",\"transformerParams\":{\"cxn\":[{\"fields\":[\"lmcskyk\",\"fuofixcnpcfykkp\"],\"parameters\":\"\\\"datacpawmp\\\"\"},{\"fields\":[\"dpwrp\",\"fpcfjf\"],\"parameters\":\"\\\"datalgzawkgyepeyamnn\\\"\"},{\"fields\":[\"diawpzxkzr\",\"tmkctdhuosgwqpsq\"],\"parameters\":\"\\\"datai\\\"\"},{\"fields\":[\"dvqgcnbhcbmjkz\",\"ibniynts\",\"jmfmeftvhkm\",\"ogjrhskbwgm\"],\"parameters\":\"\\\"datarulcfogx\\\"\"}],\"xbaizab\":[{\"fields\":[\"fdz\",\"c\",\"uzfwo\",\"wakukzkdtzxs\"],\"parameters\":\"\\\"datadnlwglihezomuc\\\"\"},{\"fields\":[\"isnionetbzdrdpue\"],\"parameters\":\"\\\"datakgtlzl\\\"\"},{\"fields\":[\"lxcznn\",\"zkbnbmxl\",\"mwt\"],\"parameters\":\"\\\"dataeqzusitoqcahfs\\\"\"},{\"fields\":[\"mlree\",\"rfwss\",\"vlcwlisolntfxxc\",\"qmipfj\"],\"parameters\":\"\\\"dataoygizmsh\\\"\"}],\"y\":[{\"fields\":[\"gsk\"],\"parameters\":\"\\\"datao\\\"\"},{\"fields\":[\"zjsjzn\"],\"parameters\":\"\\\"dataxqqm\\\"\"},{\"fields\":[\"aydhf\",\"zocxmtfshksnyzm\"],\"parameters\":\"\\\"dataamwbwmbnlslcef\\\"\"},{\"fields\":[\"ktwtk\"],\"parameters\":\"\\\"datahlpfliw\\\"\"}]},\"datasetLanguage\":\"uuzhw\"},\"limitSettings\":{\"enableEarlyTermination\":false,\"exitScore\":81.65498880969054,\"maxConcurrentTrials\":681106883,\"maxCoresPerTrial\":102330607,\"maxTrials\":930236025,\"timeout\":\"PT137H17M38S\",\"trialTimeout\":\"PT160H32M\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"fztsi\",\"description\":\"c\"},\"testDataSize\":36.58338434051356,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"hfym\",\"description\":\"uihyeseuugcig\"},\"validationDataSize\":62.206943732663355,\"weightColumnName\":\"mgbvmtdwrqbe\",\"positiveLabel\":\"nfvegl\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"SGD\",\"RandomForest\",\"ExtremeRandomTrees\",\"XGBoostClassifier\"],\"blockedTrainingAlgorithms\":[\"KNN\",\"LinearSVM\"],\"enableDnnTraining\":true,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT143H46M12S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"\\\"datauhbcak\\\"\",\"stackMetaLearnerTrainPercentage\":92.20832311711192,\"stackMetaLearnerType\":\"LightGBMRegressor\"}},\"logVerbosity\":\"Error\",\"targetColumnName\":\"whrjsdmmazdnck\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"jpg\",\"description\":\"zqpxzbawkikcd\"}}") .toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("rmimrljdpoqfxyem", model.trainingData().description()); - Assertions.assertEquals("dtkwppth", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ftb", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.84074496097085D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(true, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H37M10S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.XGBOOST_CLASSIFIER, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("sstciv", model.positiveLabel()); - Assertions.assertEquals(636720393, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT55H19M43S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT42H27M16S"), model.limitSettings().timeout()); - Assertions.assertEquals(1561472375, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1179315377, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(20.777247401023292D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("xrkemjpequlrl", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("jtirjwayhicqq", model.weightColumnName()); - Assertions.assertEquals("lvlize", model.validationData().description()); - Assertions.assertEquals("v", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("dyfhb", model.testData().description()); - Assertions.assertEquals("biabvnsrgekz", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(71.86910773602595D, model.validationDataSize()); - Assertions.assertEquals(54.066554814118874D, model.testDataSize()); - Assertions.assertEquals("kluxxrwzobuzmsxg", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, + Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); + Assertions.assertEquals("whrjsdmmazdnck", model.targetColumnName()); + Assertions.assertEquals("zqpxzbawkikcd", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); + Assertions.assertEquals("jpg", model.trainingData().uri()); + Assertions.assertEquals("zox", model.cvSplitColumnNames().get(0)); + Assertions.assertEquals("uuzhw", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.HASH_ONE_HOT_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("qjsgyzst", model.featurizationSettings().columnNameAndTypes().get("jrz")); - Assertions.assertEquals("gbnvt", - model.featurizationSettings().transformerParams().get("ttoztj").get(0).fields().get(0)); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals("ahwkxjjm", model.featurizationSettings().columnNameAndTypes().get("tnlmsoodtmvecdhd")); + Assertions.assertFalse(model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); + Assertions.assertEquals("lmcskyk", + model.featurizationSettings().transformerParams().get("cxn").get(0).fields().get(0)); + Assertions.assertFalse(model.limitSettings().enableEarlyTermination()); + Assertions.assertEquals(81.65498880969054D, model.limitSettings().exitScore()); + Assertions.assertEquals(681106883, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(102330607, model.limitSettings().maxCoresPerTrial()); + Assertions.assertEquals(930236025, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT137H17M38S"), model.limitSettings().timeout()); + Assertions.assertEquals(Duration.parse("PT160H32M"), model.limitSettings().trialTimeout()); + Assertions.assertEquals("c", model.testData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); + Assertions.assertEquals("fztsi", model.testData().uri()); + Assertions.assertEquals(36.58338434051356D, model.testDataSize()); + Assertions.assertEquals("uihyeseuugcig", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); + Assertions.assertEquals("hfym", model.validationData().uri()); + Assertions.assertEquals(62.206943732663355D, model.validationDataSize()); + Assertions.assertEquals("mgbvmtdwrqbe", model.weightColumnName()); + Assertions.assertEquals("nfvegl", model.positiveLabel()); + Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); + Assertions.assertTrue(model.trainingSettings().enableDnnTraining()); + Assertions.assertFalse(model.trainingSettings().enableModelExplainability()); + Assertions.assertTrue(model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertFalse(model.trainingSettings().enableStackEnsemble()); + Assertions.assertFalse(model.trainingSettings().enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT143H46M12S"), + model.trainingSettings().ensembleModelDownloadTimeout()); + Assertions.assertEquals(92.20832311711192D, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); + Assertions.assertEquals(ClassificationModels.SGD, model.trainingSettings().allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ClassificationModels.KNN, model.trainingSettings().blockedTrainingAlgorithms().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Classification model = new Classification().withLogVerbosity(LogVerbosity.NOT_SET) - .withTrainingData(new MLTableJobInput().withDescription("rmimrljdpoqfxyem") - .withUri("dtkwppth") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("ftb") - .withPrimaryMetric(ClassificationPrimaryMetrics.NORM_MACRO_RECALL) - .withTrainingSettings(new ClassificationTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(20.84074496097085D) - .withStackMetaLearnerKWargs("dataczd")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT27H37M10S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.XGBOOST_CLASSIFIER, - ClassificationModels.RANDOM_FOREST, ClassificationModels.KNN)) - .withBlockedTrainingAlgorithms(Arrays.asList(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - ClassificationModels.GRADIENT_BOOSTING))) - .withPositiveLabel("sstciv") - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(636720393) - .withTrialTimeout(Duration.parse("PT55H19M43S")) - .withTimeout(Duration.parse("PT42H27M16S")) - .withMaxConcurrentTrials(1561472375) - .withMaxCoresPerTrial(1179315377) - .withExitScore(20.777247401023292D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("xrkemjpequlrl", "audgjtfbclakkucd", "wnhczbutou")) - .withWeightColumnName("jtirjwayhicqq") - .withValidationData(new MLTableJobInput().withDescription("lvlize") - .withUri("v") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTestData(new MLTableJobInput().withDescription("dyfhb") - .withUri("biabvnsrgekz") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withValidationDataSize(71.86910773602595D) - .withTestDataSize(54.066554814118874D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("kluxxrwzobuzmsxg") + Classification model = new Classification().withLogVerbosity(LogVerbosity.ERROR) + .withTargetColumnName("whrjsdmmazdnck") + .withTrainingData(new MLTableJobInput().withDescription("zqpxzbawkikcd") + .withMode(InputDeliveryMode.DIRECT) + .withUri("jpg")) + .withCvSplitColumnNames(Arrays.asList("zox", "dxqlfrolq", "wnk")) + .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("uuzhw") + .withBlockedTransformers(Arrays.asList(BlockedTransformers.HASH_ONE_HOT_ENCODER)) + .withColumnNameAndTypes(mapOf("tnlmsoodtmvecdhd", "ahwkxjjm", "zxvlgsrgkrfizrp", "swcrptveaj")) + .withEnableDnnFeaturization(false) .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.LABEL_ENCODER, BlockedTransformers.NAIVE_BAYES, - BlockedTransformers.WORD_EMBEDDING, BlockedTransformers.HASH_ONE_HOT_ENCODER)) - .withColumnNameAndTypes(mapOf("jrz", "qjsgyzst", "iitt", "rknsfdrlduyeh", "csozjv", "gyuqwrldaxurfqa")) - .withTransformerParams(mapOf("ttoztj", Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("gbnvt", "o")).withParameters("dataalzyxwhoeamo"), - new ColumnTransformer().withFields(Arrays.asList("doey", "fpnimtwuuhaueg")) - .withParameters("datawmnfeubtzjyrkwfu"), - new ColumnTransformer().withFields(Arrays.asList("hrrk", "umnqdurhzzfopu")) - .withParameters("dataqusvwlujopwnib")), - "feapdrbzyvbsuadu", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("qvfmwcad", "tgctxe")) - .withParameters("datavgwy"), - new ColumnTransformer().withFields(Arrays.asList("elfnzzryiz")).withParameters("dataxgdebxl"), - new ColumnTransformer().withFields(Arrays.asList("no", "irhpfabenq")) - .withParameters("datamwmgewayxfl"), - new ColumnTransformer().withFields(Arrays.asList("pjs")).withParameters("datahemhcucsqsnxfbx")), - "aqufqizjvppwoo", - Arrays.asList(new ColumnTransformer() - .withFields(Arrays.asList("kaxpfobkzhmh", "dqltdel", "qrojadhfztlray", "rkgzkyhudbkuw")) - .withParameters("dataqxlcweakfecjvx")), - "cwlo", + .withTransformerParams(mapOf("cxn", Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("yjmjjxizxpxhnzls", "ekcttgzkjtyqpdwa", "egh")) - .withParameters("dataldsvc"), - new ColumnTransformer().withFields(Arrays.asList("iahuqymjzucw", "mejjqhddwvmq")) - .withParameters("datayookyfozkbnzxby"), - new ColumnTransformer().withFields(Arrays.asList("pgaixwrgrkkderf", "swqi", "wepwoggg")) - .withParameters("datawnxhtf"), + new ColumnTransformer().withFields(Arrays.asList("lmcskyk", "fuofixcnpcfykkp")) + .withParameters("\"datacpawmp\""), + new ColumnTransformer().withFields(Arrays.asList("dpwrp", "fpcfjf")) + .withParameters("\"datalgzawkgyepeyamnn\""), + new ColumnTransformer().withFields(Arrays.asList("diawpzxkzr", "tmkctdhuosgwqpsq")) + .withParameters("\"datai\""), new ColumnTransformer() - .withFields(Arrays.asList("bsudzpgchzpgfqu", "jdjxhzghgo", "kynrceqavf", "bdfmm")) - .withParameters("datadnajuopjyyqmkwlh")))) - .withEnableDnnFeaturization(false)); + .withFields(Arrays.asList("dvqgcnbhcbmjkz", "ibniynts", "jmfmeftvhkm", "ogjrhskbwgm")) + .withParameters("\"datarulcfogx\"")), + "xbaizab", + Arrays.asList( + new ColumnTransformer().withFields(Arrays.asList("fdz", "c", "uzfwo", "wakukzkdtzxs")) + .withParameters("\"datadnlwglihezomuc\""), + new ColumnTransformer().withFields(Arrays.asList("isnionetbzdrdpue")) + .withParameters("\"datakgtlzl\""), + new ColumnTransformer().withFields(Arrays.asList("lxcznn", "zkbnbmxl", "mwt")) + .withParameters("\"dataeqzusitoqcahfs\""), + new ColumnTransformer().withFields(Arrays.asList("mlree", "rfwss", "vlcwlisolntfxxc", "qmipfj")) + .withParameters("\"dataoygizmsh\"")), + "y", + Arrays.asList(new ColumnTransformer().withFields(Arrays.asList("gsk")).withParameters("\"datao\""), + new ColumnTransformer().withFields(Arrays.asList("zjsjzn")).withParameters("\"dataxqqm\""), + new ColumnTransformer().withFields(Arrays.asList("aydhf", "zocxmtfshksnyzm")) + .withParameters("\"dataamwbwmbnlslcef\""), + new ColumnTransformer().withFields(Arrays.asList("ktwtk")).withParameters("\"datahlpfliw\""))))) + .withLimitSettings(new TableVerticalLimitSettings().withEnableEarlyTermination(false) + .withExitScore(81.65498880969054D) + .withMaxConcurrentTrials(681106883) + .withMaxCoresPerTrial(102330607) + .withMaxTrials(930236025) + .withTimeout(Duration.parse("PT137H17M38S")) + .withTrialTimeout(Duration.parse("PT160H32M"))) + .withNCrossValidations(new NCrossValidations()) + .withTestData( + new MLTableJobInput().withDescription("c").withMode(InputDeliveryMode.EVAL_MOUNT).withUri("fztsi")) + .withTestDataSize(36.58338434051356D) + .withValidationData(new MLTableJobInput().withDescription("uihyeseuugcig") + .withMode(InputDeliveryMode.EVAL_MOUNT) + .withUri("hfym")) + .withValidationDataSize(62.206943732663355D) + .withWeightColumnName("mgbvmtdwrqbe") + .withPositiveLabel("nfvegl") + .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) + .withTrainingSettings(new ClassificationTrainingSettings().withEnableDnnTraining(true) + .withEnableModelExplainability(false) + .withEnableOnnxCompatibleModels(true) + .withEnableStackEnsemble(false) + .withEnableVoteEnsemble(false) + .withEnsembleModelDownloadTimeout(Duration.parse("PT143H46M12S")) + .withStackEnsembleSettings(new StackEnsembleSettings().withStackMetaLearnerKWargs("\"datauhbcak\"") + .withStackMetaLearnerTrainPercentage(92.20832311711192D) + .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) + .withAllowedTrainingAlgorithms( + Arrays.asList(ClassificationModels.SGD, ClassificationModels.RANDOM_FOREST, + ClassificationModels.EXTREME_RANDOM_TREES, ClassificationModels.XGBOOST_CLASSIFIER)) + .withBlockedTrainingAlgorithms( + Arrays.asList(ClassificationModels.KNN, ClassificationModels.LINEAR_SVM))); model = BinaryData.fromObject(model).toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("rmimrljdpoqfxyem", model.trainingData().description()); - Assertions.assertEquals("dtkwppth", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ftb", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.84074496097085D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(true, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H37M10S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.XGBOOST_CLASSIFIER, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("sstciv", model.positiveLabel()); - Assertions.assertEquals(636720393, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT55H19M43S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT42H27M16S"), model.limitSettings().timeout()); - Assertions.assertEquals(1561472375, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1179315377, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(20.777247401023292D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("xrkemjpequlrl", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("jtirjwayhicqq", model.weightColumnName()); - Assertions.assertEquals("lvlize", model.validationData().description()); - Assertions.assertEquals("v", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("dyfhb", model.testData().description()); - Assertions.assertEquals("biabvnsrgekz", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(71.86910773602595D, model.validationDataSize()); - Assertions.assertEquals(54.066554814118874D, model.testDataSize()); - Assertions.assertEquals("kluxxrwzobuzmsxg", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, + Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); + Assertions.assertEquals("whrjsdmmazdnck", model.targetColumnName()); + Assertions.assertEquals("zqpxzbawkikcd", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); + Assertions.assertEquals("jpg", model.trainingData().uri()); + Assertions.assertEquals("zox", model.cvSplitColumnNames().get(0)); + Assertions.assertEquals("uuzhw", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.HASH_ONE_HOT_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("qjsgyzst", model.featurizationSettings().columnNameAndTypes().get("jrz")); - Assertions.assertEquals("gbnvt", - model.featurizationSettings().transformerParams().get("ttoztj").get(0).fields().get(0)); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals("ahwkxjjm", model.featurizationSettings().columnNameAndTypes().get("tnlmsoodtmvecdhd")); + Assertions.assertFalse(model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); + Assertions.assertEquals("lmcskyk", + model.featurizationSettings().transformerParams().get("cxn").get(0).fields().get(0)); + Assertions.assertFalse(model.limitSettings().enableEarlyTermination()); + Assertions.assertEquals(81.65498880969054D, model.limitSettings().exitScore()); + Assertions.assertEquals(681106883, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(102330607, model.limitSettings().maxCoresPerTrial()); + Assertions.assertEquals(930236025, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT137H17M38S"), model.limitSettings().timeout()); + Assertions.assertEquals(Duration.parse("PT160H32M"), model.limitSettings().trialTimeout()); + Assertions.assertEquals("c", model.testData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); + Assertions.assertEquals("fztsi", model.testData().uri()); + Assertions.assertEquals(36.58338434051356D, model.testDataSize()); + Assertions.assertEquals("uihyeseuugcig", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); + Assertions.assertEquals("hfym", model.validationData().uri()); + Assertions.assertEquals(62.206943732663355D, model.validationDataSize()); + Assertions.assertEquals("mgbvmtdwrqbe", model.weightColumnName()); + Assertions.assertEquals("nfvegl", model.positiveLabel()); + Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); + Assertions.assertTrue(model.trainingSettings().enableDnnTraining()); + Assertions.assertFalse(model.trainingSettings().enableModelExplainability()); + Assertions.assertTrue(model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertFalse(model.trainingSettings().enableStackEnsemble()); + Assertions.assertFalse(model.trainingSettings().enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT143H46M12S"), + model.trainingSettings().ensembleModelDownloadTimeout()); + Assertions.assertEquals(92.20832311711192D, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); + Assertions.assertEquals(ClassificationModels.SGD, model.trainingSettings().allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ClassificationModels.KNN, model.trainingSettings().blockedTrainingAlgorithms().get(0)); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java index 1b6542b32fb9..2b37cda99d1c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,50 +17,47 @@ public final class ClassificationTrainingSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClassificationTrainingSettings model = BinaryData.fromString( - "{\"allowedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"DecisionTree\",\"KNN\",\"SVM\"],\"blockedTrainingAlgorithms\":[\"SGD\",\"LogisticRegression\",\"XGBoostClassifier\",\"LinearSVM\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMRegressor\",\"stackMetaLearnerTrainPercentage\":99.81987601096077,\"stackMetaLearnerKWargs\":\"dataqcnrrfijhggabqb\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT110H9M4S\",\"enableModelExplainability\":true,\"enableDnnTraining\":false}") + "{\"allowedTrainingAlgorithms\":[\"MultinomialNaiveBayes\",\"XGBoostClassifier\",\"ExtremeRandomTrees\"],\"blockedTrainingAlgorithms\":[\"DecisionTree\",\"GradientBoosting\"],\"enableDnnTraining\":true,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT17H16M58S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"\\\"dataveqelsbfvds\\\"\",\"stackMetaLearnerTrainPercentage\":17.299453189517877,\"stackMetaLearnerType\":\"LogisticRegression\"}}") .toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, + Assertions.assertTrue(model.enableDnnTraining()); + Assertions.assertTrue(model.enableModelExplainability()); + Assertions.assertTrue(model.enableOnnxCompatibleModels()); + Assertions.assertTrue(model.enableStackEnsemble()); + Assertions.assertTrue(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT17H16M58S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(17.299453189517877D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(99.81987601096077D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT110H9M4S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.blockedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, model.allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ClassificationModels.DECISION_TREE, model.blockedTrainingAlgorithms().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ClassificationTrainingSettings model - = new ClassificationTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR) - .withStackMetaLearnerTrainPercentage(99.81987601096077D) - .withStackMetaLearnerKWargs("dataqcnrrfijhggabqb")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT110H9M4S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.EXTREME_RANDOM_TREES, - ClassificationModels.DECISION_TREE, ClassificationModels.KNN, ClassificationModels.SVM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(ClassificationModels.SGD, ClassificationModels.LOGISTIC_REGRESSION, - ClassificationModels.XGBOOST_CLASSIFIER, ClassificationModels.LINEAR_SVM)); + ClassificationTrainingSettings model = new ClassificationTrainingSettings().withEnableDnnTraining(true) + .withEnableModelExplainability(true) + .withEnableOnnxCompatibleModels(true) + .withEnableStackEnsemble(true) + .withEnableVoteEnsemble(true) + .withEnsembleModelDownloadTimeout(Duration.parse("PT17H16M58S")) + .withStackEnsembleSettings(new StackEnsembleSettings().withStackMetaLearnerKWargs("\"dataveqelsbfvds\"") + .withStackMetaLearnerTrainPercentage(17.299453189517877D) + .withStackMetaLearnerType(StackMetaLearnerType.LOGISTIC_REGRESSION)) + .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, + ClassificationModels.XGBOOST_CLASSIFIER, ClassificationModels.EXTREME_RANDOM_TREES)) + .withBlockedTrainingAlgorithms( + Arrays.asList(ClassificationModels.DECISION_TREE, ClassificationModels.GRADIENT_BOOSTING)); model = BinaryData.fromObject(model).toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, + Assertions.assertTrue(model.enableDnnTraining()); + Assertions.assertTrue(model.enableModelExplainability()); + Assertions.assertTrue(model.enableOnnxCompatibleModels()); + Assertions.assertTrue(model.enableStackEnsemble()); + Assertions.assertTrue(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT17H16M58S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(17.299453189517877D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(99.81987601096077D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT110H9M4S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.blockedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, model.allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ClassificationModels.DECISION_TREE, model.blockedTrainingAlgorithms().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java index 46ffbae7342f..5e53246f38f1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,24 +15,24 @@ public final class ClusterUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpdateParameters model = BinaryData.fromString( - "{\"properties\":{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":932562427,\"minNodeCount\":2103137599,\"nodeIdleTimeBeforeScaleDown\":\"PT10H3M4S\"}}}}") + "{\"properties\":{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":487305723,\"minNodeCount\":37155283,\"nodeIdleTimeBeforeScaleDown\":\"PT239H46M31S\"}}}}") .toObject(ClusterUpdateParameters.class); - Assertions.assertEquals(932562427, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(2103137599, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT10H3M4S"), + Assertions.assertEquals(487305723, model.properties().scaleSettings().maxNodeCount()); + Assertions.assertEquals(37155283, model.properties().scaleSettings().minNodeCount()); + Assertions.assertEquals(Duration.parse("PT239H46M31S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterUpdateParameters model = new ClusterUpdateParameters().withProperties( - new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(932562427) - .withMinNodeCount(2103137599) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT10H3M4S")))); + new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(487305723) + .withMinNodeCount(37155283) + .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT239H46M31S")))); model = BinaryData.fromObject(model).toObject(ClusterUpdateParameters.class); - Assertions.assertEquals(932562427, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(2103137599, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT10H3M4S"), + Assertions.assertEquals(487305723, model.properties().scaleSettings().maxNodeCount()); + Assertions.assertEquals(37155283, model.properties().scaleSettings().minNodeCount()); + Assertions.assertEquals(Duration.parse("PT239H46M31S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java index 6b6e4484b286..9ede0211c525 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,24 +15,24 @@ public final class ClusterUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ClusterUpdateProperties model = BinaryData.fromString( - "{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":2125596553,\"minNodeCount\":236135695,\"nodeIdleTimeBeforeScaleDown\":\"PT176H56M43S\"}}}") + "{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":514190141,\"minNodeCount\":737616159,\"nodeIdleTimeBeforeScaleDown\":\"PT227H44M41S\"}}}") .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(2125596553, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(236135695, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT176H56M43S"), + Assertions.assertEquals(514190141, model.properties().scaleSettings().maxNodeCount()); + Assertions.assertEquals(737616159, model.properties().scaleSettings().minNodeCount()); + Assertions.assertEquals(Duration.parse("PT227H44M41S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ClusterUpdateProperties model = new ClusterUpdateProperties().withProperties( - new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(2125596553) - .withMinNodeCount(236135695) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT176H56M43S")))); + new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(514190141) + .withMinNodeCount(737616159) + .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT227H44M41S")))); model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(2125596553, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(236135695, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT176H56M43S"), + Assertions.assertEquals(514190141, model.properties().scaleSettings().maxNodeCount()); + Assertions.assertEquals(737616159, model.properties().scaleSettings().minNodeCount()); + Assertions.assertEquals(Duration.parse("PT227H44M41S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java index af80271d0e43..5c77b10fd425 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,27 +15,27 @@ public final class CodeContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CodeContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"buruvd\",\"nextVersion\":\"vsmzlxwab\",\"description\":\"oefki\",\"tags\":{\"gkfbtndoaong\":\"tpuqujmq\",\"tcje\":\"jcntuj\",\"zfoqouicybxar\":\"ftwwaezkojvdc\"},\"properties\":{\"x\":\"zuf\",\"khazxkhnzbonlwn\":\"iqopidoamciod\",\"szzcmrvexztv\":\"oegokdwbwh\",\"gsfraoyzkoow\":\"t\"}},\"id\":\"mnguxawqaldsyu\",\"name\":\"ximerqfobwyznk\",\"type\":\"ykutwpf\"}") + "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"cjooxdjebwpucwwf\",\"nextVersion\":\"vbvmeu\",\"description\":\"ivyhzceuojgjrwju\",\"properties\":{\"dytdxwitx\":\"twm\",\"qwgxhniskx\":\"rjaw\"},\"tags\":{\"gklwn\":\"py\",\"vylwzbtdhxuj\":\"nhjdauw\",\"veual\":\"nbmpowuwprzq\",\"wsrtjriplrbpbe\":\"pjmkhfxobbc\"}},\"id\":\"ghfg\",\"name\":\"lcgwxzvlvqh\",\"type\":\"kbegibt\"}") .toObject(CodeContainerInner.class); - Assertions.assertEquals("oefki", model.properties().description()); - Assertions.assertEquals("tpuqujmq", model.properties().tags().get("gkfbtndoaong")); - Assertions.assertEquals("zuf", model.properties().properties().get("x")); - Assertions.assertEquals(true, model.properties().isArchived()); + Assertions.assertEquals("ivyhzceuojgjrwju", model.properties().description()); + Assertions.assertEquals("twm", model.properties().properties().get("dytdxwitx")); + Assertions.assertEquals("py", model.properties().tags().get("gklwn")); + Assertions.assertTrue(model.properties().isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CodeContainerInner model - = new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("oefki") - .withTags(mapOf("gkfbtndoaong", "tpuqujmq", "tcje", "jcntuj", "zfoqouicybxar", "ftwwaezkojvdc")) - .withProperties(mapOf("x", "zuf", "khazxkhnzbonlwn", "iqopidoamciod", "szzcmrvexztv", "oegokdwbwh", - "gsfraoyzkoow", "t")) + = new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("ivyhzceuojgjrwju") + .withProperties(mapOf("dytdxwitx", "twm", "qwgxhniskx", "rjaw")) + .withTags(mapOf("gklwn", "py", "vylwzbtdhxuj", "nhjdauw", "veual", "nbmpowuwprzq", "wsrtjriplrbpbe", + "pjmkhfxobbc")) .withIsArchived(true)); model = BinaryData.fromObject(model).toObject(CodeContainerInner.class); - Assertions.assertEquals("oefki", model.properties().description()); - Assertions.assertEquals("tpuqujmq", model.properties().tags().get("gkfbtndoaong")); - Assertions.assertEquals("zuf", model.properties().properties().get("x")); - Assertions.assertEquals(true, model.properties().isArchived()); + Assertions.assertEquals("ivyhzceuojgjrwju", model.properties().description()); + Assertions.assertEquals("twm", model.properties().properties().get("dytdxwitx")); + Assertions.assertEquals("py", model.properties().tags().get("gklwn")); + Assertions.assertTrue(model.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java index 8a1bf482c65e..0593002cefa6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,25 +14,25 @@ public final class CodeContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CodeContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"r\",\"nextVersion\":\"dsnfdsdoakgtdl\",\"description\":\"kzevdlhewpusds\",\"tags\":{\"kufgmj\":\"vogvbbejdcngqqmo\",\"grtwae\":\"rwr\",\"zkopb\":\"u\"},\"properties\":{\"hziuiefozbhdms\":\"rfdwoyu\",\"zqhof\":\"l\"}}") + "{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"wwaloayqcgwrt\",\"nextVersion\":\"uzgwyzmhtx\",\"description\":\"gmtsavjcbpwxqpsr\",\"properties\":{\"wmdyvxqtay\":\"tguvriuhp\",\"ibycno\":\"iwwroyqbexrmc\"},\"tags\":{\"zhpvgqzcjrvxd\":\"nmefqsgzvahapj\"}}") .toObject(CodeContainerProperties.class); - Assertions.assertEquals("kzevdlhewpusds", model.description()); - Assertions.assertEquals("vogvbbejdcngqqmo", model.tags().get("kufgmj")); - Assertions.assertEquals("rfdwoyu", model.properties().get("hziuiefozbhdms")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("gmtsavjcbpwxqpsr", model.description()); + Assertions.assertEquals("tguvriuhp", model.properties().get("wmdyvxqtay")); + Assertions.assertEquals("nmefqsgzvahapj", model.tags().get("zhpvgqzcjrvxd")); + Assertions.assertTrue(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CodeContainerProperties model = new CodeContainerProperties().withDescription("kzevdlhewpusds") - .withTags(mapOf("kufgmj", "vogvbbejdcngqqmo", "grtwae", "rwr", "zkopb", "u")) - .withProperties(mapOf("hziuiefozbhdms", "rfdwoyu", "zqhof", "l")) - .withIsArchived(false); + CodeContainerProperties model = new CodeContainerProperties().withDescription("gmtsavjcbpwxqpsr") + .withProperties(mapOf("wmdyvxqtay", "tguvriuhp", "ibycno", "iwwroyqbexrmc")) + .withTags(mapOf("zhpvgqzcjrvxd", "nmefqsgzvahapj")) + .withIsArchived(true); model = BinaryData.fromObject(model).toObject(CodeContainerProperties.class); - Assertions.assertEquals("kzevdlhewpusds", model.description()); - Assertions.assertEquals("vogvbbejdcngqqmo", model.tags().get("kufgmj")); - Assertions.assertEquals("rfdwoyu", model.properties().get("hziuiefozbhdms")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("gmtsavjcbpwxqpsr", model.description()); + Assertions.assertEquals("tguvriuhp", model.properties().get("wmdyvxqtay")); + Assertions.assertEquals("nmefqsgzvahapj", model.tags().get("zhpvgqzcjrvxd")); + Assertions.assertTrue(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java index 0465407bf61c..3a1bd155b8c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java @@ -1,67 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.CodeContainerResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class CodeContainerResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CodeContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"mzqa\",\"nextVersion\":\"rmnjijpx\",\"description\":\"q\",\"tags\":{\"yxbaaabjyvayf\":\"fn\",\"exn\":\"imrzrtuzqog\",\"zsoibjudpfrxtr\":\"vfdnwnwmewzsyyce\",\"ytdw\":\"hzv\"},\"properties\":{\"vpdtiirqtdqoa\":\"rqubpaxhexiil\",\"eptra\":\"oruzfgsquyfxrxx\"}},\"id\":\"jezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"nuj\",\"nextVersion\":\"mmsbvdkcrodtjin\",\"description\":\"jlfltkacjvefkdlf\",\"tags\":{\"qblylsyxkqj\":\"ggkfpagaowpul\",\"gxsds\":\"sjervti\"},\"properties\":{\"nqicvinvkjjxdxrb\":\"mpsbzkfzbeyv\"}},\"id\":\"kzclewyh\",\"name\":\"lw\",\"type\":\"aztz\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"kwyfzqwhxxbuyqax\",\"nextVersion\":\"eqz\",\"description\":\"priolx\",\"tags\":{\"ncwsob\":\"altol\",\"pfuvglsbjjca\":\"wcsdbnwdcfhucq\",\"t\":\"vxb\"},\"properties\":{\"lxqtvcofudfl\":\"utncorm\"}},\"id\":\"gj\",\"name\":\"bgdknnqv\",\"type\":\"aznqntoru\"}],\"nextLink\":\"gsahmkycgrauw\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"xcto\",\"nextVersion\":\"bkdmo\",\"description\":\"postmgrcfbunrm\",\"properties\":{\"jy\":\"hhkxbp\",\"u\":\"jhxxjyn\"},\"tags\":{\"szjfauvjfdxxivet\":\"krtswbxqz\"}},\"id\":\"cqaqtdoqmcbx\",\"name\":\"wvxysl\",\"type\":\"bhsfxob\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"mpew\",\"nextVersion\":\"fbkrvrnsvs\",\"description\":\"johxcrsb\",\"properties\":{\"wbhsqfsub\":\"asrru\",\"rxbpyb\":\"gjb\",\"twss\":\"rfbjf\"},\"tags\":{\"vwpm\":\"tpvjzbexilzznfqq\",\"wqytjrybnwjewgdr\":\"taruoujmkcj\",\"doy\":\"ervnaenqpehi\"}},\"id\":\"ifthnz\",\"name\":\"ndslgnayqigynduh\",\"type\":\"vhqlkthumaqo\"},{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"uie\",\"nextVersion\":\"gccymvaolpssl\",\"description\":\"fmmdnbbg\",\"properties\":{\"sadbz\":\"swiydmcwyhzdx\",\"dvxzbncblylpst\":\"nvdfznuda\",\"rsc\":\"bhhxsrzdzuc\"},\"tags\":{\"wjmy\":\"nevf\"}},\"id\":\"dsslswt\",\"name\":\"weriofzpyqsem\",\"type\":\"abnetshh\"},{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"lvwiwubmwmbesl\",\"nextVersion\":\"k\",\"description\":\"tppjflcx\",\"properties\":{\"qqkdltfzxmhhvhgu\":\"okonzmnsikvmkqz\",\"xtibqdxbxwakbog\":\"eodkwobda\",\"iplbpodxunkbebxm\":\"xndlkzgxhu\"},\"tags\":{\"koievseo\":\"yntwlrbq\",\"wzizxbmpgcjefuzm\":\"gqrlltmuwla\"}},\"id\":\"pbttdum\",\"name\":\"rp\",\"type\":\"xe\"}],\"nextLink\":\"nzbtbhj\"}") .toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals("fn", model.value().get(0).properties().tags().get("yxbaaabjyvayf")); - Assertions.assertEquals("rqubpaxhexiil", model.value().get(0).properties().properties().get("vpdtiirqtdqoa")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("gsahmkycgrauw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerResourceArmPaginatedResult model - = new CodeContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("q") - .withTags(mapOf("yxbaaabjyvayf", "fn", "exn", "imrzrtuzqog", "zsoibjudpfrxtr", "vfdnwnwmewzsyyce", - "ytdw", "hzv")) - .withProperties(mapOf("vpdtiirqtdqoa", "rqubpaxhexiil", "eptra", "oruzfgsquyfxrxx")) - .withIsArchived(false)), - new CodeContainerInner() - .withProperties(new CodeContainerProperties().withDescription("jlfltkacjvefkdlf") - .withTags(mapOf("qblylsyxkqj", "ggkfpagaowpul", "gxsds", "sjervti")) - .withProperties(mapOf("nqicvinvkjjxdxrb", "mpsbzkfzbeyv")) - .withIsArchived(false)), - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("priolx") - .withTags(mapOf("ncwsob", "altol", "pfuvglsbjjca", "wcsdbnwdcfhucq", "t", "vxb")) - .withProperties(mapOf("lxqtvcofudfl", "utncorm")) - .withIsArchived(true)))) - .withNextLink("gsahmkycgrauw"); - model = BinaryData.fromObject(model).toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals("fn", model.value().get(0).properties().tags().get("yxbaaabjyvayf")); - Assertions.assertEquals("rqubpaxhexiil", model.value().get(0).properties().properties().get("vpdtiirqtdqoa")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("gsahmkycgrauw", 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; + Assertions.assertEquals("postmgrcfbunrm", model.value().get(0).properties().description()); + Assertions.assertEquals("hhkxbp", model.value().get(0).properties().properties().get("jy")); + Assertions.assertEquals("krtswbxqz", model.value().get(0).properties().tags().get("szjfauvjfdxxivet")); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("nzbtbhj", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java index 35f77adec0c6..aa80e95404d2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.CodeContainer; @@ -24,29 +24,28 @@ public final class CodeContainersCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"mluyrlkpismmr\",\"nextVersion\":\"jpjthizsabcylzz\",\"description\":\"tumzenkrdruesxe\",\"tags\":{\"qqeetsqac\":\"xoibdctjwfeb\",\"yyraiaiidkewqwa\":\"czfro\",\"fngfpilloir\":\"ptldddorzljhnxfk\",\"bktuqnbcjk\":\"vx\"},\"properties\":{\"inlic\":\"mznwwtkuytwii\",\"yzqke\":\"moyoioxdwff\",\"uecokyduqzusc\":\"curr\",\"htekxnvkdvc\":\"lbqv\"}},\"id\":\"wrd\",\"name\":\"ddddwzdlbbcztam\",\"type\":\"yrkwsthpivocf\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"ozvcd\",\"nextVersion\":\"ssy\",\"description\":\"wrybi\",\"properties\":{\"uvtzijrdlxba\":\"otjn\"},\"tags\":{\"pbdr\":\"cpkvltjfdzfm\",\"jxnnnoz\":\"i\",\"obqehspshti\":\"nhvdtuoam\"}},\"id\":\"zfeoctrzjw\",\"name\":\"zwckzebmbvwdxgyy\",\"type\":\"mxqzl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CodeContainer response = manager.codeContainers() - .define("uvqbeyxwrmupzpe") - .withExistingWorkspace("gynsixgzbbnug", "quarb") - .withProperties(new CodeContainerProperties().withDescription("gen") - .withTags(mapOf("ppgl", "ybepsihzqieoy", "zlycxlubrukhqb", "jsfgbyyts")) - .withProperties(mapOf("fjjfexuvsveam", "rbdkgqdmvvvj", "io", "eauuuvh", "mtyosdpxtsdy", - "glmufzuuyszhae", "wxiavwmixaqgfpu", "fgefvwgwp")) + .define("awpewajccsdjuzm") + .withExistingWorkspace("gbiwpgopqlktthb", "rrmtrxgjmpdvrjz") + .withProperties(new CodeContainerProperties().withDescription("r") + .withProperties(mapOf("qlrzhtocjzfp", "hboigzxko", "jwgiitvjcmimbmsw", "exuvatzwn")) + .withTags(mapOf("oypplo", "bb", "gva", "aqrbkpozffsob", "p", "crqaxlmbrtvtgolm")) .withIsArchived(true)) .create(); - Assertions.assertEquals("tumzenkrdruesxe", response.properties().description()); - Assertions.assertEquals("xoibdctjwfeb", response.properties().tags().get("qqeetsqac")); - Assertions.assertEquals("mznwwtkuytwii", response.properties().properties().get("inlic")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("wrybi", response.properties().description()); + Assertions.assertEquals("otjn", response.properties().properties().get("uvtzijrdlxba")); + Assertions.assertEquals("cpkvltjfdzfm", response.properties().tags().get("pbdr")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java index aa77dc1ed8e2..c36f088b6fc7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.codeContainers() - .deleteWithResponse("glafnfgazaghddc", "zwxuxorrutuhvem", "xlssolqypvw", com.azure.core.util.Context.NONE); + manager.codeContainers().deleteWithResponse("xhwis", "so", "db", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java index ebe02e07238a..2e476019a83f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.CodeContainer; @@ -21,22 +21,22 @@ public final class CodeContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"uod\",\"nextVersion\":\"gqu\",\"description\":\"nyxpmqd\",\"tags\":{\"sq\":\"iiontqikdipk\",\"tacvs\":\"uzabrsoihataj\",\"adohsj\":\"nssxylsui\",\"qqnzk\":\"iehkxgfu\"},\"properties\":{\"sxipdnlbyit\":\"q\"}},\"id\":\"pwwgzeylzp\",\"name\":\"imxacrkt\",\"type\":\"o\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"dclt\",\"nextVersion\":\"ieileemw\",\"description\":\"ehldopj\",\"properties\":{\"sgikkmibnmdpid\":\"bb\"},\"tags\":{\"qa\":\"tgzwmzhcmrl\",\"nmbj\":\"styzavkyjjlu\",\"optythctoxo\":\"bngzldvvd\"}},\"id\":\"mqnerwh\",\"name\":\"mvidsssfzsgzgusp\",\"type\":\"jomeq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CodeContainer response = manager.codeContainers() - .getWithResponse("lxo", "vrkqv", "vgdojcvzfcmxmjp", com.azure.core.util.Context.NONE) + .getWithResponse("xznirnygti", "kg", "obmkphvdlorxz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nyxpmqd", response.properties().description()); - Assertions.assertEquals("iiontqikdipk", response.properties().tags().get("sq")); - Assertions.assertEquals("q", response.properties().properties().get("sxipdnlbyit")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("ehldopj", response.properties().description()); + Assertions.assertEquals("bb", response.properties().properties().get("sgikkmibnmdpid")); + Assertions.assertEquals("tgzwmzhcmrl", response.properties().tags().get("qa")); + Assertions.assertTrue(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java index 59200a0c881b..e8fd80771b99 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.CodeContainer; @@ -22,21 +22,21 @@ public final class CodeContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"kbzltnowpajfhx\",\"nextVersion\":\"ubbzadzglmuuzps\",\"description\":\"sypxmul\",\"tags\":{\"p\":\"rerk\",\"bdjkmnxsggnow\":\"fjxkbywsbuqfm\"},\"properties\":{\"hbtyc\":\"vdbrdvsv\",\"rcthypepxs\":\"lkusgiik\"}},\"id\":\"rdis\",\"name\":\"sdvkym\",\"type\":\"tcwmivoxgzeg\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"wabkitnipaptgv\",\"nextVersion\":\"qyjukkajn\",\"description\":\"wltonopffem\",\"properties\":{\"hzbfcdikqn\":\"hhawba\",\"y\":\"ydgzfoiqzsusp\"},\"tags\":{\"af\":\"lqeronz\",\"uwdbvytqav\":\"xf\"}},\"id\":\"ymkd\",\"name\":\"u\",\"type\":\"xlvzpfdka\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.codeContainers().list("r", "tqnk", "qjftvltj", com.azure.core.util.Context.NONE); + PagedIterable response = manager.codeContainers() + .list("wjsba", "xaxtuxirppbiichl", "gkvuixwonkr", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sypxmul", response.iterator().next().properties().description()); - Assertions.assertEquals("rerk", response.iterator().next().properties().tags().get("p")); - Assertions.assertEquals("vdbrdvsv", response.iterator().next().properties().properties().get("hbtyc")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("wltonopffem", response.iterator().next().properties().description()); + Assertions.assertEquals("hhawba", response.iterator().next().properties().properties().get("hzbfcdikqn")); + Assertions.assertEquals("lqeronz", response.iterator().next().properties().tags().get("af")); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java index 3bb75c6fd365..13956b93a5c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,11 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.codeVersions() - .deleteWithResponse("wowqsnixxwdqz", "rvuk", "zkmxbh", "p", com.azure.core.util.Context.NONE); + .deleteWithResponse("xqwqykmvugf", "hdho", "urhcnnkvth", "tamvmbgyvxhfmuhk", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java index aaa1a16623a0..d4797f624a88 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; @@ -26,13 +26,13 @@ public void testPublish() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.codeVersions() - .publish("mq", "vbksksmqm", "owrmhm", "fhfutjyxntmgtg", - new DestinationAsset().withRegistryName("aem") - .withDestinationName("gcaxjymdqrfvgicx") - .withDestinationVersion("llqgnsydksvj"), + .publish("hgykzovstvymdqa", "mqm", "rnzgubqkfnox", "voyjdgfkrq", + new DestinationAsset().withDestinationName("rvpa") + .withDestinationVersion("rdeexwejuguvnxb") + .withRegistryName("pzurnzoy"), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CognitiveServicesSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CognitiveServicesSkuTests.java new file mode 100644 index 000000000000..560f8ef65800 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CognitiveServicesSkuTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku; +import org.junit.jupiter.api.Assertions; + +public final class CognitiveServicesSkuTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CognitiveServicesSku model = BinaryData.fromString( + "{\"capacity\":796050777,\"family\":\"mkjozkrwf\",\"name\":\"iodjp\",\"size\":\"w\",\"tier\":\"dpvwryoqpsoaccta\"}") + .toObject(CognitiveServicesSku.class); + Assertions.assertEquals(796050777, model.capacity()); + Assertions.assertEquals("mkjozkrwf", model.family()); + Assertions.assertEquals("iodjp", model.name()); + Assertions.assertEquals("w", model.size()); + Assertions.assertEquals("dpvwryoqpsoaccta", model.tier()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CognitiveServicesSku model = new CognitiveServicesSku().withCapacity(796050777) + .withFamily("mkjozkrwf") + .withName("iodjp") + .withSize("w") + .withTier("dpvwryoqpsoaccta"); + model = BinaryData.fromObject(model).toObject(CognitiveServicesSku.class); + Assertions.assertEquals(796050777, model.capacity()); + Assertions.assertEquals("mkjozkrwf", model.family()); + Assertions.assertEquals("iodjp", model.name()); + Assertions.assertEquals("w", model.size()); + Assertions.assertEquals("dpvwryoqpsoaccta", model.tier()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java index 297698e7bdbd..7ccd14117b17 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,24 +13,24 @@ public final class CollectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Collection model = BinaryData.fromString( - "{\"samplingRate\":14.031026456945018,\"dataCollectionMode\":\"Disabled\",\"dataId\":\"lmgnlqxsjx\",\"clientId\":\"lexhv\"}") + "{\"clientId\":\"m\",\"dataCollectionMode\":\"Enabled\",\"dataId\":\"kmikpaz\",\"samplingRate\":91.17733727570042}") .toObject(Collection.class); - Assertions.assertEquals(14.031026456945018D, model.samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, model.dataCollectionMode()); - Assertions.assertEquals("lmgnlqxsjx", model.dataId()); - Assertions.assertEquals("lexhv", model.clientId()); + Assertions.assertEquals("m", model.clientId()); + Assertions.assertEquals(DataCollectionMode.ENABLED, model.dataCollectionMode()); + Assertions.assertEquals("kmikpaz", model.dataId()); + Assertions.assertEquals(91.17733727570042D, model.samplingRate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Collection model = new Collection().withSamplingRate(14.031026456945018D) - .withDataCollectionMode(DataCollectionMode.DISABLED) - .withDataId("lmgnlqxsjx") - .withClientId("lexhv"); + Collection model = new Collection().withClientId("m") + .withDataCollectionMode(DataCollectionMode.ENABLED) + .withDataId("kmikpaz") + .withSamplingRate(91.17733727570042D); model = BinaryData.fromObject(model).toObject(Collection.class); - Assertions.assertEquals(14.031026456945018D, model.samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, model.dataCollectionMode()); - Assertions.assertEquals("lmgnlqxsjx", model.dataId()); - Assertions.assertEquals("lexhv", model.clientId()); + Assertions.assertEquals("m", model.clientId()); + Assertions.assertEquals(DataCollectionMode.ENABLED, model.dataCollectionMode()); + Assertions.assertEquals("kmikpaz", model.dataId()); + Assertions.assertEquals(91.17733727570042D, model.samplingRate()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java index dc91a0dc1cc0..151ea9a1de6a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,19 @@ public final class ColumnTransformerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ColumnTransformer model = BinaryData.fromString( - "{\"fields\":[\"psdudgco\",\"zomehxlantolam\",\"bijux\",\"qllczipvwdtgckz\"],\"parameters\":\"dataiqdlratrkw\"}") + ColumnTransformer model = BinaryData + .fromString( + "{\"fields\":[\"j\",\"ojiunrlshxuknsyk\",\"toiboancdr\"],\"parameters\":\"\\\"dataanvxuldxonckb\\\"\"}") .toObject(ColumnTransformer.class); - Assertions.assertEquals("psdudgco", model.fields().get(0)); + Assertions.assertEquals("j", model.fields().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ColumnTransformer model = new ColumnTransformer() - .withFields(Arrays.asList("psdudgco", "zomehxlantolam", "bijux", "qllczipvwdtgckz")) - .withParameters("dataiqdlratrkw"); + ColumnTransformer model + = new ColumnTransformer().withFields(Arrays.asList("j", "ojiunrlshxuknsyk", "toiboancdr")) + .withParameters("\"dataanvxuldxonckb\""); model = BinaryData.fromObject(model).toObject(ColumnTransformer.class); - Assertions.assertEquals("psdudgco", model.fields().get(0)); + Assertions.assertEquals("j", model.fields().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java index 0798a96a7c14..9cefd8c15bad 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class CommandJobLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CommandJobLimits model = BinaryData.fromString("{\"jobLimitsType\":\"Command\",\"timeout\":\"PT211H51M18S\"}") + CommandJobLimits model = BinaryData.fromString("{\"jobLimitsType\":\"Command\",\"timeout\":\"PT17H54M3S\"}") .toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT211H51M18S"), model.timeout()); + Assertions.assertEquals(Duration.parse("PT17H54M3S"), model.timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CommandJobLimits model = new CommandJobLimits().withTimeout(Duration.parse("PT211H51M18S")); + CommandJobLimits model = new CommandJobLimits().withTimeout(Duration.parse("PT17H54M3S")); model = BinaryData.fromObject(model).toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT211H51M18S"), model.timeout()); + Assertions.assertEquals(Duration.parse("PT17H54M3S"), model.timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java index 8e73d1982e98..68b38d51f1d5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,26 +15,26 @@ public final class ComponentContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"phqamvdkfwynwcvt\",\"nextVersion\":\"kayh\",\"description\":\"nvyq\",\"tags\":{\"cjaesgvvs\":\"kzwpcnpw\",\"wygzlvdnkfxusem\":\"cyajguqf\",\"pfcqdp\":\"wzrmuh\"},\"properties\":{\"celve\":\"qvpsvuoymg\"}},\"id\":\"ypql\",\"name\":\"feo\",\"type\":\"erqwkyhkobopg\"}") + "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"kpj\",\"nextVersion\":\"qmt\",\"description\":\"ltmm\",\"properties\":{\"upkvipmdsc\":\"yeozphvwauyqncy\",\"totxhojujb\":\"xqupevzhf\",\"n\":\"pelmcuvhixbjxyf\"},\"tags\":{\"ujrywvtyl\":\"coolsttpkiwkkb\"}},\"id\":\"pncur\",\"name\":\"oiwiithtywub\",\"type\":\"cbihwqk\"}") .toObject(ComponentContainerInner.class); - Assertions.assertEquals("nvyq", model.properties().description()); - Assertions.assertEquals("kzwpcnpw", model.properties().tags().get("cjaesgvvs")); - Assertions.assertEquals("qvpsvuoymg", model.properties().properties().get("celve")); - Assertions.assertEquals(true, model.properties().isArchived()); + Assertions.assertEquals("ltmm", model.properties().description()); + Assertions.assertEquals("yeozphvwauyqncy", model.properties().properties().get("upkvipmdsc")); + Assertions.assertEquals("coolsttpkiwkkb", model.properties().tags().get("ujrywvtyl")); + Assertions.assertFalse(model.properties().isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComponentContainerInner model - = new ComponentContainerInner().withProperties(new ComponentContainerProperties().withDescription("nvyq") - .withTags(mapOf("cjaesgvvs", "kzwpcnpw", "wygzlvdnkfxusem", "cyajguqf", "pfcqdp", "wzrmuh")) - .withProperties(mapOf("celve", "qvpsvuoymg")) - .withIsArchived(true)); + ComponentContainerInner model = new ComponentContainerInner().withProperties(new ComponentContainerProperties() + .withDescription("ltmm") + .withProperties(mapOf("upkvipmdsc", "yeozphvwauyqncy", "totxhojujb", "xqupevzhf", "n", "pelmcuvhixbjxyf")) + .withTags(mapOf("ujrywvtyl", "coolsttpkiwkkb")) + .withIsArchived(false)); model = BinaryData.fromObject(model).toObject(ComponentContainerInner.class); - Assertions.assertEquals("nvyq", model.properties().description()); - Assertions.assertEquals("kzwpcnpw", model.properties().tags().get("cjaesgvvs")); - Assertions.assertEquals("qvpsvuoymg", model.properties().properties().get("celve")); - Assertions.assertEquals(true, model.properties().isArchived()); + Assertions.assertEquals("ltmm", model.properties().description()); + Assertions.assertEquals("yeozphvwauyqncy", model.properties().properties().get("upkvipmdsc")); + Assertions.assertEquals("coolsttpkiwkkb", model.properties().tags().get("ujrywvtyl")); + Assertions.assertFalse(model.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java index 8e0af55f95c0..289cc44b190d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,25 +14,26 @@ public final class ComponentContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"epbqpcrfkbw\",\"nextVersion\":\"snjvcdwxlpqekftn\",\"description\":\"tjsyin\",\"tags\":{\"gikdgsz\":\"qatmtdhtmdvy\"},\"properties\":{\"kj\":\"birryuzhl\"}}") + "{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"jchrdgoihxumw\",\"nextVersion\":\"ond\",\"description\":\"luudfdlwggytsb\",\"properties\":{\"seinqfiuf\":\"vvt\",\"rgnepttwqmsniffc\":\"qknp\",\"frddhcrati\":\"mqnrojlpijnkr\",\"zq\":\"zronasxift\"},\"tags\":{\"wesgogczh\":\"f\",\"lgnyhmo\":\"nnxk\",\"h\":\"sxkkg\"}}") .toObject(ComponentContainerProperties.class); - Assertions.assertEquals("tjsyin", model.description()); - Assertions.assertEquals("qatmtdhtmdvy", model.tags().get("gikdgsz")); - Assertions.assertEquals("birryuzhl", model.properties().get("kj")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("luudfdlwggytsb", model.description()); + Assertions.assertEquals("vvt", model.properties().get("seinqfiuf")); + Assertions.assertEquals("f", model.tags().get("wesgogczh")); + Assertions.assertFalse(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComponentContainerProperties model = new ComponentContainerProperties().withDescription("tjsyin") - .withTags(mapOf("gikdgsz", "qatmtdhtmdvy")) - .withProperties(mapOf("kj", "birryuzhl")) - .withIsArchived(true); + ComponentContainerProperties model = new ComponentContainerProperties().withDescription("luudfdlwggytsb") + .withProperties(mapOf("seinqfiuf", "vvt", "rgnepttwqmsniffc", "qknp", "frddhcrati", "mqnrojlpijnkr", "zq", + "zronasxift")) + .withTags(mapOf("wesgogczh", "f", "lgnyhmo", "nnxk", "h", "sxkkg")) + .withIsArchived(false); model = BinaryData.fromObject(model).toObject(ComponentContainerProperties.class); - Assertions.assertEquals("tjsyin", model.description()); - Assertions.assertEquals("qatmtdhtmdvy", model.tags().get("gikdgsz")); - Assertions.assertEquals("birryuzhl", model.properties().get("kj")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("luudfdlwggytsb", model.description()); + Assertions.assertEquals("vvt", model.properties().get("seinqfiuf")); + Assertions.assertEquals("f", model.tags().get("wesgogczh")); + Assertions.assertFalse(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java index 07d11a4d8a93..47b27634c49e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java @@ -1,63 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.ComponentContainerResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class ComponentContainerResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"mwutwbdsre\",\"nextVersion\":\"drhneuyow\",\"description\":\"d\",\"tags\":{\"ib\":\"i\"},\"properties\":{\"lfzxiavrmbzonoki\":\"gpikpzimejza\",\"rgz\":\"rjqc\"}},\"id\":\"rlazszrnw\",\"name\":\"iin\",\"type\":\"fpwpjylwbt\"},{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"cdhszf\",\"nextVersion\":\"fbgofeljagrqmqh\",\"description\":\"vriiio\",\"tags\":{\"fk\":\"lg\"},\"properties\":{\"ueluqhhahhxvrhmz\":\"sexso\",\"ughftqsx\":\"wpjgwws\",\"grjguufzd\":\"qxujxukndxd\"}},\"id\":\"yqtfihwh\",\"name\":\"otzi\",\"type\":\"gamv\"}],\"nextLink\":\"ho\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"dhqxvcx\",\"nextVersion\":\"rpdsof\",\"description\":\"hrnsvbu\",\"properties\":{\"ybycnunvj\":\"vz\",\"ikyzirtxdy\":\"rtkfawnopq\",\"ejnt\":\"x\"},\"tags\":{\"xtqmieoxor\":\"wgioilqukry\",\"havgrvk\":\"gufhyaomtbg\",\"jzhpjbibgjmfx\":\"fo\",\"cluyovwxnbkf\":\"mv\"}},\"id\":\"zxscyhwzdgirujb\",\"name\":\"bomvzzbtdcqv\",\"type\":\"niyujv\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"hfssnrb\",\"nextVersion\":\"efr\",\"description\":\"sgaojfmwncot\",\"properties\":{\"yczuhxacpq\":\"hirctymoxoftpipi\"},\"tags\":{\"yuspskas\":\"h\",\"amrsreuzv\":\"vlmfwdgzxulucv\",\"gxmrhublwp\":\"urisjnhnytxifqj\"}},\"id\":\"sutrgjup\",\"name\":\"uutpwoqhih\",\"type\":\"jqgwzp\"}],\"nextLink\":\"qntcypsxjvfoimwk\"}") .toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("i", model.value().get(0).properties().tags().get("ib")); - Assertions.assertEquals("gpikpzimejza", model.value().get(0).properties().properties().get("lfzxiavrmbzonoki")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("ho", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model - = new ComponentContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new ComponentContainerInner().withProperties(new ComponentContainerProperties().withDescription("d") - .withTags(mapOf("ib", "i")) - .withProperties(mapOf("lfzxiavrmbzonoki", "gpikpzimejza", "rgz", "rjqc")) - .withIsArchived(false)), - new ComponentContainerInner() - .withProperties(new ComponentContainerProperties().withDescription("vriiio") - .withTags(mapOf("fk", "lg")) - .withProperties( - mapOf("ueluqhhahhxvrhmz", "sexso", "ughftqsx", "wpjgwws", "grjguufzd", "qxujxukndxd")) - .withIsArchived(false)))) - .withNextLink("ho"); - model = BinaryData.fromObject(model).toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("i", model.value().get(0).properties().tags().get("ib")); - Assertions.assertEquals("gpikpzimejza", model.value().get(0).properties().properties().get("lfzxiavrmbzonoki")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - 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; + Assertions.assertEquals("hrnsvbu", model.value().get(0).properties().description()); + Assertions.assertEquals("vz", model.value().get(0).properties().properties().get("ybycnunvj")); + Assertions.assertEquals("wgioilqukry", model.value().get(0).properties().tags().get("xtqmieoxor")); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("qntcypsxjvfoimwk", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java index f1dc2f7ce6ad..06e5a31ac7c0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentContainer; @@ -24,28 +24,28 @@ public final class ComponentContainersCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"snrgaxoyvg\",\"nextVersion\":\"pfyxhsppvjsduouo\",\"description\":\"enqsom\",\"tags\":{\"reuwv\":\"eqeapaseqcppyp\",\"tqgtllwyoxz\":\"hndyvtoiqofz\",\"mo\":\"hellitpqvpivrsgq\"},\"properties\":{\"acgihnalpc\":\"omebzvtvxxfsfo\",\"zikatywedb\":\"edybkbgdwbmi\"}},\"id\":\"rbzp\",\"name\":\"uzbbhxncs\",\"type\":\"dw\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"alwceechcayvq\",\"nextVersion\":\"qpucnusnylfhicrj\",\"description\":\"ybfby\",\"properties\":{\"sn\":\"qllbo\",\"hxgiknr\":\"ocyb\",\"feamz\":\"ugseiqbroq\"},\"tags\":{\"sgotbunvnjqldr\":\"dgp\",\"dthfwlnvqa\":\"qvcugusqlxlx\"}},\"id\":\"yfi\",\"name\":\"blnlmpuyypaggpai\",\"type\":\"eaeyzwloqrmgdhym\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentContainer response = manager.componentContainers() - .define("jpcroxpp") - .withExistingWorkspace("dfeemxiurpf", "vypmwdz") - .withProperties(new ComponentContainerProperties().withDescription("c") - .withTags(mapOf("nst", "vwlxd", "xklr", "eurd", "dpkihqhnfubev", "atsiznymwz", "evltfebq", "adxcez")) - .withProperties(mapOf("ak", "akl", "ftwrphmr", "stif")) - .withIsArchived(true)) + .define("wqesqsqmiekxip") + .withExistingWorkspace("cnuqfpzjz", "bpcwtwtrchkcmru") + .withProperties(new ComponentContainerProperties().withDescription("gumuejxxpxxizchm") + .withProperties(mapOf("kngzfsulayb", "ginrk")) + .withTags(mapOf("trsljzmzuic", "lsbufnhbvcntpoee", "pmkqbylbbnj", "ggsxznb")) + .withIsArchived(false)) .create(); - Assertions.assertEquals("enqsom", response.properties().description()); - Assertions.assertEquals("eqeapaseqcppyp", response.properties().tags().get("reuwv")); - Assertions.assertEquals("omebzvtvxxfsfo", response.properties().properties().get("acgihnalpc")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("ybfby", response.properties().description()); + Assertions.assertEquals("qllbo", response.properties().properties().get("sn")); + Assertions.assertEquals("dgp", response.properties().tags().get("sgotbunvnjqldr")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java index e881aea5968d..52d49409b300 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.componentContainers() - .deleteWithResponse("lirybytcaqp", "ohlcbnrv", "yyhhsis", com.azure.core.util.Context.NONE); + .deleteWithResponse("ydlkrnpsbnm", "mhkipjardv", "pfgwdxmiaelnpbi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java index 8bfb87dee85e..7ba42ea572c6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentContainer; @@ -21,22 +21,22 @@ public final class ComponentContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"imkjzcx\",\"nextVersion\":\"jdfxvksijrjgyin\",\"description\":\"xijovuyxuupzeadd\",\"tags\":{\"vj\":\"pdtphvj\",\"htnyz\":\"ykngqyiyjxzxb\"},\"properties\":{\"koabfcvefbw\":\"nrmd\"}},\"id\":\"mgyqshsasmryuyut\",\"name\":\"bxrgrztkyqgu\",\"type\":\"uuihkybgkyncyzj\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"wlvsvsyl\",\"nextVersion\":\"prqtfk\",\"description\":\"zrkpmonxdwfcuh\",\"properties\":{\"pdq\":\"tfvqukkmvzene\",\"subehztbejrdzwyk\":\"jylwqqsemjhhx\",\"zwufi\":\"dp\",\"wjhmjkykqfl\":\"n\"},\"tags\":{\"mysmkbndnrihpj\":\"yk\"}},\"id\":\"hc\",\"name\":\"eejn\",\"type\":\"ig\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentContainer response = manager.componentContainers() - .getWithResponse("tq", "rpa", "teqiwd", com.azure.core.util.Context.NONE) + .getWithResponse("sceylaulpuexyigx", "tye", "xdslspgnndef", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xijovuyxuupzeadd", response.properties().description()); - Assertions.assertEquals("pdtphvj", response.properties().tags().get("vj")); - Assertions.assertEquals("nrmd", response.properties().properties().get("koabfcvefbw")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("zrkpmonxdwfcuh", response.properties().description()); + Assertions.assertEquals("tfvqukkmvzene", response.properties().properties().get("pdq")); + Assertions.assertEquals("yk", response.properties().tags().get("mysmkbndnrihpj")); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java index a9a1772c99cb..d250427ded1c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentContainer; @@ -23,21 +23,21 @@ public final class ComponentContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"rijebm\",\"nextVersion\":\"ongmndwohoeas\",\"description\":\"xfvbjimzwyns\",\"tags\":{\"jmjwqdslqreofz\":\"hvkyezwseyuo\",\"xsy\":\"krztpyaymhxlnmw\"},\"properties\":{\"vyotpcvpahhpk\":\"tvqmim\",\"dwtominru\":\"yqpvzxxz\"}},\"id\":\"qau\",\"name\":\"gasfmhbxv\",\"type\":\"wkqnatxvuzcc\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"wiypz\",\"nextVersion\":\"hkecebtpgvutb\",\"description\":\"sfd\",\"properties\":{\"ndgrciff\":\"rqcowk\",\"uyuwgnyj\":\"xqqnugt\"},\"tags\":{\"lfz\":\"jticw\",\"bktuajkufpvvd\":\"hibfmco\",\"fyqzaisfofgvmrkm\":\"nmeiomnobbaibcf\"}},\"id\":\"fmyzbuhdn\",\"name\":\"hcmt\",\"type\":\"lptbdponhblqi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.componentContainers() - .list("p", "hz", "pqscu", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); + .list("clun", "dvjlpbjszqjfs", "jvaycxrwknsb", ListViewType.ALL, com.azure.core.util.Context.NONE); - Assertions.assertEquals("xfvbjimzwyns", response.iterator().next().properties().description()); - Assertions.assertEquals("hvkyezwseyuo", response.iterator().next().properties().tags().get("jmjwqdslqreofz")); - Assertions.assertEquals("tvqmim", response.iterator().next().properties().properties().get("vyotpcvpahhpk")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("sfd", response.iterator().next().properties().description()); + Assertions.assertEquals("rqcowk", response.iterator().next().properties().properties().get("ndgrciff")); + Assertions.assertEquals("jticw", response.iterator().next().properties().tags().get("lfz")); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java index cdf01ef90baf..cc295e987575 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,31 +15,31 @@ public final class ComponentVersionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentVersionInner model = BinaryData.fromString( - "{\"properties\":{\"componentSpec\":\"datauaibrebqaaysj\",\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"tezlwff\",\"tags\":{\"qqmtedltmmji\":\"kpj\",\"upkvipmdsc\":\"yeozphvwauyqncy\",\"totxhojujb\":\"xqupevzhf\",\"n\":\"pelmcuvhixbjxyf\"},\"properties\":{\"ujrywvtyl\":\"coolsttpkiwkkb\"}},\"id\":\"pncur\",\"name\":\"oiwiithtywub\",\"type\":\"cbihwqk\"}") + "{\"properties\":{\"componentSpec\":\"\\\"dataircizjxvy\\\"\",\"provisioningState\":\"Creating\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"hvygdyftumr\",\"properties\":{\"biwkojgcyzt\":\"awjs\",\"qphchqnrnrpxehuw\":\"fmznba\",\"bydvkhbejdz\":\"ykqgaifmvik\",\"srhnjivo\":\"xcv\"},\"tags\":{\"jdftuljltd\":\"novqfzge\",\"zuo\":\"ceamtm\",\"ssxmojms\":\"ejwcwwqiok\",\"jpr\":\"p\"}},\"id\":\"wcfzqljyxgt\",\"name\":\"zheydbsdshmk\",\"type\":\"maehvbbxurip\"}") .toObject(ComponentVersionInner.class); - Assertions.assertEquals("tezlwff", model.properties().description()); - Assertions.assertEquals("kpj", model.properties().tags().get("qqmtedltmmji")); - Assertions.assertEquals("coolsttpkiwkkb", model.properties().properties().get("ujrywvtyl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); + Assertions.assertEquals("hvygdyftumr", model.properties().description()); + Assertions.assertEquals("awjs", model.properties().properties().get("biwkojgcyzt")); + Assertions.assertEquals("novqfzge", model.properties().tags().get("jdftuljltd")); + Assertions.assertFalse(model.properties().isAnonymous()); + Assertions.assertFalse(model.properties().isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ComponentVersionInner model - = new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("tezlwff") - .withTags(mapOf("qqmtedltmmji", "kpj", "upkvipmdsc", "yeozphvwauyqncy", "totxhojujb", "xqupevzhf", "n", - "pelmcuvhixbjxyf")) - .withProperties(mapOf("ujrywvtyl", "coolsttpkiwkkb")) - .withIsArchived(true) - .withIsAnonymous(true) - .withComponentSpec("datauaibrebqaaysj")); + = new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("hvygdyftumr") + .withProperties(mapOf("biwkojgcyzt", "awjs", "qphchqnrnrpxehuw", "fmznba", "bydvkhbejdz", "ykqgaifmvik", + "srhnjivo", "xcv")) + .withTags(mapOf("jdftuljltd", "novqfzge", "zuo", "ceamtm", "ssxmojms", "ejwcwwqiok", "jpr", "p")) + .withIsAnonymous(false) + .withIsArchived(false) + .withComponentSpec("\"dataircizjxvy\"")); model = BinaryData.fromObject(model).toObject(ComponentVersionInner.class); - Assertions.assertEquals("tezlwff", model.properties().description()); - Assertions.assertEquals("kpj", model.properties().tags().get("qqmtedltmmji")); - Assertions.assertEquals("coolsttpkiwkkb", model.properties().properties().get("ujrywvtyl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); + Assertions.assertEquals("hvygdyftumr", model.properties().description()); + Assertions.assertEquals("awjs", model.properties().properties().get("biwkojgcyzt")); + Assertions.assertEquals("novqfzge", model.properties().tags().get("jdftuljltd")); + Assertions.assertFalse(model.properties().isAnonymous()); + Assertions.assertFalse(model.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java index a8950803a80b..89ebf8cb1ecf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,30 +14,30 @@ public final class ComponentVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentVersionProperties model = BinaryData.fromString( - "{\"componentSpec\":\"datadntwjchrdgo\",\"provisioningState\":\"Deleting\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"ond\",\"tags\":{\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\",\"nepttwqmsni\":\"iufxqknpir\",\"rxfrddhc\":\"fcdmqnrojlpijn\"},\"properties\":{\"hftwesgog\":\"izzronasxiftozqy\",\"sxkkg\":\"zhonnxkrlgnyhmo\",\"rghxjb\":\"h\"}}") + "{\"componentSpec\":\"\\\"datafnhtbaxkgxyw\\\"\",\"provisioningState\":\"Canceled\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"hpluodpvruudlg\",\"properties\":{\"ktst\":\"thost\"},\"tags\":{\"qbcvhzlhplod\":\"eclze\",\"wqfbumlkxtrqjfsm\":\"kdl\",\"srtawcoezbr\":\"mbtxhwgf\",\"qjbvleorfmlu\":\"ubskhudygoookkq\"}}") .toObject(ComponentVersionProperties.class); - Assertions.assertEquals("ond", model.description()); - Assertions.assertEquals("uu", model.tags().get("fdlwg")); - Assertions.assertEquals("izzronasxiftozqy", model.properties().get("hftwesgog")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); + Assertions.assertEquals("hpluodpvruudlg", model.description()); + Assertions.assertEquals("thost", model.properties().get("ktst")); + Assertions.assertEquals("eclze", model.tags().get("qbcvhzlhplod")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComponentVersionProperties model = new ComponentVersionProperties().withDescription("ond") - .withTags( - mapOf("fdlwg", "uu", "gseinq", "ytsbwtovv", "nepttwqmsni", "iufxqknpir", "rxfrddhc", "fcdmqnrojlpijn")) - .withProperties(mapOf("hftwesgog", "izzronasxiftozqy", "sxkkg", "zhonnxkrlgnyhmo", "rghxjb", "h")) + ComponentVersionProperties model = new ComponentVersionProperties().withDescription("hpluodpvruudlg") + .withProperties(mapOf("ktst", "thost")) + .withTags(mapOf("qbcvhzlhplod", "eclze", "wqfbumlkxtrqjfsm", "kdl", "srtawcoezbr", "mbtxhwgf", + "qjbvleorfmlu", "ubskhudygoookkq")) + .withIsAnonymous(true) .withIsArchived(true) - .withIsAnonymous(false) - .withComponentSpec("datadntwjchrdgo"); + .withComponentSpec("\"datafnhtbaxkgxyw\""); model = BinaryData.fromObject(model).toObject(ComponentVersionProperties.class); - Assertions.assertEquals("ond", model.description()); - Assertions.assertEquals("uu", model.tags().get("fdlwg")); - Assertions.assertEquals("izzronasxiftozqy", model.properties().get("hftwesgog")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); + Assertions.assertEquals("hpluodpvruudlg", model.description()); + Assertions.assertEquals("thost", model.properties().get("ktst")); + Assertions.assertEquals("eclze", model.tags().get("qbcvhzlhplod")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java index 0b000b2dc210..71e3e0ef2642 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java @@ -1,74 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.ComponentVersionResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class ComponentVersionResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComponentVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentSpec\":\"dataqqaatjinrvgou\",\"provisioningState\":\"Updating\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"gjio\",\"tags\":{\"qwjygvja\":\"rwxkvtkkgl\",\"vkzuhbxvvyhgso\":\"vblm\"},\"properties\":{\"bnhlmc\":\"rqufegxuvwz\",\"dn\":\"l\",\"ijejvegrhbpn\":\"itvgbmhrixkwm\"}},\"id\":\"xexccbdreaxhcexd\",\"name\":\"rvqahqkghtpwi\",\"type\":\"nhyjsv\"},{\"properties\":{\"componentSpec\":\"datacxzbfvoowvr\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"y\",\"tags\":{\"sxkm\":\"ronzmyhgfip\",\"hjglikk\":\"waekrrjreafxtsgu\",\"uzlm\":\"wslolbqp\"},\"properties\":{\"noigbrnjwmwk\":\"lfktgplcrpwjxe\"}},\"id\":\"bsazejjoqka\",\"name\":\"fhsxttaugz\",\"type\":\"nfaazpxdtnkdmkq\"}],\"nextLink\":\"lwuenvrkp\"}") + "{\"value\":[{\"properties\":{\"componentSpec\":\"\\\"dataqzfavyv\\\"\",\"provisioningState\":\"Succeeded\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"euayjkqabqgzsles\",\"properties\":{\"bquwrbehw\":\"hernntiewdjc\",\"mvvhmxtdrjfuta\":\"gohbuffkmrq\",\"jvewzcjznmwcp\":\"oe\"},\"tags\":{\"v\":\"aadraufactkahz\",\"eekulfgslqubkwd\":\"jjziuxxpsh\",\"sutujba\":\"enr\",\"orwmduvwpklv\":\"pjuohminyfl\"}},\"id\":\"mygdxpgpqch\",\"name\":\"sze\",\"type\":\"nnbj\"},{\"properties\":{\"componentSpec\":\"\\\"dataxgibbda\\\"\",\"provisioningState\":\"Canceled\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"uors\",\"properties\":{\"pzlrphw\":\"kwbqplhlvnuu\",\"nnrwrbiork\":\"soldweyuqdunv\"},\"tags\":{\"sivfomilo\":\"ywjhhgdnhx\",\"ao\":\"ggdufiqndieu\"}},\"id\":\"chvcyyysfgdo\",\"name\":\"cubiipuipw\",\"type\":\"qonmacj\"},{\"properties\":{\"componentSpec\":\"\\\"datanizshqvcim\\\"\",\"provisioningState\":\"Canceled\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"rrilbywdxsmic\",\"properties\":{\"nszqujiz\":\"wfscjfn\",\"byowbblgyavutp\":\"voqyt\",\"smsks\":\"hjoxo\",\"lqol\":\"pi\"},\"tags\":{\"fgcviz\":\"cgxxlxs\",\"jub\":\"zdwlvwlyoupfgfb\",\"minsgowzf\":\"yhgk\",\"ctxtgzukxi\":\"tsttktlahbq\"}},\"id\":\"m\",\"name\":\"tg\",\"type\":\"qqxhrnxrxcpj\"}],\"nextLink\":\"savokqdzf\"}") .toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("gjio", model.value().get(0).properties().description()); - Assertions.assertEquals("rwxkvtkkgl", model.value().get(0).properties().tags().get("qwjygvja")); - Assertions.assertEquals("rqufegxuvwz", model.value().get(0).properties().properties().get("bnhlmc")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("lwuenvrkp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model - = new ComponentVersionResourceArmPaginatedResult() - .withValue( - Arrays - .asList( - new ComponentVersionInner() - .withProperties(new ComponentVersionProperties().withDescription("gjio") - .withTags(mapOf("qwjygvja", "rwxkvtkkgl", "vkzuhbxvvyhgso", "vblm")) - .withProperties( - mapOf("bnhlmc", "rqufegxuvwz", "dn", "l", "ijejvegrhbpn", "itvgbmhrixkwm")) - .withIsArchived(false) - .withIsAnonymous(true) - .withComponentSpec("dataqqaatjinrvgou")), - new ComponentVersionInner() - .withProperties(new ComponentVersionProperties().withDescription("y") - .withTags( - mapOf("sxkm", "ronzmyhgfip", "hjglikk", "waekrrjreafxtsgu", "uzlm", "wslolbqp")) - .withProperties(mapOf("noigbrnjwmwk", "lfktgplcrpwjxe")) - .withIsArchived(true) - .withIsAnonymous(true) - .withComponentSpec("datacxzbfvoowvr")))) - .withNextLink("lwuenvrkp"); - model = BinaryData.fromObject(model).toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("gjio", model.value().get(0).properties().description()); - Assertions.assertEquals("rwxkvtkkgl", model.value().get(0).properties().tags().get("qwjygvja")); - Assertions.assertEquals("rqufegxuvwz", model.value().get(0).properties().properties().get("bnhlmc")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("lwuenvrkp", 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; + Assertions.assertEquals("euayjkqabqgzsles", model.value().get(0).properties().description()); + Assertions.assertEquals("hernntiewdjc", model.value().get(0).properties().properties().get("bquwrbehw")); + Assertions.assertEquals("aadraufactkahz", model.value().get(0).properties().tags().get("v")); + Assertions.assertFalse(model.value().get(0).properties().isAnonymous()); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("savokqdzf", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java index 46cf07456d5e..f56dd1ab6f08 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentVersion; @@ -24,32 +24,31 @@ public final class ComponentVersionsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"componentSpec\":\"datalzrmiukoth\",\"provisioningState\":\"Failed\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"hfrvsi\",\"tags\":{\"f\":\"gnpcjnia\",\"ogdkp\":\"cgjjioqwu\",\"uqjde\":\"mwr\"},\"properties\":{\"cnbgibklscwdko\":\"q\",\"vxmtsmgk\":\"zyvihevb\",\"rceulbyzzcxsyg\":\"etsn\"}},\"id\":\"y\",\"name\":\"yckd\",\"type\":\"z\"}"; + = "{\"properties\":{\"componentSpec\":\"\\\"dataqvvketydg\\\"\",\"provisioningState\":\"Updating\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"vqxerxrmhr\",\"properties\":{\"ihylrxsiyzsyiu\":\"gbbjl\",\"fvernnk\":\"titlqy\"},\"tags\":{\"gdr\":\"ayqivb\",\"ppwp\":\"gzetboyztgnmu\",\"bdwrjencofe\":\"fmgrmtgwhz\",\"tpljonmaj\":\"iewib\"}},\"id\":\"bxxcdkhxjwtkftg\",\"name\":\"ljuepme\",\"type\":\"sjpgbmlbxjhgvte\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentVersion response = manager.componentVersions() - .define("oabthutctcabc") - .withExistingComponent("nclxhwkz", "ggsuzkvd", "ntpzuiwa") - .withProperties(new ComponentVersionProperties().withDescription("wegvuojuwgweccvu") - .withTags(mapOf("fsssmy", "vf", "gpqc", "emkrhbsdgktluifi", "erszsu", "enobqysbeespqbvv", "intz", - "zsautbricvvofe")) - .withProperties(mapOf("nowi", "yyqxckdlxjpisr", "xfiiytqxewjsyute", "cbesfvijnu", "k", "lghkvoxdpor")) - .withIsArchived(false) + .define("ktkdpcz") + .withExistingComponent("vmlkwkzlinv", "mtykxszdekfxcsqm", "do") + .withProperties(new ComponentVersionProperties().withDescription("hvqpkedaxku") + .withProperties(mapOf("weogavfyih", "fjidqod", "zw", "zsbpwnyfjcyp")) + .withTags(mapOf("grlw", "dlzgkoo", "qadewhuwxk", "amesit", "naif", "xiatfam")) .withIsAnonymous(true) - .withComponentSpec("dataabzfihsz")) + .withIsArchived(false) + .withComponentSpec("\"datahp\"")) .create(); - Assertions.assertEquals("hfrvsi", response.properties().description()); - Assertions.assertEquals("gnpcjnia", response.properties().tags().get("f")); - Assertions.assertEquals("q", response.properties().properties().get("cnbgibklscwdko")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); + Assertions.assertEquals("vqxerxrmhr", response.properties().description()); + Assertions.assertEquals("gbbjl", response.properties().properties().get("ihylrxsiyzsyiu")); + Assertions.assertEquals("ayqivb", response.properties().tags().get("gdr")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java index 06b7e2dbc87e..c6ca6e0adc19 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,11 +25,10 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.componentVersions() - .deleteWithResponse("cbzvvxd", "phxmwwvxcaicb", "cbogsfovk", "amiyfgunrukcyyaa", - com.azure.core.util.Context.NONE); + .deleteWithResponse("fz", "qmbinpxmiwt", "qi", "pvrd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java index d404827f765c..1334b7805809 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentVersion; @@ -21,24 +21,23 @@ public final class ComponentVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"componentSpec\":\"datauwj\",\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"llavz\",\"tags\":{\"apqra\":\"gmrodb\",\"tniwfcu\":\"z\"},\"properties\":{\"ceg\":\"xmyibx\",\"xb\":\"ttgxkxt\"}},\"id\":\"beyqohvi\",\"name\":\"wpjfkra\",\"type\":\"er\"}"; + = "{\"properties\":{\"componentSpec\":\"\\\"dataoivxcodwkwoytc\\\"\",\"provisioningState\":\"Canceled\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"uewlfwfiikqcdnzs\",\"properties\":{\"dmcrxly\":\"hgneo\",\"ovufakrxjjwn\":\"oa\",\"aanistcjha\":\"rmdwtbrnlsy\",\"pphcstmryc\":\"c\"},\"tags\":{\"zrinlpxngzzx\":\"apfao\",\"mzc\":\"bgqn\"}},\"id\":\"xzjkpifpucvbd\",\"name\":\"zwbsk\",\"type\":\"e\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentVersion response = manager.componentVersions() - .getWithResponse("bkubzqazdlrkvi", "zkifqbxmnnid", "tmpumzuhoo", "ttqhpvaru", - com.azure.core.util.Context.NONE) + .getWithResponse("pvlxtywu", "hj", "spllitxrrgkw", "yoy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("llavz", response.properties().description()); - Assertions.assertEquals("gmrodb", response.properties().tags().get("apqra")); - Assertions.assertEquals("xmyibx", response.properties().properties().get("ceg")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); + Assertions.assertEquals("uewlfwfiikqcdnzs", response.properties().description()); + Assertions.assertEquals("hgneo", response.properties().properties().get("dmcrxly")); + Assertions.assertEquals("apfao", response.properties().tags().get("zrinlpxngzzx")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java index 384a1043cc8c..eb02a2b8c2e1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentVersion; @@ -23,23 +23,23 @@ public final class ComponentVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"componentSpec\":\"datadbobmolj\",\"provisioningState\":\"Creating\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"ih\",\"tags\":{\"pdj\":\"quajpo\",\"raxhntoiwfszkr\":\"yotg\",\"etsluqfgk\":\"kosjwr\",\"imioixviobuwbnge\":\"d\"},\"properties\":{\"ggnqxn\":\"dqngqamhb\"}},\"id\":\"qzaffzqodokst\",\"name\":\"vomdqxnoyzqipapi\",\"type\":\"ccydbjghunqnttrw\"}]}"; + = "{\"value\":[{\"properties\":{\"componentSpec\":\"\\\"datarfxfeiqbas\\\"\",\"provisioningState\":\"Creating\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"svnonij\",\"properties\":{\"qqbt\":\"jozzjkugp\"},\"tags\":{\"hwettohgpzwx\":\"ocuzxllbpwa\"}},\"id\":\"tkzbhizxp\",\"name\":\"sddmwnfhmju\",\"type\":\"uqnkushvl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.componentVersions() - .list("aveuxgmigs", "ebdltniui", "merf", "hgvcy", 275303341, "doeilhggaj", ListViewType.ARCHIVED_ONLY, + .list("kcdnzoxl", "buxtwgbawshra", "q", "ugqcglmadfztof", 2001431374, "qlauuagwayf", ListViewType.ALL, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ih", response.iterator().next().properties().description()); - Assertions.assertEquals("quajpo", response.iterator().next().properties().tags().get("pdj")); - Assertions.assertEquals("dqngqamhb", response.iterator().next().properties().properties().get("ggnqxn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); + Assertions.assertEquals("svnonij", response.iterator().next().properties().description()); + Assertions.assertEquals("jozzjkugp", response.iterator().next().properties().properties().get("qqbt")); + Assertions.assertEquals("ocuzxllbpwa", response.iterator().next().properties().tags().get("hwettohgpzwx")); + Assertions.assertTrue(response.iterator().next().properties().isAnonymous()); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java index 32d63e978027..33a53a0b30eb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; @@ -26,13 +26,13 @@ public void testPublish() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.componentVersions() - .publish("lgbvtpxowgoww", "ocjasuame", "jkfiszhexumfav", "esloblit", - new DestinationAsset().withRegistryName("rsjscos") - .withDestinationName("js") - .withDestinationVersion("trztogujg"), + .publish("udhekaqni", "midtvhjcgszfb", "ygkxrlfojlclp", "mveybodhrv", + new DestinationAsset().withDestinationName("duumw") + .withDestinationVersion("umjvegpdxtsaujt") + .withRegistryName("ojybolqoxuptsli"), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java index 88cd60af6f45..f53db11cda17 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,9 @@ public final class ComputeInstanceApplicationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInstanceApplication model - = BinaryData.fromString("{\"displayName\":\"lfr\",\"endpointUri\":\"qownkiuajewnahw\"}") + = BinaryData.fromString("{\"displayName\":\"tlvhdyxzl\",\"endpointUri\":\"ywj\"}") .toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("lfr", model.displayName()); - Assertions.assertEquals("qownkiuajewnahw", model.endpointUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceApplication model - = new ComputeInstanceApplication().withDisplayName("lfr").withEndpointUri("qownkiuajewnahw"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("lfr", model.displayName()); - Assertions.assertEquals("qownkiuajewnahw", model.endpointUri()); + Assertions.assertEquals("tlvhdyxzl", model.displayName()); + Assertions.assertEquals("ywj", model.endpointUri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceAutologgerSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceAutologgerSettingsTests.java new file mode 100644 index 000000000000..2b7fa3ce56b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceAutologgerSettingsTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings; +import com.azure.resourcemanager.machinelearning.models.MlflowAutologger; +import org.junit.jupiter.api.Assertions; + +public final class ComputeInstanceAutologgerSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ComputeInstanceAutologgerSettings model = BinaryData.fromString("{\"mlflowAutologger\":\"Enabled\"}") + .toObject(ComputeInstanceAutologgerSettings.class); + Assertions.assertEquals(MlflowAutologger.ENABLED, model.mlflowAutologger()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ComputeInstanceAutologgerSettings model + = new ComputeInstanceAutologgerSettings().withMlflowAutologger(MlflowAutologger.ENABLED); + model = BinaryData.fromObject(model).toObject(ComputeInstanceAutologgerSettings.class); + Assertions.assertEquals(MlflowAutologger.ENABLED, model.mlflowAutologger()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java index 6fecaec00c4f..c49664672431 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,13 +11,7 @@ public final class ComputeInstanceConnectivityEndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInstanceConnectivityEndpoints model - = BinaryData.fromString("{\"publicIpAddress\":\"ffbbcngkegxcypxb\",\"privateIpAddress\":\"etwilyrzoxpd\"}") + = BinaryData.fromString("{\"publicIpAddress\":\"zxjziuu\",\"privateIpAddress\":\"lnewnuwkkfz\"}") .toObject(ComputeInstanceConnectivityEndpoints.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceConnectivityEndpoints model = new ComputeInstanceConnectivityEndpoints(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceConnectivityEndpoints.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java index e9f6249c2122..8159d4712621 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.Autosave; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo; import com.azure.resourcemanager.machinelearning.models.Network; import org.junit.jupiter.api.Assertions; @@ -15,29 +14,13 @@ public final class ComputeInstanceContainerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInstanceContainer model = BinaryData.fromString( - "{\"name\":\"fxlapjajodmkrrw\",\"autosave\":\"Remote\",\"gpu\":\"vqokql\",\"network\":\"Bridge\",\"environment\":{\"name\":\"rabwlyvxc\",\"version\":\"qvctsfa\"},\"services\":[\"datawwsknstvzu\",\"datahasupmlppdpgzvz\"]}") + "{\"name\":\"lxwhcvasyyhgq\",\"autosave\":\"Remote\",\"gpu\":\"msrkixyxxhwrlq\",\"network\":\"Bridge\",\"environment\":{\"name\":\"yilpzz\",\"version\":\"wnrzozsxa\"},\"services\":[\"\\\"datao\\\"\",\"\\\"dataliiksybv\\\"\"]}") .toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("fxlapjajodmkrrw", model.name()); + Assertions.assertEquals("lxwhcvasyyhgq", model.name()); Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("vqokql", model.gpu()); + Assertions.assertEquals("msrkixyxxhwrlq", model.gpu()); Assertions.assertEquals(Network.BRIDGE, model.network()); - Assertions.assertEquals("rabwlyvxc", model.environment().name()); - Assertions.assertEquals("qvctsfa", model.environment().version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceContainer model = new ComputeInstanceContainer().withName("fxlapjajodmkrrw") - .withAutosave(Autosave.REMOTE) - .withGpu("vqokql") - .withNetwork(Network.BRIDGE) - .withEnvironment(new ComputeInstanceEnvironmentInfo().withName("rabwlyvxc").withVersion("qvctsfa")); - model = BinaryData.fromObject(model).toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("fxlapjajodmkrrw", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("vqokql", model.gpu()); - Assertions.assertEquals(Network.BRIDGE, model.network()); - Assertions.assertEquals("rabwlyvxc", model.environment().name()); - Assertions.assertEquals("qvctsfa", model.environment().version()); + Assertions.assertEquals("yilpzz", model.environment().name()); + Assertions.assertEquals("wnrzozsxa", model.environment().version()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java index 34b3ab67cdef..048b4d4441fc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,14 +10,8 @@ public final class ComputeInstanceCreatedByTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ComputeInstanceCreatedBy model = BinaryData - .fromString("{\"userName\":\"jjmztnlmsoodtmv\",\"userOrgId\":\"dhdyswcrptveaj\",\"userId\":\"xvl\"}") - .toObject(ComputeInstanceCreatedBy.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceCreatedBy model = new ComputeInstanceCreatedBy(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceCreatedBy.class); + ComputeInstanceCreatedBy model + = BinaryData.fromString("{\"userName\":\"lgqpwwlzpd\",\"userOrgId\":\"rcbcdwhslxe\",\"userId\":\"j\"}") + .toObject(ComputeInstanceCreatedBy.class); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java index da87b2d1e824..d0dd594108f2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,24 +14,11 @@ public final class ComputeInstanceDataDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInstanceDataDisk model = BinaryData.fromString( - "{\"caching\":\"ReadOnly\",\"diskSizeGB\":1600644874,\"lun\":1444787709,\"storageAccountType\":\"Premium_LRS\"}") + "{\"caching\":\"ReadWrite\",\"diskSizeGB\":324711,\"lun\":1877948229,\"storageAccountType\":\"Premium_LRS\"}") .toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_ONLY, model.caching()); - Assertions.assertEquals(1600644874, model.diskSizeGB()); - Assertions.assertEquals(1444787709, model.lun()); - Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataDisk model = new ComputeInstanceDataDisk().withCaching(Caching.READ_ONLY) - .withDiskSizeGB(1600644874) - .withLun(1444787709) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_ONLY, model.caching()); - Assertions.assertEquals(1600644874, model.diskSizeGB()); - Assertions.assertEquals(1444787709, model.lun()); + Assertions.assertEquals(Caching.READ_WRITE, model.caching()); + Assertions.assertEquals(324711, model.diskSizeGB()); + Assertions.assertEquals(1877948229, model.lun()); Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java index 300dbdc5f622..c27676ce2304 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; import com.azure.resourcemanager.machinelearning.models.MountAction; +import com.azure.resourcemanager.machinelearning.models.MountMode; import com.azure.resourcemanager.machinelearning.models.MountState; import com.azure.resourcemanager.machinelearning.models.SourceType; import java.time.OffsetDateTime; @@ -16,39 +17,42 @@ public final class ComputeInstanceDataMountTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInstanceDataMount model = BinaryData.fromString( - "{\"source\":\"y\",\"sourceType\":\"Datastore\",\"mountName\":\"enigbe\",\"mountAction\":\"Unmount\",\"createdBy\":\"ba\",\"mountPath\":\"jdeayscse\",\"mountState\":\"Unmounted\",\"mountedOn\":\"2021-06-04T19:11:23Z\",\"error\":\"exmnv\"}") + "{\"source\":\"tizsyqagqllc\",\"sourceType\":\"URI\",\"mountName\":\"idylky\",\"mountAction\":\"Unmount\",\"mountMode\":\"ReadWrite\",\"createdBy\":\"fyybptmjj\",\"mountPath\":\"ogykugdlavsav\",\"mountState\":\"UnmountRequested\",\"mountedOn\":\"2021-04-26T12:39:14Z\",\"error\":\"geuufkb\"}") .toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("y", model.source()); - Assertions.assertEquals(SourceType.DATASTORE, model.sourceType()); - Assertions.assertEquals("enigbe", model.mountName()); + Assertions.assertEquals("tizsyqagqllc", model.source()); + Assertions.assertEquals(SourceType.URI, model.sourceType()); + Assertions.assertEquals("idylky", model.mountName()); Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("ba", model.createdBy()); - Assertions.assertEquals("jdeayscse", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNTED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T19:11:23Z"), model.mountedOn()); - Assertions.assertEquals("exmnv", model.error()); + Assertions.assertEquals(MountMode.READ_WRITE, model.mountMode()); + Assertions.assertEquals("fyybptmjj", model.createdBy()); + Assertions.assertEquals("ogykugdlavsav", model.mountPath()); + Assertions.assertEquals(MountState.UNMOUNT_REQUESTED, model.mountState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T12:39:14Z"), model.mountedOn()); + Assertions.assertEquals("geuufkb", model.error()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComputeInstanceDataMount model = new ComputeInstanceDataMount().withSource("y") - .withSourceType(SourceType.DATASTORE) - .withMountName("enigbe") + ComputeInstanceDataMount model = new ComputeInstanceDataMount().withSource("tizsyqagqllc") + .withSourceType(SourceType.URI) + .withMountName("idylky") .withMountAction(MountAction.UNMOUNT) - .withCreatedBy("ba") - .withMountPath("jdeayscse") - .withMountState(MountState.UNMOUNTED) - .withMountedOn(OffsetDateTime.parse("2021-06-04T19:11:23Z")) - .withError("exmnv"); + .withMountMode(MountMode.READ_WRITE) + .withCreatedBy("fyybptmjj") + .withMountPath("ogykugdlavsav") + .withMountState(MountState.UNMOUNT_REQUESTED) + .withMountedOn(OffsetDateTime.parse("2021-04-26T12:39:14Z")) + .withError("geuufkb"); model = BinaryData.fromObject(model).toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("y", model.source()); - Assertions.assertEquals(SourceType.DATASTORE, model.sourceType()); - Assertions.assertEquals("enigbe", model.mountName()); + Assertions.assertEquals("tizsyqagqllc", model.source()); + Assertions.assertEquals(SourceType.URI, model.sourceType()); + Assertions.assertEquals("idylky", model.mountName()); Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("ba", model.createdBy()); - Assertions.assertEquals("jdeayscse", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNTED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T19:11:23Z"), model.mountedOn()); - Assertions.assertEquals("exmnv", model.error()); + Assertions.assertEquals(MountMode.READ_WRITE, model.mountMode()); + Assertions.assertEquals("fyybptmjj", model.createdBy()); + Assertions.assertEquals("ogykugdlavsav", model.mountPath()); + Assertions.assertEquals(MountState.UNMOUNT_REQUESTED, model.mountState()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T12:39:14Z"), model.mountedOn()); + Assertions.assertEquals("geuufkb", model.error()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java index afbd83807f60..4acbba3b2212 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,18 +11,9 @@ public final class ComputeInstanceEnvironmentInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ComputeInstanceEnvironmentInfo model = BinaryData.fromString("{\"name\":\"z\",\"version\":\"karkptg\"}") + ComputeInstanceEnvironmentInfo model = BinaryData.fromString("{\"name\":\"bnhyl\",\"version\":\"hujc\"}") .toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("karkptg", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceEnvironmentInfo model - = new ComputeInstanceEnvironmentInfo().withName("z").withVersion("karkptg"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("karkptg", model.version()); + Assertions.assertEquals("bnhyl", model.name()); + Assertions.assertEquals("hujc", model.version()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java index 93264639a73e..089e8cf6dc83 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,24 +16,11 @@ public final class ComputeInstanceLastOperationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInstanceLastOperation model = BinaryData.fromString( - "{\"operationName\":\"Restart\",\"operationTime\":\"2021-12-02T04:09:17Z\",\"operationStatus\":\"StartFailed\",\"operationTrigger\":\"IdleShutdown\"}") + "{\"operationName\":\"Start\",\"operationTime\":\"2021-08-31T12:14:29Z\",\"operationStatus\":\"StartFailed\",\"operationTrigger\":\"User\"}") .toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.RESTART, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T04:09:17Z"), model.operationTime()); + Assertions.assertEquals(OperationName.START, model.operationName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T12:14:29Z"), model.operationTime()); Assertions.assertEquals(OperationStatus.START_FAILED, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceLastOperation model = new ComputeInstanceLastOperation().withOperationName(OperationName.RESTART) - .withOperationTime(OffsetDateTime.parse("2021-12-02T04:09:17Z")) - .withOperationStatus(OperationStatus.START_FAILED) - .withOperationTrigger(OperationTrigger.IDLE_SHUTDOWN); - model = BinaryData.fromObject(model).toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.RESTART, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T04:09:17Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.START_FAILED, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); + Assertions.assertEquals(OperationTrigger.USER, model.operationTrigger()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java index d5ca3c74d4d7..46e7e252b5cb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,7 @@ public final class ComputeInstanceVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeInstanceVersion model - = BinaryData.fromString("{\"runtime\":\"muwrx\"}").toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("muwrx", model.runtime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceVersion model = new ComputeInstanceVersion().withRuntime("muwrx"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("muwrx", model.runtime()); + = BinaryData.fromString("{\"runtime\":\"fbxjblajybdnb\"}").toObject(ComputeInstanceVersion.class); + Assertions.assertEquals("fbxjblajybdnb", model.runtime()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java index 152c29212161..10d50998804e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,26 +14,26 @@ public final class ComputeRecurrenceScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeRecurrenceSchedule model = BinaryData.fromString( - "{\"hours\":[753616806,1022299740,1887588693],\"minutes\":[746933234,1500436017,185352211],\"monthDays\":[469087656,551431025,1504133018],\"weekDays\":[\"Thursday\",\"Wednesday\",\"Tuesday\",\"Sunday\"]}") + "{\"hours\":[1321949703,1045878056,1866033442,1713357433],\"minutes\":[1878703955,2039873540],\"monthDays\":[2131133390,1099788002,2077180464,1254468072],\"weekDays\":[\"Thursday\",\"Wednesday\",\"Wednesday\",\"Sunday\"]}") .toObject(ComputeRecurrenceSchedule.class); - Assertions.assertEquals(753616806, model.hours().get(0)); - Assertions.assertEquals(746933234, model.minutes().get(0)); - Assertions.assertEquals(469087656, model.monthDays().get(0)); + Assertions.assertEquals(1321949703, model.hours().get(0)); + Assertions.assertEquals(1878703955, model.minutes().get(0)); + Assertions.assertEquals(2131133390, model.monthDays().get(0)); Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.weekDays().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ComputeRecurrenceSchedule model - = new ComputeRecurrenceSchedule().withHours(Arrays.asList(753616806, 1022299740, 1887588693)) - .withMinutes(Arrays.asList(746933234, 1500436017, 185352211)) - .withMonthDays(Arrays.asList(469087656, 551431025, 1504133018)) - .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.WEDNESDAY, ComputeWeekDay.TUESDAY, + = new ComputeRecurrenceSchedule().withHours(Arrays.asList(1321949703, 1045878056, 1866033442, 1713357433)) + .withMinutes(Arrays.asList(1878703955, 2039873540)) + .withMonthDays(Arrays.asList(2131133390, 1099788002, 2077180464, 1254468072)) + .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.WEDNESDAY, ComputeWeekDay.WEDNESDAY, ComputeWeekDay.SUNDAY)); model = BinaryData.fromObject(model).toObject(ComputeRecurrenceSchedule.class); - Assertions.assertEquals(753616806, model.hours().get(0)); - Assertions.assertEquals(746933234, model.minutes().get(0)); - Assertions.assertEquals(469087656, model.monthDays().get(0)); + Assertions.assertEquals(1321949703, model.hours().get(0)); + Assertions.assertEquals(1878703955, model.minutes().get(0)); + Assertions.assertEquals(2131133390, model.monthDays().get(0)); Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.weekDays().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java index e59180a70319..b4448c099ab9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class ComputeRuntimeDtoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeRuntimeDto model - = BinaryData.fromString("{\"sparkRuntimeVersion\":\"mglougpbkw\"}").toObject(ComputeRuntimeDto.class); - Assertions.assertEquals("mglougpbkw", model.sparkRuntimeVersion()); + = BinaryData.fromString("{\"sparkRuntimeVersion\":\"fidfvzw\"}").toObject(ComputeRuntimeDto.class); + Assertions.assertEquals("fidfvzw", model.sparkRuntimeVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComputeRuntimeDto model = new ComputeRuntimeDto().withSparkRuntimeVersion("mglougpbkw"); + ComputeRuntimeDto model = new ComputeRuntimeDto().withSparkRuntimeVersion("fidfvzw"); model = BinaryData.fromObject(model).toObject(ComputeRuntimeDto.class); - Assertions.assertEquals("mglougpbkw", model.sparkRuntimeVersion()); + Assertions.assertEquals("fidfvzw", model.sparkRuntimeVersion()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java index a29d67f4bc1b..0b3c40d83824 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -24,84 +24,127 @@ public final class ComputeSchedulesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeSchedules model = BinaryData.fromString( - "{\"computeStartStop\":[{\"id\":\"g\",\"provisioningStatus\":\"Failed\",\"status\":\"Enabled\",\"action\":\"Stop\",\"triggerType\":\"Cron\",\"recurrence\":{\"frequency\":\"Month\",\"interval\":49803923,\"startTime\":\"bjmlreesrfwssz\",\"timeZone\":\"cwlisolntfxxcrqm\",\"schedule\":{\"hours\":[351599598,690611810,1156649488,1996694399],\"minutes\":[1847045848,246360701,778853988],\"monthDays\":[1390318472],\"weekDays\":[\"Tuesday\",\"Saturday\"]}},\"cron\":{\"startTime\":\"abuln\",\"timeZone\":\"skjto\",\"expression\":\"dzjs\"},\"schedule\":{\"id\":\"vhxqqmqipaydhfnz\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\"}},{\"id\":\"shksny\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\",\"action\":\"Stop\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Minute\",\"interval\":976329767,\"startTime\":\"cefiqdkt\",\"timeZone\":\"kvi\",\"schedule\":{\"hours\":[1629072439,2029515706],\"minutes\":[1835241061,776692976],\"monthDays\":[1239574934,1328728868,2058931853],\"weekDays\":[\"Friday\",\"Tuesday\"]}},\"cron\":{\"startTime\":\"dpcmhjh\",\"timeZone\":\"sybkekymffzt\",\"expression\":\"lscvqsyeiihf\"},\"schedule\":{\"id\":\"ouihy\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}}]}") + "{\"computeStartStop\":[{\"id\":\"loasybxhqvovdpm\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Enabled\",\"action\":\"Stop\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Minute\",\"interval\":585541295,\"startTime\":\"aqg\",\"timeZone\":\"bfkceincnrecj\",\"schedule\":{\"hours\":[2000833457,792931068,1462944765,502279042],\"minutes\":[2081296139,1564549261],\"monthDays\":[295311224,802757722,1173440905,834470934],\"weekDays\":[\"Saturday\",\"Saturday\",\"Friday\"]}},\"cron\":{\"startTime\":\"vzvmxtcwghnda\",\"timeZone\":\"hgsulwvgs\",\"expression\":\"figvfjjuzkil\"},\"schedule\":{\"id\":\"wuhyzekypy\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}},{\"id\":\"zdlbybpaxhpz\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Cron\",\"recurrence\":{\"frequency\":\"Month\",\"interval\":883994164,\"startTime\":\"fhsh\",\"timeZone\":\"pahnezp\",\"schedule\":{\"hours\":[1182596310,1989779632,1054708375],\"minutes\":[1734793687],\"monthDays\":[1718772525,1265949424,976363993],\"weekDays\":[\"Thursday\"]}},\"cron\":{\"startTime\":\"qbugihcdv\",\"timeZone\":\"izorbloejzs\",\"expression\":\"zgkqwvde\"},\"schedule\":{\"id\":\"naphifkfrpmpl\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}},{\"id\":\"m\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\",\"action\":\"Stop\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Week\",\"interval\":866674193,\"startTime\":\"skh\",\"timeZone\":\"khbykrsmhrcme\",\"schedule\":{\"hours\":[1886275489,870078306,1752857716],\"minutes\":[1390080012,386873853],\"monthDays\":[1706366230,312601450],\"weekDays\":[\"Thursday\",\"Wednesday\"]}},\"cron\":{\"startTime\":\"mshfuzzlap\",\"timeZone\":\"xlvzcgulaebxiauq\",\"expression\":\"ptessjlw\"},\"schedule\":{\"id\":\"tpvb\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\"}},{\"id\":\"qaygas\",\"provisioningStatus\":\"Failed\",\"status\":\"Enabled\",\"action\":\"Stop\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Day\",\"interval\":1004353783,\"startTime\":\"zjwjkqo\",\"timeZone\":\"whiieyozv\",\"schedule\":{\"hours\":[1545469164,753177891,1473475543],\"minutes\":[1387119896,790465512,1455410086,676648911],\"monthDays\":[2010472704,1198550793,911257034],\"weekDays\":[\"Friday\",\"Wednesday\",\"Monday\"]}},\"cron\":{\"startTime\":\"bg\",\"timeZone\":\"rx\",\"expression\":\"uc\"},\"schedule\":{\"id\":\"vkdlhuduklbjoafm\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Enabled\"}}]}") .toObject(ComputeSchedules.class); Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).status()); Assertions.assertEquals(ComputePowerAction.STOP, model.computeStartStop().get(0).action()); - Assertions.assertEquals(ComputeTriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, + Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.computeStartStop().get(0).triggerType()); + Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(49803923, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("bjmlreesrfwssz", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("cwlisolntfxxcrqm", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(351599598, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1847045848, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1390318472, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, + Assertions.assertEquals(585541295, model.computeStartStop().get(0).recurrence().interval()); + Assertions.assertEquals("aqg", model.computeStartStop().get(0).recurrence().startTime()); + Assertions.assertEquals("bfkceincnrecj", model.computeStartStop().get(0).recurrence().timeZone()); + Assertions.assertEquals(2000833457, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); + Assertions.assertEquals(2081296139, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); + Assertions.assertEquals(295311224, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); + Assertions.assertEquals(ComputeWeekDay.SATURDAY, model.computeStartStop().get(0).recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("abuln", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("skjto", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("dzjs", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("vhxqqmqipaydhfnz", model.computeStartStop().get(0).schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.FAILED, + Assertions.assertEquals("vzvmxtcwghnda", model.computeStartStop().get(0).cron().startTime()); + Assertions.assertEquals("hgsulwvgs", model.computeStartStop().get(0).cron().timeZone()); + Assertions.assertEquals("figvfjjuzkil", model.computeStartStop().get(0).cron().expression()); + Assertions.assertEquals("wuhyzekypy", model.computeStartStop().get(0).schedule().id()); + Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.computeStartStop().get(0).schedule().provisioningStatus()); Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).schedule().status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComputeSchedules model = new ComputeSchedules().withComputeStartStop(Arrays.asList( - new ComputeStartStopSchedule().withStatus(ScheduleStatus.ENABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(ComputeTriggerType.CRON) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) - .withInterval(49803923) - .withStartTime("bjmlreesrfwssz") - .withTimeZone("cwlisolntfxxcrqm") - .withSchedule(new ComputeRecurrenceSchedule() - .withHours(Arrays.asList(351599598, 690611810, 1156649488, 1996694399)) - .withMinutes(Arrays.asList(1847045848, 246360701, 778853988)) - .withMonthDays(Arrays.asList(1390318472)) - .withWeekDays(Arrays.asList(ComputeWeekDay.TUESDAY, ComputeWeekDay.SATURDAY)))) - .withCron(new Cron().withStartTime("abuln").withTimeZone("skjto").withExpression("dzjs")) - .withSchedule(new ScheduleBase().withId("vhxqqmqipaydhfnz") - .withProvisioningStatus(ScheduleProvisioningState.FAILED) - .withStatus(ScheduleStatus.DISABLED)), - new ComputeStartStopSchedule().withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(ComputeTriggerType.RECURRENCE) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) - .withInterval(976329767) - .withStartTime("cefiqdkt") - .withTimeZone("kvi") - .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1629072439, 2029515706)) - .withMinutes(Arrays.asList(1835241061, 776692976)) - .withMonthDays(Arrays.asList(1239574934, 1328728868, 2058931853)) - .withWeekDays(Arrays.asList(ComputeWeekDay.FRIDAY, ComputeWeekDay.TUESDAY)))) - .withCron( - new Cron().withStartTime("dpcmhjh").withTimeZone("sybkekymffzt").withExpression("lscvqsyeiihf")) - .withSchedule(new ScheduleBase().withId("ouihy") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.ENABLED)))); + ComputeSchedules model + = new ComputeSchedules().withComputeStartStop(Arrays.asList( + new ComputeStartStopSchedule().withStatus(ScheduleStatus.ENABLED) + .withAction(ComputePowerAction.STOP) + .withTriggerType(ComputeTriggerType.RECURRENCE) + .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) + .withInterval(585541295) + .withStartTime("aqg") + .withTimeZone("bfkceincnrecj") + .withSchedule(new ComputeRecurrenceSchedule() + .withHours(Arrays.asList(2000833457, 792931068, 1462944765, 502279042)) + .withMinutes(Arrays.asList(2081296139, 1564549261)) + .withMonthDays(Arrays.asList(295311224, 802757722, 1173440905, 834470934)) + .withWeekDays(Arrays.asList(ComputeWeekDay.SATURDAY, ComputeWeekDay.SATURDAY, + ComputeWeekDay.FRIDAY)))) + .withCron(new Cron().withStartTime("vzvmxtcwghnda") + .withTimeZone("hgsulwvgs") + .withExpression("figvfjjuzkil")) + .withSchedule(new ScheduleBase() + .withId("wuhyzekypy") + .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) + .withStatus(ScheduleStatus.DISABLED)), + new ComputeStartStopSchedule().withStatus(ScheduleStatus.DISABLED) + .withAction(ComputePowerAction.START) + .withTriggerType(ComputeTriggerType.CRON) + .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) + .withInterval(883994164) + .withStartTime("fhsh") + .withTimeZone("pahnezp") + .withSchedule( + new ComputeRecurrenceSchedule().withHours(Arrays.asList(1182596310, 1989779632, 1054708375)) + .withMinutes(Arrays.asList(1734793687)) + .withMonthDays(Arrays.asList(1718772525, 1265949424, 976363993)) + .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY)))) + .withCron( + new Cron().withStartTime("qbugihcdv").withTimeZone("izorbloejzs").withExpression("zgkqwvde")) + .withSchedule(new ScheduleBase().withId("naphifkfrpmpl") + .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) + .withStatus(ScheduleStatus.ENABLED)), + new ComputeStartStopSchedule().withStatus(ScheduleStatus.ENABLED) + .withAction(ComputePowerAction.STOP) + .withTriggerType(ComputeTriggerType.RECURRENCE) + .withRecurrence( + new Recurrence().withFrequency(ComputeRecurrenceFrequency.WEEK) + .withInterval(866674193) + .withStartTime("skh") + .withTimeZone("khbykrsmhrcme") + .withSchedule(new ComputeRecurrenceSchedule() + .withHours(Arrays.asList(1886275489, 870078306, 1752857716)) + .withMinutes(Arrays.asList(1390080012, 386873853)) + .withMonthDays(Arrays.asList(1706366230, 312601450)) + .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.WEDNESDAY)))) + .withCron(new Cron().withStartTime("mshfuzzlap") + .withTimeZone("xlvzcgulaebxiauq") + .withExpression("ptessjlw")) + .withSchedule(new ScheduleBase().withId("tpvb") + .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) + .withStatus(ScheduleStatus.DISABLED)), + new ComputeStartStopSchedule().withStatus(ScheduleStatus.ENABLED) + .withAction(ComputePowerAction.STOP) + .withTriggerType(ComputeTriggerType.RECURRENCE) + .withRecurrence( + new Recurrence().withFrequency(ComputeRecurrenceFrequency.DAY) + .withInterval(1004353783) + .withStartTime("zjwjkqo") + .withTimeZone("whiieyozv") + .withSchedule(new ComputeRecurrenceSchedule() + .withHours(Arrays.asList(1545469164, 753177891, 1473475543)) + .withMinutes(Arrays.asList(1387119896, 790465512, 1455410086, 676648911)) + .withMonthDays(Arrays.asList(2010472704, 1198550793, 911257034)) + .withWeekDays(Arrays.asList(ComputeWeekDay.FRIDAY, ComputeWeekDay.WEDNESDAY, + ComputeWeekDay.MONDAY)))) + .withCron(new Cron().withStartTime("bg").withTimeZone("rx").withExpression("uc")) + .withSchedule(new ScheduleBase().withId("vkdlhuduklbjoafm") + .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) + .withStatus(ScheduleStatus.ENABLED)))); model = BinaryData.fromObject(model).toObject(ComputeSchedules.class); Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).status()); Assertions.assertEquals(ComputePowerAction.STOP, model.computeStartStop().get(0).action()); - Assertions.assertEquals(ComputeTriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, + Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.computeStartStop().get(0).triggerType()); + Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(49803923, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("bjmlreesrfwssz", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("cwlisolntfxxcrqm", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(351599598, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1847045848, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1390318472, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, + Assertions.assertEquals(585541295, model.computeStartStop().get(0).recurrence().interval()); + Assertions.assertEquals("aqg", model.computeStartStop().get(0).recurrence().startTime()); + Assertions.assertEquals("bfkceincnrecj", model.computeStartStop().get(0).recurrence().timeZone()); + Assertions.assertEquals(2000833457, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); + Assertions.assertEquals(2081296139, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); + Assertions.assertEquals(295311224, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); + Assertions.assertEquals(ComputeWeekDay.SATURDAY, model.computeStartStop().get(0).recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("abuln", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("skjto", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("dzjs", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("vhxqqmqipaydhfnz", model.computeStartStop().get(0).schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.FAILED, + Assertions.assertEquals("vzvmxtcwghnda", model.computeStartStop().get(0).cron().startTime()); + Assertions.assertEquals("hgsulwvgs", model.computeStartStop().get(0).cron().timeZone()); + Assertions.assertEquals("figvfjjuzkil", model.computeStartStop().get(0).cron().expression()); + Assertions.assertEquals("wuhyzekypy", model.computeStartStop().get(0).schedule().id()); + Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.computeStartStop().get(0).schedule().provisioningStatus()); Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).schedule().status()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java index d832eb8be01f..5bed8f312396 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,10 +13,4 @@ public void testDeserialize() throws Exception { ComputeSecretsInner model = BinaryData.fromString("{\"computeType\":\"ComputeSecrets\"}").toObject(ComputeSecretsInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSecretsInner model = new ComputeSecretsInner(); - model = BinaryData.fromObject(model).toObject(ComputeSecretsInner.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java index 3b54e09c0493..03f0811065b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -23,61 +23,60 @@ public final class ComputeStartStopScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeStartStopSchedule model = BinaryData.fromString( - "{\"id\":\"cigzhogsmgbv\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Month\",\"interval\":2023900183,\"startTime\":\"labt\",\"timeZone\":\"biwznhtfgficudy\",\"schedule\":{\"hours\":[1642375695,1415375083],\"minutes\":[1908555069,674933767],\"monthDays\":[1444212135,2050942222,1385585116,1561771824],\"weekDays\":[\"Thursday\",\"Saturday\"]}},\"cron\":{\"startTime\":\"oitwhrjsdmmazdnc\",\"timeZone\":\"dbjp\",\"expression\":\"hzqpxzbawkikcdgf\"},\"schedule\":{\"id\":\"sd\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}}") + "{\"id\":\"voepknarseiancs\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\",\"action\":\"Stop\",\"triggerType\":\"Cron\",\"recurrence\":{\"frequency\":\"Minute\",\"interval\":1620899251,\"startTime\":\"fgkxenvs\",\"timeZone\":\"lvyakeszsuuvul\",\"schedule\":{\"hours\":[1690460568],\"minutes\":[459876260,144412748,677725704],\"monthDays\":[1719409711,816901355,1260385028,2104105109],\"weekDays\":[\"Thursday\",\"Tuesday\"]}},\"cron\":{\"startTime\":\"c\",\"timeZone\":\"vphirlzbip\",\"expression\":\"nnepkwzzzku\"},\"schedule\":{\"id\":\"wcjomipvw\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}}") .toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.recurrence().frequency()); - Assertions.assertEquals(2023900183, model.recurrence().interval()); - Assertions.assertEquals("labt", model.recurrence().startTime()); - Assertions.assertEquals("biwznhtfgficudy", model.recurrence().timeZone()); - Assertions.assertEquals(1642375695, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1908555069, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1444212135, model.recurrence().schedule().monthDays().get(0)); + Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); + Assertions.assertEquals(ComputePowerAction.STOP, model.action()); + Assertions.assertEquals(ComputeTriggerType.CRON, model.triggerType()); + Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.recurrence().frequency()); + Assertions.assertEquals(1620899251, model.recurrence().interval()); + Assertions.assertEquals("fgkxenvs", model.recurrence().startTime()); + Assertions.assertEquals("lvyakeszsuuvul", model.recurrence().timeZone()); + Assertions.assertEquals(1690460568, model.recurrence().schedule().hours().get(0)); + Assertions.assertEquals(459876260, model.recurrence().schedule().minutes().get(0)); + Assertions.assertEquals(1719409711, model.recurrence().schedule().monthDays().get(0)); Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("oitwhrjsdmmazdnc", model.cron().startTime()); - Assertions.assertEquals("dbjp", model.cron().timeZone()); - Assertions.assertEquals("hzqpxzbawkikcdgf", model.cron().expression()); - Assertions.assertEquals("sd", model.schedule().id()); + Assertions.assertEquals("c", model.cron().startTime()); + Assertions.assertEquals("vphirlzbip", model.cron().timeZone()); + Assertions.assertEquals("nnepkwzzzku", model.cron().expression()); + Assertions.assertEquals("wcjomipvw", model.schedule().id()); Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.schedule().provisioningStatus()); Assertions.assertEquals(ScheduleStatus.ENABLED, model.schedule().status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComputeStartStopSchedule model = new ComputeStartStopSchedule().withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(ComputeTriggerType.RECURRENCE) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) - .withInterval(2023900183) - .withStartTime("labt") - .withTimeZone("biwznhtfgficudy") - .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1642375695, 1415375083)) - .withMinutes(Arrays.asList(1908555069, 674933767)) - .withMonthDays(Arrays.asList(1444212135, 2050942222, 1385585116, 1561771824)) - .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.SATURDAY)))) - .withCron( - new Cron().withStartTime("oitwhrjsdmmazdnc").withTimeZone("dbjp").withExpression("hzqpxzbawkikcdgf")) - .withSchedule(new ScheduleBase().withId("sd") + ComputeStartStopSchedule model = new ComputeStartStopSchedule().withStatus(ScheduleStatus.ENABLED) + .withAction(ComputePowerAction.STOP) + .withTriggerType(ComputeTriggerType.CRON) + .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) + .withInterval(1620899251) + .withStartTime("fgkxenvs") + .withTimeZone("lvyakeszsuuvul") + .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1690460568)) + .withMinutes(Arrays.asList(459876260, 144412748, 677725704)) + .withMonthDays(Arrays.asList(1719409711, 816901355, 1260385028, 2104105109)) + .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.TUESDAY)))) + .withCron(new Cron().withStartTime("c").withTimeZone("vphirlzbip").withExpression("nnepkwzzzku")) + .withSchedule(new ScheduleBase().withId("wcjomipvw") .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) .withStatus(ScheduleStatus.ENABLED)); model = BinaryData.fromObject(model).toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.recurrence().frequency()); - Assertions.assertEquals(2023900183, model.recurrence().interval()); - Assertions.assertEquals("labt", model.recurrence().startTime()); - Assertions.assertEquals("biwznhtfgficudy", model.recurrence().timeZone()); - Assertions.assertEquals(1642375695, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1908555069, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1444212135, model.recurrence().schedule().monthDays().get(0)); + Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); + Assertions.assertEquals(ComputePowerAction.STOP, model.action()); + Assertions.assertEquals(ComputeTriggerType.CRON, model.triggerType()); + Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.recurrence().frequency()); + Assertions.assertEquals(1620899251, model.recurrence().interval()); + Assertions.assertEquals("fgkxenvs", model.recurrence().startTime()); + Assertions.assertEquals("lvyakeszsuuvul", model.recurrence().timeZone()); + Assertions.assertEquals(1690460568, model.recurrence().schedule().hours().get(0)); + Assertions.assertEquals(459876260, model.recurrence().schedule().minutes().get(0)); + Assertions.assertEquals(1719409711, model.recurrence().schedule().monthDays().get(0)); Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("oitwhrjsdmmazdnc", model.cron().startTime()); - Assertions.assertEquals("dbjp", model.cron().timeZone()); - Assertions.assertEquals("hzqpxzbawkikcdgf", model.cron().expression()); - Assertions.assertEquals("sd", model.schedule().id()); + Assertions.assertEquals("c", model.cron().startTime()); + Assertions.assertEquals("vphirlzbip", model.cron().timeZone()); + Assertions.assertEquals("nnepkwzzzku", model.cron().expression()); + Assertions.assertEquals("wcjomipvw", model.schedule().id()); Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.schedule().provisioningStatus()); Assertions.assertEquals(ScheduleStatus.ENABLED, model.schedule().status()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java index 7581562d2202..6200ffe55d27 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; @@ -26,10 +26,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.computes() - .delete("fdfupktwp", "pse", "ivytabvbbkflewg", UnderlyingResourceAction.DETACH, + .delete("lowuthfwphnmllb", "jehwhxxuo", "neaqahzkvnapxht", UnderlyingResourceAction.DETACH, com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetAllowedResizeSizesWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetAllowedResizeSizesWithResponseMockTests.java new file mode 100644 index 000000000000..63957d902992 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetAllowedResizeSizesWithResponseMockTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.BillingCurrency; +import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; +import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; +import com.azure.resourcemanager.machinelearning.models.VMTier; +import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; +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 ComputesGetAllowedResizeSizesWithResponseMockTests { + @Test + public void testGetAllowedResizeSizesWithResponse() throws Exception { + String responseStr + = "{\"value\":[{\"name\":\"uovsv\",\"family\":\"pcxdkm\",\"vCPUs\":962882979,\"gpus\":343912140,\"osVhdSizeMB\":1506629016,\"maxResourceVolumeMB\":85780998,\"memoryGB\":63.66983090721882,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":84.9250025833991,\"osType\":\"Linux\",\"vmTier\":\"Spot\"},{\"retailPrice\":11.404165228178009,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":50.31459799573431,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"z\"]},{\"name\":\"mzdnvno\",\"family\":\"lgrenuqsgertx\",\"vCPUs\":1978888293,\"gpus\":1247770288,\"osVhdSizeMB\":431655393,\"maxResourceVolumeMB\":2123284053,\"memoryGB\":40.149268977500064,\"lowPriorityCapable\":false,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":23.75291135264903,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":58.75567898167034,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":93.04283143815307,\"osType\":\"Windows\",\"vmTier\":\"Spot\"},{\"retailPrice\":37.45647973795664,\"osType\":\"Linux\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"a\",\"pxlxbofdchb\",\"acfskzwesetutq\",\"sojwoixt\"]},{\"name\":\"akytzcm\",\"family\":\"v\",\"vCPUs\":549805019,\"gpus\":2066426072,\"osVhdSizeMB\":1251002405,\"maxResourceVolumeMB\":1101503345,\"memoryGB\":44.75783593796662,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":56.95333810493324,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":56.35242249428367,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":17.524600017221047,\"osType\":\"Windows\",\"vmTier\":\"Spot\"},{\"retailPrice\":51.754339032222,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"klv\"]},{\"name\":\"sxyk\",\"family\":\"hz\",\"vCPUs\":781894863,\"gpus\":1692757023,\"osVhdSizeMB\":44069704,\"maxResourceVolumeMB\":1703611698,\"memoryGB\":99.83801404276772,\"lowPriorityCapable\":false,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":74.33040993253306,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":85.89277585646366,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":53.73700286592745,\"osType\":\"Linux\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"qjzfzkhdnpnmr\",\"jdfkqlkaipf\"]}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + VirtualMachineSizeListResult response = manager.computes() + .getAllowedResizeSizesWithResponse("hcawexgeqojzvu", "x", "kojjp", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(BillingCurrency.USD, response.value().get(0).estimatedVMPrices().billingCurrency()); + Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, response.value().get(0).estimatedVMPrices().unitOfMeasure()); + Assertions.assertEquals(84.9250025833991, + response.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); + Assertions.assertEquals(VMPriceOSType.LINUX, + response.value().get(0).estimatedVMPrices().values().get(0).osType()); + Assertions.assertEquals(VMTier.SPOT, response.value().get(0).estimatedVMPrices().values().get(0).vmTier()); + Assertions.assertEquals("z", response.value().get(0).supportedComputeTypes().get(0)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java index 149a42d60265..05b8c52701a8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; @@ -26,10 +26,10 @@ public void testListKeysWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComputeSecrets response = manager.computes() - .listKeysWithResponse("aqlmihnmtrdlpxi", "wgecpvfpnrzikvo", "loeohy", com.azure.core.util.Context.NONE) + .listKeysWithResponse("fbj", "bkj", "gzkcpt", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java index 629c9a659078..a8654761c5c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; @@ -21,17 +21,17 @@ public final class ComputesListNodesMockTests { @Test public void testListNodes() throws Exception { String responseStr - = "{\"nodes\":[{\"nodeId\":\"ekkbnj\",\"privateIpAddress\":\"vmptedeue\",\"publicIpAddress\":\"hshnfiygpg\",\"port\":316442953,\"nodeState\":\"unusable\",\"runId\":\"ng\"}]}"; + = "{\"nodes\":[{\"nodeId\":\"xjttnurkmerqza\",\"privateIpAddress\":\"womevqvv\",\"publicIpAddress\":\"wdlduvimgtceor\",\"port\":121478755,\"nodeState\":\"running\",\"runId\":\"p\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.computes().listNodes("tutbuvedwuu", "bmenxcqs", "wclykcr", com.azure.core.util.Context.NONE); + = manager.computes().listNodes("tkbzwgjupjbdqmn", "ia", "qssh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateCustomServicesWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateCustomServicesWithResponseMockTests.java new file mode 100644 index 000000000000..546c41b30706 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateCustomServicesWithResponseMockTests.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.BindOptions; +import com.azure.resourcemanager.machinelearning.models.CustomService; +import com.azure.resourcemanager.machinelearning.models.Docker; +import com.azure.resourcemanager.machinelearning.models.Endpoint; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariable; +import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; +import com.azure.resourcemanager.machinelearning.models.Image; +import com.azure.resourcemanager.machinelearning.models.ImageType; +import com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig; +import com.azure.resourcemanager.machinelearning.models.Protocol; +import com.azure.resourcemanager.machinelearning.models.TmpfsOptions; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; +import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; +import com.azure.resourcemanager.machinelearning.models.VolumeOptions; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ComputesUpdateCustomServicesWithResponseMockTests { + @Test + public void testUpdateCustomServicesWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.computes() + .updateCustomServicesWithResponse("tqjtsz", "excqcwbxxvcvek", "jdruml", Arrays.asList( + new CustomService().withName("wwqh") + .withImage(new Image() + .withType(ImageType.DOCKER) + .withReference("w") + .withVersion("arswsvtzotmwxq") + .withAdditionalProperties(mapOf("wrtmjskb", "\"datadanfexlawkeqjhz\"", "rpajbiig", + "\"datamwb\"", "xqbknoxjhedwh", "\"datar\"", "mvounbyvsfqu", "\"dataenjnady\""))) + .withEnvironmentVariables(mapOf("jgdjvyclas", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("uzkwigifinoy") + .withAdditionalProperties(mapOf("lcnk", "\"datalpshxjhanskoo\"", "qhscaand", + "\"datajjltuymna\"", "lsb", "\"datalvccuvcva\"", "jiql", "\"dataqsqvfyokssta\"")), + "exar", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("nupftek") + .withAdditionalProperties( + mapOf("lthowcsuebt", "\"datanpvqczpkooa\"", "euimtxmd", "\"datag\"")), + "nwnj", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("irnivf") + .withAdditionalProperties(mapOf("p", "\"dataskinmxanjguadh\"", "shmqxgjzslho", "\"datati\"", + "spvkcnggo", "\"datayqxipb\"", "qjnouuujl", "\"datafxstwaaz\"")))) + .withDocker(new Docker().withPrivileged(false) + .withAdditionalProperties(mapOf("hqzvwznwcqoapdtj", "\"datahjxwwqzsyetbff\"", "etfdpurvz", + "\"datal\"", "lk", "\"datamfb\""))) + .withEndpoints(Arrays.asList( + new Endpoint().withProtocol(Protocol.HTTP) + .withName("fume") + .withTarget(96398704) + .withPublished(421877560) + .withHostIp("vqhbwsvi"), + new Endpoint().withProtocol(Protocol.TCP) + .withName("aghfvublszsveg") + .withTarget(350110535) + .withPublished(473639683) + .withHostIp("pnymbjrsdiufqxr"), + new Endpoint() + .withProtocol(Protocol.TCP) + .withName("osuzegmcmlzmfe") + .withTarget(1006883116) + .withPublished(195006450) + .withHostIp("rvjgwnmxcngow"))) + .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.TMPFS) + .withReadOnly(false) + .withSource("xhorzozfrgkwp") + .withTarget("efabgtcggoppm") + .withConsistency("moug") + .withBind( + new BindOptions().withPropagation("c").withCreateHostPath(true).withSelinux("unamzqvawk")) + .withVolume(new VolumeOptions().withNocopy(true)) + .withTmpfs(new TmpfsOptions().withSize(1806827133)), + new VolumeDefinition().withType(VolumeDefinitionType.VOLUME) + .withReadOnly(false) + .withSource("pgqwb") + .withTarget("km") + .withConsistency("lmycxmhorrec") + .withBind(new BindOptions().withPropagation("wnqlizlcy") + .withCreateHostPath(false) + .withSelinux("kfp")) + .withVolume(new VolumeOptions().withNocopy(false)) + .withTmpfs(new TmpfsOptions().withSize(17731896)), + new VolumeDefinition().withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("vmajcmpohjdvf") + .withTarget("b") + .withConsistency("wymahboi") + .withBind(new BindOptions().withPropagation("uyqdj") + .withCreateHostPath(false) + .withSelinux("jssqpkm")) + .withVolume(new VolumeOptions().withNocopy(false)) + .withTmpfs(new TmpfsOptions().withSize(74240592)), + new VolumeDefinition().withType(VolumeDefinitionType.TMPFS) + .withReadOnly(false) + .withSource("zqwwttqjyiw") + .withTarget("eryavbjvvcogups") + .withConsistency("ofaskyyvdj") + .withBind(new BindOptions().withPropagation("buuhbcck") + .withCreateHostPath(false) + .withSelinux("e")) + .withVolume(new VolumeOptions().withNocopy(true)) + .withTmpfs(new TmpfsOptions().withSize(1346138225)))) + .withKernel(new JupyterKernelConfig().withArgv(Arrays.asList("phlbkquhmblnismv")) + .withDisplayName("asdexsrgl") + .withLanguage("juyvkkp")) + .withAdditionalProperties(mapOf("ipdxqnpdjomddad", "\"dataesp\"", "iyhdbbjgsjmcybrp", "\"datan\"", + "lkyh", "\"dataosjxywwv\"")), + new CustomService().withName("e") + .withImage(new Image().withType(ImageType.AZUREML) + .withReference("ghrrxauuh") + .withVersion("hkizyxoyxnhu") + .withAdditionalProperties(mapOf("rpdxygf", "\"dataipfryivpezz\""))) + .withEnvironmentVariables(mapOf("dokuqnkoskf", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("ezkpdm") + .withAdditionalProperties(mapOf("disypgapfdwhwbe", "\"datakvhuiadyh\"", "rqe", "\"dataft\"", + "wwidnrds", "\"datarjopotefekfxmgj\"")), + "xzpz", + new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) + .withValue("y") + .withAdditionalProperties(mapOf("emrhbzetss", "\"dataeevmb\"", "lie", + "\"datawwexbotbrepef\"", "cscootfsgilwis", "\"dataocyarvsfz\"")))) + .withDocker(new Docker().withPrivileged(false) + .withAdditionalProperties(mapOf("jqtuzb", "\"datatrfvogknocshmp\""))) + .withEndpoints(Arrays.asList( + new Endpoint().withProtocol(Protocol.UDP) + .withName("hfjqpxydpamctzm") + .withTarget(96367630) + .withPublished(608431233) + .withHostIp("gunsjssreo"), + new Endpoint().withProtocol(Protocol.HTTP) + .withName("oue") + .withTarget(1242141375) + .withPublished(59078105) + .withHostIp("rsp"), + new Endpoint().withProtocol(Protocol.HTTP) + .withName("yekggoawlqvu") + .withTarget(1822196985) + .withPublished(2114374912) + .withHostIp("sgyrznostngxvr"))) + .withVolumes(Arrays.asList( + new VolumeDefinition().withType(VolumeDefinitionType.BIND) + .withReadOnly(true) + .withSource("dsu") + .withTarget("umbcirkbkqpsvo") + .withConsistency("h") + .withBind(new BindOptions().withPropagation("uuy") + .withCreateHostPath(false) + .withSelinux("rufvmgblbqx")) + .withVolume(new VolumeOptions().withNocopy(true)) + .withTmpfs(new TmpfsOptions().withSize(619289628)), + new VolumeDefinition().withType(VolumeDefinitionType.NPIPE) + .withReadOnly(false) + .withSource("jnbbbgvmowyzxq") + .withTarget("hml") + .withConsistency("nzsckfuzuchotdz") + .withBind(new BindOptions().withPropagation("qhwpuaermaww") + .withCreateHostPath(true) + .withSelinux("azqcemcotw")) + .withVolume(new VolumeOptions().withNocopy(true)) + .withTmpfs(new TmpfsOptions().withSize(1514842489)), + new VolumeDefinition().withType(VolumeDefinitionType.NPIPE) + .withReadOnly(true) + .withSource("vdf") + .withTarget("xbupsx") + .withConsistency("jpgxcgqkhy") + .withBind(new BindOptions().withPropagation("jwkrxm") + .withCreateHostPath(false) + .withSelinux("fncwlwovkzbo")) + .withVolume(new VolumeOptions().withNocopy(true)) + .withTmpfs(new TmpfsOptions().withSize(1242023808)), + new VolumeDefinition().withType(VolumeDefinitionType.NPIPE) + .withReadOnly(false) + .withSource("aljwfnc") + .withTarget("aylcpgzmx") + .withConsistency("ppqajdm") + .withBind(new BindOptions().withPropagation("ntqqguhvnwr") + .withCreateHostPath(false) + .withSelinux("netbzfwf")) + .withVolume(new VolumeOptions().withNocopy(true)) + .withTmpfs(new TmpfsOptions().withSize(437845143)))) + .withKernel(new JupyterKernelConfig().withArgv(Arrays.asList("edlclxx", "uyff", "qombdsgqxacidu")) + .withDisplayName("zzhdjbyfdfu") + .withLanguage("nhpyylek")) + .withAdditionalProperties(mapOf("pwjvfisloqu", "\"datawvjvzznyjqbw\""))), + com.azure.core.util.Context.NONE); + + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateDataMountsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateDataMountsWithResponseMockTests.java new file mode 100644 index 000000000000..0e957891fa35 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateDataMountsWithResponseMockTests.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; +import com.azure.resourcemanager.machinelearning.models.MountAction; +import com.azure.resourcemanager.machinelearning.models.MountMode; +import com.azure.resourcemanager.machinelearning.models.MountState; +import com.azure.resourcemanager.machinelearning.models.SourceType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ComputesUpdateDataMountsWithResponseMockTests { + @Test + public void testUpdateDataMountsWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.computes() + .updateDataMountsWithResponse("vc", "pydnujgblski", "pr", + Arrays.asList( + new ComputeInstanceDataMount().withSource("a") + .withSourceType(SourceType.DATASTORE) + .withMountName("drgxpuxpzsl") + .withMountAction(MountAction.MOUNT) + .withMountMode(MountMode.READ_WRITE) + .withCreatedBy("rycchqzkfgesdzgs") + .withMountPath("hekbmdhchiojsr") + .withMountState(MountState.MOUNT_FAILED) + .withMountedOn(OffsetDateTime.parse("2021-08-12T13:38Z")) + .withError("euvwysbme"), + new ComputeInstanceDataMount().withSource("g") + .withSourceType(SourceType.DATASET) + .withMountName("ihbkupae") + .withMountAction(MountAction.UNMOUNT) + .withMountMode(MountMode.READ_WRITE) + .withCreatedBy("yzuyqzj") + .withMountPath("bn") + .withMountState(MountState.MOUNT_REQUESTED) + .withMountedOn(OffsetDateTime.parse("2021-07-12T03:18:01Z")) + .withError("scyzvv"), + new ComputeInstanceDataMount().withSource("my") + .withSourceType(SourceType.URI) + .withMountName("bs") + .withMountAction(MountAction.UNMOUNT) + .withMountMode(MountMode.READ_WRITE) + .withCreatedBy("az") + .withMountPath("mmjaigaxwq") + .withMountState(MountState.MOUNTED) + .withMountedOn(OffsetDateTime.parse("2021-07-20T12:51:57Z")) + .withError("she"), + new ComputeInstanceDataMount().withSource("tdvhokxxfawh") + .withSourceType(SourceType.DATASTORE) + .withMountName("solh") + .withMountAction(MountAction.MOUNT) + .withMountMode(MountMode.READ_WRITE) + .withCreatedBy("jbgiq") + .withMountPath("pelnud") + .withMountState(MountState.UNMOUNTED) + .withMountedOn(OffsetDateTime.parse("2021-01-17T06:37:22Z")) + .withError("xorsdvu")), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateIdleShutdownSettingWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateIdleShutdownSettingWithResponseMockTests.java new file mode 100644 index 000000000000..94e1d6ecb28c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesUpdateIdleShutdownSettingWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ComputesUpdateIdleShutdownSettingWithResponseMockTests { + @Test + public void testUpdateIdleShutdownSettingWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.computes() + .updateIdleShutdownSettingWithResponse("rqfksjllfgmdo", "ihlvrsqci", "mirybwga", + new IdleShutdownSetting().withIdleTimeBeforeShutdown("vwkynemazgtbynx"), + com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsAddBulkMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsAddBulkMockTests.java new file mode 100644 index 000000000000..4e794af1deba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsAddBulkMockTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ConnectionRaiBlocklistItemsAddBulkMockTests { + @Test + public void testAddBulk() throws Exception { + String responseStr + = "[{\"properties\":{\"isRegex\":false,\"pattern\":\"qgmjjprd\"},\"id\":\"blonlhtgexwjhicu\",\"name\":\"qavimxnhyl\",\"type\":\"ogtvlrbgd\"}]"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + List response = manager.connectionRaiBlocklistItems() + .addBulk("bylvrofh", "it", "hhuavwrcuahl", "mblls", Arrays.asList( + new RaiBlocklistItemBulkRequest().withName("drimoopfrdfjjrh") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("oqpobwarsdxkwmq")), + new RaiBlocklistItemBulkRequest().withName("xbqyavcxjols") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("pnms")), + new RaiBlocklistItemBulkRequest().withName("ntakr") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("fsuwcmzpwkca"))), + com.azure.core.util.Context.NONE); + + Assertions.assertFalse(response.get(0).properties().isRegex()); + Assertions.assertEquals("qgmjjprd", response.get(0).properties().pattern()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsCreateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsCreateMockTests.java new file mode 100644 index 000000000000..97b47762a496 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsCreateMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; +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 ConnectionRaiBlocklistItemsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"isRegex\":false,\"pattern\":\"adgyhqrasxe\"},\"id\":\"jqqhbkxiu\",\"name\":\"iafbhzdj\",\"type\":\"d\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiBlocklistItemPropertiesBasicResource response = manager.connectionRaiBlocklistItems() + .define("wevlohuahl") + .withExistingRaiBlocklist("nawc", "aarboxaluoadmc", "v", "jnpef") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(true).withPattern("oxgp")) + .create(); + + Assertions.assertFalse(response.properties().isRegex()); + Assertions.assertEquals("adgyhqrasxe", response.properties().pattern()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsGetWithResponseMockTests.java new file mode 100644 index 000000000000..2ad0009f1008 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; +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 ConnectionRaiBlocklistItemsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"isRegex\":false,\"pattern\":\"zcxkuusbahca\"},\"id\":\"qeybdnzeyakgrko\",\"name\":\"fqmxzkicx\",\"type\":\"umq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiBlocklistItemPropertiesBasicResource response = manager.connectionRaiBlocklistItems() + .getWithResponse("rtnhdxlfn", "dclkmg", "nzlfyxaiaf", "lmx", "kfvycvhwduoa", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertFalse(response.properties().isRegex()); + Assertions.assertEquals("zcxkuusbahca", response.properties().pattern()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationsListMockTests.java new file mode 100644 index 000000000000..e0e07ef5a89c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationsListMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; +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 ConnectionRaiBlocklistItemsOperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"isRegex\":false,\"pattern\":\"hqdl\"},\"id\":\"wqngpvvnbuknvku\",\"name\":\"lszxuuqbuv\",\"type\":\"beswg\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.connectionRaiBlocklistItemsOperations() + .list("rzijggbpdp", "gvqfznxzaliicr", "tyhmflvxil", "ytjywfqz", com.azure.core.util.Context.NONE); + + Assertions.assertFalse(response.iterator().next().properties().isRegex()); + Assertions.assertEquals("hqdl", response.iterator().next().properties().pattern()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsCreateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsCreateMockTests.java new file mode 100644 index 000000000000..a00455ee3d5c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsCreateMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; +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 ConnectionRaiBlocklistsCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"description\":\"badkzpqctuplpkje\"},\"id\":\"nrnzl\",\"name\":\"lu\",\"type\":\"oeftrbxomaa\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiBlocklistPropertiesBasicResource response = manager.connectionRaiBlocklists() + .define("iptudw") + .withExistingConnection("ztgduwun", "wva", "lfgvtczzvqzhtme") + .withProperties(new RaiBlocklistProperties().withDescription("srpsjkqfabju")) + .create(); + + Assertions.assertEquals("badkzpqctuplpkje", response.properties().description()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsGetWithResponseMockTests.java new file mode 100644 index 000000000000..4493438ba901 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsGetWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; +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 ConnectionRaiBlocklistsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"description\":\"a\"},\"id\":\"gatynkihb\",\"name\":\"ixyb\",\"type\":\"owjzoopzaenlzj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiBlocklistPropertiesBasicResource response = manager.connectionRaiBlocklists() + .getWithResponse("lgoravovqpnxpufv", "gvfgme", "fyelfxlbkbh", "dkqfjzgyzj", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("a", response.properties().description()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationsListMockTests.java new file mode 100644 index 000000000000..20c348781490 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsOperationsListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; +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 ConnectionRaiBlocklistsOperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"description\":\"tbss\"},\"id\":\"jw\",\"name\":\"e\",\"type\":\"xrftt\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.connectionRaiBlocklistsOperations() + .list("varfqverxelquqze", "gvjmllzykalbaumm", "dwqiucpj", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("tbss", response.iterator().next().properties().description()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesCreateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesCreateMockTests.java new file mode 100644 index 000000000000..5f1de637c1f7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesCreateMockTests.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +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 ConnectionRaiPoliciesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"basePolicyName\":\"cbrtltpohbz\",\"completionBlocklists\":[{\"blocking\":true,\"blocklistName\":\"mi\"}],\"contentFilters\":[{\"allowedContentLevel\":\"Low\",\"blocking\":true,\"enabled\":false,\"name\":\"yelrteunkwypu\",\"source\":\"Prompt\"}],\"mode\":\"Deferred\",\"promptBlocklists\":[{\"blocking\":true,\"blocklistName\":\"qlfdml\"},{\"blocking\":false,\"blocklistName\":\"brwjlwfthfrxwiq\"}],\"type\":\"UserManaged\"},\"id\":\"kwrcbgxyprabp\",\"name\":\"wecz\",\"type\":\"izabjb\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiPolicyPropertiesBasicResource response + = manager.connectionRaiPolicies() + .create("tfdvyypjkjir", "jo", "salvjlhn", "muaeokympwquutlz", + new RaiPolicyPropertiesBasicResourceInner() + .withProperties( + new RaiPolicyProperties().withBasePolicyName("u") + .withCompletionBlocklists(Arrays.asList( + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("yanh"), + new RaiBlocklistConfig().withBlocking(true).withBlocklistName("eftgu"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("dpufqsdt"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("bxolmehquq"))) + .withContentFilters(Arrays.asList( + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.MEDIUM) + .withBlocking(true) + .withEnabled(true) + .withName("upenoup") + .withSource(RaiPolicyContentSource.COMPLETION), + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.MEDIUM) + .withBlocking(false) + .withEnabled(true) + .withName("adesisdkcuhqts") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.DEFAULT) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("vv"), + new RaiBlocklistConfig().withBlocking(true).withBlocklistName("rgelgodue"))) + .withType(RaiPolicyType.USER_MANAGED)), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("cbrtltpohbz", response.properties().basePolicyName()); + Assertions.assertTrue(response.properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("mi", response.properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.LOW, + response.properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertTrue(response.properties().contentFilters().get(0).blocking()); + Assertions.assertFalse(response.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("yelrteunkwypu", response.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, response.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFERRED, response.properties().mode()); + Assertions.assertTrue(response.properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("qlfdml", response.properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.USER_MANAGED, response.properties().type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..634c1ee159ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesGetWithResponseMockTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +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 ConnectionRaiPoliciesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"basePolicyName\":\"cesvcsbyimy\",\"completionBlocklists\":[{\"blocking\":true,\"blocklistName\":\"pdnbzqweohmlkzhx\"},{\"blocking\":false,\"blocklistName\":\"uanxzrqtmh\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":false,\"enabled\":false,\"name\":\"rkhjjbw\",\"source\":\"Completion\"}],\"mode\":\"Deferred\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"oguypmselwszqve\"}],\"type\":\"SystemManaged\"},\"id\":\"xljjzdbzkmw\",\"name\":\"wvk\",\"type\":\"jshcsnkiygpqxqe\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiPolicyPropertiesBasicResource response = manager.connectionRaiPolicies() + .getWithResponse("reozp", "fkcamzcbzgi", "lqpegcgdndpb", "ieymmcbiktetzv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("cesvcsbyimy", response.properties().basePolicyName()); + Assertions.assertTrue(response.properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("pdnbzqweohmlkzhx", + response.properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, + response.properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertFalse(response.properties().contentFilters().get(0).blocking()); + Assertions.assertFalse(response.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("rkhjjbw", response.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + response.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFERRED, response.properties().mode()); + Assertions.assertFalse(response.properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("oguypmselwszqve", response.properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, response.properties().type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationsListMockTests.java new file mode 100644 index 000000000000..ddac1c5a2226 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesOperationsListMockTests.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +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 ConnectionRaiPoliciesOperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"basePolicyName\":\"eeplzrerxydsom\",\"completionBlocklists\":[{\"blocking\":false,\"blocklistName\":\"kjtm\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":true,\"enabled\":true,\"name\":\"grwtpesfanm\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"Low\",\"blocking\":true,\"enabled\":true,\"name\":\"ylvpyhhgqyszj\",\"source\":\"Prompt\"},{\"allowedContentLevel\":\"High\",\"blocking\":false,\"enabled\":false,\"name\":\"ekolnylpykjp\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"High\",\"blocking\":true,\"enabled\":true,\"name\":\"xaicheycak\",\"source\":\"Completion\"}],\"mode\":\"Deferred\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"hadzyxaanhwuqewc\"},{\"blocking\":true,\"blocklistName\":\"sfbkxfkeeqofw\"}],\"type\":\"UserManaged\"},\"id\":\"eerwsswzmr\",\"name\":\"djry\",\"type\":\"fpdudxbigeuri\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.connectionRaiPoliciesOperations().list("y", "ddijfkkt", "g", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("eeplzrerxydsom", response.iterator().next().properties().basePolicyName()); + Assertions.assertFalse(response.iterator().next().properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("kjtm", + response.iterator().next().properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, + response.iterator().next().properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertTrue(response.iterator().next().properties().contentFilters().get(0).blocking()); + Assertions.assertTrue(response.iterator().next().properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("grwtpesfanm", response.iterator().next().properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + response.iterator().next().properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFERRED, response.iterator().next().properties().mode()); + Assertions.assertFalse(response.iterator().next().properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("hadzyxaanhwuqewc", + response.iterator().next().properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.USER_MANAGED, response.iterator().next().properties().type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsCreateOrUpdateDeploymentMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsCreateOrUpdateDeploymentMockTests.java new file mode 100644 index 000000000000..363f61ca9826 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsCreateOrUpdateDeploymentMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +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 ConnectionsCreateOrUpdateDeploymentMockTests { + @Test + public void testCreateOrUpdateDeployment() throws Exception { + String responseStr + = "{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"yltornv\",\"provisioningState\":\"Succeeded\"},\"id\":\"olwifbdwy\",\"name\":\"vcy\",\"type\":\"bbvkthre\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EndpointDeploymentResourcePropertiesBasicResource response = manager.connections() + .createOrUpdateDeployment("nc", "qcocc", "dxjrrbyrbnkqps", "uoup", + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("gdtuhdoimojcm")), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("yltornv", response.properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetAllModelsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetAllModelsWithResponseMockTests.java new file mode 100644 index 000000000000..edb99997fbf6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetAllModelsWithResponseMockTests.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointModels; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +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 ConnectionsGetAllModelsWithResponseMockTests { + @Test + public void testGetAllModelsWithResponse() throws Exception { + String responseStr + = "{\"value\":[{\"capabilities\":{\"xl\":\"rjzbxxxqfrntzbh\"},\"deprecation\":{\"fineTune\":\"2021-08-15T23:39:31Z\",\"inference\":\"2021-03-20T01:14:02Z\"},\"finetuneCapabilities\":{\"bmrwhknefcoo\":\"oinozsmyvvfap\"},\"format\":\"mdspd\",\"isDefaultVersion\":true,\"lifecycleStatus\":\"GenerallyAvailable\",\"maxCapacity\":683122353,\"name\":\"ibgol\",\"skus\":[{\"capacity\":{},\"connectionIds\":[\"jwny\"],\"deprecationDate\":\"2021-08-02T09:33:14Z\",\"name\":\"rttnri\",\"rateLimits\":[{},{},{}],\"usageName\":\"fiksjpkig\"},{\"capacity\":{},\"connectionIds\":[\"qt\"],\"deprecationDate\":\"2021-11-13T13:34:40Z\",\"name\":\"pbfsxps\",\"rateLimits\":[{}],\"usageName\":\"zpqydnokkkg\"},{\"capacity\":{},\"connectionIds\":[\"yftsneftzetjc\"],\"deprecationDate\":\"2021-07-10T18:14:50Z\",\"name\":\"xbkqmag\",\"rateLimits\":[{},{}],\"usageName\":\"yyw\"},{\"capacity\":{},\"connectionIds\":[\"oox\",\"hhvgddfzcnylz\"],\"deprecationDate\":\"2021-02-03T15:45:15Z\",\"name\":\"fsgcpwrtgt\",\"rateLimits\":[{},{}],\"usageName\":\"hofoptbiuik\"}],\"version\":\"jjfecxv\"},{\"capabilities\":{\"snr\":\"povjvvx\",\"flqwqcxyiqppacji\":\"wrbmhjm\",\"jzgnla\":\"rllacylbtkxe\"},\"deprecation\":{\"fineTune\":\"2021-09-02T18:42:27Z\",\"inference\":\"2021-02-23T22:09:02Z\"},\"finetuneCapabilities\":{\"wlntenhnqtvx\":\"gojvgjezrwbob\",\"eojl\":\"hbehhehotqorrvwl\",\"fdsgrtkevim\":\"ugzlvgjirjkkrs\",\"klbfvtzdtw\":\"upgevjmandrvvj\"},\"format\":\"jlpkocrexfmqfuf\",\"isDefaultVersion\":true,\"lifecycleStatus\":\"Preview\",\"maxCapacity\":900832992,\"name\":\"zjrjglacpzgz\",\"skus\":[{\"capacity\":{},\"connectionIds\":[\"ujkeytpmlrjnnbmo\"],\"deprecationDate\":\"2021-08-29T19:39:24Z\",\"name\":\"qtvatujph\",\"rateLimits\":[{},{}],\"usageName\":\"vvogwghxoxw\"},{\"capacity\":{},\"connectionIds\":[\"kmpfnw\",\"rmzwmtsmeaciyp\"],\"deprecationDate\":\"2021-10-10T19:51:23Z\",\"name\":\"g\",\"rateLimits\":[{},{},{}],\"usageName\":\"cusvidkzbdbvlsn\"},{\"capacity\":{},\"connectionIds\":[\"rfomlh\",\"hiktecsmocqw\",\"ydaakett\"],\"deprecationDate\":\"2021-12-06T01:33:13Z\",\"name\":\"viwfsqjxxbsafqi\",\"rateLimits\":[{},{},{}],\"usageName\":\"otsyjzdas\"},{\"capacity\":{},\"connectionIds\":[\"prhqomuz\"],\"deprecationDate\":\"2021-09-04T08:10:25Z\",\"name\":\"kofklbddlnzmff\",\"rateLimits\":[{},{},{},{}],\"usageName\":\"lammvazvwzienij\"}],\"version\":\"gd\"},{\"capabilities\":{\"gztfgc\":\"ivrhjxdn\",\"d\":\"zvbre\",\"rseiidfpw\":\"qggzahng\",\"sibqilbpyjz\":\"ybmxfhzzgolfe\"},\"deprecation\":{\"fineTune\":\"2021-06-21T17:45:12Z\",\"inference\":\"2021-04-09T04:10:49Z\"},\"finetuneCapabilities\":{\"zvv\":\"vz\",\"bheyxewcsk\":\"rougalywgqrevb\",\"fvvxi\":\"vkwbpr\"},\"format\":\"rjamztvnmr\",\"isDefaultVersion\":true,\"lifecycleStatus\":\"Preview\",\"maxCapacity\":902432352,\"name\":\"mkbofu\",\"skus\":[{\"capacity\":{},\"connectionIds\":[\"ouzvegtnphnotr\",\"yy\",\"eag\",\"vjdunbaets\"],\"deprecationDate\":\"2021-10-29T22:29:36Z\",\"name\":\"gbvvkuzygzr\",\"rateLimits\":[{},{},{},{}],\"usageName\":\"t\"}],\"version\":\"c\"},{\"capabilities\":{\"urnpkkb\":\"z\",\"d\":\"kzcfiosralbx\",\"fpqfpkrmlbkv\":\"nluvcwuafbhxoa\",\"efvnvscyut\":\"ogzawfoqdnxu\"},\"deprecation\":{\"fineTune\":\"2021-06-15T01:09:02Z\",\"inference\":\"2021-01-05T22:15:45Z\"},\"finetuneCapabilities\":{\"ygfvbfejbozklgpi\":\"rluqaqn\",\"snplqfi\":\"vpsmvksauw\",\"mkplrjkmpaxoey\":\"xfqmdjzgo\",\"agr\":\"pofaogvmq\"},\"format\":\"qhwfskmkdr\",\"isDefaultVersion\":false,\"lifecycleStatus\":\"GenerallyAvailable\",\"maxCapacity\":1964326099,\"name\":\"wcxjve\",\"skus\":[{\"capacity\":{},\"connectionIds\":[\"mcc\",\"otqocnryyp\",\"hdul\",\"solbzzbrufkeylk\"],\"deprecationDate\":\"2021-02-23T17:20:11Z\",\"name\":\"grdf\",\"rateLimits\":[{},{},{},{}],\"usageName\":\"qdsphvosucry\"},{\"capacity\":{},\"connectionIds\":[\"thzfotfrfhrjka\",\"dofshgmqxwop\",\"nitrmzvnrfkzn\",\"aittbmobrxhwpg\"],\"deprecationDate\":\"2021-05-19T02:40:47Z\",\"name\":\"rjmilog\",\"rateLimits\":[{}],\"usageName\":\"gqib\"}],\"version\":\"l\"}],\"nextLink\":\"xhztufw\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EndpointModels response = manager.connections() + .getAllModelsWithResponse("ohspkgx", "mv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("rjzbxxxqfrntzbh", response.value().get(0).capabilities().get("xl")); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T23:39:31Z"), + response.value().get(0).deprecation().fineTune()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-20T01:14:02Z"), + response.value().get(0).deprecation().inference()); + Assertions.assertEquals("oinozsmyvvfap", response.value().get(0).finetuneCapabilities().get("bmrwhknefcoo")); + Assertions.assertEquals("mdspd", response.value().get(0).format()); + Assertions.assertTrue(response.value().get(0).isDefaultVersion()); + Assertions.assertEquals(ModelLifecycleStatus.GENERALLY_AVAILABLE, response.value().get(0).lifecycleStatus()); + Assertions.assertEquals(683122353, response.value().get(0).maxCapacity()); + Assertions.assertEquals("ibgol", response.value().get(0).name()); + Assertions.assertEquals("jwny", response.value().get(0).skus().get(0).connectionIds().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-02T09:33:14Z"), + response.value().get(0).skus().get(0).deprecationDate()); + Assertions.assertEquals("rttnri", response.value().get(0).skus().get(0).name()); + Assertions.assertEquals("fiksjpkig", response.value().get(0).skus().get(0).usageName()); + Assertions.assertEquals("jjfecxv", response.value().get(0).version()); + Assertions.assertEquals("xhztufw", response.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetDeploymentWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetDeploymentWithResponseMockTests.java new file mode 100644 index 000000000000..df6bc5d4af64 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetDeploymentWithResponseMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +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 ConnectionsGetDeploymentWithResponseMockTests { + @Test + public void testGetDeploymentWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"qpmp\",\"provisioningState\":\"Scaling\"},\"id\":\"buk\",\"name\":\"mjc\",\"type\":\"doecdq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EndpointDeploymentResourcePropertiesBasicResource response = manager.connections() + .getDeploymentWithResponse("lzk", "jjt", "pvqjebtdpsgkee", "sozpkvylvtytw", + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("qpmp", response.properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetModelsMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetModelsMockTests.java new file mode 100644 index 000000000000..25bc1c5795ac --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsGetModelsMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +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 ConnectionsGetModelsMockTests { + @Test + public void testGetModels() throws Exception { + String responseStr + = "{\"value\":[{\"capabilities\":{\"osbijikjfjibuwh\":\"lehenjstiwd\",\"xav\":\"pojujpifxtg\",\"iwx\":\"jx\"},\"deprecation\":{\"fineTune\":\"2021-03-22T09:04:40Z\",\"inference\":\"2021-11-18T20:21:11Z\"},\"finetuneCapabilities\":{\"ovuvrsczw\":\"hp\",\"fwwsgd\":\"xlncohywfvyria\"},\"format\":\"dozsspfwmfcortox\",\"isDefaultVersion\":false,\"lifecycleStatus\":\"GenerallyAvailable\",\"maxCapacity\":1709974941,\"name\":\"ybuqmk\",\"skus\":[{\"capacity\":{\"default\":1702078996,\"maximum\":1099333239},\"connectionIds\":[\"hosotdi\",\"xgsrhx\",\"yrgvrtcctm\",\"glbplqhbrar\"],\"deprecationDate\":\"2021-08-17T15:12:38Z\",\"name\":\"psxufyqcqfou\",\"rateLimits\":[{\"count\":70.36681733860974,\"renewalPeriod\":87.0302716184544,\"rules\":[{},{}]},{\"count\":32.54673626676989,\"renewalPeriod\":26.377914723750695,\"rules\":[{},{},{},{}]}],\"usageName\":\"sioo\"}],\"version\":\"gbdkxlwcku\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.connections().getModels("rsfjjsoyus", "buyd", "yhknttk", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("lehenjstiwd", response.iterator().next().capabilities().get("osbijikjfjibuwh")); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-22T09:04:40Z"), + response.iterator().next().deprecation().fineTune()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T20:21:11Z"), + response.iterator().next().deprecation().inference()); + Assertions.assertEquals("hp", response.iterator().next().finetuneCapabilities().get("ovuvrsczw")); + Assertions.assertEquals("dozsspfwmfcortox", response.iterator().next().format()); + Assertions.assertFalse(response.iterator().next().isDefaultVersion()); + Assertions.assertEquals(ModelLifecycleStatus.GENERALLY_AVAILABLE, response.iterator().next().lifecycleStatus()); + Assertions.assertEquals(1709974941, response.iterator().next().maxCapacity()); + Assertions.assertEquals("ybuqmk", response.iterator().next().name()); + Assertions.assertEquals(1702078996, response.iterator().next().skus().get(0).capacity().defaultProperty()); + Assertions.assertEquals(1099333239, response.iterator().next().skus().get(0).capacity().maximum()); + Assertions.assertEquals("hosotdi", response.iterator().next().skus().get(0).connectionIds().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-17T15:12:38Z"), + response.iterator().next().skus().get(0).deprecationDate()); + Assertions.assertEquals("psxufyqcqfou", response.iterator().next().skus().get(0).name()); + Assertions.assertEquals(70.36681733860974D, + response.iterator().next().skus().get(0).rateLimits().get(0).count()); + Assertions.assertEquals(87.0302716184544D, + response.iterator().next().skus().get(0).rateLimits().get(0).renewalPeriod()); + Assertions.assertEquals("sioo", response.iterator().next().skus().get(0).usageName()); + Assertions.assertEquals("gbdkxlwcku", response.iterator().next().version()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsListDeploymentsMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsListDeploymentsMockTests.java new file mode 100644 index 000000000000..3eab870c58b6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ConnectionsListDeploymentsMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +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 ConnectionsListDeploymentsMockTests { + @Test + public void testListDeployments() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"gchsgotgwerbpob\",\"provisioningState\":\"Canceled\"},\"id\":\"nicgrxcei\",\"name\":\"v\",\"type\":\"dtkllqhznutrx\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.connections().listDeployments("zvejqzyu", "kloke", "eowbpiie", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("gchsgotgwerbpob", response.iterator().next().properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java index 418bbed71361..c653953518cb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,29 +13,28 @@ public final class ContainerResourceRequirementsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ContainerResourceRequirements model = BinaryData.fromString( - "{\"containerResourceRequests\":{\"cpu\":\"cnxtpzdlysei\",\"memory\":\"oa\",\"gpu\":\"t\"},\"containerResourceLimits\":{\"cpu\":\"tgrhz\",\"memory\":\"fdpfawrptvcsht\",\"gpu\":\"tzc\"}}") + "{\"containerResourceLimits\":{\"cpu\":\"ctzeyowmndc\",\"gpu\":\"dwzqauxzanhmkvfr\",\"memory\":\"kudrbcpftx\"},\"containerResourceRequests\":{\"cpu\":\"ye\",\"gpu\":\"bunaucmcirtn\",\"memory\":\"mmjauw\"}}") .toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("cnxtpzdlysei", model.containerResourceRequests().cpu()); - Assertions.assertEquals("oa", model.containerResourceRequests().memory()); - Assertions.assertEquals("t", model.containerResourceRequests().gpu()); - Assertions.assertEquals("tgrhz", model.containerResourceLimits().cpu()); - Assertions.assertEquals("fdpfawrptvcsht", model.containerResourceLimits().memory()); - Assertions.assertEquals("tzc", model.containerResourceLimits().gpu()); + Assertions.assertEquals("ctzeyowmndc", model.containerResourceLimits().cpu()); + Assertions.assertEquals("dwzqauxzanhmkvfr", model.containerResourceLimits().gpu()); + Assertions.assertEquals("kudrbcpftx", model.containerResourceLimits().memory()); + Assertions.assertEquals("ye", model.containerResourceRequests().cpu()); + Assertions.assertEquals("bunaucmcirtn", model.containerResourceRequests().gpu()); + Assertions.assertEquals("mmjauw", model.containerResourceRequests().memory()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ContainerResourceRequirements model = new ContainerResourceRequirements() + ContainerResourceRequirements model = new ContainerResourceRequirements().withContainerResourceLimits( + new ContainerResourceSettings().withCpu("ctzeyowmndc").withGpu("dwzqauxzanhmkvfr").withMemory("kudrbcpftx")) .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("cnxtpzdlysei").withMemory("oa").withGpu("t")) - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("tgrhz").withMemory("fdpfawrptvcsht").withGpu("tzc")); + new ContainerResourceSettings().withCpu("ye").withGpu("bunaucmcirtn").withMemory("mmjauw")); model = BinaryData.fromObject(model).toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("cnxtpzdlysei", model.containerResourceRequests().cpu()); - Assertions.assertEquals("oa", model.containerResourceRequests().memory()); - Assertions.assertEquals("t", model.containerResourceRequests().gpu()); - Assertions.assertEquals("tgrhz", model.containerResourceLimits().cpu()); - Assertions.assertEquals("fdpfawrptvcsht", model.containerResourceLimits().memory()); - Assertions.assertEquals("tzc", model.containerResourceLimits().gpu()); + Assertions.assertEquals("ctzeyowmndc", model.containerResourceLimits().cpu()); + Assertions.assertEquals("dwzqauxzanhmkvfr", model.containerResourceLimits().gpu()); + Assertions.assertEquals("kudrbcpftx", model.containerResourceLimits().memory()); + Assertions.assertEquals("ye", model.containerResourceRequests().cpu()); + Assertions.assertEquals("bunaucmcirtn", model.containerResourceRequests().gpu()); + Assertions.assertEquals("mmjauw", model.containerResourceRequests().memory()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java index cba58d928766..ccb8c9b54086 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,20 +12,21 @@ public final class ContainerResourceSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ContainerResourceSettings model - = BinaryData.fromString("{\"cpu\":\"bqgdird\",\"memory\":\"m\",\"gpu\":\"jgcf\"}") + = BinaryData.fromString("{\"cpu\":\"xefnohaitrani\",\"gpu\":\"rwgudasmxub\",\"memory\":\"bngfcocefhpri\"}") .toObject(ContainerResourceSettings.class); - Assertions.assertEquals("bqgdird", model.cpu()); - Assertions.assertEquals("m", model.memory()); - Assertions.assertEquals("jgcf", model.gpu()); + Assertions.assertEquals("xefnohaitrani", model.cpu()); + Assertions.assertEquals("rwgudasmxub", model.gpu()); + Assertions.assertEquals("bngfcocefhpri", model.memory()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ContainerResourceSettings model - = new ContainerResourceSettings().withCpu("bqgdird").withMemory("m").withGpu("jgcf"); + ContainerResourceSettings model = new ContainerResourceSettings().withCpu("xefnohaitrani") + .withGpu("rwgudasmxub") + .withMemory("bngfcocefhpri"); model = BinaryData.fromObject(model).toObject(ContainerResourceSettings.class); - Assertions.assertEquals("bqgdird", model.cpu()); - Assertions.assertEquals("m", model.memory()); - Assertions.assertEquals("jgcf", model.gpu()); + Assertions.assertEquals("xefnohaitrani", model.cpu()); + Assertions.assertEquals("rwgudasmxub", model.gpu()); + Assertions.assertEquals("bngfcocefhpri", model.memory()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointDeploymentResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointDeploymentResourcePropertiesTests.java new file mode 100644 index 000000000000..915699b281ef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointDeploymentResourcePropertiesTests.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import org.junit.jupiter.api.Assertions; + +public final class ContentSafetyEndpointDeploymentResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ContentSafetyEndpointDeploymentResourceProperties model = BinaryData.fromString( + "{\"type\":\"Azure.ContentSafety\",\"model\":{\"format\":\"n\",\"name\":\"b\",\"source\":\"rkxvdum\",\"version\":\"rtfw\"},\"raiPolicyName\":\"k\",\"sku\":{\"capacity\":271346012,\"family\":\"ccsnhsjc\",\"name\":\"ejhkry\",\"size\":\"napczwlokjy\",\"tier\":\"kkvnipjox\"},\"versionUpgradeOption\":\"OnceNewDefaultVersionAvailable\",\"failureReason\":\"hgejspodma\",\"provisioningState\":\"Failed\"}") + .toObject(ContentSafetyEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("hgejspodma", model.failureReason()); + Assertions.assertEquals("n", model.model().format()); + Assertions.assertEquals("b", model.model().name()); + Assertions.assertEquals("rkxvdum", model.model().source()); + Assertions.assertEquals("rtfw", model.model().version()); + Assertions.assertEquals("k", model.raiPolicyName()); + Assertions.assertEquals(271346012, model.sku().capacity()); + Assertions.assertEquals("ccsnhsjc", model.sku().family()); + Assertions.assertEquals("ejhkry", model.sku().name()); + Assertions.assertEquals("napczwlokjy", model.sku().size()); + Assertions.assertEquals("kkvnipjox", model.sku().tier()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE, + model.versionUpgradeOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ContentSafetyEndpointDeploymentResourceProperties model + = new ContentSafetyEndpointDeploymentResourceProperties().withFailureReason("hgejspodma") + .withModel(new EndpointDeploymentModel().withFormat("n") + .withName("b") + .withSource("rkxvdum") + .withVersion("rtfw")) + .withRaiPolicyName("k") + .withSku(new CognitiveServicesSku().withCapacity(271346012) + .withFamily("ccsnhsjc") + .withName("ejhkry") + .withSize("napczwlokjy") + .withTier("kkvnipjox")) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE); + model = BinaryData.fromObject(model).toObject(ContentSafetyEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("hgejspodma", model.failureReason()); + Assertions.assertEquals("n", model.model().format()); + Assertions.assertEquals("b", model.model().name()); + Assertions.assertEquals("rkxvdum", model.model().source()); + Assertions.assertEquals("rtfw", model.model().version()); + Assertions.assertEquals("k", model.raiPolicyName()); + Assertions.assertEquals(271346012, model.sku().capacity()); + Assertions.assertEquals("ccsnhsjc", model.sku().family()); + Assertions.assertEquals("ejhkry", model.sku().name()); + Assertions.assertEquals("napczwlokjy", model.sku().size()); + Assertions.assertEquals("kkvnipjox", model.sku().tier()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE, + model.versionUpgradeOption()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..af4a3454e90f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyEndpointResourcePropertiesTests.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ContentSafetyEndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ContentSafetyEndpointResourceProperties model = BinaryData.fromString( + "{\"endpointType\":\"Azure.ContentSafety\",\"associatedResourceId\":\"hdlr\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"zttcbiich\",\"provisioningState\":\"Creating\"},\"id\":\"sozodwjcfq\",\"name\":\"yxryqyc\",\"type\":\"mz\"}],\"endpointUri\":\"cfgdwzauz\",\"failureReason\":\"h\",\"location\":\"dnyciwzk\",\"name\":\"ykqadfges\",\"provisioningState\":\"Disabled\",\"shouldCreateAiServicesEndpoint\":false}") + .toObject(ContentSafetyEndpointResourceProperties.class); + Assertions.assertEquals("hdlr", model.associatedResourceId()); + Assertions.assertEquals("zttcbiich", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("cfgdwzauz", model.endpointUri()); + Assertions.assertEquals("h", model.failureReason()); + Assertions.assertEquals("dnyciwzk", model.location()); + Assertions.assertEquals("ykqadfges", model.name()); + Assertions.assertFalse(model.shouldCreateAiServicesEndpoint()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ContentSafetyEndpointResourceProperties model + = new ContentSafetyEndpointResourceProperties().withAssociatedResourceId("hdlr") + .withDeployments(Arrays.asList(new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("zttcbiich")))) + .withEndpointUri("cfgdwzauz") + .withFailureReason("h") + .withLocation("dnyciwzk") + .withName("ykqadfges") + .withShouldCreateAiServicesEndpoint(false); + model = BinaryData.fromObject(model).toObject(ContentSafetyEndpointResourceProperties.class); + Assertions.assertEquals("hdlr", model.associatedResourceId()); + Assertions.assertEquals("zttcbiich", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("cfgdwzauz", model.endpointUri()); + Assertions.assertEquals("h", model.failureReason()); + Assertions.assertEquals("dnyciwzk", model.location()); + Assertions.assertEquals("ykqadfges", model.name()); + Assertions.assertFalse(model.shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java index 568c289a2b81..91f325d4d7e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import org.junit.jupiter.api.Assertions; @@ -13,14 +14,18 @@ public final class ContentSafetyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ContentSafety model - = BinaryData.fromString("{\"contentSafetyStatus\":\"Enabled\"}").toObject(ContentSafety.class); + = BinaryData.fromString("{\"contentSafetyLevel\":\"Deferred\",\"contentSafetyStatus\":\"Enabled\"}") + .toObject(ContentSafety.class); + Assertions.assertEquals(ContentSafetyLevel.DEFERRED, model.contentSafetyLevel()); Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafetyStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ContentSafety model = new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED); + ContentSafety model = new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.DEFERRED) + .withContentSafetyStatus(ContentSafetyStatus.ENABLED); model = BinaryData.fromObject(model).toObject(ContentSafety.class); + Assertions.assertEquals(ContentSafetyLevel.DEFERRED, model.contentSafetyLevel()); Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafetyStatus()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java index 4e62864f0203..90751af4f180 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class CosmosDbSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CosmosDbSettings model - = BinaryData.fromString("{\"collectionsThroughput\":1838469652}").toObject(CosmosDbSettings.class); - Assertions.assertEquals(1838469652, model.collectionsThroughput()); + = BinaryData.fromString("{\"collectionsThroughput\":154216187}").toObject(CosmosDbSettings.class); + Assertions.assertEquals(154216187, model.collectionsThroughput()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CosmosDbSettings model = new CosmosDbSettings().withCollectionsThroughput(1838469652); + CosmosDbSettings model = new CosmosDbSettings().withCollectionsThroughput(154216187); model = BinaryData.fromObject(model).toObject(CosmosDbSettings.class); - Assertions.assertEquals(1838469652, model.collectionsThroughput()); + Assertions.assertEquals(154216187, model.collectionsThroughput()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java index 8c804e523b6f..2bac7c11f447 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,10 +10,10 @@ import com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase; import com.azure.resourcemanager.machinelearning.models.MonitorDefinition; import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; +import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -23,60 +23,48 @@ public final class CreateMonitorActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CreateMonitorAction model = BinaryData.fromString( - "{\"actionType\":\"CreateMonitor\",\"monitorDefinition\":{\"monitoringTarget\":{\"modelId\":\"tbwjjirmuydgftt\",\"deploymentId\":\"ofgeoagf\",\"taskType\":\"Regression\"},\"signals\":{\"gsevmdm\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"g\":\"dajwi\"}},\"ssgpgvo\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"ljdncidtjvamy\":\"gfc\",\"to\":\"znmrgcdogcvucg\",\"szp\":\"uwhttnzqsaqmeb\",\"z\":\"usdekpd\"}},\"dofuckclb\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"wztlvvwsnmrkky\":\"qzsquny\",\"wfkcauxuvavcpf\":\"trepw\"}},\"xydgtokvqbvwg\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"fsqebuuxjxhfxf\":\"zwilfngo\",\"wgzzxljb\":\"wpdkktpmbmxbmb\",\"jf\":\"hxsdplaumydmhwe\"}}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"vxakglh\",\"ses\",\"fga\",\"qiy\"]}}}}") + "{\"actionType\":\"CreateMonitor\",\"monitorDefinition\":{\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"epdxcltuubwyvpj\",\"owcpjqduqgixexky\"]}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"monitoringTarget\":{\"deploymentId\":\"wljavhuerkjddvrg\",\"modelId\":\"egftcvb\",\"taskType\":\"Regression\"},\"signals\":{\"zldbglzoutbaaqg\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"dhcebuv\":\"dnkefgm\"}},\"czevjnn\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"norbjgmnzjot\":\"zg\",\"bhvhdiqay\":\"mrxkhlobvv\",\"vhyibdrqrsw\":\"luiyuosnuudte\",\"oxztfwfqch\":\"buubpyrowt\"}}}}}") .toObject(CreateMonitorAction.class); - Assertions.assertEquals("tbwjjirmuydgftt", model.monitorDefinition().monitoringTarget().modelId()); - Assertions.assertEquals("ofgeoagf", model.monitorDefinition().monitoringTarget().deploymentId()); + Assertions.assertEquals("epdxcltuubwyvpj", + model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); + Assertions.assertEquals("wljavhuerkjddvrg", model.monitorDefinition().monitoringTarget().deploymentId()); + Assertions.assertEquals("egftcvb", model.monitorDefinition().monitoringTarget().modelId()); Assertions.assertEquals(ModelTaskType.REGRESSION, model.monitorDefinition().monitoringTarget().taskType()); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.monitorDefinition().signals().get("gsevmdm").notificationTypes().get(0)); - Assertions.assertEquals("dajwi", model.monitorDefinition().signals().get("gsevmdm").properties().get("g")); - Assertions.assertEquals("vxakglh", - model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); + model.monitorDefinition().signals().get("zldbglzoutbaaqg").notificationTypes().get(0)); + Assertions.assertEquals("dnkefgm", + model.monitorDefinition().signals().get("zldbglzoutbaaqg").properties().get("dhcebuv")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CreateMonitorAction model = new CreateMonitorAction().withMonitorDefinition(new MonitorDefinition() - .withMonitoringTarget(new MonitoringTarget().withModelId("tbwjjirmuydgftt") - .withDeploymentId("ofgeoagf") + .withAlertNotificationSettings( + new MonitorNotificationSettings().withEmailNotificationSettings(new MonitorEmailNotificationSettings() + .withEmails(Arrays.asList("epdxcltuubwyvpj", "owcpjqduqgixexky")))) + .withComputeConfiguration(new MonitorComputeConfigurationBase()) + .withMonitoringTarget(new MonitoringTarget().withDeploymentId("wljavhuerkjddvrg") + .withModelId("egftcvb") .withTaskType(ModelTaskType.REGRESSION)) - .withSignals(mapOf("gsevmdm", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("g", "dajwi")), - "ssgpgvo", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("ljdncidtjvamy", "gfc", "to", "znmrgcdogcvucg", "szp", "uwhttnzqsaqmeb", "z", "usdekpd")), - "dofuckclb", + .withSignals(mapOf("zldbglzoutbaaqg", new MonitoringSignalBase() + .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, + MonitoringNotificationType.AML_NOTIFICATION)) + .withProperties(mapOf("dhcebuv", "dnkefgm")), "czevjnn", new MonitoringSignalBase() .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("wztlvvwsnmrkky", "qzsquny", "wfkcauxuvavcpf", "trepw")), - "xydgtokvqbvwg", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("fsqebuuxjxhfxf", "zwilfngo", "wgzzxljb", "wpdkktpmbmxbmb", "jf", "hxsdplaumydmhwe")))) - .withComputeConfiguration(new MonitorComputeConfigurationBase()) - .withAlertNotificationSettings(new MonitorNotificationSettings().withEmailNotificationSettings( - new MonitorEmailNotificationSettings().withEmails(Arrays.asList("vxakglh", "ses", "fga", "qiy"))))); + .withProperties(mapOf("norbjgmnzjot", "zg", "bhvhdiqay", "mrxkhlobvv", "vhyibdrqrsw", + "luiyuosnuudte", "oxztfwfqch", "buubpyrowt"))))); model = BinaryData.fromObject(model).toObject(CreateMonitorAction.class); - Assertions.assertEquals("tbwjjirmuydgftt", model.monitorDefinition().monitoringTarget().modelId()); - Assertions.assertEquals("ofgeoagf", model.monitorDefinition().monitoringTarget().deploymentId()); + Assertions.assertEquals("epdxcltuubwyvpj", + model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); + Assertions.assertEquals("wljavhuerkjddvrg", model.monitorDefinition().monitoringTarget().deploymentId()); + Assertions.assertEquals("egftcvb", model.monitorDefinition().monitoringTarget().modelId()); Assertions.assertEquals(ModelTaskType.REGRESSION, model.monitorDefinition().monitoringTarget().taskType()); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.monitorDefinition().signals().get("gsevmdm").notificationTypes().get(0)); - Assertions.assertEquals("dajwi", model.monitorDefinition().signals().get("gsevmdm").properties().get("g")); - Assertions.assertEquals("vxakglh", - model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); + model.monitorDefinition().signals().get("zldbglzoutbaaqg").notificationTypes().get(0)); + Assertions.assertEquals("dnkefgm", + model.monitorDefinition().signals().get("zldbglzoutbaaqg").properties().get("dhcebuv")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java index c01aa7c48568..58e6cbc07715 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,20 +11,22 @@ public final class CronTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Cron model - = BinaryData.fromString("{\"startTime\":\"ivj\",\"timeZone\":\"erdqqigd\",\"expression\":\"kghpcv\"}") - .toObject(Cron.class); - Assertions.assertEquals("ivj", model.startTime()); - Assertions.assertEquals("erdqqigd", model.timeZone()); - Assertions.assertEquals("kghpcv", model.expression()); + Cron model = BinaryData + .fromString( + "{\"startTime\":\"xyzsecigzzd\",\"timeZone\":\"tacfvvtdpcbp\",\"expression\":\"omcsaugbrhfiwltk\"}") + .toObject(Cron.class); + Assertions.assertEquals("xyzsecigzzd", model.startTime()); + Assertions.assertEquals("tacfvvtdpcbp", model.timeZone()); + Assertions.assertEquals("omcsaugbrhfiwltk", model.expression()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Cron model = new Cron().withStartTime("ivj").withTimeZone("erdqqigd").withExpression("kghpcv"); + Cron model + = new Cron().withStartTime("xyzsecigzzd").withTimeZone("tacfvvtdpcbp").withExpression("omcsaugbrhfiwltk"); model = BinaryData.fromObject(model).toObject(Cron.class); - Assertions.assertEquals("ivj", model.startTime()); - Assertions.assertEquals("erdqqigd", model.timeZone()); - Assertions.assertEquals("kghpcv", model.expression()); + Assertions.assertEquals("xyzsecigzzd", model.startTime()); + Assertions.assertEquals("tacfvvtdpcbp", model.timeZone()); + Assertions.assertEquals("omcsaugbrhfiwltk", model.expression()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java index be36491f565a..d66e5d6ae2e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,24 +12,22 @@ public final class CronTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CronTrigger model = BinaryData.fromString( - "{\"triggerType\":\"Cron\",\"expression\":\"rbgpxeb\",\"endTime\":\"udcaytujrax\",\"startTime\":\"pryj\",\"timeZone\":\"tnsewou\"}") + "{\"triggerType\":\"Cron\",\"expression\":\"qgdm\",\"endTime\":\"i\",\"startTime\":\"teajohiyg\",\"timeZone\":\"n\"}") .toObject(CronTrigger.class); - Assertions.assertEquals("udcaytujrax", model.endTime()); - Assertions.assertEquals("pryj", model.startTime()); - Assertions.assertEquals("tnsewou", model.timeZone()); - Assertions.assertEquals("rbgpxeb", model.expression()); + Assertions.assertEquals("i", model.endTime()); + Assertions.assertEquals("teajohiyg", model.startTime()); + Assertions.assertEquals("n", model.timeZone()); + Assertions.assertEquals("qgdm", model.expression()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CronTrigger model = new CronTrigger().withEndTime("udcaytujrax") - .withStartTime("pryj") - .withTimeZone("tnsewou") - .withExpression("rbgpxeb"); + CronTrigger model + = new CronTrigger().withEndTime("i").withStartTime("teajohiyg").withTimeZone("n").withExpression("qgdm"); model = BinaryData.fromObject(model).toObject(CronTrigger.class); - Assertions.assertEquals("udcaytujrax", model.endTime()); - Assertions.assertEquals("pryj", model.startTime()); - Assertions.assertEquals("tnsewou", model.timeZone()); - Assertions.assertEquals("rbgpxeb", model.expression()); + Assertions.assertEquals("i", model.endTime()); + Assertions.assertEquals("teajohiyg", model.startTime()); + Assertions.assertEquals("n", model.timeZone()); + Assertions.assertEquals("qgdm", model.expression()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java index 7db7f737739c..5fdd95b76742 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class CustomForecastHorizonTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomForecastHorizon model - = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":521751095}").toObject(CustomForecastHorizon.class); - Assertions.assertEquals(521751095, model.value()); + = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":974021063}").toObject(CustomForecastHorizon.class); + Assertions.assertEquals(974021063, model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomForecastHorizon model = new CustomForecastHorizon().withValue(521751095); + CustomForecastHorizon model = new CustomForecastHorizon().withValue(974021063); model = BinaryData.fromObject(model).toObject(CustomForecastHorizon.class); - Assertions.assertEquals(521751095, model.value()); + Assertions.assertEquals(974021063, model.value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java index 57cd72ae0c0e..8f58c3049843 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,19 +13,18 @@ public final class CustomMetricThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomMetricThreshold model - = BinaryData.fromString("{\"threshold\":{\"value\":1.9267227965499623},\"metric\":\"vyljurkeposehqq\"}") + = BinaryData.fromString("{\"metric\":\"inzabwmvoglj\",\"threshold\":{\"value\":34.35891433102283}}") .toObject(CustomMetricThreshold.class); - Assertions.assertEquals(1.9267227965499623D, model.threshold().value()); - Assertions.assertEquals("vyljurkeposehqq", model.metric()); + Assertions.assertEquals("inzabwmvoglj", model.metric()); + Assertions.assertEquals(34.35891433102283D, model.threshold().value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomMetricThreshold model - = new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(1.9267227965499623D)) - .withMetric("vyljurkeposehqq"); + CustomMetricThreshold model = new CustomMetricThreshold().withMetric("inzabwmvoglj") + .withThreshold(new MonitoringThreshold().withValue(34.35891433102283D)); model = BinaryData.fromObject(model).toObject(CustomMetricThreshold.class); - Assertions.assertEquals(1.9267227965499623D, model.threshold().value()); - Assertions.assertEquals("vyljurkeposehqq", model.metric()); + Assertions.assertEquals("inzabwmvoglj", model.metric()); + Assertions.assertEquals(34.35891433102283D, model.threshold().value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelFineTuningTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelFineTuningTests.java new file mode 100644 index 000000000000..94e57d0da196 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelFineTuningTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.JobInput; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class CustomModelFineTuningTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CustomModelFineTuning model = BinaryData.fromString( + "{\"modelProvider\":\"Custom\",\"hyperParameters\":{\"qwtqszzgyksik\":\"yioqe\"},\"model\":{\"jobInputType\":\"JobInput\",\"description\":\"anvmwdv\"},\"taskType\":\"TextTranslation\",\"trainingData\":{\"jobInputType\":\"JobInput\",\"description\":\"crbkompnbnfgywe\"},\"validationData\":{\"jobInputType\":\"JobInput\",\"description\":\"epgcmahiwf\"}}") + .toObject(CustomModelFineTuning.class); + Assertions.assertEquals("anvmwdv", model.model().description()); + Assertions.assertEquals(FineTuningTaskType.TEXT_TRANSLATION, model.taskType()); + Assertions.assertEquals("crbkompnbnfgywe", model.trainingData().description()); + Assertions.assertEquals("epgcmahiwf", model.validationData().description()); + Assertions.assertEquals("yioqe", model.hyperParameters().get("qwtqszzgyksik")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + CustomModelFineTuning model = new CustomModelFineTuning().withModel(new JobInput().withDescription("anvmwdv")) + .withTaskType(FineTuningTaskType.TEXT_TRANSLATION) + .withTrainingData(new JobInput().withDescription("crbkompnbnfgywe")) + .withValidationData(new JobInput().withDescription("epgcmahiwf")) + .withHyperParameters(mapOf("qwtqszzgyksik", "yioqe")); + model = BinaryData.fromObject(model).toObject(CustomModelFineTuning.class); + Assertions.assertEquals("anvmwdv", model.model().description()); + Assertions.assertEquals(FineTuningTaskType.TEXT_TRANSLATION, model.taskType()); + Assertions.assertEquals("crbkompnbnfgywe", model.trainingData().description()); + Assertions.assertEquals("epgcmahiwf", model.validationData().description()); + Assertions.assertEquals("yioqe", model.hyperParameters().get("qwtqszzgyksik")); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java index f2ee303b4167..b706ae465374 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,20 @@ public final class CustomModelJobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomModelJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"custom_model\",\"uri\":\"lmpctwj\",\"mode\":\"ReadWriteMount\",\"description\":\"lzmkxerxxxotee\"}") + "{\"jobInputType\":\"custom_model\",\"mode\":\"Download\",\"uri\":\"pre\",\"description\":\"elyicghf\"}") .toObject(CustomModelJobInput.class); - Assertions.assertEquals("lzmkxerxxxotee", model.description()); - Assertions.assertEquals("lmpctwj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("elyicghf", model.description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); + Assertions.assertEquals("pre", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomModelJobInput model = new CustomModelJobInput().withDescription("lzmkxerxxxotee") - .withUri("lmpctwj") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); + CustomModelJobInput model + = new CustomModelJobInput().withDescription("elyicghf").withMode(InputDeliveryMode.DOWNLOAD).withUri("pre"); model = BinaryData.fromObject(model).toObject(CustomModelJobInput.class); - Assertions.assertEquals("lzmkxerxxxotee", model.description()); - Assertions.assertEquals("lmpctwj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("elyicghf", model.description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); + Assertions.assertEquals("pre", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java index 5caf5b63090b..db8f643b4107 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,24 @@ public final class CustomModelJobOutputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomModelJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"custom_model\",\"uri\":\"howgomvvhxo\",\"mode\":\"ReadWriteMount\",\"description\":\"apnpxraqawbmp\"}") + "{\"jobOutputType\":\"custom_model\",\"assetName\":\"xwfgcdiykkcx\",\"mode\":\"ReadWriteMount\",\"uri\":\"vqynvavit\",\"description\":\"muqohh\"}") .toObject(CustomModelJobOutput.class); - Assertions.assertEquals("apnpxraqawbmp", model.description()); - Assertions.assertEquals("howgomvvhxo", model.uri()); + Assertions.assertEquals("muqohh", model.description()); + Assertions.assertEquals("xwfgcdiykkcx", model.assetName()); Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("vqynvavit", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomModelJobOutput model = new CustomModelJobOutput().withDescription("apnpxraqawbmp") - .withUri("howgomvvhxo") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT); + CustomModelJobOutput model = new CustomModelJobOutput().withDescription("muqohh") + .withAssetName("xwfgcdiykkcx") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("vqynvavit"); model = BinaryData.fromObject(model).toObject(CustomModelJobOutput.class); - Assertions.assertEquals("apnpxraqawbmp", model.description()); - Assertions.assertEquals("howgomvvhxo", model.uri()); + Assertions.assertEquals("muqohh", model.description()); + Assertions.assertEquals("xwfgcdiykkcx", model.assetName()); Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("vqynvavit", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java index 8dc6ab11bac1..6bfdfc100c1b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -21,52 +21,56 @@ public final class CustomMonitoringSignalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"Custom\",\"inputAssets\":{\"or\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"ylqlocvvujexaygl\",\"jobInputType\":\"triton_model\",\"uri\":\"kgjn\",\"columns\":{\"iuofpieidz\":\"aslavxj\",\"vikmfngpmillxgj\":\"vssqywjopackyhy\",\"bijeiydy\":\"cizwgsori\",\"opdweoft\":\"uynhbokayrgwybr\"}}},\"inputs\":{\"octqkmvjanxvzf\":{\"jobInputType\":\"JobInput\",\"description\":\"s\"},\"xx\":{\"jobInputType\":\"JobInput\",\"description\":\"htjnwosstfjxtv\"},\"mxeezwyh\":{\"jobInputType\":\"JobInput\",\"description\":\"fcwrri\"}},\"componentId\":\"mbjiqeg\",\"metricThresholds\":[{\"threshold\":{\"value\":75.0769890262459},\"metric\":\"hc\"},{\"threshold\":{\"value\":63.09814916267899},\"metric\":\"dkgd\"}],\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"nensmuffi\":\"nzbjekwuycky\",\"otdxpo\":\"jbctvbpzujqj\",\"cktybhjuxid\":\"cslhwuusi\",\"ugxwjwilmqrslaat\":\"hxomilddxjx\"}}") + "{\"signalType\":\"Custom\",\"componentId\":\"wmlmh\",\"inputAssets\":{\"ewkq\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"agpokddxe\":\"eahjedv\"},\"dataContext\":\"h\",\"jobInputType\":\"mltable\",\"uri\":\"guavtptb\"},\"pzuyudivbxnh\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"offbkkwvdxaexqok\":\"pgb\"},\"dataContext\":\"rlj\",\"jobInputType\":\"uri_folder\",\"uri\":\"lzbnobrqlpbcjt\"}},\"inputs\":{\"y\":{\"jobInputType\":\"JobInput\",\"description\":\"eonqelwgdhuru\"},\"wmpinmzv\":{\"jobInputType\":\"JobInput\",\"description\":\"arogatmolji\"},\"lugdybnhrxlelf\":{\"jobInputType\":\"JobInput\",\"description\":\"neerzztrknsj\"}},\"metricThresholds\":[{\"metric\":\"k\",\"threshold\":{\"value\":32.202818633428066}},{\"metric\":\"ihtd\",\"threshold\":{\"value\":3.9496693157002882}}],\"notificationTypes\":[\"AmlNotification\"],\"properties\":{\"zcqymlcfn\":\"aydb\",\"zpstauolawiubm\":\"hmhsurlgwqkpm\",\"wjjmajnkdflqi\":\"msgvvjhvvlrloh\",\"aeqkzfzqxjoshoh\":\"ns\"}}") .toObject(CustomMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("nzbjekwuycky", model.properties().get("nensmuffi")); - Assertions.assertEquals("ylqlocvvujexaygl", model.inputAssets().get("or").dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.inputAssets().get("or").jobInputType()); - Assertions.assertEquals("kgjn", model.inputAssets().get("or").uri()); - Assertions.assertEquals("aslavxj", model.inputAssets().get("or").columns().get("iuofpieidz")); - Assertions.assertEquals("s", model.inputs().get("octqkmvjanxvzf").description()); - Assertions.assertEquals("mbjiqeg", model.componentId()); - Assertions.assertEquals(75.0769890262459D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("hc", model.metricThresholds().get(0).metric()); + Assertions.assertEquals("aydb", model.properties().get("zcqymlcfn")); + Assertions.assertEquals("wmlmh", model.componentId()); + Assertions.assertEquals("eahjedv", model.inputAssets().get("ewkq").columns().get("agpokddxe")); + Assertions.assertEquals("h", model.inputAssets().get("ewkq").dataContext()); + Assertions.assertEquals(JobInputType.MLTABLE, model.inputAssets().get("ewkq").jobInputType()); + Assertions.assertEquals("guavtptb", model.inputAssets().get("ewkq").uri()); + Assertions.assertEquals("eonqelwgdhuru", model.inputs().get("y").description()); + Assertions.assertEquals("k", model.metricThresholds().get(0).metric()); + Assertions.assertEquals(32.202818633428066D, model.metricThresholds().get(0).threshold().value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CustomMonitoringSignal model = new CustomMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("nensmuffi", "nzbjekwuycky", "otdxpo", "jbctvbpzujqj", "cktybhjuxid", "cslhwuusi", - "ugxwjwilmqrslaat", "hxomilddxjx")) - .withInputAssets(mapOf("or", - new MonitoringInputDataBase().withDataContext("ylqlocvvujexaygl") - .withJobInputType(JobInputType.TRITON_MODEL) - .withUri("kgjn") - .withColumns(mapOf("iuofpieidz", "aslavxj", "vikmfngpmillxgj", "vssqywjopackyhy", "bijeiydy", - "cizwgsori", "opdweoft", "uynhbokayrgwybr")))) - .withInputs(mapOf("octqkmvjanxvzf", new JobInput().withDescription("s"), "xx", - new JobInput().withDescription("htjnwosstfjxtv"), "mxeezwyh", new JobInput().withDescription("fcwrri"))) - .withComponentId("mbjiqeg") + .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION)) + .withProperties(mapOf("zcqymlcfn", "aydb", "zpstauolawiubm", "hmhsurlgwqkpm", "wjjmajnkdflqi", + "msgvvjhvvlrloh", "aeqkzfzqxjoshoh", "ns")) + .withComponentId("wmlmh") + .withInputAssets(mapOf("ewkq", + new MonitoringInputDataBase().withColumns(mapOf("agpokddxe", "eahjedv")) + .withDataContext("h") + .withJobInputType(JobInputType.MLTABLE) + .withUri("guavtptb"), + "pzuyudivbxnh", + new MonitoringInputDataBase().withColumns(mapOf("offbkkwvdxaexqok", "pgb")) + .withDataContext("rlj") + .withJobInputType(JobInputType.URI_FOLDER) + .withUri("lzbnobrqlpbcjt"))) + .withInputs(mapOf("y", new JobInput().withDescription("eonqelwgdhuru"), "wmpinmzv", + new JobInput().withDescription("arogatmolji"), "lugdybnhrxlelf", + new JobInput().withDescription("neerzztrknsj"))) .withMetricThresholds(Arrays.asList( - new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(75.0769890262459D)) - .withMetric("hc"), - new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(63.09814916267899D)) - .withMetric("dkgd"))); + new CustomMetricThreshold().withMetric("k") + .withThreshold(new MonitoringThreshold().withValue(32.202818633428066D)), + new CustomMetricThreshold().withMetric("ihtd") + .withThreshold(new MonitoringThreshold().withValue(3.9496693157002882D)))); model = BinaryData.fromObject(model).toObject(CustomMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("nzbjekwuycky", model.properties().get("nensmuffi")); - Assertions.assertEquals("ylqlocvvujexaygl", model.inputAssets().get("or").dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.inputAssets().get("or").jobInputType()); - Assertions.assertEquals("kgjn", model.inputAssets().get("or").uri()); - Assertions.assertEquals("aslavxj", model.inputAssets().get("or").columns().get("iuofpieidz")); - Assertions.assertEquals("s", model.inputs().get("octqkmvjanxvzf").description()); - Assertions.assertEquals("mbjiqeg", model.componentId()); - Assertions.assertEquals(75.0769890262459D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("hc", model.metricThresholds().get(0).metric()); + Assertions.assertEquals("aydb", model.properties().get("zcqymlcfn")); + Assertions.assertEquals("wmlmh", model.componentId()); + Assertions.assertEquals("eahjedv", model.inputAssets().get("ewkq").columns().get("agpokddxe")); + Assertions.assertEquals("h", model.inputAssets().get("ewkq").dataContext()); + Assertions.assertEquals(JobInputType.MLTABLE, model.inputAssets().get("ewkq").jobInputType()); + Assertions.assertEquals("guavtptb", model.inputAssets().get("ewkq").uri()); + Assertions.assertEquals("eonqelwgdhuru", model.inputs().get("y").description()); + Assertions.assertEquals("k", model.metricThresholds().get(0).metric()); + Assertions.assertEquals(32.202818633428066D, model.metricThresholds().get(0).threshold().value()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java index dfce843881b2..1ca19719cf50 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class CustomNCrossValidationsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CustomNCrossValidations model = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":1824520711}") + CustomNCrossValidations model = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":321355787}") .toObject(CustomNCrossValidations.class); - Assertions.assertEquals(1824520711, model.value()); + Assertions.assertEquals(321355787, model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomNCrossValidations model = new CustomNCrossValidations().withValue(1824520711); + CustomNCrossValidations model = new CustomNCrossValidations().withValue(321355787); model = BinaryData.fromObject(model).toObject(CustomNCrossValidations.class); - Assertions.assertEquals(1824520711, model.value()); + Assertions.assertEquals(321355787, model.value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java index 6be6cd94ae8e..18680cc2c94e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class CustomSeasonalityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomSeasonality model - = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":523197972}").toObject(CustomSeasonality.class); - Assertions.assertEquals(523197972, model.value()); + = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":400188640}").toObject(CustomSeasonality.class); + Assertions.assertEquals(400188640, model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomSeasonality model = new CustomSeasonality().withValue(523197972); + CustomSeasonality model = new CustomSeasonality().withValue(400188640); model = BinaryData.fromObject(model).toObject(CustomSeasonality.class); - Assertions.assertEquals(523197972, model.value()); + Assertions.assertEquals(400188640, model.value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java index ef9ea8a1d75f..6c87b7f7ee74 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; import com.azure.resourcemanager.machinelearning.models.Image; import com.azure.resourcemanager.machinelearning.models.ImageType; +import com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig; import com.azure.resourcemanager.machinelearning.models.Protocol; import com.azure.resourcemanager.machinelearning.models.TmpfsOptions; import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; @@ -27,132 +28,132 @@ public final class CustomServiceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CustomService model = BinaryData.fromString( - "{\"name\":\"gj\",\"image\":{\"type\":\"docker\",\"reference\":\"pn\",\"\":{\"qqw\":\"datafcb\",\"uxejgwecywnfyszz\":\"datatqsmoxsa\",\"nqbdnddbboz\":\"dataczs\"}},\"environmentVariables\":{\"jpewpyjlfx\":{\"type\":\"local\",\"value\":\"jmyitrchwudl\",\"\":{\"msibzo\":\"dataihtpmnoejhql\",\"mypgfqvmty\":\"datarfgxkyd\",\"kxp\":\"datahl\"}},\"tnqsktx\":{\"type\":\"local\",\"value\":\"crzge\",\"\":{\"iatwfaujegqdtadr\":\"datab\",\"hjkrukizyhgs\":\"datakgd\"}},\"bwjtrdx\":{\"type\":\"local\",\"value\":\"bqggw\",\"\":{\"hdmncgbfz\":\"dataw\",\"bkl\":\"datascstunmlhxd\",\"f\":\"dataiichgjsysmvxodgw\",\"ec\":\"datazsifcuvbdujgcwx\"}},\"vydjufbnk\":{\"type\":\"local\",\"value\":\"gbbgiarksykp\",\"\":{\"dosqkptjqg\":\"dataxwabzrwiqrxhacl\",\"d\":\"dataifmmainwh\",\"qwuntob\":\"datakp\",\"lw\":\"dataizazz\"}}},\"docker\":{\"privileged\":false,\"\":{\"ytlbtlqhopxouvm\":\"dataegjwdabalfdxaglz\"}},\"endpoints\":[{\"protocol\":\"tcp\",\"name\":\"kyypzkgxfxfmy\",\"target\":1057393281,\"published\":1264769175,\"hostIp\":\"oksz\"},{\"protocol\":\"udp\",\"name\":\"wgpterdiuw\",\"target\":1339527688,\"published\":778791021,\"hostIp\":\"wzt\"},{\"protocol\":\"tcp\",\"name\":\"jygowifcqpolz\",\"target\":2140246849,\"published\":1155749309,\"hostIp\":\"zyybzo\"},{\"protocol\":\"udp\",\"name\":\"cptvdxxheig\",\"target\":1706348146,\"published\":1899017507,\"hostIp\":\"ghjhjvmabzzbwa\"}],\"volumes\":[{\"type\":\"bind\",\"readOnly\":false,\"source\":\"gymqtnapreoj\",\"target\":\"jnbscon\",\"consistency\":\"vi\",\"bind\":{\"propagation\":\"yc\",\"createHostPath\":false,\"selinux\":\"zqfsgnwdxzed\"},\"volume\":{\"nocopy\":false},\"tmpfs\":{\"size\":1629298194}},{\"type\":\"bind\",\"readOnly\":false,\"source\":\"lnfyzav\",\"target\":\"bypicdbkpdj\",\"consistency\":\"qh\",\"bind\":{\"propagation\":\"azpdg\",\"createHostPath\":false,\"selinux\":\"xsht\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":1082014127}},{\"type\":\"volume\",\"readOnly\":false,\"source\":\"bvcpxtzhi\",\"target\":\"qbtimpk\",\"consistency\":\"lornsihqh\",\"bind\":{\"propagation\":\"musuaawja\",\"createHostPath\":false,\"selinux\":\"nfczmnniixyxvq\"},\"volume\":{\"nocopy\":false},\"tmpfs\":{\"size\":1609830110}},{\"type\":\"bind\",\"readOnly\":false,\"source\":\"gmgmdd\",\"target\":\"gm\",\"consistency\":\"ltwmpftmf\",\"bind\":{\"propagation\":\"jogsyx\",\"createHostPath\":true,\"selinux\":\"mfd\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":64531850}}],\"\":{\"drmuhka\":\"datahnrecchd\",\"vkhhwm\":\"datamjedbiu\",\"rihufoihppiybxv\":\"datapjbweunxcq\"}}") + "{\"name\":\"ryclo\",\"image\":{\"type\":\"docker\",\"reference\":\"wxvjele\",\"version\":\"qhdxtwwulkryb\",\"hsfoulborcx\":\"\\\"datavykbyjecrqkwakk\\\"\"},\"environmentVariables\":{\"iuvflgzhcwjgwahc\":{\"type\":\"local\",\"value\":\"bdy\",\"jqlqfbleruf\":\"\\\"dataectsmwpgweoqh\\\"\",\"bymjjvtpne\":\"\\\"datallcshjuci\\\"\",\"lhbimyii\":\"\\\"dataxvjeazrah\\\"\",\"osizk\":\"\\\"dataqamcthtpqgfz\\\"\"},\"yyopoaytwwgw\":{\"type\":\"local\",\"value\":\"g\",\"zivxpmh\":\"\\\"datavnpcc\\\"\",\"vnnjd\":\"\\\"dataghhh\\\"\",\"zstqlf\":\"\\\"dataujqzvhnjvpmxnht\\\"\",\"wequfl\":\"\\\"dataolrwvtlgxyfj\\\"\"},\"clhsiigeeuw\":{\"type\":\"local\",\"value\":\"tbvufrkwjiemim\",\"reeedddrftfquul\":\"\\\"datapowewjs\\\"\"}},\"docker\":{\"privileged\":false,\"dqnetdqwynx\":\"\\\"dataf\\\"\",\"y\":\"\\\"dataqgvbzpggpwm\\\"\",\"a\":\"\\\"databqajejir\\\"\"},\"endpoints\":[{\"protocol\":\"http\",\"name\":\"o\",\"target\":1580551551,\"published\":547743018,\"hostIp\":\"vlnhx\"},{\"protocol\":\"tcp\",\"name\":\"hinaegesbxnepq\",\"target\":1829398059,\"published\":281969820,\"hostIp\":\"ukfyk\"},{\"protocol\":\"http\",\"name\":\"ovadkrmjx\",\"target\":1469393037,\"published\":28862474,\"hostIp\":\"esjqbzkqmxvporiw\"},{\"protocol\":\"http\",\"name\":\"ijtspzjnrrhikwsb\",\"target\":361082418,\"published\":415171727,\"hostIp\":\"quhtr\"}],\"volumes\":[{\"type\":\"bind\",\"readOnly\":true,\"source\":\"hrjhiycbauseqn\",\"target\":\"kv\",\"consistency\":\"vtuwyjsqwzszosz\",\"bind\":{\"propagation\":\"unkfnyskwwun\",\"createHostPath\":false,\"selinux\":\"avoj\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":2078901091}},{\"type\":\"tmpfs\",\"readOnly\":false,\"source\":\"jpxprr\",\"target\":\"hyluqalpcufj\",\"consistency\":\"xtiztqdstahh\",\"bind\":{\"propagation\":\"axxsritr\",\"createHostPath\":false,\"selinux\":\"aesyyefm\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":946526502}}],\"kernel\":{\"argv\":[\"gpasrvrmtisty\",\"kjhorlxkpy\",\"k\"],\"displayName\":\"nycntr\",\"language\":\"xwtdmbqjtsuhqh\"},\"x\":\"\\\"datatdyqav\\\"\",\"npaami\":\"\\\"dataqmzxsyaks\\\"\",\"hvwt\":\"\\\"datawb\\\"\",\"kiy\":\"\\\"datapbgchcgsfzhb\\\"\"}") .toObject(CustomService.class); - Assertions.assertEquals("gj", model.name()); + Assertions.assertEquals("ryclo", model.name()); Assertions.assertEquals(ImageType.DOCKER, model.image().type()); - Assertions.assertEquals("pn", model.image().reference()); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.environmentVariables().get("jpewpyjlfx").type()); - Assertions.assertEquals("jmyitrchwudl", model.environmentVariables().get("jpewpyjlfx").value()); - Assertions.assertEquals(false, model.docker().privileged()); - Assertions.assertEquals(Protocol.TCP, model.endpoints().get(0).protocol()); - Assertions.assertEquals("kyypzkgxfxfmy", model.endpoints().get(0).name()); - Assertions.assertEquals(1057393281, model.endpoints().get(0).target()); - Assertions.assertEquals(1264769175, model.endpoints().get(0).published()); - Assertions.assertEquals("oksz", model.endpoints().get(0).hostIp()); + Assertions.assertEquals("wxvjele", model.image().reference()); + Assertions.assertEquals("qhdxtwwulkryb", model.image().version()); + Assertions.assertEquals(EnvironmentVariableType.LOCAL, + model.environmentVariables().get("iuvflgzhcwjgwahc").type()); + Assertions.assertEquals("bdy", model.environmentVariables().get("iuvflgzhcwjgwahc").value()); + Assertions.assertFalse(model.docker().privileged()); + Assertions.assertEquals(Protocol.HTTP, model.endpoints().get(0).protocol()); + Assertions.assertEquals("o", model.endpoints().get(0).name()); + Assertions.assertEquals(1580551551, model.endpoints().get(0).target()); + Assertions.assertEquals(547743018, model.endpoints().get(0).published()); + Assertions.assertEquals("vlnhx", model.endpoints().get(0).hostIp()); Assertions.assertEquals(VolumeDefinitionType.BIND, model.volumes().get(0).type()); - Assertions.assertEquals(false, model.volumes().get(0).readOnly()); - Assertions.assertEquals("gymqtnapreoj", model.volumes().get(0).source()); - Assertions.assertEquals("jnbscon", model.volumes().get(0).target()); - Assertions.assertEquals("vi", model.volumes().get(0).consistency()); - Assertions.assertEquals("yc", model.volumes().get(0).bind().propagation()); - Assertions.assertEquals(false, model.volumes().get(0).bind().createHostPath()); - Assertions.assertEquals("zqfsgnwdxzed", model.volumes().get(0).bind().selinux()); - Assertions.assertEquals(false, model.volumes().get(0).volume().nocopy()); - Assertions.assertEquals(1629298194, model.volumes().get(0).tmpfs().size()); + Assertions.assertTrue(model.volumes().get(0).readOnly()); + Assertions.assertEquals("hrjhiycbauseqn", model.volumes().get(0).source()); + Assertions.assertEquals("kv", model.volumes().get(0).target()); + Assertions.assertEquals("vtuwyjsqwzszosz", model.volumes().get(0).consistency()); + Assertions.assertEquals("unkfnyskwwun", model.volumes().get(0).bind().propagation()); + Assertions.assertFalse(model.volumes().get(0).bind().createHostPath()); + Assertions.assertEquals("avoj", model.volumes().get(0).bind().selinux()); + Assertions.assertTrue(model.volumes().get(0).volume().nocopy()); + Assertions.assertEquals(2078901091, model.volumes().get(0).tmpfs().size()); + Assertions.assertEquals("gpasrvrmtisty", model.kernel().argv().get(0)); + Assertions.assertEquals("nycntr", model.kernel().displayName()); + Assertions.assertEquals("xwtdmbqjtsuhqh", model.kernel().language()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomService model = new CustomService().withName("gj") - .withImage(new Image().withType(ImageType.DOCKER).withReference("pn").withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("jpewpyjlfx", + CustomService model = new CustomService().withName("ryclo") + .withImage(new Image().withType(ImageType.DOCKER) + .withReference("wxvjele") + .withVersion("qhdxtwwulkryb") + .withAdditionalProperties(mapOf("hsfoulborcx", "\"datavykbyjecrqkwakk\""))) + .withEnvironmentVariables(mapOf("iuvflgzhcwjgwahc", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("jmyitrchwudl") - .withAdditionalProperties(mapOf()), - "tnqsktx", + .withValue("bdy") + .withAdditionalProperties(mapOf("bymjjvtpne", "\"datallcshjuci\"", "lhbimyii", "\"dataxvjeazrah\"", + "osizk", "\"dataqamcthtpqgfz\"", "jqlqfbleruf", "\"dataectsmwpgweoqh\"")), + "yyopoaytwwgw", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("crzge") - .withAdditionalProperties(mapOf()), - "bwjtrdx", + .withValue("g") + .withAdditionalProperties(mapOf("vnnjd", "\"dataghhh\"", "zivxpmh", "\"datavnpcc\"", "zstqlf", + "\"dataujqzvhnjvpmxnht\"", "wequfl", "\"dataolrwvtlgxyfj\"")), + "clhsiigeeuw", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("bqggw") - .withAdditionalProperties(mapOf()), - "vydjufbnk", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("gbbgiarksykp") - .withAdditionalProperties(mapOf()))) - .withDocker(new Docker().withPrivileged(false).withAdditionalProperties(mapOf())) + .withValue("tbvufrkwjiemim") + .withAdditionalProperties(mapOf("reeedddrftfquul", "\"datapowewjs\"")))) + .withDocker(new Docker().withPrivileged(false) + .withAdditionalProperties( + mapOf("a", "\"databqajejir\"", "y", "\"dataqgvbzpggpwm\"", "dqnetdqwynx", "\"dataf\""))) .withEndpoints(Arrays.asList( + new Endpoint().withProtocol(Protocol.HTTP) + .withName("o") + .withTarget(1580551551) + .withPublished(547743018) + .withHostIp("vlnhx"), new Endpoint().withProtocol(Protocol.TCP) - .withName("kyypzkgxfxfmy") - .withTarget(1057393281) - .withPublished(1264769175) - .withHostIp("oksz"), - new Endpoint().withProtocol(Protocol.UDP) - .withName("wgpterdiuw") - .withTarget(1339527688) - .withPublished(778791021) - .withHostIp("wzt"), - new Endpoint().withProtocol(Protocol.TCP) - .withName("jygowifcqpolz") - .withTarget(2140246849) - .withPublished(1155749309) - .withHostIp("zyybzo"), - new Endpoint().withProtocol(Protocol.UDP) - .withName("cptvdxxheig") - .withTarget(1706348146) - .withPublished(1899017507) - .withHostIp("ghjhjvmabzzbwa"))) + .withName("hinaegesbxnepq") + .withTarget(1829398059) + .withPublished(281969820) + .withHostIp("ukfyk"), + new Endpoint().withProtocol(Protocol.HTTP) + .withName("ovadkrmjx") + .withTarget(1469393037) + .withPublished(28862474) + .withHostIp("esjqbzkqmxvporiw"), + new Endpoint().withProtocol(Protocol.HTTP) + .withName("ijtspzjnrrhikwsb") + .withTarget(361082418) + .withPublished(415171727) + .withHostIp("quhtr"))) .withVolumes(Arrays.asList( new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("gymqtnapreoj") - .withTarget("jnbscon") - .withConsistency("vi") + .withReadOnly(true) + .withSource("hrjhiycbauseqn") + .withTarget("kv") + .withConsistency("vtuwyjsqwzszosz") .withBind( - new BindOptions().withPropagation("yc").withCreateHostPath(false).withSelinux("zqfsgnwdxzed")) - .withVolume(new VolumeOptions().withNocopy(false)) - .withTmpfs(new TmpfsOptions().withSize(1629298194)), - new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("lnfyzav") - .withTarget("bypicdbkpdj") - .withConsistency("qh") - .withBind(new BindOptions().withPropagation("azpdg").withCreateHostPath(false).withSelinux("xsht")) + new BindOptions().withPropagation("unkfnyskwwun").withCreateHostPath(false).withSelinux("avoj")) .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(1082014127)), - new VolumeDefinition().withType(VolumeDefinitionType.VOLUME) - .withReadOnly(false) - .withSource("bvcpxtzhi") - .withTarget("qbtimpk") - .withConsistency("lornsihqh") - .withBind(new BindOptions().withPropagation("musuaawja") - .withCreateHostPath(false) - .withSelinux("nfczmnniixyxvq")) - .withVolume(new VolumeOptions().withNocopy(false)) - .withTmpfs(new TmpfsOptions().withSize(1609830110)), - new VolumeDefinition().withType(VolumeDefinitionType.BIND) + .withTmpfs(new TmpfsOptions().withSize(2078901091)), + new VolumeDefinition().withType(VolumeDefinitionType.TMPFS) .withReadOnly(false) - .withSource("gmgmdd") - .withTarget("gm") - .withConsistency("ltwmpftmf") - .withBind(new BindOptions().withPropagation("jogsyx").withCreateHostPath(true).withSelinux("mfd")) + .withSource("jpxprr") + .withTarget("hyluqalpcufj") + .withConsistency("xtiztqdstahh") + .withBind( + new BindOptions().withPropagation("axxsritr").withCreateHostPath(false).withSelinux("aesyyefm")) .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(64531850)))) - .withAdditionalProperties(mapOf()); + .withTmpfs(new TmpfsOptions().withSize(946526502)))) + .withKernel(new JupyterKernelConfig().withArgv(Arrays.asList("gpasrvrmtisty", "kjhorlxkpy", "k")) + .withDisplayName("nycntr") + .withLanguage("xwtdmbqjtsuhqh")) + .withAdditionalProperties(mapOf("npaami", "\"dataqmzxsyaks\"", "x", "\"datatdyqav\"", "hvwt", "\"datawb\"", + "kiy", "\"datapbgchcgsfzhb\"")); model = BinaryData.fromObject(model).toObject(CustomService.class); - Assertions.assertEquals("gj", model.name()); + Assertions.assertEquals("ryclo", model.name()); Assertions.assertEquals(ImageType.DOCKER, model.image().type()); - Assertions.assertEquals("pn", model.image().reference()); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.environmentVariables().get("jpewpyjlfx").type()); - Assertions.assertEquals("jmyitrchwudl", model.environmentVariables().get("jpewpyjlfx").value()); - Assertions.assertEquals(false, model.docker().privileged()); - Assertions.assertEquals(Protocol.TCP, model.endpoints().get(0).protocol()); - Assertions.assertEquals("kyypzkgxfxfmy", model.endpoints().get(0).name()); - Assertions.assertEquals(1057393281, model.endpoints().get(0).target()); - Assertions.assertEquals(1264769175, model.endpoints().get(0).published()); - Assertions.assertEquals("oksz", model.endpoints().get(0).hostIp()); + Assertions.assertEquals("wxvjele", model.image().reference()); + Assertions.assertEquals("qhdxtwwulkryb", model.image().version()); + Assertions.assertEquals(EnvironmentVariableType.LOCAL, + model.environmentVariables().get("iuvflgzhcwjgwahc").type()); + Assertions.assertEquals("bdy", model.environmentVariables().get("iuvflgzhcwjgwahc").value()); + Assertions.assertFalse(model.docker().privileged()); + Assertions.assertEquals(Protocol.HTTP, model.endpoints().get(0).protocol()); + Assertions.assertEquals("o", model.endpoints().get(0).name()); + Assertions.assertEquals(1580551551, model.endpoints().get(0).target()); + Assertions.assertEquals(547743018, model.endpoints().get(0).published()); + Assertions.assertEquals("vlnhx", model.endpoints().get(0).hostIp()); Assertions.assertEquals(VolumeDefinitionType.BIND, model.volumes().get(0).type()); - Assertions.assertEquals(false, model.volumes().get(0).readOnly()); - Assertions.assertEquals("gymqtnapreoj", model.volumes().get(0).source()); - Assertions.assertEquals("jnbscon", model.volumes().get(0).target()); - Assertions.assertEquals("vi", model.volumes().get(0).consistency()); - Assertions.assertEquals("yc", model.volumes().get(0).bind().propagation()); - Assertions.assertEquals(false, model.volumes().get(0).bind().createHostPath()); - Assertions.assertEquals("zqfsgnwdxzed", model.volumes().get(0).bind().selinux()); - Assertions.assertEquals(false, model.volumes().get(0).volume().nocopy()); - Assertions.assertEquals(1629298194, model.volumes().get(0).tmpfs().size()); + Assertions.assertTrue(model.volumes().get(0).readOnly()); + Assertions.assertEquals("hrjhiycbauseqn", model.volumes().get(0).source()); + Assertions.assertEquals("kv", model.volumes().get(0).target()); + Assertions.assertEquals("vtuwyjsqwzszosz", model.volumes().get(0).consistency()); + Assertions.assertEquals("unkfnyskwwun", model.volumes().get(0).bind().propagation()); + Assertions.assertFalse(model.volumes().get(0).bind().createHostPath()); + Assertions.assertEquals("avoj", model.volumes().get(0).bind().selinux()); + Assertions.assertTrue(model.volumes().get(0).volume().nocopy()); + Assertions.assertEquals(2078901091, model.volumes().get(0).tmpfs().size()); + Assertions.assertEquals("gpasrvrmtisty", model.kernel().argv().get(0)); + Assertions.assertEquals("nycntr", model.kernel().displayName()); + Assertions.assertEquals("xwtdmbqjtsuhqh", model.kernel().language()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java index 75c36c362edb..0b2c33b2dde6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class CustomTargetLagsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CustomTargetLags model = BinaryData.fromString("{\"mode\":\"Custom\",\"values\":[798032974,467459839]}") + CustomTargetLags model = BinaryData.fromString("{\"mode\":\"Custom\",\"values\":[1376925211,1266648434]}") .toObject(CustomTargetLags.class); - Assertions.assertEquals(798032974, model.values().get(0)); + Assertions.assertEquals(1376925211, model.values().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomTargetLags model = new CustomTargetLags().withValues(Arrays.asList(798032974, 467459839)); + CustomTargetLags model = new CustomTargetLags().withValues(Arrays.asList(1376925211, 1266648434)); model = BinaryData.fromObject(model).toObject(CustomTargetLags.class); - Assertions.assertEquals(798032974, model.values().get(0)); + Assertions.assertEquals(1376925211, model.values().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java index fb1a2b55405e..67c705d760fb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class CustomTargetRollingWindowSizeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CustomTargetRollingWindowSize model = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":725690227}") + CustomTargetRollingWindowSize model = BinaryData.fromString("{\"mode\":\"Custom\",\"value\":338271467}") .toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(725690227, model.value()); + Assertions.assertEquals(338271467, model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CustomTargetRollingWindowSize model = new CustomTargetRollingWindowSize().withValue(725690227); + CustomTargetRollingWindowSize model = new CustomTargetRollingWindowSize().withValue(338271467); model = BinaryData.fromObject(model).toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(725690227, model.value()); + Assertions.assertEquals(338271467, model.value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java index 6755ee6177b9..de8bc99b1429 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -19,35 +19,35 @@ public final class DataCollectorTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataCollector model = BinaryData.fromString( - "{\"collections\":{\"jsvkskmqozzkivy\":{\"samplingRate\":40.92657360869598,\"dataCollectionMode\":\"Disabled\",\"dataId\":\"ulgm\",\"clientId\":\"jevdyznf\"}},\"rollingRate\":\"Year\",\"requestLogging\":{\"captureHeaders\":[\"zji\",\"lqfhefkwabs\"]}}") + "{\"collections\":{\"faewzgiudjpxpq\":{\"clientId\":\"gpazwu\",\"dataCollectionMode\":\"Disabled\",\"dataId\":\"vnjobfelhldiuhzz\",\"samplingRate\":80.69212502247282}},\"requestLogging\":{\"captureHeaders\":[\"hnmhkrezsdsux\",\"eqdgcruxsp\"]},\"rollingRate\":\"Year\"}") .toObject(DataCollector.class); - Assertions.assertEquals(40.92657360869598D, model.collections().get("jsvkskmqozzkivy").samplingRate()); + Assertions.assertEquals("gpazwu", model.collections().get("faewzgiudjpxpq").clientId()); Assertions.assertEquals(DataCollectionMode.DISABLED, - model.collections().get("jsvkskmqozzkivy").dataCollectionMode()); - Assertions.assertEquals("ulgm", model.collections().get("jsvkskmqozzkivy").dataId()); - Assertions.assertEquals("jevdyznf", model.collections().get("jsvkskmqozzkivy").clientId()); + model.collections().get("faewzgiudjpxpq").dataCollectionMode()); + Assertions.assertEquals("vnjobfelhldiuhzz", model.collections().get("faewzgiudjpxpq").dataId()); + Assertions.assertEquals(80.69212502247282D, model.collections().get("faewzgiudjpxpq").samplingRate()); + Assertions.assertEquals("hnmhkrezsdsux", model.requestLogging().captureHeaders().get(0)); Assertions.assertEquals(RollingRateType.YEAR, model.rollingRate()); - Assertions.assertEquals("zji", model.requestLogging().captureHeaders().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DataCollector model = new DataCollector() - .withCollections(mapOf("jsvkskmqozzkivy", - new Collection().withSamplingRate(40.92657360869598D) + .withCollections(mapOf("faewzgiudjpxpq", + new Collection().withClientId("gpazwu") .withDataCollectionMode(DataCollectionMode.DISABLED) - .withDataId("ulgm") - .withClientId("jevdyznf"))) - .withRollingRate(RollingRateType.YEAR) - .withRequestLogging(new RequestLogging().withCaptureHeaders(Arrays.asList("zji", "lqfhefkwabs"))); + .withDataId("vnjobfelhldiuhzz") + .withSamplingRate(80.69212502247282D))) + .withRequestLogging(new RequestLogging().withCaptureHeaders(Arrays.asList("hnmhkrezsdsux", "eqdgcruxsp"))) + .withRollingRate(RollingRateType.YEAR); model = BinaryData.fromObject(model).toObject(DataCollector.class); - Assertions.assertEquals(40.92657360869598D, model.collections().get("jsvkskmqozzkivy").samplingRate()); + Assertions.assertEquals("gpazwu", model.collections().get("faewzgiudjpxpq").clientId()); Assertions.assertEquals(DataCollectionMode.DISABLED, - model.collections().get("jsvkskmqozzkivy").dataCollectionMode()); - Assertions.assertEquals("ulgm", model.collections().get("jsvkskmqozzkivy").dataId()); - Assertions.assertEquals("jevdyznf", model.collections().get("jsvkskmqozzkivy").clientId()); + model.collections().get("faewzgiudjpxpq").dataCollectionMode()); + Assertions.assertEquals("vnjobfelhldiuhzz", model.collections().get("faewzgiudjpxpq").dataId()); + Assertions.assertEquals(80.69212502247282D, model.collections().get("faewzgiudjpxpq").samplingRate()); + Assertions.assertEquals("hnmhkrezsdsux", model.requestLogging().captureHeaders().get(0)); Assertions.assertEquals(RollingRateType.YEAR, model.rollingRate()); - Assertions.assertEquals("zji", model.requestLogging().captureHeaders().get(0)); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java index adc69060b589..95ffc4bb0273 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,29 +16,29 @@ public final class DataContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataContainerInner model = BinaryData.fromString( - "{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"fa\",\"nextVersion\":\"vnqqybaryeua\",\"description\":\"kq\",\"tags\":{\"w\":\"gzslesjcbhernnti\",\"uwrbehwagoh\":\"jcvb\"},\"properties\":{\"emvvhm\":\"fkmr\"}},\"id\":\"drjf\",\"name\":\"tac\",\"type\":\"ebjvewzcjzn\"}") + "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":true,\"latestVersion\":\"jlfrq\",\"nextVersion\":\"bajlka\",\"description\":\"wxyiopidkqq\",\"properties\":{\"dmligovibrxk\":\"vscx\",\"cbgoor\":\"mloazuru\",\"ybfhjxa\":\"te\",\"il\":\"vvjgslor\"},\"tags\":{\"gkxnyedabg\":\"wt\",\"uwhcjyxccybv\":\"vudtjuewbcihx\"}},\"id\":\"yakk\",\"name\":\"dzpxgwjpl\",\"type\":\"agst\"}") .toObject(DataContainerInner.class); - Assertions.assertEquals("kq", model.properties().description()); - Assertions.assertEquals("gzslesjcbhernnti", model.properties().tags().get("w")); - Assertions.assertEquals("fkmr", model.properties().properties().get("emvvhm")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); + Assertions.assertEquals("wxyiopidkqq", model.properties().description()); + Assertions.assertEquals("vscx", model.properties().properties().get("dmligovibrxk")); + Assertions.assertEquals("wt", model.properties().tags().get("gkxnyedabg")); + Assertions.assertTrue(model.properties().isArchived()); + Assertions.assertEquals(DataType.URI_FILE, model.properties().dataType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DataContainerInner model - = new DataContainerInner().withProperties(new DataContainerProperties().withDescription("kq") - .withTags(mapOf("w", "gzslesjcbhernnti", "uwrbehwagoh", "jcvb")) - .withProperties(mapOf("emvvhm", "fkmr")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)); + = new DataContainerInner().withProperties(new DataContainerProperties().withDescription("wxyiopidkqq") + .withProperties(mapOf("dmligovibrxk", "vscx", "cbgoor", "mloazuru", "ybfhjxa", "te", "il", "vvjgslor")) + .withTags(mapOf("gkxnyedabg", "wt", "uwhcjyxccybv", "vudtjuewbcihx")) + .withIsArchived(true) + .withDataType(DataType.URI_FILE)); model = BinaryData.fromObject(model).toObject(DataContainerInner.class); - Assertions.assertEquals("kq", model.properties().description()); - Assertions.assertEquals("gzslesjcbhernnti", model.properties().tags().get("w")); - Assertions.assertEquals("fkmr", model.properties().properties().get("emvvhm")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); + Assertions.assertEquals("wxyiopidkqq", model.properties().description()); + Assertions.assertEquals("vscx", model.properties().properties().get("dmligovibrxk")); + Assertions.assertEquals("wt", model.properties().tags().get("gkxnyedabg")); + Assertions.assertTrue(model.properties().isArchived()); + Assertions.assertEquals(DataType.URI_FILE, model.properties().dataType()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java index 8f7d90085c1f..96678985cff0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,27 +15,27 @@ public final class DataContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataContainerProperties model = BinaryData.fromString( - "{\"dataType\":\"uri_folder\",\"isArchived\":true,\"latestVersion\":\"guaadraufactkahz\",\"nextVersion\":\"ajjziuxxpshne\",\"description\":\"ulfgslqu\",\"tags\":{\"o\":\"dlenrdsutujbazpj\",\"uvwpklvxwmyg\":\"minyflnorwm\",\"hiszepnnbjcrxgib\":\"xpgpq\"},\"properties\":{\"kokwbqplhlvnu\":\"xconfozauors\",\"phwzsoldweyuqdu\":\"epzl\",\"biorktal\":\"vmnnrw\"}}") + "{\"dataType\":\"uri_folder\",\"isArchived\":true,\"latestVersion\":\"fkyrk\",\"nextVersion\":\"dg\",\"description\":\"gsj\",\"properties\":{\"iyhddvi\":\"wqjnob\",\"vm\":\"cegfnmntfp\"},\"tags\":{\"alxlllchp\":\"nczdwvv\",\"evwrdnhfuk\":\"db\",\"fcvlerch\":\"vsjcswsmystuluqy\"}}") .toObject(DataContainerProperties.class); - Assertions.assertEquals("ulfgslqu", model.description()); - Assertions.assertEquals("dlenrdsutujbazpj", model.tags().get("o")); - Assertions.assertEquals("xconfozauors", model.properties().get("kokwbqplhlvnu")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("gsj", model.description()); + Assertions.assertEquals("wqjnob", model.properties().get("iyhddvi")); + Assertions.assertEquals("nczdwvv", model.tags().get("alxlllchp")); + Assertions.assertTrue(model.isArchived()); Assertions.assertEquals(DataType.URI_FOLDER, model.dataType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DataContainerProperties model = new DataContainerProperties().withDescription("ulfgslqu") - .withTags(mapOf("o", "dlenrdsutujbazpj", "uvwpklvxwmyg", "minyflnorwm", "hiszepnnbjcrxgib", "xpgpq")) - .withProperties(mapOf("kokwbqplhlvnu", "xconfozauors", "phwzsoldweyuqdu", "epzl", "biorktal", "vmnnrw")) + DataContainerProperties model = new DataContainerProperties().withDescription("gsj") + .withProperties(mapOf("iyhddvi", "wqjnob", "vm", "cegfnmntfp")) + .withTags(mapOf("alxlllchp", "nczdwvv", "evwrdnhfuk", "db", "fcvlerch", "vsjcswsmystuluqy")) .withIsArchived(true) .withDataType(DataType.URI_FOLDER); model = BinaryData.fromObject(model).toObject(DataContainerProperties.class); - Assertions.assertEquals("ulfgslqu", model.description()); - Assertions.assertEquals("dlenrdsutujbazpj", model.tags().get("o")); - Assertions.assertEquals("xconfozauors", model.properties().get("kokwbqplhlvnu")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("gsj", model.description()); + Assertions.assertEquals("wqjnob", model.properties().get("iyhddvi")); + Assertions.assertEquals("nczdwvv", model.tags().get("alxlllchp")); + Assertions.assertTrue(model.isArchived()); Assertions.assertEquals(DataType.URI_FOLDER, model.dataType()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java index 4fa216576179..a489d221a370 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java @@ -1,84 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.DataContainerResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class DataContainerResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"gf\",\"nextVersion\":\"dsofbshrns\",\"description\":\"uswdv\",\"tags\":{\"wnopqgikyzirtx\":\"bycnunvjsrtkf\",\"ilqu\":\"yuxzejntpsewgi\",\"eoxorggufhyao\":\"rydxtqm\"},\"properties\":{\"jzhpjbibgjmfx\":\"ghhavgrvkffo\",\"cluyovwxnbkf\":\"mv\",\"zbomvzzbtdcqvpni\":\"zzxscyhwzdgiruj\"}},\"id\":\"jviylwdshfs\",\"name\":\"n\",\"type\":\"bgye\"},{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"gaojf\",\"nextVersion\":\"nc\",\"description\":\"mrfhirctymox\",\"tags\":{\"qjlihhyuspska\":\"pipiwyczuhxac\",\"cvpa\":\"dvlmfwdgzxul\",\"zvxurisjnhny\":\"rsre\"},\"properties\":{\"zgxmr\":\"fq\",\"upauut\":\"ublwpcesutrg\"}},\"id\":\"oqh\",\"name\":\"hej\",\"type\":\"g\"},{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"qntcypsxjvfoimwk\",\"nextVersion\":\"ircizjxvy\",\"description\":\"ceacvlhvygdy\",\"tags\":{\"jslb\":\"mrtwna\",\"aeqphchqnr\":\"wkojgcyztsfmzn\",\"wrykqgai\":\"rpxeh\"},\"properties\":{\"jdz\":\"iklbydvkhb\",\"srhnjivo\":\"xcv\"}},\"id\":\"tnovqfzgemjdftul\",\"name\":\"ltducea\",\"type\":\"tmczuomejwcwwqi\"},{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"xmojmsvpkjp\",\"nextVersion\":\"kwcf\",\"description\":\"ljyxgtczhe\",\"tags\":{\"xu\":\"sdshmkxmaehvb\",\"n\":\"iplt\",\"xywr\":\"tbaxk\",\"uodpv\":\"kpyklyhp\"},\"properties\":{\"tvdxeclzedqb\":\"dlgzibthostgkt\",\"lhpl\":\"vh\",\"lkxt\":\"dqkdlwwqfbu\",\"fwsrtawcoezbrhu\":\"qjfsmlmbtxhw\"}},\"id\":\"kh\",\"name\":\"dyg\",\"type\":\"ookk\"}],\"nextLink\":\"qjbvleorfmlu\"}") + "{\"value\":[{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"jbabwidf\",\"nextVersion\":\"sspuunnoxyhkx\",\"description\":\"ddrihpf\",\"properties\":{\"djvlpj\":\"caaewdao\",\"msgeivsiykzk\":\"xkzb\",\"xonbzoggculapz\":\"ncj\",\"pgogtqxepny\":\"y\"},\"tags\":{\"lvofqzhvfcibyfmo\":\"uajlyj\",\"dwxf\":\"uxrkjp\"}},\"id\":\"iivwzjbhyzsxjrka\",\"name\":\"btrnegvm\",\"type\":\"vuqeqvldspast\"},{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":true,\"latestVersion\":\"mflvest\",\"nextVersion\":\"lx\",\"description\":\"ilozapeewchpxlk\",\"properties\":{\"vu\":\"uziycsl\",\"gzulwmmrqzzr\":\"uztcktyhjtqed\",\"vqeevtoep\":\"jvpglydzgk\"},\"tags\":{\"wytpzdmovz\":\"t\",\"f\":\"fvaawzqa\",\"cokpv\":\"gzuriglaecxndt\",\"irclnpk\":\"mlqtmldgxob\"}},\"id\":\"ayzri\",\"name\":\"khyawfvjlboxqv\",\"type\":\"jlmxhomdynhd\"},{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":true,\"latestVersion\":\"mbnraauzzp\",\"nextVersion\":\"a\",\"description\":\"sdzhezww\",\"properties\":{\"hqyikvy\":\"qyuvvfonkp\",\"vluwmncsttij\":\"auy\"},\"tags\":{\"krsgsgb\":\"vpo\",\"dgkynscliqhzvhxn\":\"huzqgn\",\"tppn\":\"omtkub\",\"frbbc\":\"dxzxhi\"}},\"id\":\"qagt\",\"name\":\"tdhlfkqo\",\"type\":\"py\"},{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":true,\"latestVersion\":\"dcnifmz\",\"nextVersion\":\"dymbrny\",\"description\":\"xmprafwg\",\"properties\":{\"udaspavehh\":\"ocxvdfffwafqr\",\"xg\":\"vkbunzozudh\",\"cdyuibhmfdnbzyd\":\"moy\",\"fcjnaeoisrvhmgor\":\"f\"},\"tags\":{\"faxvxil\":\"kiscvwmzhwpl\",\"nzeyqxtjj\":\"btgn\",\"vodggxdbee\":\"zqlqhyc\"}},\"id\":\"ieknl\",\"name\":\"ariaawi\",\"type\":\"agy\"}],\"nextLink\":\"qfby\"}") .toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("uswdv", model.value().get(0).properties().description()); - Assertions.assertEquals("bycnunvjsrtkf", model.value().get(0).properties().tags().get("wnopqgikyzirtx")); - Assertions.assertEquals("ghhavgrvkffo", model.value().get(0).properties().properties().get("jzhpjbibgjmfx")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - Assertions.assertEquals("qjbvleorfmlu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerResourceArmPaginatedResult model - = new DataContainerResourceArmPaginatedResult() - .withValue(Arrays.asList( - new DataContainerInner().withProperties(new DataContainerProperties() - .withDescription("uswdv") - .withTags(mapOf("wnopqgikyzirtx", "bycnunvjsrtkf", "ilqu", "yuxzejntpsewgi", "eoxorggufhyao", - "rydxtqm")) - .withProperties(mapOf("jzhpjbibgjmfx", "ghhavgrvkffo", "cluyovwxnbkf", "mv", "zbomvzzbtdcqvpni", - "zzxscyhwzdgiruj")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)), - new DataContainerInner() - .withProperties(new DataContainerProperties().withDescription("mrfhirctymox") - .withTags( - mapOf("qjlihhyuspska", "pipiwyczuhxac", "cvpa", "dvlmfwdgzxul", "zvxurisjnhny", "rsre")) - .withProperties(mapOf("zgxmr", "fq", "upauut", "ublwpcesutrg")) - .withIsArchived(false) - .withDataType(DataType.MLTABLE)), - new DataContainerInner() - .withProperties(new DataContainerProperties().withDescription("ceacvlhvygdy") - .withTags(mapOf("jslb", "mrtwna", "aeqphchqnr", "wkojgcyztsfmzn", "wrykqgai", "rpxeh")) - .withProperties(mapOf("jdz", "iklbydvkhb", "srhnjivo", "xcv")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)), - new DataContainerInner().withProperties(new DataContainerProperties().withDescription("ljyxgtczhe") - .withTags(mapOf("xu", "sdshmkxmaehvb", "n", "iplt", "xywr", "tbaxk", "uodpv", "kpyklyhp")) - .withProperties(mapOf("tvdxeclzedqb", "dlgzibthostgkt", "lhpl", "vh", "lkxt", "dqkdlwwqfbu", - "fwsrtawcoezbrhu", "qjfsmlmbtxhw")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)))) - .withNextLink("qjbvleorfmlu"); - model = BinaryData.fromObject(model).toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("uswdv", model.value().get(0).properties().description()); - Assertions.assertEquals("bycnunvjsrtkf", model.value().get(0).properties().tags().get("wnopqgikyzirtx")); - Assertions.assertEquals("ghhavgrvkffo", model.value().get(0).properties().properties().get("jzhpjbibgjmfx")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - Assertions.assertEquals("qjbvleorfmlu", 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; + Assertions.assertEquals("ddrihpf", model.value().get(0).properties().description()); + Assertions.assertEquals("caaewdao", model.value().get(0).properties().properties().get("djvlpj")); + Assertions.assertEquals("uajlyj", model.value().get(0).properties().tags().get("lvofqzhvfcibyfmo")); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals(DataType.URI_FOLDER, model.value().get(0).properties().dataType()); + Assertions.assertEquals("qfby", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java index f42a4ba0fcef..72f93eecd006 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataContainer; @@ -25,29 +25,30 @@ public final class DataContainersCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"cukboc\",\"nextVersion\":\"t\",\"description\":\"hvsgzpwqieyxjkc\",\"tags\":{\"qepeftmub\":\"sttam\"},\"properties\":{\"zeq\":\"oepeqlhbtysy\",\"gyzwfyfdbvoo\":\"ctpqnofkw\",\"iyqmlmw\":\"lmikdsqqykgjjsmv\",\"cvemmriyz\":\"wsmnwbm\"}},\"id\":\"quesxplcsinbulo\",\"name\":\"xxhcynnmvaiz\",\"type\":\"kwqqpwcids\"}"; + = "{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":true,\"latestVersion\":\"eodvlmdzgvcykz\",\"nextVersion\":\"gctygbbmu\",\"description\":\"jvvcrsmwojm\",\"properties\":{\"q\":\"vumnru\"},\"tags\":{\"pec\":\"qjftvltj\"}},\"id\":\"kbzltnowpajfhx\",\"name\":\"mu\",\"type\":\"bzadzglmuuzpsu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataContainer response = manager.dataContainers() - .define("qon") - .withExistingWorkspace("sxblmnxrxkuly", "ivvi") - .withProperties(new DataContainerProperties().withDescription("pnkzimqaxt") - .withTags(mapOf("paxjdqvv", "ycv", "mrdvhbgtuhwhx", "jehyvnfjngo")) - .withProperties(mapOf("nuzgzrxxduseb", "enbphy")) + .define("tmlidk") + .withExistingWorkspace("lyxbwslxg", "mxtoejtqvq") + .withProperties(new DataContainerProperties().withDescription("rplf") + .withProperties(mapOf("rxknfv", "mjjfzizxlbiqqeb", "onrk", "symagbahdbtjmku")) + .withTags(mapOf("xhuqfvpanloqov", "z", "ucujtjuzvyjxuxch", "cxgqtquirgopgza", "vuvda", + "uoqhqrcsksxqfhl", "ijcsapqhipajs", "vyjcdpncvfyeqyod")) .withIsArchived(false) .withDataType(DataType.URI_FILE)) .create(); - Assertions.assertEquals("hvsgzpwqieyxjkc", response.properties().description()); - Assertions.assertEquals("sttam", response.properties().tags().get("qepeftmub")); - Assertions.assertEquals("oepeqlhbtysy", response.properties().properties().get("zeq")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("jvvcrsmwojm", response.properties().description()); + Assertions.assertEquals("vumnru", response.properties().properties().get("q")); + Assertions.assertEquals("qjftvltj", response.properties().tags().get("pec")); + Assertions.assertTrue(response.properties().isArchived()); Assertions.assertEquals(DataType.MLTABLE, response.properties().dataType()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java index 79e8c07d00cd..fd7ea7b24abc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.dataContainers() - .deleteWithResponse("zxqomzdfaupqvei", "zwnkbjqpz", "odwh", com.azure.core.util.Context.NONE); + manager.dataContainers().deleteWithResponse("hzefin", "yydxwgti", "vz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java index bcd114a54701..c1aa8067fb90 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataContainer; @@ -22,23 +22,23 @@ public final class DataContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"dcaqimodnbjmjx\",\"nextVersion\":\"bucmzkqt\",\"description\":\"jacktav\",\"tags\":{\"secedsoqwexi\":\"godjfyplavb\",\"ikf\":\"bnzot\",\"etqj\":\"jqdfadgywyla\",\"gylyzolrvwsgseqj\":\"ohystdgjtpbtkogf\"},\"properties\":{\"gisw\":\"axir\",\"pvsobamt\":\"jy\"}},\"id\":\"irdzdgv\",\"name\":\"oflzuk\",\"type\":\"gougxpypbmz\"}"; + = "{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":true,\"latestVersion\":\"wqbak\",\"nextVersion\":\"xerowuzvrnnb\",\"description\":\"ra\",\"properties\":{\"ofmazhkqqs\":\"nmtojxg\",\"dmwiwevveswg\":\"knaqszbwgp\"},\"tags\":{\"dargkwim\":\"qqhd\",\"xvbkirgknhfwlajw\":\"cceeeuquuwczzcuj\",\"spewyzhydtkbm\":\"ajydjbjgip\",\"garmawokgcnev\":\"rsdplvia\"}},\"id\":\"cwbqy\",\"name\":\"clwbjgiynqryoisw\",\"type\":\"ofvsxau\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataContainer response = manager.dataContainers() - .getWithResponse("uxsochtuxapewzwq", "bx", "ynslcvynavwtttsm", com.azure.core.util.Context.NONE) + .getWithResponse("v", "unudmakkshrnaxk", "zkwohdigeyuocft", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("jacktav", response.properties().description()); - Assertions.assertEquals("godjfyplavb", response.properties().tags().get("secedsoqwexi")); - Assertions.assertEquals("axir", response.properties().properties().get("gisw")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); + Assertions.assertEquals("ra", response.properties().description()); + Assertions.assertEquals("nmtojxg", response.properties().properties().get("ofmazhkqqs")); + Assertions.assertEquals("qqhd", response.properties().tags().get("dargkwim")); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals(DataType.MLTABLE, response.properties().dataType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java index eace8b48b6ff..243e86136aa2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataContainer; @@ -24,22 +24,23 @@ public final class DataContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":true,\"latestVersion\":\"qcsotwqtkpdc\",\"nextVersion\":\"fqoermgmgn\",\"description\":\"axaogskhc\",\"tags\":{\"yyb\":\"bipyse\",\"bpgdiwdy\":\"bfjcvmk\",\"wqwvcwcehzrtrg\":\"hdtiemb\"},\"properties\":{\"ktuzrltpe\":\"btbxhyfwjf\",\"njpbhjlugcupcyfr\":\"sdkbqfzbvttqjntv\"}},\"id\":\"oyvmvuxyeeafd\",\"name\":\"suwl\",\"type\":\"nxzhgbspdxbhjqux\"}]}"; + = "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"wncs\",\"nextVersion\":\"fxvchmubyguqh\",\"description\":\"msvjfgrpryyir\",\"properties\":{\"kbuatxkznlwl\":\"jxjrbvy\",\"zkxiym\":\"bxogkevdayv\"},\"tags\":{\"ybsps\":\"gkjalrjwaezp\"}},\"id\":\"mtcepzimfcfs\",\"name\":\"iwe\",\"type\":\"pasckpgb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dataContainers() - .list("rxbmljrjyfjleux", "xkpsjldgnim", "oacf", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); + .list("deexccw", "dgfquywmwtacrscf", "ncrvjcullmfwfpoe", ListViewType.ACTIVE_ONLY, + com.azure.core.util.Context.NONE); - Assertions.assertEquals("axaogskhc", response.iterator().next().properties().description()); - Assertions.assertEquals("bipyse", response.iterator().next().properties().tags().get("yyb")); - Assertions.assertEquals("btbxhyfwjf", response.iterator().next().properties().properties().get("ktuzrltpe")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("msvjfgrpryyir", response.iterator().next().properties().description()); + Assertions.assertEquals("jxjrbvy", response.iterator().next().properties().properties().get("kbuatxkznlwl")); + Assertions.assertEquals("gkjalrjwaezp", response.iterator().next().properties().tags().get("ybsps")); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); Assertions.assertEquals(DataType.URI_FILE, response.iterator().next().properties().dataType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java index 2f4e36b0a02a..638ca9723a1a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,16 +13,16 @@ public final class DataDriftMetricThresholdBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataDriftMetricThresholdBase model = BinaryData - .fromString("{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":16.657561950971566}}") + .fromString("{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":19.181829886419045}}") .toObject(DataDriftMetricThresholdBase.class); - Assertions.assertEquals(16.657561950971566D, model.threshold().value()); + Assertions.assertEquals(19.181829886419045D, model.threshold().value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DataDriftMetricThresholdBase model = new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(16.657561950971566D)); + .withThreshold(new MonitoringThreshold().withValue(19.181829886419045D)); model = BinaryData.fromObject(model).toObject(DataDriftMetricThresholdBase.class); - Assertions.assertEquals(16.657561950971566D, model.threshold().value()); + Assertions.assertEquals(19.181829886419045D, model.threshold().value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java index eeef451e5497..0857ebc395c1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -24,63 +24,73 @@ public final class DataDriftMonitoringSignalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"DataDrift\",\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"gbjbhrp\"},\"metricThresholds\":[{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":44.85113411986268}},{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":50.380142949889816}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"mmaixpqji\",\"jobInputType\":\"mlflow_model\",\"uri\":\"f\",\"columns\":{\"tohqclna\":\"sld\",\"gsiqikvllr\":\"h\",\"wrqkza\":\"tpmglxkoikmtr\",\"paklw\":\"bun\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"wee\",\"jobInputType\":\"uri_folder\",\"uri\":\"nejzltkaszfjsxs\",\"columns\":{\"lnwsbvvdlsf\":\"uxapgrcqebmvrdjo\"}},\"featureDataTypeOverride\":{\"esdfedsb\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"i\":\"phymc\",\"e\":\"kltvdhqnufbx\",\"ntojovfnybydhuih\":\"i\"}}") + "{\"signalType\":\"DataDrift\",\"featureDataTypeOverride\":{\"haqidoyzltgiomqo\":\"Categorical\",\"epiaeapfsergd\":\"Categorical\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"acyh\"},\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"metricThresholds\":[{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":7.085636167259302}},{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":90.44405823393869}},{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":30.602944436423396}},{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":39.05158062950731}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"ipsejbsvsia\":\"wmbupyvqyvliq\",\"zydisnuep\":\"eswhd\",\"nldpxottd\":\"wyj\",\"ocqibz\":\"i\"},\"dataContext\":\"hweebiph\",\"jobInputType\":\"literal\",\"uri\":\"vcjwqwoqsratj\"},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"gv\":\"zybspijhfrzgdkk\",\"zhwilzzh\":\"ukhsusmmorf\",\"r\":\"ijmri\"},\"dataContext\":\"dneyttlr\",\"jobInputType\":\"uri_file\",\"uri\":\"ivcbkutpumltwj\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"khmocgjs\":\"pvzlqywauyqnj\",\"gljkybsj\":\"gouarhwvixqq\",\"jhxpcvrd\":\"clrvtzqnrbctbh\"}}") .toObject(DataDriftMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("phymc", model.properties().get("i")); + Assertions.assertEquals("pvzlqywauyqnj", model.properties().get("khmocgjs")); + Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, + model.featureDataTypeOverride().get("haqidoyzltgiomqo")); Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gbjbhrp", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(44.85113411986268D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("mmaixpqji", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("f", model.productionData().uri()); - Assertions.assertEquals("sld", model.productionData().columns().get("tohqclna")); - Assertions.assertEquals("wee", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); - Assertions.assertEquals("nejzltkaszfjsxs", model.referenceData().uri()); - Assertions.assertEquals("uxapgrcqebmvrdjo", model.referenceData().columns().get("lnwsbvvdlsf")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("esdfedsb")); + Assertions.assertEquals("acyh", model.featureImportanceSettings().targetColumn()); + Assertions.assertEquals(7.085636167259302D, model.metricThresholds().get(0).threshold().value()); + Assertions.assertEquals("wmbupyvqyvliq", model.productionData().columns().get("ipsejbsvsia")); + Assertions.assertEquals("hweebiph", model.productionData().dataContext()); + Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); + Assertions.assertEquals("vcjwqwoqsratj", model.productionData().uri()); + Assertions.assertEquals("zybspijhfrzgdkk", model.referenceData().columns().get("gv")); + Assertions.assertEquals("dneyttlr", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.URI_FILE, model.referenceData().jobInputType()); + Assertions.assertEquals("ivcbkutpumltwj", model.referenceData().uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DataDriftMonitoringSignal model = new DataDriftMonitoringSignal() .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("i", "phymc", "e", "kltvdhqnufbx", "ntojovfnybydhuih", "i")) - .withFeatures(new MonitoringFeatureFilterBase()) + Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) + .withProperties( + mapOf("khmocgjs", "pvzlqywauyqnj", "gljkybsj", "gouarhwvixqq", "jhxpcvrd", "clrvtzqnrbctbh")) + .withFeatureDataTypeOverride(mapOf("haqidoyzltgiomqo", MonitoringFeatureDataType.CATEGORICAL, + "epiaeapfsergd", MonitoringFeatureDataType.CATEGORICAL)) .withFeatureImportanceSettings( - new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("gbjbhrp")) + new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("acyh")) + .withFeatures(new MonitoringFeatureFilterBase()) .withMetricThresholds(Arrays.asList( new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(44.85113411986268D)), + .withThreshold(new MonitoringThreshold().withValue(7.085636167259302D)), + new DataDriftMetricThresholdBase() + .withThreshold(new MonitoringThreshold().withValue(90.44405823393869D)), + new DataDriftMetricThresholdBase() + .withThreshold(new MonitoringThreshold().withValue(30.602944436423396D)), new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(50.380142949889816D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("mmaixpqji") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("f") - .withColumns(mapOf("tohqclna", "sld", "gsiqikvllr", "h", "wrqkza", "tpmglxkoikmtr", "paklw", "bun"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("wee") - .withJobInputType(JobInputType.URI_FOLDER) - .withUri("nejzltkaszfjsxs") - .withColumns(mapOf("lnwsbvvdlsf", "uxapgrcqebmvrdjo"))) - .withFeatureDataTypeOverride(mapOf("esdfedsb", MonitoringFeatureDataType.NUMERICAL)); + .withThreshold(new MonitoringThreshold().withValue(39.05158062950731D)))) + .withProductionData(new MonitoringInputDataBase() + .withColumns( + mapOf("ipsejbsvsia", "wmbupyvqyvliq", "zydisnuep", "eswhd", "nldpxottd", "wyj", "ocqibz", "i")) + .withDataContext("hweebiph") + .withJobInputType(JobInputType.LITERAL) + .withUri("vcjwqwoqsratj")) + .withReferenceData(new MonitoringInputDataBase() + .withColumns(mapOf("gv", "zybspijhfrzgdkk", "zhwilzzh", "ukhsusmmorf", "r", "ijmri")) + .withDataContext("dneyttlr") + .withJobInputType(JobInputType.URI_FILE) + .withUri("ivcbkutpumltwj")); model = BinaryData.fromObject(model).toObject(DataDriftMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("phymc", model.properties().get("i")); + Assertions.assertEquals("pvzlqywauyqnj", model.properties().get("khmocgjs")); + Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, + model.featureDataTypeOverride().get("haqidoyzltgiomqo")); Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gbjbhrp", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(44.85113411986268D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("mmaixpqji", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("f", model.productionData().uri()); - Assertions.assertEquals("sld", model.productionData().columns().get("tohqclna")); - Assertions.assertEquals("wee", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); - Assertions.assertEquals("nejzltkaszfjsxs", model.referenceData().uri()); - Assertions.assertEquals("uxapgrcqebmvrdjo", model.referenceData().columns().get("lnwsbvvdlsf")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("esdfedsb")); + Assertions.assertEquals("acyh", model.featureImportanceSettings().targetColumn()); + Assertions.assertEquals(7.085636167259302D, model.metricThresholds().get(0).threshold().value()); + Assertions.assertEquals("wmbupyvqyvliq", model.productionData().columns().get("ipsejbsvsia")); + Assertions.assertEquals("hweebiph", model.productionData().dataContext()); + Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); + Assertions.assertEquals("vcjwqwoqsratj", model.productionData().uri()); + Assertions.assertEquals("zybspijhfrzgdkk", model.referenceData().columns().get("gv")); + Assertions.assertEquals("dneyttlr", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.URI_FILE, model.referenceData().jobInputType()); + Assertions.assertEquals("ivcbkutpumltwj", model.referenceData().uri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataGenerationVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataGenerationVerticalTests.java new file mode 100644 index 000000000000..9a64c87e4b3b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataGenerationVerticalTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType; +import com.azure.resourcemanager.machinelearning.models.DataGenerationVertical; +import com.azure.resourcemanager.machinelearning.models.PromptSettings; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings; +import com.azure.resourcemanager.machinelearning.models.TeacherModelSettings; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DataGenerationVerticalTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DataGenerationVertical model = BinaryData.fromString( + "{\"dataGenerationType\":\"DataGenerationVertical\",\"dataGenerationTaskType\":\"Summarization\",\"promptSettings\":{\"enableChainOfDensity\":false,\"enableChainOfThought\":false,\"maxLenSummary\":264936574},\"teacherModelEndpoint\":{\"endpointName\":\"blfs\"},\"teacherModelSettings\":{\"teacherModelEndpointRequestSettings\":{\"minEndpointSuccessRatio\":85.21366048341534,\"requestBatchSize\":1847938019},\"teacherModelInferenceParameters\":{\"lxiz\":\"cvvfxrdytzf\"}}}") + .toObject(DataGenerationVertical.class); + Assertions.assertEquals(DataGenerationTaskType.SUMMARIZATION, model.dataGenerationTaskType()); + Assertions.assertFalse(model.promptSettings().enableChainOfDensity()); + Assertions.assertFalse(model.promptSettings().enableChainOfThought()); + Assertions.assertEquals(264936574, model.promptSettings().maxLenSummary()); + Assertions.assertEquals("blfs", model.teacherModelEndpoint().endpointName()); + Assertions.assertEquals(85.21366048341534D, + model.teacherModelSettings().teacherModelEndpointRequestSettings().minEndpointSuccessRatio()); + Assertions.assertEquals(1847938019, + model.teacherModelSettings().teacherModelEndpointRequestSettings().requestBatchSize()); + Assertions.assertEquals("cvvfxrdytzf", + model.teacherModelSettings().teacherModelInferenceParameters().get("lxiz")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DataGenerationVertical model + = new DataGenerationVertical().withDataGenerationTaskType(DataGenerationTaskType.SUMMARIZATION) + .withPromptSettings(new PromptSettings().withEnableChainOfDensity(false) + .withEnableChainOfThought(false) + .withMaxLenSummary(264936574)) + .withTeacherModelEndpoint(new TeacherModelEndpoint().withEndpointName("blfs")) + .withTeacherModelSettings(new TeacherModelSettings() + .withTeacherModelEndpointRequestSettings( + new TeacherModelEndpointRequestSettings().withMinEndpointSuccessRatio(85.21366048341534D) + .withRequestBatchSize(1847938019)) + .withTeacherModelInferenceParameters(mapOf("lxiz", "cvvfxrdytzf"))); + model = BinaryData.fromObject(model).toObject(DataGenerationVertical.class); + Assertions.assertEquals(DataGenerationTaskType.SUMMARIZATION, model.dataGenerationTaskType()); + Assertions.assertFalse(model.promptSettings().enableChainOfDensity()); + Assertions.assertFalse(model.promptSettings().enableChainOfThought()); + Assertions.assertEquals(264936574, model.promptSettings().maxLenSummary()); + Assertions.assertEquals("blfs", model.teacherModelEndpoint().endpointName()); + Assertions.assertEquals(85.21366048341534D, + model.teacherModelSettings().teacherModelEndpointRequestSettings().minEndpointSuccessRatio()); + Assertions.assertEquals(1847938019, + model.teacherModelSettings().teacherModelEndpointRequestSettings().requestBatchSize()); + Assertions.assertEquals("cvvfxrdytzf", + model.teacherModelSettings().teacherModelInferenceParameters().get("lxiz")); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java index 363e5037b410..2807e8a39837 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,16 +11,17 @@ public final class DataLakeAnalyticsSchemaPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DataLakeAnalyticsSchemaProperties model = BinaryData.fromString("{\"dataLakeStoreAccountName\":\"wtxzuisam\"}") - .toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("wtxzuisam", model.dataLakeStoreAccountName()); + DataLakeAnalyticsSchemaProperties model + = BinaryData.fromString("{\"dataLakeStoreAccountName\":\"qiywhxpsbapial\"}") + .toObject(DataLakeAnalyticsSchemaProperties.class); + Assertions.assertEquals("qiywhxpsbapial", model.dataLakeStoreAccountName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DataLakeAnalyticsSchemaProperties model - = new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("wtxzuisam"); + = new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("qiywhxpsbapial"); model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("wtxzuisam", model.dataLakeStoreAccountName()); + Assertions.assertEquals("qiywhxpsbapial", model.dataLakeStoreAccountName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java deleted file mode 100644 index a0304a36f071..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchema; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalyticsSchema model - = BinaryData.fromString("{\"properties\":{\"dataLakeStoreAccountName\":\"dbmp\"}}") - .toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("dbmp", model.properties().dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchema model = new DataLakeAnalyticsSchema() - .withProperties(new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("dbmp")); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("dbmp", model.properties().dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java index b0de8cbf43c8..4cc357181e9e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,20 +11,18 @@ public final class DataPathAssetReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DataPathAssetReference model = BinaryData - .fromString( - "{\"referenceType\":\"DataPath\",\"path\":\"wvumosqircamqprl\",\"datastoreId\":\"rugejcvjkjy\"}") - .toObject(DataPathAssetReference.class); - Assertions.assertEquals("wvumosqircamqprl", model.path()); - Assertions.assertEquals("rugejcvjkjy", model.datastoreId()); + DataPathAssetReference model + = BinaryData.fromString("{\"referenceType\":\"DataPath\",\"datastoreId\":\"vogygzyvneez\",\"path\":\"fg\"}") + .toObject(DataPathAssetReference.class); + Assertions.assertEquals("vogygzyvneez", model.datastoreId()); + Assertions.assertEquals("fg", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DataPathAssetReference model - = new DataPathAssetReference().withPath("wvumosqircamqprl").withDatastoreId("rugejcvjkjy"); + DataPathAssetReference model = new DataPathAssetReference().withDatastoreId("vogygzyvneez").withPath("fg"); model = BinaryData.fromObject(model).toObject(DataPathAssetReference.class); - Assertions.assertEquals("wvumosqircamqprl", model.path()); - Assertions.assertEquals("rugejcvjkjy", model.datastoreId()); + Assertions.assertEquals("vogygzyvneez", model.datastoreId()); + Assertions.assertEquals("fg", model.path()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java index bc62a16c55b1..19631a7b99a2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,16 +13,16 @@ public final class DataQualityMetricThresholdBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataQualityMetricThresholdBase model = BinaryData - .fromString("{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":1.952782612587045}}") + .fromString("{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":55.26068726211584}}") .toObject(DataQualityMetricThresholdBase.class); - Assertions.assertEquals(1.952782612587045D, model.threshold().value()); + Assertions.assertEquals(55.26068726211584D, model.threshold().value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DataQualityMetricThresholdBase model = new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(1.952782612587045D)); + .withThreshold(new MonitoringThreshold().withValue(55.26068726211584D)); model = BinaryData.fromObject(model).toObject(DataQualityMetricThresholdBase.class); - Assertions.assertEquals(1.952782612587045D, model.threshold().value()); + Assertions.assertEquals(55.26068726211584D, model.threshold().value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java index edbee6f80163..eef2dfc30911 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -24,23 +24,22 @@ public final class DataQualityMonitoringSignalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataQualityMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"DataQuality\",\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"gelajdyolje\"},\"metricThresholds\":[{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":72.15525185747076}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":73.54011054612096}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":63.244267432137526}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":6.228835392523502}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jymgqbgcxhn\",\"jobInputType\":\"literal\",\"uri\":\"gzxlermkmerghski\",\"columns\":{\"jqnvtsdyd\":\"pupkcbkfukd\",\"yuf\":\"hkpafyaloowwzizz\",\"ti\":\"qz\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"uf\",\"jobInputType\":\"mltable\",\"uri\":\"fdk\",\"columns\":{\"qh\":\"vndjokgwesym\",\"ujqbbgsimwejl\":\"qpfzlpejtznxlue\",\"bcpr\":\"bkbpjzobd\",\"ydtnaczkfwfatgaw\":\"swku\"}},\"featureDataTypeOverride\":{\"kivdwgtqcume\":\"Categorical\",\"aaqgoqbdiuycs\":\"Numerical\",\"kowkrbhzhr\":\"Categorical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"gucyhfaimqvdruo\":\"wiuasfg\",\"kk\":\"kgyfpeoehgfmqm\",\"vzjyielb\":\"xvlzjxplhpevasyn\"}}") + "{\"signalType\":\"DataQuality\",\"featureDataTypeOverride\":{\"fsvpink\":\"Numerical\",\"atqtdiswxspvckoj\":\"Numerical\",\"bbg\":\"Categorical\",\"ft\":\"Categorical\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"pvpvd\"},\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"metricThresholds\":[{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":78.51504433085599}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":11.711587359830878}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"xzfxn\":\"fjb\"},\"dataContext\":\"lbmuos\",\"jobInputType\":\"literal\",\"uri\":\"jmdihdcyyyzlw\"},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"dq\":\"zjnufzrfg\",\"zrtftedzuubjt\":\"nn\"},\"dataContext\":\"jsxmtyjjvavdpw\",\"jobInputType\":\"uri_folder\",\"uri\":\"btdphti\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"friwgybjp\":\"anmhkscauwazcgw\",\"lix\":\"zokscvg\",\"qkjvxprwpxsoohu\":\"gbyfgwe\",\"ugggzlfbgrdcgu\":\"xlcskltez\"}}") .toObject(DataQualityMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("wiuasfg", model.properties().get("gucyhfaimqvdruo")); + Assertions.assertEquals("anmhkscauwazcgw", model.properties().get("friwgybjp")); + Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("fsvpink")); Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gelajdyolje", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(72.15525185747076D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("jymgqbgcxhn", model.productionData().dataContext()); + Assertions.assertEquals("pvpvd", model.featureImportanceSettings().targetColumn()); + Assertions.assertEquals(78.51504433085599D, model.metricThresholds().get(0).threshold().value()); + Assertions.assertEquals("fjb", model.productionData().columns().get("xzfxn")); + Assertions.assertEquals("lbmuos", model.productionData().dataContext()); Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); - Assertions.assertEquals("gzxlermkmerghski", model.productionData().uri()); - Assertions.assertEquals("pupkcbkfukd", model.productionData().columns().get("jqnvtsdyd")); - Assertions.assertEquals("uf", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.MLTABLE, model.referenceData().jobInputType()); - Assertions.assertEquals("fdk", model.referenceData().uri()); - Assertions.assertEquals("vndjokgwesym", model.referenceData().columns().get("qh")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, - model.featureDataTypeOverride().get("kivdwgtqcume")); + Assertions.assertEquals("jmdihdcyyyzlw", model.productionData().uri()); + Assertions.assertEquals("zjnufzrfg", model.referenceData().columns().get("dq")); + Assertions.assertEquals("jsxmtyjjvavdpw", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); + Assertions.assertEquals("btdphti", model.referenceData().uri()); } @org.junit.jupiter.api.Test @@ -48,46 +47,43 @@ public void testSerialize() throws Exception { DataQualityMonitoringSignal model = new DataQualityMonitoringSignal() .withNotificationTypes( Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("gucyhfaimqvdruo", "wiuasfg", "kk", "kgyfpeoehgfmqm", "vzjyielb", "xvlzjxplhpevasyn")) + .withProperties(mapOf("friwgybjp", "anmhkscauwazcgw", "lix", "zokscvg", "qkjvxprwpxsoohu", "gbyfgwe", + "ugggzlfbgrdcgu", "xlcskltez")) + .withFeatureDataTypeOverride(mapOf("fsvpink", MonitoringFeatureDataType.NUMERICAL, "atqtdiswxspvckoj", + MonitoringFeatureDataType.NUMERICAL, "bbg", MonitoringFeatureDataType.CATEGORICAL, "ft", + MonitoringFeatureDataType.CATEGORICAL)) + .withFeatureImportanceSettings( + new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("pvpvd")) .withFeatures(new MonitoringFeatureFilterBase()) - .withFeatureImportanceSettings(new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED) - .withTargetColumn("gelajdyolje")) .withMetricThresholds(Arrays.asList( new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(72.15525185747076D)), + .withThreshold(new MonitoringThreshold().withValue(78.51504433085599D)), new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(73.54011054612096D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(63.244267432137526D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(6.228835392523502D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("jymgqbgcxhn") + .withThreshold(new MonitoringThreshold().withValue(11.711587359830878D)))) + .withProductionData(new MonitoringInputDataBase().withColumns(mapOf("xzfxn", "fjb")) + .withDataContext("lbmuos") .withJobInputType(JobInputType.LITERAL) - .withUri("gzxlermkmerghski") - .withColumns(mapOf("jqnvtsdyd", "pupkcbkfukd", "yuf", "hkpafyaloowwzizz", "ti", "qz"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("uf") - .withJobInputType(JobInputType.MLTABLE) - .withUri("fdk") - .withColumns(mapOf("qh", "vndjokgwesym", "ujqbbgsimwejl", "qpfzlpejtznxlue", "bcpr", "bkbpjzobd", - "ydtnaczkfwfatgaw", "swku"))) - .withFeatureDataTypeOverride(mapOf("kivdwgtqcume", MonitoringFeatureDataType.CATEGORICAL, "aaqgoqbdiuycs", - MonitoringFeatureDataType.NUMERICAL, "kowkrbhzhr", MonitoringFeatureDataType.CATEGORICAL)); + .withUri("jmdihdcyyyzlw")) + .withReferenceData( + new MonitoringInputDataBase().withColumns(mapOf("dq", "zjnufzrfg", "zrtftedzuubjt", "nn")) + .withDataContext("jsxmtyjjvavdpw") + .withJobInputType(JobInputType.URI_FOLDER) + .withUri("btdphti")); model = BinaryData.fromObject(model).toObject(DataQualityMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("wiuasfg", model.properties().get("gucyhfaimqvdruo")); + Assertions.assertEquals("anmhkscauwazcgw", model.properties().get("friwgybjp")); + Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("fsvpink")); Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gelajdyolje", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(72.15525185747076D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("jymgqbgcxhn", model.productionData().dataContext()); + Assertions.assertEquals("pvpvd", model.featureImportanceSettings().targetColumn()); + Assertions.assertEquals(78.51504433085599D, model.metricThresholds().get(0).threshold().value()); + Assertions.assertEquals("fjb", model.productionData().columns().get("xzfxn")); + Assertions.assertEquals("lbmuos", model.productionData().dataContext()); Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); - Assertions.assertEquals("gzxlermkmerghski", model.productionData().uri()); - Assertions.assertEquals("pupkcbkfukd", model.productionData().columns().get("jqnvtsdyd")); - Assertions.assertEquals("uf", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.MLTABLE, model.referenceData().jobInputType()); - Assertions.assertEquals("fdk", model.referenceData().uri()); - Assertions.assertEquals("vndjokgwesym", model.referenceData().columns().get("qh")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, - model.featureDataTypeOverride().get("kivdwgtqcume")); + Assertions.assertEquals("jmdihdcyyyzlw", model.productionData().uri()); + Assertions.assertEquals("zjnufzrfg", model.referenceData().columns().get("dq")); + Assertions.assertEquals("jsxmtyjjvavdpw", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); + Assertions.assertEquals("btdphti", model.referenceData().uri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java index dac5e4fa54a7..abccc7fb5a28 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,33 +15,32 @@ public final class DataVersionBaseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataVersionBaseInner model = BinaryData.fromString( - "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"widf\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"unnoxyhk\",\"tags\":{\"oqcaaewdaomdj\":\"ddrihpf\",\"jxxkzbrmsgei\":\"l\",\"ggcula\":\"siykzkdncjdxonbz\",\"y\":\"z\"},\"properties\":{\"ajlyjtlvofqzhv\":\"ogtqxepnylbf\",\"fmo\":\"cib\",\"dwxf\":\"uxrkjp\",\"rkambt\":\"wiivwzjbhyzsx\"}},\"id\":\"egv\",\"name\":\"nvuqeqvldspa\",\"type\":\"tjb\"}") + "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"yr\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"cojocqwogfnzjvus\",\"properties\":{\"ylfsbtk\":\"dmozu\"},\"tags\":{\"jqctojcmisofie\":\"ysownbtgkbug\",\"ojyqdhcuplcplcw\":\"pe\"}},\"id\":\"ihih\",\"name\":\"hzdsqtzbsrgnow\",\"type\":\"jhf\"}") .toObject(DataVersionBaseInner.class); - Assertions.assertEquals("unnoxyhk", model.properties().description()); - Assertions.assertEquals("ddrihpf", model.properties().tags().get("oqcaaewdaomdj")); - Assertions.assertEquals("ogtqxepnylbf", model.properties().properties().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("widf", model.properties().dataUri()); + Assertions.assertEquals("cojocqwogfnzjvus", model.properties().description()); + Assertions.assertEquals("dmozu", model.properties().properties().get("ylfsbtk")); + Assertions.assertEquals("ysownbtgkbug", model.properties().tags().get("jqctojcmisofie")); + Assertions.assertFalse(model.properties().isAnonymous()); + Assertions.assertTrue(model.properties().isArchived()); + Assertions.assertEquals("yr", model.properties().dataUri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DataVersionBaseInner model = new DataVersionBaseInner().withProperties(new DataVersionBaseProperties() - .withDescription("unnoxyhk") - .withTags(mapOf("oqcaaewdaomdj", "ddrihpf", "jxxkzbrmsgei", "l", "ggcula", "siykzkdncjdxonbz", "y", "z")) - .withProperties( - mapOf("ajlyjtlvofqzhv", "ogtqxepnylbf", "fmo", "cib", "dwxf", "uxrkjp", "rkambt", "wiivwzjbhyzsx")) - .withIsArchived(true) - .withIsAnonymous(true) - .withDataUri("widf")); + DataVersionBaseInner model = new DataVersionBaseInner() + .withProperties(new DataVersionBaseProperties().withDescription("cojocqwogfnzjvus") + .withProperties(mapOf("ylfsbtk", "dmozu")) + .withTags(mapOf("jqctojcmisofie", "ysownbtgkbug", "ojyqdhcuplcplcw", "pe")) + .withIsAnonymous(false) + .withIsArchived(true) + .withDataUri("yr")); model = BinaryData.fromObject(model).toObject(DataVersionBaseInner.class); - Assertions.assertEquals("unnoxyhk", model.properties().description()); - Assertions.assertEquals("ddrihpf", model.properties().tags().get("oqcaaewdaomdj")); - Assertions.assertEquals("ogtqxepnylbf", model.properties().properties().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("widf", model.properties().dataUri()); + Assertions.assertEquals("cojocqwogfnzjvus", model.properties().description()); + Assertions.assertEquals("dmozu", model.properties().properties().get("ylfsbtk")); + Assertions.assertEquals("ysownbtgkbug", model.properties().tags().get("jqctojcmisofie")); + Assertions.assertFalse(model.properties().isAnonymous()); + Assertions.assertTrue(model.properties().isArchived()); + Assertions.assertEquals("yr", model.properties().dataUri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java index 3a7e34d14cb7..684c595ed7ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,31 +14,31 @@ public final class DataVersionBasePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataVersionBaseProperties model = BinaryData.fromString( - "{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"kdmflvestmjlx\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"apeewchpxlkt\",\"tags\":{\"yhjtqedcgzu\":\"ziycslevufuztck\",\"zrrjvpgly\":\"wmmrq\"},\"properties\":{\"ev\":\"krvq\",\"t\":\"oepry\",\"fvaawzqa\":\"wytpzdmovz\"}}") + "{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"mvec\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"oteyowc\",\"properties\":{\"zmpjwyiv\":\"ovekqvgqouwi\",\"cvhrfsp\":\"ikf\",\"kvyklxubyjaffmm\":\"uagrttikteusqc\"},\"tags\":{\"ubgq\":\"cqc\",\"metttwgd\":\"brta\",\"seypxiutcxapz\":\"lqxihhrmooiz\",\"petogebjox\":\"y\"}}") .toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("apeewchpxlkt", model.description()); - Assertions.assertEquals("ziycslevufuztck", model.tags().get("yhjtqedcgzu")); - Assertions.assertEquals("krvq", model.properties().get("ev")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("kdmflvestmjlx", model.dataUri()); + Assertions.assertEquals("oteyowc", model.description()); + Assertions.assertEquals("ovekqvgqouwi", model.properties().get("zmpjwyiv")); + Assertions.assertEquals("cqc", model.tags().get("ubgq")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals("mvec", model.dataUri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DataVersionBaseProperties model = new DataVersionBaseProperties().withDescription("apeewchpxlkt") - .withTags(mapOf("yhjtqedcgzu", "ziycslevufuztck", "zrrjvpgly", "wmmrq")) - .withProperties(mapOf("ev", "krvq", "t", "oepry", "fvaawzqa", "wytpzdmovz")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("kdmflvestmjlx"); + DataVersionBaseProperties model = new DataVersionBaseProperties().withDescription("oteyowc") + .withProperties(mapOf("zmpjwyiv", "ovekqvgqouwi", "cvhrfsp", "ikf", "kvyklxubyjaffmm", "uagrttikteusqc")) + .withTags(mapOf("ubgq", "cqc", "metttwgd", "brta", "seypxiutcxapz", "lqxihhrmooiz", "petogebjox", "y")) + .withIsAnonymous(true) + .withIsArchived(false) + .withDataUri("mvec"); model = BinaryData.fromObject(model).toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("apeewchpxlkt", model.description()); - Assertions.assertEquals("ziycslevufuztck", model.tags().get("yhjtqedcgzu")); - Assertions.assertEquals("krvq", model.properties().get("ev")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("kdmflvestmjlx", model.dataUri()); + Assertions.assertEquals("oteyowc", model.description()); + Assertions.assertEquals("ovekqvgqouwi", model.properties().get("zmpjwyiv")); + Assertions.assertEquals("cqc", model.tags().get("ubgq")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals("mvec", model.dataUri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java index 789ff4ea9ee2..957ad1932f9f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java @@ -1,77 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.DataVersionBaseResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class DataVersionBaseResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataVersionBaseResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"hhg\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ivfomiloxgg\",\"tags\":{\"hvcyyysfg\":\"iqndieuzaofj\"},\"properties\":{\"qonmacj\":\"cubiipuipw\",\"izsh\":\"k\",\"gmblrri\":\"vcimpev\",\"rwfscjfnynszquj\":\"bywdxsmicc\"}},\"id\":\"dvoqyt\",\"name\":\"byowbblgyavutp\",\"type\":\"hjoxo\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"smsks\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"oljxkcgx\",\"tags\":{\"l\":\"sffgcvizqzd\",\"youpfgfbkj\":\"w\",\"ttsttktlahbqact\":\"bdyhgkfminsgowz\"},\"properties\":{\"x\":\"zukxitmmqtgqq\",\"isavok\":\"rnxrxcpj\",\"azivjlfrqttbajl\":\"dzf\"}},\"id\":\"tnwxy\",\"name\":\"opidkqqfkuv\",\"type\":\"cxkdmligovi\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rxkpmloazuruoc\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"te\",\"tags\":{\"ordilmywwtkgkxny\":\"fhjxakvvjgs\",\"vudtjuewbcihx\":\"dabg\",\"ayakkudzpx\":\"uwhcjyxccybv\",\"stcyohpfkyrkdbd\":\"wjplma\"},\"properties\":{\"mnwqj\":\"gsj\",\"n\":\"obaiyhddviaceg\",\"dwvvba\":\"ntfpmvmemfnc\"}},\"id\":\"lllchpodb\",\"name\":\"evwrdnhfuk\",\"type\":\"vsjcswsmystuluqy\"}],\"nextLink\":\"cvlerchpqbmfpjba\"}") + "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"etnwsdtutnw\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"uzhyrmewipmvekdx\",\"properties\":{\"xgketwz\":\"qgsjjxun\",\"mhv\":\"hzjhf\"},\"tags\":{\"qsxvmhf\":\"vgpmun\"}},\"id\":\"zjyi\",\"name\":\"sasbhu\",\"type\":\"ypoh\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"uemsly\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"foobrlttyms\",\"properties\":{\"gtilax\":\"gqdnfwqzd\",\"oyzunbixxr\":\"nfhqlyvijouwivk\",\"clrcivtsox\":\"ikvcpwp\"},\"tags\":{\"mpdnqqskawa\":\"enxpmyyefr\"}},\"id\":\"vmm\",\"name\":\"npqfrtqlkzmeg\",\"type\":\"itgvkx\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"zyqdrfegcealzx\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"ymo\",\"properties\":{\"omfaj\":\"lwigdivbkbx\",\"xakjsqzhzb\":\"wasqvdaeyyg\",\"asi\":\"zkgimsid\",\"wa\":\"ddyvvjskgfmo\"},\"tags\":{\"eaahhvjhhn\":\"gat\",\"jjidjk\":\"kzyb\",\"vblbjednljlageua\":\"yxkyxvx\",\"enlsvxeizzgwkln\":\"lxunsmjbnkppxy\"}},\"id\":\"mffeycxcktpi\",\"name\":\"merteeammxqiek\",\"type\":\"kzddrtkgdojbmxva\"}],\"nextLink\":\"efdeesve\"}") .toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("ivfomiloxgg", model.value().get(0).properties().description()); - Assertions.assertEquals("iqndieuzaofj", model.value().get(0).properties().tags().get("hvcyyysfg")); - Assertions.assertEquals("cubiipuipw", model.value().get(0).properties().properties().get("qonmacj")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("hhg", model.value().get(0).properties().dataUri()); - Assertions.assertEquals("cvlerchpqbmfpjba", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model - = new DataVersionBaseResourceArmPaginatedResult().withValue(Arrays.asList( - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("ivfomiloxgg") - .withTags(mapOf("hvcyyysfg", "iqndieuzaofj")) - .withProperties(mapOf("qonmacj", "cubiipuipw", "izsh", "k", "gmblrri", "vcimpev", "rwfscjfnynszquj", - "bywdxsmicc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("hhg")), - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("oljxkcgx") - .withTags(mapOf("l", "sffgcvizqzd", "youpfgfbkj", "w", "ttsttktlahbqact", "bdyhgkfminsgowz")) - .withProperties(mapOf("x", "zukxitmmqtgqq", "isavok", "rnxrxcpj", "azivjlfrqttbajl", "dzf")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("smsks")), - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("te") - .withTags(mapOf("ordilmywwtkgkxny", "fhjxakvvjgs", "vudtjuewbcihx", "dabg", "ayakkudzpx", - "uwhcjyxccybv", "stcyohpfkyrkdbd", "wjplma")) - .withProperties(mapOf("mnwqj", "gsj", "n", "obaiyhddviaceg", "dwvvba", "ntfpmvmemfnc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("rxkpmloazuruoc")))) - .withNextLink("cvlerchpqbmfpjba"); - model = BinaryData.fromObject(model).toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("ivfomiloxgg", model.value().get(0).properties().description()); - Assertions.assertEquals("iqndieuzaofj", model.value().get(0).properties().tags().get("hvcyyysfg")); - Assertions.assertEquals("cubiipuipw", model.value().get(0).properties().properties().get("qonmacj")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("hhg", model.value().get(0).properties().dataUri()); - Assertions.assertEquals("cvlerchpqbmfpjba", 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; + Assertions.assertEquals("uzhyrmewipmvekdx", model.value().get(0).properties().description()); + Assertions.assertEquals("qgsjjxun", model.value().get(0).properties().properties().get("xgketwz")); + Assertions.assertEquals("vgpmun", model.value().get(0).properties().tags().get("qsxvmhf")); + Assertions.assertTrue(model.value().get(0).properties().isAnonymous()); + Assertions.assertTrue(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("etnwsdtutnw", model.value().get(0).properties().dataUri()); + Assertions.assertEquals("efdeesve", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java index b8ab3cf6f434..1dd06b6d08bb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataVersionBase; @@ -24,32 +24,34 @@ public final class DataVersionsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"znqqkqxkdglse\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"yakr\",\"tags\":{\"nnvxouhdcf\":\"nwgokrllbec\",\"g\":\"ptfcjapmfwxmcxhw\",\"mgadhmqyufpfo\":\"hifoyo\"},\"properties\":{\"qcypm\":\"ylszrtng\",\"cigcbmayhdtjfrp\":\"nfcorcnhf\"}},\"id\":\"ajzdj\",\"name\":\"zbrwrfrmhouf\",\"type\":\"krbgvojcks\"}"; + = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"amkyrkwsthpiv\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"vnodqqzjbfy\",\"properties\":{\"xfrwvlypz\":\"wnfqdfwv\",\"bod\":\"uskpncdocloepjza\",\"k\":\"wazbur\",\"joasnz\":\"ffudbkvunn\"},\"tags\":{\"wdqzurvukszkm\":\"owqsnix\",\"nmcy\":\"bhhpvvaeghtmqonx\",\"swbrnbo\":\"ecuvwate\",\"fvbksksmqmwowrm\":\"ishkm\"}},\"id\":\"ifhfutjyxntmg\",\"name\":\"gu\",\"type\":\"aem\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataVersionBase response = manager.dataVersions() - .define("rru") - .withExistingData("rucwzc", "judhgw", "qeglym") - .withProperties(new DataVersionBaseProperties().withDescription("lfi") - .withTags(mapOf("e", "nnyxwdpm")) - .withProperties(mapOf("mmvdpavc", "vzxgbamqrbbsnp", "wdtunpcskdlrfo", "kbyjuwhizcbqjxm")) - .withIsArchived(false) + .define("jmsngmluyr") + .withExistingDatum("jumlkjsvkbt", "lixa", "phkgminhecjgdj") + .withProperties(new DataVersionBaseProperties().withDescription("sabcylzz") + .withProperties(mapOf("drue", "umzenk", "ctjwfebqqq", "xexawxoib", "qaclczfr", "et", "amptldddorzlj", + "fyyraiaiidkewq")) + .withTags(mapOf("vx", "fkffngfpilloir", "rqmznwwtkuy", "bktuqnbcjk", "oyoioxdwffwyzqke", "wiieinlicl", + "uecokyduqzusc", "curr")) .withIsAnonymous(true) - .withDataUri("sqpiyxkmqm")) + .withIsArchived(false) + .withDataUri("kpismmrmrj")) .create(); - Assertions.assertEquals("yakr", response.properties().description()); - Assertions.assertEquals("nwgokrllbec", response.properties().tags().get("nnvxouhdcf")); - Assertions.assertEquals("ylszrtng", response.properties().properties().get("qcypm")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("znqqkqxkdglse", response.properties().dataUri()); + Assertions.assertEquals("vnodqqzjbfy", response.properties().description()); + Assertions.assertEquals("wnfqdfwv", response.properties().properties().get("xfrwvlypz")); + Assertions.assertEquals("owqsnix", response.properties().tags().get("wdqzurvukszkm")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("amkyrkwsthpiv", response.properties().dataUri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java index 7f7676139156..c764759b0346 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,11 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.dataVersions() - .deleteWithResponse("nm", "niqw", "qxyxfknjqss", "nwvravntv", com.azure.core.util.Context.NONE); + .deleteWithResponse("lxo", "vrkqv", "vgdojcvzfcmxmjp", "akjdtuodocgquqxn", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java index c9eaabcf88c1..92e504b4210a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataVersionBase; @@ -21,24 +21,24 @@ public final class DataVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"regykjmpad\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"hcz\",\"tags\":{\"af\":\"itydljgrpq\",\"sihumwafapctglj\":\"gjqqbactffxdb\",\"qdd\":\"pizqqihvbkufq\",\"ajlfpsvrljlhe\":\"ynpgomzmkj\"},\"properties\":{\"bnwitafjjevp\":\"cp\",\"vkparskplqft\":\"vitghzq\"}},\"id\":\"xqmbsu\",\"name\":\"cykgulellfwrmsux\",\"type\":\"qbmqo\"}"; + = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"nowxhyvdbrdvsv\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"vlkusgi\",\"properties\":{\"mrdiscsdvkymkt\":\"rcthypepxs\"},\"tags\":{\"a\":\"ivoxgzegnglafnf\"}},\"id\":\"ghddc\",\"name\":\"zwxuxorrutuhvem\",\"type\":\"xlssolqypvw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataVersionBase response = manager.dataVersions() - .getWithResponse("lkwqisnlpaymket", "tkt", "mewwlkryz", "pgqqdhtctx", com.azure.core.util.Context.NONE) + .getWithResponse("sypxmul", "hfrerkqpyfjxkb", "ws", "uqfmxbdjkmnxsg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hcz", response.properties().description()); - Assertions.assertEquals("itydljgrpq", response.properties().tags().get("af")); - Assertions.assertEquals("cp", response.properties().properties().get("bnwitafjjevp")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("regykjmpad", response.properties().dataUri()); + Assertions.assertEquals("vlkusgi", response.properties().description()); + Assertions.assertEquals("rcthypepxs", response.properties().properties().get("mrdiscsdvkymkt")); + Assertions.assertEquals("ivoxgzegnglafnf", response.properties().tags().get("a")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("nowxhyvdbrdvsv", response.properties().dataUri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java index 5ad27d199a95..b7416a907e00 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataVersionBase; @@ -23,24 +23,24 @@ public final class DataVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rwpekiprjb\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"airpwj\",\"tags\":{\"jtvqopugrsergiuz\":\"iwsywp\",\"mcbcen\":\"qefzypult\"},\"properties\":{\"kiynbf\":\"huepikwcxoasgukq\",\"irgyutexnzh\":\"kiwmqnwmytcc\",\"ybfarkhkoqcudn\":\"mcgvjb\"}},\"id\":\"oyh\",\"name\":\"pjj\",\"type\":\"qnzcbjfpxoy\"}]}"; + = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"lsu\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"sjyiehkxgfuzq\",\"properties\":{\"nlbyitfz\":\"kwlxqdsxip\",\"lzpiimxacrk\":\"wwgze\",\"ixgz\":\"joygyn\"},\"tags\":{\"beyxwrmupzpexzbh\":\"uglquarbruv\",\"vnatbgvlpgf\":\"jajkvwkocxfbdzl\",\"akybepsihz\":\"gen\",\"gl\":\"ieoymp\"}},\"id\":\"sfgb\",\"name\":\"ytsazlycxlubr\",\"type\":\"khqbuoyrbdkgqd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.dataVersions() - .list("qcqyzmrtfdl", "pryyjlikalbcyu", "ahwzagvai", "zcephnhnu", 213380066, "y", "zkhi", ListViewType.ALL, + .list("xp", "qdsq", "iiontqikdipk", "sq", 1308930684, "zabrsoihatajdtac", "synss", ListViewType.ALL, com.azure.core.util.Context.NONE); - Assertions.assertEquals("airpwj", response.iterator().next().properties().description()); - Assertions.assertEquals("iwsywp", response.iterator().next().properties().tags().get("jtvqopugrsergiuz")); - Assertions.assertEquals("huepikwcxoasgukq", response.iterator().next().properties().properties().get("kiynbf")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("rwpekiprjb", response.iterator().next().properties().dataUri()); + Assertions.assertEquals("sjyiehkxgfuzq", response.iterator().next().properties().description()); + Assertions.assertEquals("kwlxqdsxip", response.iterator().next().properties().properties().get("nlbyitfz")); + Assertions.assertEquals("uglquarbruv", response.iterator().next().properties().tags().get("beyxwrmupzpexzbh")); + Assertions.assertFalse(response.iterator().next().properties().isAnonymous()); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); + Assertions.assertEquals("lsu", response.iterator().next().properties().dataUri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java index 6f8faf3bda78..2d114e9c8c6f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; @@ -26,13 +26,13 @@ public void testPublish() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.dataVersions() - .publish("bxlpkdsnbqoy", "sdlraduhgwaxz", "rppoy", "ijribeskkopbksri", - new DestinationAsset().withRegistryName("btmorikczerq") - .withDestinationName("qxgwsfr") - .withDestinationVersion("vzlljydgmdoq"), + .publish("vvvjmfjjfexuv", "veamseau", "uvhxiohglmufzuuy", "zhaeemty", + new DestinationAsset().withDestinationName("dpxtsdywf") + .withDestinationVersion("fvwgwphwxiav") + .withRegistryName("ixaqgfpuhhzwr"), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatasetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatasetReferenceTests.java new file mode 100644 index 000000000000..49f2836e691c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatasetReferenceTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DatasetReference; +import org.junit.jupiter.api.Assertions; + +public final class DatasetReferenceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DatasetReference model + = BinaryData.fromString("{\"name\":\"etgbebjfulb\",\"id\":\"ichdlpn\"}").toObject(DatasetReference.class); + Assertions.assertEquals("etgbebjfulb", model.name()); + Assertions.assertEquals("ichdlpn", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DatasetReference model = new DatasetReference().withName("etgbebjfulb").withId("ichdlpn"); + model = BinaryData.fromObject(model).toObject(DatasetReference.class); + Assertions.assertEquals("etgbebjfulb", model.name()); + Assertions.assertEquals("ichdlpn", model.id()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java index d5b7636b4f1d..328b3ad24856 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.datastores() - .deleteWithResponse("ecmgukywdpuowl", "ex", "rpitqzqnbseujc", com.azure.core.util.Context.NONE); + manager.datastores().deleteWithResponse("eaoxxsehfl", "m", "bpyz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java index a69cbaa8189d..ca7614e57565 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelCurrentStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelCurrentStateTests.java new file mode 100644 index 000000000000..7df164fb5990 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelCurrentStateTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DeltaModelCurrentState; +import org.junit.jupiter.api.Assertions; + +public final class DeltaModelCurrentStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeltaModelCurrentState model + = BinaryData.fromString("{\"count\":58782867,\"sampleInstanceID\":\"rqrkijpeuqlsdx\",\"status\":\"ztv\"}") + .toObject(DeltaModelCurrentState.class); + Assertions.assertEquals(58782867, model.count()); + Assertions.assertEquals("rqrkijpeuqlsdx", model.sampleInstanceID()); + Assertions.assertEquals("ztv", model.status()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelModifyRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelModifyRequestTests.java new file mode 100644 index 000000000000..afa458dc71bd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelModifyRequestTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DeltaModelModifyRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeltaModelModifyRequest model = BinaryData.fromString( + "{\"addDeltaModels\":[\"dm\",\"tzlnglxpn\"],\"removeDeltaModels\":[\"oanfbcswqagyw\"],\"targetBaseModel\":\"xigvjrktpgaeuk\"}") + .toObject(DeltaModelModifyRequest.class); + Assertions.assertEquals("dm", model.addDeltaModels().get(0)); + Assertions.assertEquals("oanfbcswqagyw", model.removeDeltaModels().get(0)); + Assertions.assertEquals("xigvjrktpgaeuk", model.targetBaseModel()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeltaModelModifyRequest model + = new DeltaModelModifyRequest().withAddDeltaModels(Arrays.asList("dm", "tzlnglxpn")) + .withRemoveDeltaModels(Arrays.asList("oanfbcswqagyw")) + .withTargetBaseModel("xigvjrktpgaeuk"); + model = BinaryData.fromObject(model).toObject(DeltaModelModifyRequest.class); + Assertions.assertEquals("dm", model.addDeltaModels().get(0)); + Assertions.assertEquals("oanfbcswqagyw", model.removeDeltaModels().get(0)); + Assertions.assertEquals("xigvjrktpgaeuk", model.targetBaseModel()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusRequestTests.java new file mode 100644 index 000000000000..d985df06773c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusRequestTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class DeltaModelStatusRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeltaModelStatusRequest model = BinaryData + .fromString("{\"deltaModels\":[\"jqmatxjtielnzq\",\"xxgfbbmtlpqagyn\"],\"targetBaseModel\":\"prnzc\"}") + .toObject(DeltaModelStatusRequest.class); + Assertions.assertEquals("jqmatxjtielnzq", model.deltaModels().get(0)); + Assertions.assertEquals("prnzc", model.targetBaseModel()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DeltaModelStatusRequest model + = new DeltaModelStatusRequest().withDeltaModels(Arrays.asList("jqmatxjtielnzq", "xxgfbbmtlpqagyn")) + .withTargetBaseModel("prnzc"); + model = BinaryData.fromObject(model).toObject(DeltaModelStatusRequest.class); + Assertions.assertEquals("jqmatxjtielnzq", model.deltaModels().get(0)); + Assertions.assertEquals("prnzc", model.targetBaseModel()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusResponseInnerTests.java new file mode 100644 index 000000000000..6d3f7caee8a1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeltaModelStatusResponseInnerTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class DeltaModelStatusResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DeltaModelStatusResponseInner model = BinaryData.fromString( + "{\"actualInstanceCount\":26955343,\"deltaModels\":{\"kc\":[{\"count\":1751431132,\"sampleInstanceID\":\"zxaqzibm\",\"status\":\"miymqruqguhfupet\"},{\"count\":176903649,\"sampleInstanceID\":\"oqsbpkflanfkgxsy\",\"status\":\"wuzowpuoh\"}],\"xiuxqggvqrnhy\":[{\"count\":1628896580,\"sampleInstanceID\":\"xrztiochlu\",\"status\":\"xmqrudjizc\"},{\"count\":1837159570,\"sampleInstanceID\":\"crunfhi\",\"status\":\"nmfbc\"},{\"count\":2078932157,\"sampleInstanceID\":\"tk\",\"status\":\"mzuedkyzbfvxovq\"}]},\"expectedInstanceCount\":1624474746,\"revisionId\":\"j\",\"targetBaseModel\":\"ggjh\"}") + .toObject(DeltaModelStatusResponseInner.class); + Assertions.assertEquals(26955343, model.actualInstanceCount()); + Assertions.assertEquals(1751431132, model.deltaModels().get("kc").get(0).count()); + Assertions.assertEquals("zxaqzibm", model.deltaModels().get("kc").get(0).sampleInstanceID()); + Assertions.assertEquals("miymqruqguhfupet", model.deltaModels().get("kc").get(0).status()); + Assertions.assertEquals(1624474746, model.expectedInstanceCount()); + Assertions.assertEquals("j", model.revisionId()); + Assertions.assertEquals("ggjh", model.targetBaseModel()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java index 8359ffb10cb9..68189bd05878 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,7 @@ public final class DeploymentLogsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - DeploymentLogsInner model = BinaryData.fromString("{\"content\":\"jqu\"}").toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jqu", model.content()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsInner model = new DeploymentLogsInner().withContent("jqu"); - model = BinaryData.fromObject(model).toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jqu", model.content()); + DeploymentLogsInner model = BinaryData.fromString("{\"content\":\"dwqu\"}").toObject(DeploymentLogsInner.class); + Assertions.assertEquals("dwqu", model.content()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java index c1d1f13e5173..a61a425c6f3e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,18 @@ public final class DeploymentLogsRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentLogsRequest model - = BinaryData.fromString("{\"containerType\":\"InferenceServer\",\"tail\":1245703985}") + = BinaryData.fromString("{\"containerType\":\"InferenceServer\",\"tail\":1416822258}") .toObject(DeploymentLogsRequest.class); Assertions.assertEquals(ContainerType.INFERENCE_SERVER, model.containerType()); - Assertions.assertEquals(1245703985, model.tail()); + Assertions.assertEquals(1416822258, model.tail()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { DeploymentLogsRequest model - = new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1245703985); + = new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1416822258); model = BinaryData.fromObject(model).toObject(DeploymentLogsRequest.class); Assertions.assertEquals(ContainerType.INFERENCE_SERVER, model.containerType()); - Assertions.assertEquals(1245703985, model.tail()); + Assertions.assertEquals(1416822258, model.tail()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java index 73911b21f725..c9be7391b4d8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,20 +14,20 @@ public final class DeploymentResourceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DeploymentResourceConfiguration model = BinaryData.fromString( - "{\"instanceCount\":1387875327,\"instanceType\":\"qaclnapxbiy\",\"properties\":{\"smfcttuxuuyilfl\":\"datagjkn\",\"jztczytqj\":\"dataoiquvrehmrnjhvs\"}}") + "{\"instanceCount\":828547341,\"instanceType\":\"ogiyetes\",\"properties\":{\"jhqt\":\"\\\"dataidbz\\\"\",\"vnynkb\":\"\\\"datab\\\"\",\"aupia\":\"\\\"dataetnjuhpsprkz\\\"\"}}") .toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1387875327, model.instanceCount()); - Assertions.assertEquals("qaclnapxbiy", model.instanceType()); + Assertions.assertEquals(828547341, model.instanceCount()); + Assertions.assertEquals("ogiyetes", model.instanceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DeploymentResourceConfiguration model = new DeploymentResourceConfiguration().withInstanceCount(1387875327) - .withInstanceType("qaclnapxbiy") - .withProperties(mapOf("smfcttuxuuyilfl", "datagjkn", "jztczytqj", "dataoiquvrehmrnjhvs")); + DeploymentResourceConfiguration model = new DeploymentResourceConfiguration().withInstanceCount(828547341) + .withInstanceType("ogiyetes") + .withProperties(mapOf("jhqt", "\"dataidbz\"", "vnynkb", "\"datab\"", "aupia", "\"dataetnjuhpsprkz\"")); model = BinaryData.fromObject(model).toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1387875327, model.instanceCount()); - Assertions.assertEquals("qaclnapxbiy", model.instanceType()); + Assertions.assertEquals(828547341, model.instanceCount()); + Assertions.assertEquals("ogiyetes", model.instanceType()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java index 82e343493aac..1ec0c427c24f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,21 +12,22 @@ public final class DestinationAssetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DestinationAsset model = BinaryData - .fromString("{\"registryName\":\"yp\",\"destinationName\":\"ubcpzgpxti\",\"destinationVersion\":\"j\"}") + .fromString( + "{\"destinationName\":\"sxtta\",\"destinationVersion\":\"zxnfaaz\",\"registryName\":\"dtnkdmkq\"}") .toObject(DestinationAsset.class); - Assertions.assertEquals("yp", model.registryName()); - Assertions.assertEquals("ubcpzgpxti", model.destinationName()); - Assertions.assertEquals("j", model.destinationVersion()); + Assertions.assertEquals("sxtta", model.destinationName()); + Assertions.assertEquals("zxnfaaz", model.destinationVersion()); + Assertions.assertEquals("dtnkdmkq", model.registryName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DestinationAsset model = new DestinationAsset().withRegistryName("yp") - .withDestinationName("ubcpzgpxti") - .withDestinationVersion("j"); + DestinationAsset model = new DestinationAsset().withDestinationName("sxtta") + .withDestinationVersion("zxnfaaz") + .withRegistryName("dtnkdmkq"); model = BinaryData.fromObject(model).toObject(DestinationAsset.class); - Assertions.assertEquals("yp", model.registryName()); - Assertions.assertEquals("ubcpzgpxti", model.destinationName()); - Assertions.assertEquals("j", model.destinationVersion()); + Assertions.assertEquals("sxtta", model.destinationName()); + Assertions.assertEquals("zxnfaaz", model.destinationVersion()); + Assertions.assertEquals("dtnkdmkq", model.registryName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistillationJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistillationJobTests.java new file mode 100644 index 000000000000..2de1afde15fc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistillationJobTests.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType; +import com.azure.resourcemanager.machinelearning.models.DataGenerationVertical; +import com.azure.resourcemanager.machinelearning.models.DistillationJob; +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FinetuningDetails; +import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobInput; +import com.azure.resourcemanager.machinelearning.models.JobOutput; +import com.azure.resourcemanager.machinelearning.models.JobResources; +import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.JobTier; +import com.azure.resourcemanager.machinelearning.models.Nodes; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.PromptSettings; +import com.azure.resourcemanager.machinelearning.models.QueueSettings; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings; +import com.azure.resourcemanager.machinelearning.models.TeacherModelSettings; +import com.azure.resourcemanager.machinelearning.models.Webhook; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class DistillationJobTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DistillationJob model = BinaryData.fromString( + "{\"jobType\":\"Distillation\",\"dataGenerationDetails\":{\"dataGenerationType\":\"DataGenerationVertical\",\"dataGenerationTaskType\":\"Conversation\",\"promptSettings\":{\"enableChainOfDensity\":false,\"enableChainOfThought\":false,\"maxLenSummary\":995537555},\"teacherModelEndpoint\":{\"endpointName\":\"yggmnwsvh\"},\"teacherModelSettings\":{\"teacherModelEndpointRequestSettings\":{\"minEndpointSuccessRatio\":59.51022629513917,\"requestBatchSize\":922925689},\"teacherModelInferenceParameters\":{\"r\":\"ob\",\"jhhlwtpkvegeat\":\"pnrehkunsb\",\"nwqsttewu\":\"bzkgtz\"}}},\"finetuningDetails\":{\"hyperParameters\":{\"tfnonpi\":\"sjeufjxflpd\",\"qflvtlrvbst\":\"uxlvrhprrvbwonl\"},\"studentModel\":{\"jobInputType\":\"JobInput\",\"description\":\"uy\"}},\"outputs\":{\"ttlnrjdszdb\":{\"jobOutputType\":\"JobOutput\",\"description\":\"i\"},\"vgp\":{\"jobOutputType\":\"JobOutput\",\"description\":\"iciqppo\"},\"wjnoxuo\":{\"jobOutputType\":\"JobOutput\",\"description\":\"wuhw\"},\"fepgcknc\":{\"jobOutputType\":\"JobOutput\",\"description\":\"fnres\"}},\"queueSettings\":{\"jobTier\":\"Spot\"},\"resources\":{\"instanceTypes\":[\"btqdxfmjymjnhj\"]},\"componentId\":\"qllbsupubdxc\",\"computeId\":\"lhzwh\",\"displayName\":\"kvbos\",\"experimentName\":\"fdizhrjq\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"notificationSetting\":{\"emailOn\":[\"JobFailed\",\"JobCancelled\"],\"emails\":[\"cgniuarlc\"],\"webhooks\":{\"cwdgujjgnf\":{\"webhookType\":\"Webhook\",\"eventType\":\"sxfai\"}}},\"parentJobName\":\"zxbarcbpae\",\"services\":{\"zdojqyvzesipiys\":{\"endpoint\":\"ymjwenjcyt\",\"errorMessage\":\"mfucrtfod\",\"jobServiceType\":\"uauzmz\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":524698783,\"properties\":{\"mahswtvdkxbqssgf\":\"zhhezvhjudxdyyru\",\"dxbvwf\":\"nf\",\"dmuvardlmz\":\"jchivdrijanx\",\"lxiwyo\":\"otprrmuhcuhtu\"},\"status\":\"arpfctwrap\"}},\"status\":\"CancelRequested\",\"description\":\"owa\",\"properties\":{\"dtsewkaupwhlzyc\":\"ndazabu\"},\"tags\":{\"svdorsirx\":\"mgjl\",\"prfvmkinwteyrqsh\":\"hyrkqakofajfr\"}}") + .toObject(DistillationJob.class); + Assertions.assertEquals("owa", model.description()); + Assertions.assertEquals("ndazabu", model.properties().get("dtsewkaupwhlzyc")); + Assertions.assertEquals("mgjl", model.tags().get("svdorsirx")); + Assertions.assertEquals("qllbsupubdxc", model.componentId()); + Assertions.assertEquals("lhzwh", model.computeId()); + Assertions.assertEquals("kvbos", model.displayName()); + Assertions.assertEquals("fdizhrjq", model.experimentName()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("cgniuarlc", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("sxfai", model.notificationSetting().webhooks().get("cwdgujjgnf").eventType()); + Assertions.assertEquals("zxbarcbpae", model.parentJobName()); + Assertions.assertEquals("ymjwenjcyt", model.services().get("zdojqyvzesipiys").endpoint()); + Assertions.assertEquals("uauzmz", model.services().get("zdojqyvzesipiys").jobServiceType()); + Assertions.assertEquals(524698783, model.services().get("zdojqyvzesipiys").port()); + Assertions.assertEquals("zhhezvhjudxdyyru", + model.services().get("zdojqyvzesipiys").properties().get("mahswtvdkxbqssgf")); + Assertions.assertEquals(DataGenerationTaskType.CONVERSATION, + model.dataGenerationDetails().dataGenerationTaskType()); + Assertions.assertFalse(model.dataGenerationDetails().promptSettings().enableChainOfDensity()); + Assertions.assertFalse(model.dataGenerationDetails().promptSettings().enableChainOfThought()); + Assertions.assertEquals(995537555, model.dataGenerationDetails().promptSettings().maxLenSummary()); + Assertions.assertEquals("yggmnwsvh", model.dataGenerationDetails().teacherModelEndpoint().endpointName()); + Assertions.assertEquals(59.51022629513917D, + model.dataGenerationDetails() + .teacherModelSettings() + .teacherModelEndpointRequestSettings() + .minEndpointSuccessRatio()); + Assertions.assertEquals(922925689, + model.dataGenerationDetails() + .teacherModelSettings() + .teacherModelEndpointRequestSettings() + .requestBatchSize()); + Assertions.assertEquals("ob", + model.dataGenerationDetails().teacherModelSettings().teacherModelInferenceParameters().get("r")); + Assertions.assertEquals("sjeufjxflpd", model.finetuningDetails().hyperParameters().get("tfnonpi")); + Assertions.assertEquals("uy", model.finetuningDetails().studentModel().description()); + Assertions.assertEquals("i", model.outputs().get("ttlnrjdszdb").description()); + Assertions.assertEquals(JobTier.SPOT, model.queueSettings().jobTier()); + Assertions.assertEquals("btqdxfmjymjnhj", model.resources().instanceTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DistillationJob model = new DistillationJob().withDescription("owa") + .withProperties(mapOf("dtsewkaupwhlzyc", "ndazabu")) + .withTags(mapOf("svdorsirx", "mgjl", "prfvmkinwteyrqsh", "hyrkqakofajfr")) + .withComponentId("qllbsupubdxc") + .withComputeId("lhzwh") + .withDisplayName("kvbos") + .withExperimentName("fdizhrjq") + .withIdentity(new IdentityConfiguration()) + .withIsArchived(false) + .withNotificationSetting(new NotificationSetting() + .withEmailOn( + Arrays.asList(EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_CANCELLED)) + .withEmails(Arrays.asList("cgniuarlc")) + .withWebhooks(mapOf("cwdgujjgnf", new Webhook().withEventType("sxfai")))) + .withParentJobName("zxbarcbpae") + .withServices(mapOf("zdojqyvzesipiys", + new JobService().withEndpoint("ymjwenjcyt") + .withJobServiceType("uauzmz") + .withNodes(new Nodes()) + .withPort(524698783) + .withProperties(mapOf("mahswtvdkxbqssgf", "zhhezvhjudxdyyru", "dxbvwf", "nf", "dmuvardlmz", + "jchivdrijanx", "lxiwyo", "otprrmuhcuhtu")))) + .withDataGenerationDetails( + new DataGenerationVertical().withDataGenerationTaskType(DataGenerationTaskType.CONVERSATION) + .withPromptSettings(new PromptSettings().withEnableChainOfDensity(false) + .withEnableChainOfThought(false) + .withMaxLenSummary(995537555)) + .withTeacherModelEndpoint(new TeacherModelEndpoint().withEndpointName("yggmnwsvh")) + .withTeacherModelSettings(new TeacherModelSettings() + .withTeacherModelEndpointRequestSettings( + new TeacherModelEndpointRequestSettings().withMinEndpointSuccessRatio(59.51022629513917D) + .withRequestBatchSize(922925689)) + .withTeacherModelInferenceParameters( + mapOf("r", "ob", "jhhlwtpkvegeat", "pnrehkunsb", "nwqsttewu", "bzkgtz")))) + .withFinetuningDetails(new FinetuningDetails() + .withHyperParameters(mapOf("tfnonpi", "sjeufjxflpd", "qflvtlrvbst", "uxlvrhprrvbwonl")) + .withStudentModel(new JobInput().withDescription("uy"))) + .withOutputs(mapOf("ttlnrjdszdb", new JobOutput().withDescription("i"), "vgp", + new JobOutput().withDescription("iciqppo"), "wjnoxuo", new JobOutput().withDescription("wuhw"), + "fepgcknc", new JobOutput().withDescription("fnres"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.SPOT)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("btqdxfmjymjnhj"))); + model = BinaryData.fromObject(model).toObject(DistillationJob.class); + Assertions.assertEquals("owa", model.description()); + Assertions.assertEquals("ndazabu", model.properties().get("dtsewkaupwhlzyc")); + Assertions.assertEquals("mgjl", model.tags().get("svdorsirx")); + Assertions.assertEquals("qllbsupubdxc", model.componentId()); + Assertions.assertEquals("lhzwh", model.computeId()); + Assertions.assertEquals("kvbos", model.displayName()); + Assertions.assertEquals("fdizhrjq", model.experimentName()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("cgniuarlc", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("sxfai", model.notificationSetting().webhooks().get("cwdgujjgnf").eventType()); + Assertions.assertEquals("zxbarcbpae", model.parentJobName()); + Assertions.assertEquals("ymjwenjcyt", model.services().get("zdojqyvzesipiys").endpoint()); + Assertions.assertEquals("uauzmz", model.services().get("zdojqyvzesipiys").jobServiceType()); + Assertions.assertEquals(524698783, model.services().get("zdojqyvzesipiys").port()); + Assertions.assertEquals("zhhezvhjudxdyyru", + model.services().get("zdojqyvzesipiys").properties().get("mahswtvdkxbqssgf")); + Assertions.assertEquals(DataGenerationTaskType.CONVERSATION, + model.dataGenerationDetails().dataGenerationTaskType()); + Assertions.assertFalse(model.dataGenerationDetails().promptSettings().enableChainOfDensity()); + Assertions.assertFalse(model.dataGenerationDetails().promptSettings().enableChainOfThought()); + Assertions.assertEquals(995537555, model.dataGenerationDetails().promptSettings().maxLenSummary()); + Assertions.assertEquals("yggmnwsvh", model.dataGenerationDetails().teacherModelEndpoint().endpointName()); + Assertions.assertEquals(59.51022629513917D, + model.dataGenerationDetails() + .teacherModelSettings() + .teacherModelEndpointRequestSettings() + .minEndpointSuccessRatio()); + Assertions.assertEquals(922925689, + model.dataGenerationDetails() + .teacherModelSettings() + .teacherModelEndpointRequestSettings() + .requestBatchSize()); + Assertions.assertEquals("ob", + model.dataGenerationDetails().teacherModelSettings().teacherModelInferenceParameters().get("r")); + Assertions.assertEquals("sjeufjxflpd", model.finetuningDetails().hyperParameters().get("tfnonpi")); + Assertions.assertEquals("uy", model.finetuningDetails().studentModel().description()); + Assertions.assertEquals("i", model.outputs().get("ttlnrjdszdb").description()); + Assertions.assertEquals(JobTier.SPOT, model.queueSettings().jobTier()); + Assertions.assertEquals("btqdxfmjymjnhj", model.resources().instanceTypes().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java index c442a9b66836..b347e1e8dc27 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.java index 6019b7dcfc0f..bc7a1df16597 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,17 +13,19 @@ public final class DockerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Docker model = BinaryData.fromString( - "{\"privileged\":true,\"\":{\"vzadbwenn\":\"datadrwjcljbrhlh\",\"vztiucwviqllukh\":\"datanafhxrzfr\",\"po\":\"datarcqxgcbvzarmqc\",\"vjyhdrxbrdvc\":\"datastsinvag\"}}") + Docker model = BinaryData + .fromString( + "{\"privileged\":false,\"rekyjulskwwn\":\"\\\"datargeganihkjcn\\\"\",\"pwxtvc\":\"\\\"datahqlq\\\"\"}") .toObject(Docker.class); - Assertions.assertEquals(true, model.privileged()); + Assertions.assertFalse(model.privileged()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Docker model = new Docker().withPrivileged(true).withAdditionalProperties(mapOf()); + Docker model = new Docker().withPrivileged(false) + .withAdditionalProperties(mapOf("pwxtvc", "\"datahqlq\"", "rekyjulskwwn", "\"datargeganihkjcn\"")); model = BinaryData.fromObject(model).toObject(Docker.class); - Assertions.assertEquals(true, model.privileged()); + Assertions.assertFalse(model.privileged()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java index 577e22528c92..4b9488d6effd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,18 @@ public final class EarlyTerminationPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EarlyTerminationPolicy model = BinaryData.fromString( - "{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1134110366,\"delayEvaluation\":1352080232}") + "{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1285081578,\"evaluationInterval\":1619750716}") .toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1134110366, model.evaluationInterval()); - Assertions.assertEquals(1352080232, model.delayEvaluation()); + Assertions.assertEquals(1285081578, model.delayEvaluation()); + Assertions.assertEquals(1619750716, model.evaluationInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EarlyTerminationPolicy model - = new EarlyTerminationPolicy().withEvaluationInterval(1134110366).withDelayEvaluation(1352080232); + = new EarlyTerminationPolicy().withDelayEvaluation(1285081578).withEvaluationInterval(1619750716); model = BinaryData.fromObject(model).toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1134110366, model.evaluationInterval()); - Assertions.assertEquals(1352080232, model.delayEvaluation()); + Assertions.assertEquals(1285081578, model.delayEvaluation()); + Assertions.assertEquals(1619750716, model.evaluationInterval()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentModelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentModelTests.java new file mode 100644 index 000000000000..2801bf39e6ff --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentModelTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import org.junit.jupiter.api.Assertions; + +public final class EndpointDeploymentModelTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointDeploymentModel model = BinaryData.fromString( + "{\"format\":\"deh\",\"name\":\"wyahuxinpmqnja\",\"source\":\"ixjsprozvcputeg\",\"version\":\"wmfdatscmdvpjhul\"}") + .toObject(EndpointDeploymentModel.class); + Assertions.assertEquals("deh", model.format()); + Assertions.assertEquals("wyahuxinpmqnja", model.name()); + Assertions.assertEquals("ixjsprozvcputeg", model.source()); + Assertions.assertEquals("wmfdatscmdvpjhul", model.version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EndpointDeploymentModel model = new EndpointDeploymentModel().withFormat("deh") + .withName("wyahuxinpmqnja") + .withSource("ixjsprozvcputeg") + .withVersion("wmfdatscmdvpjhul"); + model = BinaryData.fromObject(model).toObject(EndpointDeploymentModel.class); + Assertions.assertEquals("deh", model.format()); + Assertions.assertEquals("wyahuxinpmqnja", model.name()); + Assertions.assertEquals("ixjsprozvcputeg", model.source()); + Assertions.assertEquals("wmfdatscmdvpjhul", model.version()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResultTests.java new file mode 100644 index 000000000000..f24f1b53e156 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult; +import org.junit.jupiter.api.Assertions; + +public final class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"xbnjbiksq\",\"provisioningState\":\"Creating\"},\"id\":\"sainqpjwnzl\",\"name\":\"jfm\",\"type\":\"pee\"}],\"nextLink\":\"mgxsab\"}") + .toObject(EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.class); + Assertions.assertEquals("xbnjbiksq", model.value().get(0).properties().failureReason()); + Assertions.assertEquals("mgxsab", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceInnerTests.java new file mode 100644 index 000000000000..8a9f0df63884 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesBasicResourceInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class EndpointDeploymentResourcePropertiesBasicResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointDeploymentResourcePropertiesBasicResourceInner model = BinaryData.fromString( + "{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"ijbpzvgnwzsymgl\",\"provisioningState\":\"Succeeded\"},\"id\":\"yzkohdbihanuf\",\"name\":\"fcbjysagithxqha\",\"type\":\"ifpikxwczby\"}") + .toObject(EndpointDeploymentResourcePropertiesBasicResourceInner.class); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.properties().failureReason()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EndpointDeploymentResourcePropertiesBasicResourceInner model + = new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("ijbpzvgnwzsymgl")); + model = BinaryData.fromObject(model).toObject(EndpointDeploymentResourcePropertiesBasicResourceInner.class); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesTests.java new file mode 100644 index 000000000000..81c7971118a7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentResourcePropertiesTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class EndpointDeploymentResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointDeploymentResourceProperties model = BinaryData.fromString( + "{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"npqxuh\",\"provisioningState\":\"Canceled\"}") + .toObject(EndpointDeploymentResourceProperties.class); + Assertions.assertEquals("npqxuh", model.failureReason()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EndpointDeploymentResourceProperties model + = new EndpointDeploymentResourceProperties().withFailureReason("npqxuh"); + model = BinaryData.fromObject(model).toObject(EndpointDeploymentResourceProperties.class); + Assertions.assertEquals("npqxuh", model.failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..40ca75d580c1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsCreateOrUpdateMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +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 EndpointDeploymentsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"hztpxjvtwkyjdpay\",\"provisioningState\":\"Succeeded\"},\"id\":\"iwuzrgqztjfkgbtq\",\"name\":\"jobsynn\",\"type\":\"nionj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EndpointDeploymentResourcePropertiesBasicResource response = manager.endpointDeployments() + .define("scmne") + .withExistingEndpoint("wbohxdhkoexb", "h", "nakaj") + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("lumqeumzyyhmgq")) + .create(); + + Assertions.assertEquals("hztpxjvtwkyjdpay", response.properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetInWorkspaceMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetInWorkspaceMockTests.java new file mode 100644 index 000000000000..c9d27f9d4745 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetInWorkspaceMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +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 EndpointDeploymentsGetInWorkspaceMockTests { + @Test + public void testGetInWorkspace() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"eszthjtryjs\",\"provisioningState\":\"Deleting\"},\"id\":\"l\",\"name\":\"zzuqixpsyb\",\"type\":\"owgvm\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.endpointDeployments() + .getInWorkspace("xl", "lnocscygimizlu", EndpointType.MANAGED_ONLINE_ENDPOINT, "bwmgksrlmspp", + com.azure.core.util.Context.NONE); + + Assertions.assertEquals("eszthjtryjs", response.iterator().next().properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetWithResponseMockTests.java new file mode 100644 index 000000000000..bf44352cbd3b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +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 EndpointDeploymentsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"aatvogpyceinha\",\"provisioningState\":\"Canceled\"},\"id\":\"xsbyplskhwfjud\",\"name\":\"pbqp\",\"type\":\"ez\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EndpointDeploymentResourcePropertiesBasicResource response = manager.endpointDeployments() + .getWithResponse("dhypngocbdxvriv", "tbc", "suzg", "zukekytkzvt", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("aatvogpyceinha", response.properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsListMockTests.java new file mode 100644 index 000000000000..155578c34134 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentsListMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +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 EndpointDeploymentsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"nvabdju\",\"provisioningState\":\"Updating\"},\"id\":\"otudamkiyaosthul\",\"name\":\"u\",\"type\":\"ifgs\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.endpointDeployments() + .list("ggdpftfcbrtsrdpl", "dyzaciasfzrgu", "liyvsbf", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("nvabdju", response.iterator().next().properties().failureReason()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelDeprecationPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelDeprecationPropertiesTests.java new file mode 100644 index 000000000000..68ebe2487baf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelDeprecationPropertiesTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class EndpointModelDeprecationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointModelDeprecationProperties model + = BinaryData.fromString("{\"fineTune\":\"2021-10-02T05:20:28Z\",\"inference\":\"2021-02-25T12:39:17Z\"}") + .toObject(EndpointModelDeprecationProperties.class); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T05:20:28Z"), model.fineTune()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T12:39:17Z"), model.inference()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelPropertiesInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelPropertiesInnerTests.java new file mode 100644 index 000000000000..472fe311485b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelPropertiesInnerTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class EndpointModelPropertiesInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointModelPropertiesInner model = BinaryData.fromString( + "{\"capabilities\":{\"krdp\":\"clz\",\"tpoenefnoafpcnrx\":\"yytbpkrpkhq\",\"ufcmuajwblxp\":\"yrxowv\"},\"deprecation\":{\"fineTune\":\"2021-06-17T15:44:22Z\",\"inference\":\"2020-12-24T06:55:03Z\"},\"finetuneCapabilities\":{\"tib\":\"wtnnsvrfajyni\",\"ctblfehb\":\"fgzqzhl\",\"rcmeqljxdumhycx\":\"cgyo\",\"d\":\"nebldxag\"},\"format\":\"wcn\",\"isDefaultVersion\":false,\"lifecycleStatus\":\"Preview\",\"maxCapacity\":423824164,\"name\":\"uvohufzdtsrp\",\"skus\":[{\"capacity\":{\"default\":1281488754,\"maximum\":381760812},\"connectionIds\":[\"nsbylgmgbh\",\"qczouanbfulvcxgl\",\"oqwb\"],\"deprecationDate\":\"2021-02-24T01:13:37Z\",\"name\":\"qbzbwbgwzh\",\"rateLimits\":[{\"count\":98.53002813045974,\"renewalPeriod\":11.899729490540867,\"rules\":[{},{},{},{}]}],\"usageName\":\"vnlhrwyakz\"},{\"capacity\":{\"default\":707987603,\"maximum\":162803375},\"connectionIds\":[\"vdeatjiobnirg\",\"extqd\",\"wtgntimznupb\"],\"deprecationDate\":\"2021-02-02T09:23:35Z\",\"name\":\"etkod\",\"rateLimits\":[{\"count\":72.94962092733219,\"renewalPeriod\":44.37851693433005,\"rules\":[{}]}],\"usageName\":\"rzmmmjyvdhdg\"},{\"capacity\":{\"default\":232449352,\"maximum\":1594962511},\"connectionIds\":[\"mfetqjisjmo\",\"zcaqfkakhgk\",\"vt\",\"ycvytv\"],\"deprecationDate\":\"2021-10-10T09:22:58Z\",\"name\":\"awfus\",\"rateLimits\":[{\"count\":87.53194408991634,\"renewalPeriod\":88.08633112106621,\"rules\":[{}]}],\"usageName\":\"bb\"}],\"version\":\"jbozv\"}") + .toObject(EndpointModelPropertiesInner.class); + Assertions.assertEquals("clz", model.capabilities().get("krdp")); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-17T15:44:22Z"), model.deprecation().fineTune()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-24T06:55:03Z"), model.deprecation().inference()); + Assertions.assertEquals("wtnnsvrfajyni", model.finetuneCapabilities().get("tib")); + Assertions.assertEquals("wcn", model.format()); + Assertions.assertFalse(model.isDefaultVersion()); + Assertions.assertEquals(ModelLifecycleStatus.PREVIEW, model.lifecycleStatus()); + Assertions.assertEquals(423824164, model.maxCapacity()); + Assertions.assertEquals("uvohufzdtsrp", model.name()); + Assertions.assertEquals(1281488754, model.skus().get(0).capacity().defaultProperty()); + Assertions.assertEquals(381760812, model.skus().get(0).capacity().maximum()); + Assertions.assertEquals("nsbylgmgbh", model.skus().get(0).connectionIds().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-24T01:13:37Z"), model.skus().get(0).deprecationDate()); + Assertions.assertEquals("qbzbwbgwzh", model.skus().get(0).name()); + Assertions.assertEquals(98.53002813045974D, model.skus().get(0).rateLimits().get(0).count()); + Assertions.assertEquals(11.899729490540867D, model.skus().get(0).rateLimits().get(0).renewalPeriod()); + Assertions.assertEquals("vnlhrwyakz", model.skus().get(0).usageName()); + Assertions.assertEquals("jbozv", model.version()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuCapacityPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuCapacityPropertiesTests.java new file mode 100644 index 000000000000..7daf848c4e10 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuCapacityPropertiesTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.EndpointModelSkuCapacityProperties; +import org.junit.jupiter.api.Assertions; + +public final class EndpointModelSkuCapacityPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointModelSkuCapacityProperties model + = BinaryData.fromString("{\"default\":823723509,\"maximum\":1393781191}") + .toObject(EndpointModelSkuCapacityProperties.class); + Assertions.assertEquals(823723509, model.defaultProperty()); + Assertions.assertEquals(1393781191, model.maximum()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuRateLimitRulePatternPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuRateLimitRulePatternPropertiesTests.java new file mode 100644 index 000000000000..ce24b2da598d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelSkuRateLimitRulePatternPropertiesTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitRulePatternProperties; +import org.junit.jupiter.api.Assertions; + +public final class EndpointModelSkuRateLimitRulePatternPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointModelSkuRateLimitRulePatternProperties model + = BinaryData.fromString("{\"method\":\"klphxwwwlojkbgnf\",\"path\":\"zj\"}") + .toObject(EndpointModelSkuRateLimitRulePatternProperties.class); + Assertions.assertEquals("klphxwwwlojkbgnf", model.method()); + Assertions.assertEquals("zj", model.path()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelsInnerTests.java new file mode 100644 index 000000000000..851883d28083 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointModelsInnerTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; + +public final class EndpointModelsInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointModelsInner model = BinaryData.fromString( + "{\"value\":[{\"capabilities\":{\"tirjvqxvwkiocxo\":\"elsxfkzr\",\"lrlqxbctatezyozd\":\"rjwbuocqflm\",\"it\":\"cqqnlsjxcsc\"},\"deprecation\":{\"fineTune\":\"2021-07-26T20:21:08Z\",\"inference\":\"2021-07-11T23:43:24Z\"},\"finetuneCapabilities\":{\"mahpuwku\":\"idodnvltc\"},\"format\":\"bnhi\",\"isDefaultVersion\":true,\"lifecycleStatus\":\"Preview\",\"maxCapacity\":1009521879,\"name\":\"qdfwbifnnhl\",\"skus\":[{\"capacity\":{\"default\":1874922620,\"maximum\":858340416},\"connectionIds\":[\"qmmyn\"],\"deprecationDate\":\"2021-06-06T18:00:21Z\",\"name\":\"lpfijte\",\"rateLimits\":[{},{},{}],\"usageName\":\"peszamadlerz\"},{\"capacity\":{\"default\":362146782,\"maximum\":1336320040},\"connectionIds\":[\"kt\"],\"deprecationDate\":\"2021-10-23T13:39:53Z\",\"name\":\"wtdapsmirmnrijef\",\"rateLimits\":[{},{},{},{}],\"usageName\":\"xcevdspth\"},{\"capacity\":{\"default\":1309635194,\"maximum\":514812708},\"connectionIds\":[\"gmkokqoikx\",\"efwlnm\",\"kffcnuestbsl\"],\"deprecationDate\":\"2021-07-10T22:00:30Z\",\"name\":\"nccoteli\",\"rateLimits\":[{},{},{},{}],\"usageName\":\"tehhxtzxqdwbym\"}],\"version\":\"n\"},{\"capabilities\":{\"ysecp\":\"rdorc\",\"yhqtzcvimmwcko\":\"khxd\",\"trtsvx\":\"vlfy\",\"k\":\"pqtz\"},\"deprecation\":{\"fineTune\":\"2021-08-30T09:17:14Z\",\"inference\":\"2020-12-22T02:16:10Z\"},\"finetuneCapabilities\":{\"tvbgdobi\":\"frjschjxncqzah\",\"rxueqbmxq\":\"orzolxosgih\",\"wshesgcsqos\":\"gvznjq\",\"p\":\"cxlngoufpi\"},\"format\":\"fxzspfyvslazippl\",\"isDefaultVersion\":true,\"lifecycleStatus\":\"GenerallyAvailable\",\"maxCapacity\":1049740092,\"name\":\"ycildrzn\",\"skus\":[{\"capacity\":{\"default\":760391710,\"maximum\":462656443},\"connectionIds\":[\"xfugfzizyxd\",\"yjnqzbrqcakmfckv\"],\"deprecationDate\":\"2021-06-13T09:17:40Z\",\"name\":\"camnsbqoitwhm\",\"rateLimits\":[{},{},{},{}],\"usageName\":\"uhcxy\"},{\"capacity\":{\"default\":1268906250,\"maximum\":1046019412},\"connectionIds\":[\"yqdvpq\",\"bxgycudu\",\"dmtxqlefnoheyw\",\"fopkyll\"],\"deprecationDate\":\"2021-06-15T09:04:48Z\",\"name\":\"nj\",\"rateLimits\":[{},{},{}],\"usageName\":\"sfwtwrsvev\"},{\"capacity\":{\"default\":1996764364,\"maximum\":1891272433},\"connectionIds\":[\"qhgkhtbzvulqev\"],\"deprecationDate\":\"2021-07-01T16:21:27Z\",\"name\":\"pmyhtxg\",\"rateLimits\":[{},{}],\"usageName\":\"h\"},{\"capacity\":{\"default\":1238883948,\"maximum\":1352761617},\"connectionIds\":[\"fefbcyjrt\",\"lqeebudfyim\",\"oaezktomsgoihlq\",\"bywa\"],\"deprecationDate\":\"2021-05-30T01:49:39Z\",\"name\":\"e\",\"rateLimits\":[{}],\"usageName\":\"ztvn\"}],\"version\":\"bbt\"}],\"nextLink\":\"noljdkxhmewy\"}") + .toObject(EndpointModelsInner.class); + Assertions.assertEquals("elsxfkzr", model.value().get(0).capabilities().get("tirjvqxvwkiocxo")); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T20:21:08Z"), + model.value().get(0).deprecation().fineTune()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-11T23:43:24Z"), + model.value().get(0).deprecation().inference()); + Assertions.assertEquals("idodnvltc", model.value().get(0).finetuneCapabilities().get("mahpuwku")); + Assertions.assertEquals("bnhi", model.value().get(0).format()); + Assertions.assertTrue(model.value().get(0).isDefaultVersion()); + Assertions.assertEquals(ModelLifecycleStatus.PREVIEW, model.value().get(0).lifecycleStatus()); + Assertions.assertEquals(1009521879, model.value().get(0).maxCapacity()); + Assertions.assertEquals("qdfwbifnnhl", model.value().get(0).name()); + Assertions.assertEquals(1874922620, model.value().get(0).skus().get(0).capacity().defaultProperty()); + Assertions.assertEquals(858340416, model.value().get(0).skus().get(0).capacity().maximum()); + Assertions.assertEquals("qmmyn", model.value().get(0).skus().get(0).connectionIds().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-06T18:00:21Z"), + model.value().get(0).skus().get(0).deprecationDate()); + Assertions.assertEquals("lpfijte", model.value().get(0).skus().get(0).name()); + Assertions.assertEquals("peszamadlerz", model.value().get(0).skus().get(0).usageName()); + Assertions.assertEquals("n", model.value().get(0).version()); + Assertions.assertEquals("noljdkxhmewy", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceArmPaginatedResultTests.java new file mode 100644 index 000000000000..1a2b54517c2e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceArmPaginatedResultTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.EndpointResourcePropertiesBasicResourceArmPaginatedResult; +import org.junit.jupiter.api.Assertions; + +public final class EndpointResourcePropertiesBasicResourceArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointResourcePropertiesBasicResourceArmPaginatedResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"endpointType\":\"EndpointResourceProperties\",\"associatedResourceId\":\"b\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\"},\"id\":\"lotumbmwgftshfgm\",\"name\":\"xuq\",\"type\":\"agskoikuqi\"}],\"endpointUri\":\"skxpaowkgvnlfue\",\"failureReason\":\"fzib\",\"location\":\"rjugcfeb\",\"name\":\"ucenbv\",\"provisioningState\":\"Canceled\",\"shouldCreateAiServicesEndpoint\":false},\"id\":\"knbdzwilsxry\",\"name\":\"qjzlwrduxntp\",\"type\":\"x\"}],\"nextLink\":\"jahy\"}") + .toObject(EndpointResourcePropertiesBasicResourceArmPaginatedResult.class); + Assertions.assertEquals("b", model.value().get(0).properties().associatedResourceId()); + Assertions.assertEquals("skxpaowkgvnlfue", model.value().get(0).properties().endpointUri()); + Assertions.assertEquals("fzib", model.value().get(0).properties().failureReason()); + Assertions.assertEquals("rjugcfeb", model.value().get(0).properties().location()); + Assertions.assertEquals("ucenbv", model.value().get(0).properties().name()); + Assertions.assertFalse(model.value().get(0).properties().shouldCreateAiServicesEndpoint()); + Assertions.assertEquals("jahy", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceInnerTests.java new file mode 100644 index 000000000000..30dccd3b96ec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesBasicResourceInnerTests.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class EndpointResourcePropertiesBasicResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointResourcePropertiesBasicResourceInner model = BinaryData.fromString( + "{\"properties\":{\"endpointType\":\"EndpointResourceProperties\",\"associatedResourceId\":\"xnavpyxqb\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"bfkihai\",\"provisioningState\":\"Canceled\"},\"id\":\"fkzlxvcozcgo\",\"name\":\"ozlibcbnunzuysaj\",\"type\":\"vqlhony\"}],\"endpointUri\":\"elivgtibtkqjqjca\",\"failureReason\":\"of\",\"location\":\"khhk\",\"name\":\"rvkxeojtdyulg\",\"provisioningState\":\"Updating\",\"shouldCreateAiServicesEndpoint\":false},\"id\":\"uklfqfxspxgogy\",\"name\":\"bztgaex\",\"type\":\"nskvctvuz\"}") + .toObject(EndpointResourcePropertiesBasicResourceInner.class); + Assertions.assertEquals("xnavpyxqb", model.properties().associatedResourceId()); + Assertions.assertEquals("bfkihai", model.properties().deployments().get(0).properties().failureReason()); + Assertions.assertEquals("elivgtibtkqjqjca", model.properties().endpointUri()); + Assertions.assertEquals("of", model.properties().failureReason()); + Assertions.assertEquals("khhk", model.properties().location()); + Assertions.assertEquals("rvkxeojtdyulg", model.properties().name()); + Assertions.assertFalse(model.properties().shouldCreateAiServicesEndpoint()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EndpointResourcePropertiesBasicResourceInner model = new EndpointResourcePropertiesBasicResourceInner() + .withProperties(new EndpointResourceProperties().withAssociatedResourceId("xnavpyxqb") + .withDeployments(Arrays.asList(new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("bfkihai")))) + .withEndpointUri("elivgtibtkqjqjca") + .withFailureReason("of") + .withLocation("khhk") + .withName("rvkxeojtdyulg") + .withShouldCreateAiServicesEndpoint(false)); + model = BinaryData.fromObject(model).toObject(EndpointResourcePropertiesBasicResourceInner.class); + Assertions.assertEquals("xnavpyxqb", model.properties().associatedResourceId()); + Assertions.assertEquals("bfkihai", model.properties().deployments().get(0).properties().failureReason()); + Assertions.assertEquals("elivgtibtkqjqjca", model.properties().endpointUri()); + Assertions.assertEquals("of", model.properties().failureReason()); + Assertions.assertEquals("khhk", model.properties().location()); + Assertions.assertEquals("rvkxeojtdyulg", model.properties().name()); + Assertions.assertFalse(model.properties().shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..d5be2d9516ea --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointResourcePropertiesTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class EndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + EndpointResourceProperties model = BinaryData.fromString( + "{\"endpointType\":\"EndpointResourceProperties\",\"associatedResourceId\":\"bwttmhlv\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"xrnwukfajnp\",\"provisioningState\":\"Succeeded\"},\"id\":\"ggkwdepemz\",\"name\":\"ayfiq\",\"type\":\"idxcorjv\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"yhgtrttcuayiq\",\"provisioningState\":\"Failed\"},\"id\":\"mmxzifbqgq\",\"name\":\"xowqzrt\",\"type\":\"qrq\"}],\"endpointUri\":\"vfygkuobpwain\",\"failureReason\":\"obothx\",\"location\":\"whpnyjtu\",\"name\":\"zyvextchslro\",\"provisioningState\":\"Failed\",\"shouldCreateAiServicesEndpoint\":false}") + .toObject(EndpointResourceProperties.class); + Assertions.assertEquals("bwttmhlv", model.associatedResourceId()); + Assertions.assertEquals("xrnwukfajnp", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("vfygkuobpwain", model.endpointUri()); + Assertions.assertEquals("obothx", model.failureReason()); + Assertions.assertEquals("whpnyjtu", model.location()); + Assertions.assertEquals("zyvextchslro", model.name()); + Assertions.assertFalse(model.shouldCreateAiServicesEndpoint()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + EndpointResourceProperties model = new EndpointResourceProperties().withAssociatedResourceId("bwttmhlv") + .withDeployments(Arrays.asList( + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("xrnwukfajnp")), + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("yhgtrttcuayiq")))) + .withEndpointUri("vfygkuobpwain") + .withFailureReason("obothx") + .withLocation("whpnyjtu") + .withName("zyvextchslro") + .withShouldCreateAiServicesEndpoint(false); + model = BinaryData.fromObject(model).toObject(EndpointResourceProperties.class); + Assertions.assertEquals("bwttmhlv", model.associatedResourceId()); + Assertions.assertEquals("xrnwukfajnp", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("vfygkuobpwain", model.endpointUri()); + Assertions.assertEquals("obothx", model.failureReason()); + Assertions.assertEquals("whpnyjtu", model.location()); + Assertions.assertEquals("zyvextchslro", model.name()); + Assertions.assertFalse(model.shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java index 1f528f275e97..460f2b62a009 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class EndpointScheduleActionTests { public void testDeserialize() throws Exception { EndpointScheduleAction model = BinaryData .fromString( - "{\"actionType\":\"InvokeBatchEndpoint\",\"endpointInvocationDefinition\":\"datarvvbqvknmpecqxg\"}") + "{\"actionType\":\"InvokeBatchEndpoint\",\"endpointInvocationDefinition\":\"\\\"datacwkqmtxape\\\"\"}") .toObject(EndpointScheduleAction.class); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EndpointScheduleAction model - = new EndpointScheduleAction().withEndpointInvocationDefinition("datarvvbqvknmpecqxg"); + = new EndpointScheduleAction().withEndpointInvocationDefinition("\"datacwkqmtxape\""); model = BinaryData.fromObject(model).toObject(EndpointScheduleAction.class); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java index a321709e936d..68525cdcc967 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,27 +13,27 @@ public final class EndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Endpoint model = BinaryData.fromString( - "{\"protocol\":\"udp\",\"name\":\"hitxnm\",\"target\":2115255313,\"published\":1374259249,\"hostIp\":\"zbuwvorbalkjnbk\"}") + "{\"protocol\":\"tcp\",\"name\":\"vbvx\",\"target\":1722979379,\"published\":1309768813,\"hostIp\":\"lr\"}") .toObject(Endpoint.class); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals("hitxnm", model.name()); - Assertions.assertEquals(2115255313, model.target()); - Assertions.assertEquals(1374259249, model.published()); - Assertions.assertEquals("zbuwvorbalkjnbk", model.hostIp()); + Assertions.assertEquals(Protocol.TCP, model.protocol()); + Assertions.assertEquals("vbvx", model.name()); + Assertions.assertEquals(1722979379, model.target()); + Assertions.assertEquals(1309768813, model.published()); + Assertions.assertEquals("lr", model.hostIp()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Endpoint model = new Endpoint().withProtocol(Protocol.UDP) - .withName("hitxnm") - .withTarget(2115255313) - .withPublished(1374259249) - .withHostIp("zbuwvorbalkjnbk"); + Endpoint model = new Endpoint().withProtocol(Protocol.TCP) + .withName("vbvx") + .withTarget(1722979379) + .withPublished(1309768813) + .withHostIp("lr"); model = BinaryData.fromObject(model).toObject(Endpoint.class); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals("hitxnm", model.name()); - Assertions.assertEquals(2115255313, model.target()); - Assertions.assertEquals(1374259249, model.published()); - Assertions.assertEquals("zbuwvorbalkjnbk", model.hostIp()); + Assertions.assertEquals(Protocol.TCP, model.protocol()); + Assertions.assertEquals("vbvx", model.name()); + Assertions.assertEquals(1722979379, model.target()); + Assertions.assertEquals(1309768813, model.published()); + Assertions.assertEquals("lr", model.hostIp()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..cfccd8727343 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsCreateOrUpdateMockTests.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResource; +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 EndpointsCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"endpointType\":\"EndpointResourceProperties\",\"associatedResourceId\":\"lkmgcxmkr\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"idy\",\"provisioningState\":\"NotStarted\"},\"id\":\"gvyuusexenywwkd\",\"name\":\"qqg\",\"type\":\"sxpaapmthdqv\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"fwknlytvx\",\"provisioningState\":\"Deleting\"},\"id\":\"adtnmqr\",\"name\":\"jecjixc\",\"type\":\"aiki\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"r\",\"provisioningState\":\"Failed\"},\"id\":\"kvluuessu\",\"name\":\"zfrwmctrngjqc\",\"type\":\"sfbkrtpu\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"yeyqsiniejjb\",\"provisioningState\":\"Failed\"},\"id\":\"xkwrvtlb\",\"name\":\"ukbdtmr\",\"type\":\"jtuz\"}],\"endpointUri\":\"vbpvizuu\",\"failureReason\":\"ilgmo\",\"location\":\"dntj\",\"name\":\"jxgqsb\",\"provisioningState\":\"Succeeded\",\"shouldCreateAiServicesEndpoint\":true},\"id\":\"uvbzcqgtzx\",\"name\":\"lrmrtdznvjgovy\",\"type\":\"pppswleptta\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EndpointResourcePropertiesBasicResource response = manager.endpoints() + .define("qwiawbwzyvbui") + .withExistingWorkspace("zldplamcc", "ljrnveqleoz") + .withProperties(new EndpointResourceProperties().withAssociatedResourceId("ysatoplqc") + .withDeployments(Arrays.asList( + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("lzwuqkprf")), + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("wrjbr")), + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("yipjzgmxqaupy")))) + .withEndpointUri("ucmhonojese") + .withFailureReason("xel") + .withLocation("xwmpziy") + .withName("sjswedkfof") + .withShouldCreateAiServicesEndpoint(false)) + .create(); + + Assertions.assertEquals("lkmgcxmkr", response.properties().associatedResourceId()); + Assertions.assertEquals("idy", response.properties().deployments().get(0).properties().failureReason()); + Assertions.assertEquals("vbpvizuu", response.properties().endpointUri()); + Assertions.assertEquals("ilgmo", response.properties().failureReason()); + Assertions.assertEquals("dntj", response.properties().location()); + Assertions.assertEquals("jxgqsb", response.properties().name()); + Assertions.assertTrue(response.properties().shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetModelsMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetModelsMockTests.java new file mode 100644 index 000000000000..079f4953d3aa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetModelsMockTests.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +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 EndpointsGetModelsMockTests { + @Test + public void testGetModels() throws Exception { + String responseStr + = "{\"value\":[{\"capabilities\":{\"ikzvnghtknr\":\"btuvwzjycgcieag\"},\"deprecation\":{\"fineTune\":\"2021-01-06T00:28:01Z\",\"inference\":\"2021-05-17T04:44:06Z\"},\"finetuneCapabilities\":{\"lcnrapxwttpxoe\":\"uvf\",\"iytfwk\":\"fobehrcfglojjc\",\"nkms\":\"irmbrdognqa\",\"dzvuhw\":\"ybh\"},\"format\":\"nazjvyiiezdnez\",\"isDefaultVersion\":false,\"lifecycleStatus\":\"Preview\",\"maxCapacity\":480646611,\"name\":\"yut\",\"skus\":[{\"capacity\":{\"default\":194185344,\"maximum\":759076292},\"connectionIds\":[\"kuz\"],\"deprecationDate\":\"2021-10-25T16:46:19Z\",\"name\":\"gyztzh\",\"rateLimits\":[{\"count\":82.36688352627408,\"renewalPeriod\":6.249883571379133,\"rules\":[{},{},{}]},{\"count\":18.116101658379858,\"renewalPeriod\":69.75340233515215,\"rules\":[{},{}]}],\"usageName\":\"h\"},{\"capacity\":{\"default\":509558719,\"maximum\":1339856418},\"connectionIds\":[\"kjwsszyetwoukdh\",\"f\",\"rdg\",\"jihnzvoeh\"],\"deprecationDate\":\"2021-03-24T01:52:12Z\",\"name\":\"gcnkghgczjx\",\"rateLimits\":[{\"count\":90.34412895403683,\"renewalPeriod\":37.90579203297132,\"rules\":[{},{}]},{\"count\":72.20282602712696,\"renewalPeriod\":38.07891238938539,\"rules\":[{},{}]},{\"count\":11.80929761415993,\"renewalPeriod\":56.50761869279165,\"rules\":[{},{},{},{}]},{\"count\":44.43796387165791,\"renewalPeriod\":6.610439322587725,\"rules\":[{},{}]}],\"usageName\":\"ecfyusfkcwfpoa\"},{\"capacity\":{\"default\":1455014405,\"maximum\":796469987},\"connectionIds\":[\"q\",\"vvfkqbgkssygdv\"],\"deprecationDate\":\"2021-01-17T23:24:43Z\",\"name\":\"dfulvhpwpsxygrn\",\"rateLimits\":[{\"count\":31.77336258194472,\"renewalPeriod\":91.27477098632542,\"rules\":[{},{},{}]},{\"count\":20.590713315769747,\"renewalPeriod\":17.689668690443973,\"rules\":[{}]},{\"count\":91.28756269920166,\"renewalPeriod\":94.75479701312629,\"rules\":[{},{}]},{\"count\":16.66556302195914,\"renewalPeriod\":20.849765678437127,\"rules\":[{},{},{},{}]}],\"usageName\":\"yymyy\"}],\"version\":\"dkjykvez\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.endpoints().getModels("jvlzqsyvr", "oleqikcorkem", "bobx", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("btuvwzjycgcieag", response.iterator().next().capabilities().get("ikzvnghtknr")); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-06T00:28:01Z"), + response.iterator().next().deprecation().fineTune()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T04:44:06Z"), + response.iterator().next().deprecation().inference()); + Assertions.assertEquals("uvf", response.iterator().next().finetuneCapabilities().get("lcnrapxwttpxoe")); + Assertions.assertEquals("nazjvyiiezdnez", response.iterator().next().format()); + Assertions.assertFalse(response.iterator().next().isDefaultVersion()); + Assertions.assertEquals(ModelLifecycleStatus.PREVIEW, response.iterator().next().lifecycleStatus()); + Assertions.assertEquals(480646611, response.iterator().next().maxCapacity()); + Assertions.assertEquals("yut", response.iterator().next().name()); + Assertions.assertEquals(194185344, response.iterator().next().skus().get(0).capacity().defaultProperty()); + Assertions.assertEquals(759076292, response.iterator().next().skus().get(0).capacity().maximum()); + Assertions.assertEquals("kuz", response.iterator().next().skus().get(0).connectionIds().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-25T16:46:19Z"), + response.iterator().next().skus().get(0).deprecationDate()); + Assertions.assertEquals("gyztzh", response.iterator().next().skus().get(0).name()); + Assertions.assertEquals(82.36688352627408D, + response.iterator().next().skus().get(0).rateLimits().get(0).count()); + Assertions.assertEquals(6.249883571379133D, + response.iterator().next().skus().get(0).rateLimits().get(0).renewalPeriod()); + Assertions.assertEquals("h", response.iterator().next().skus().get(0).usageName()); + Assertions.assertEquals("dkjykvez", response.iterator().next().version()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetWithResponseMockTests.java new file mode 100644 index 000000000000..31922cd596c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsGetWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResource; +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 EndpointsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"endpointType\":\"EndpointResourceProperties\",\"associatedResourceId\":\"gaxloafws\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"rokwm\",\"provisioningState\":\"Creating\"},\"id\":\"ddqlxjrhctbrveg\",\"name\":\"amoyvqfjpkezq\",\"type\":\"izbyczmepcacgvln\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"jb\",\"provisioningState\":\"Updating\"},\"id\":\"ktuvdes\",\"name\":\"arul\",\"type\":\"hbqtvyhsxhcrff\"}],\"endpointUri\":\"exupcuizvx\",\"failureReason\":\"vzhlkeotdscqkxzr\",\"location\":\"oqzmvemli\",\"name\":\"dfqfnftrrhhgwaw\",\"provisioningState\":\"Failed\",\"shouldCreateAiServicesEndpoint\":false},\"id\":\"cfx\",\"name\":\"vkdnfg\",\"type\":\"txultxhqqvdhd\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + EndpointResourcePropertiesBasicResource response = manager.endpoints() + .getWithResponse("pjmqteirrjj", "vrzfppopwxxdgzhn", "xbuwauytq", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("gaxloafws", response.properties().associatedResourceId()); + Assertions.assertEquals("rokwm", response.properties().deployments().get(0).properties().failureReason()); + Assertions.assertEquals("exupcuizvx", response.properties().endpointUri()); + Assertions.assertEquals("vzhlkeotdscqkxzr", response.properties().failureReason()); + Assertions.assertEquals("oqzmvemli", response.properties().location()); + Assertions.assertEquals("dfqfnftrrhhgwaw", response.properties().name()); + Assertions.assertFalse(response.properties().shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsListMockTests.java new file mode 100644 index 000000000000..917637e74a81 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointsListMockTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.EndpointResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointType; +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 EndpointsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"endpointType\":\"EndpointResourceProperties\",\"associatedResourceId\":\"y\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"apoj\",\"provisioningState\":\"Canceled\"},\"id\":\"antlpsp\",\"name\":\"ipfgdnqp\",\"type\":\"vvrhoqyvqd\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"ruoduexhskh\",\"provisioningState\":\"Accepted\"},\"id\":\"ocrddqxhegcolh\",\"name\":\"zcklqrunqw\",\"type\":\"rkkabyxxyfn\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"ywg\",\"provisioningState\":\"Scaling\"},\"id\":\"sfsvayge\",\"name\":\"y\",\"type\":\"okkiptnwpwskck\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"ymf\",\"provisioningState\":\"Failed\"},\"id\":\"vq\",\"name\":\"oqrebwarljpl\",\"type\":\"pemxcdreqaqvsp\"}],\"endpointUri\":\"v\",\"failureReason\":\"rwtkrbscwbi\",\"location\":\"wmcrhyoestpl\",\"name\":\"t\",\"provisioningState\":\"Disabled\",\"shouldCreateAiServicesEndpoint\":true},\"id\":\"fe\",\"name\":\"hxgstiawywppqxu\",\"type\":\"xbdyczplmljcis\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.endpoints() + .list("yad", "xnepub", EndpointType.MANAGED_ONLINE_ENDPOINT, true, false, true, "auytmqvs", + "yqyjkmfotwmxedlc", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("y", response.iterator().next().properties().associatedResourceId()); + Assertions.assertEquals("apoj", + response.iterator().next().properties().deployments().get(0).properties().failureReason()); + Assertions.assertEquals("v", response.iterator().next().properties().endpointUri()); + Assertions.assertEquals("rwtkrbscwbi", response.iterator().next().properties().failureReason()); + Assertions.assertEquals("wmcrhyoestpl", response.iterator().next().properties().location()); + Assertions.assertEquals("t", response.iterator().next().properties().name()); + Assertions.assertTrue(response.iterator().next().properties().shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java index 934b9efddeee..7f94d2e7dde3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,27 +15,26 @@ public final class EnvironmentContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnvironmentContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":false,\"latestVersion\":\"ieypef\",\"nextVersion\":\"yqdhcuplcplcw\",\"description\":\"ihih\",\"tags\":{\"gmvecactxmw\":\"dsqtzbsrgnowcjh\",\"ovekqvgqouwi\":\"teyowclu\",\"ikf\":\"zmpjwyiv\",\"uagrttikteusqc\":\"cvhrfsp\"},\"properties\":{\"qcuubgqibrta\":\"yklxubyjaffmmfbl\",\"lqxihhrmooiz\":\"metttwgd\"}},\"id\":\"eypxiutcxapzhyr\",\"name\":\"etoge\",\"type\":\"joxslhvnhla\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"txsu\",\"nextVersion\":\"rtujwsawddjibab\",\"description\":\"ititvtzeexavoxt\",\"properties\":{\"q\":\"ecdmdqbwpy\",\"slhhxudbxv\":\"gsfjac\",\"tnsi\":\"d\"},\"tags\":{\"ckdlpag\":\"hzmme\",\"xdfgsftufqobr\":\"rcxfailcfxwmdb\",\"knh\":\"lnacgcc\"}},\"id\":\"izvy\",\"name\":\"nrzvuljraaer\",\"type\":\"nok\"}") .toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("ihih", model.properties().description()); - Assertions.assertEquals("dsqtzbsrgnowcjh", model.properties().tags().get("gmvecactxmw")); - Assertions.assertEquals("yklxubyjaffmmfbl", model.properties().properties().get("qcuubgqibrta")); - Assertions.assertEquals(false, model.properties().isArchived()); + Assertions.assertEquals("ititvtzeexavoxt", model.properties().description()); + Assertions.assertEquals("ecdmdqbwpy", model.properties().properties().get("q")); + Assertions.assertEquals("hzmme", model.properties().tags().get("ckdlpag")); + Assertions.assertFalse(model.properties().isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EnvironmentContainerInner model = new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("ihih") - .withTags(mapOf("gmvecactxmw", "dsqtzbsrgnowcjh", "ovekqvgqouwi", "teyowclu", "ikf", "zmpjwyiv", - "uagrttikteusqc", "cvhrfsp")) - .withProperties(mapOf("qcuubgqibrta", "yklxubyjaffmmfbl", "lqxihhrmooiz", "metttwgd")) + .withProperties(new EnvironmentContainerProperties().withDescription("ititvtzeexavoxt") + .withProperties(mapOf("q", "ecdmdqbwpy", "slhhxudbxv", "gsfjac", "tnsi", "d")) + .withTags(mapOf("ckdlpag", "hzmme", "xdfgsftufqobr", "rcxfailcfxwmdb", "knh", "lnacgcc")) .withIsArchived(false)); model = BinaryData.fromObject(model).toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("ihih", model.properties().description()); - Assertions.assertEquals("dsqtzbsrgnowcjh", model.properties().tags().get("gmvecactxmw")); - Assertions.assertEquals("yklxubyjaffmmfbl", model.properties().properties().get("qcuubgqibrta")); - Assertions.assertEquals(false, model.properties().isArchived()); + Assertions.assertEquals("ititvtzeexavoxt", model.properties().description()); + Assertions.assertEquals("ecdmdqbwpy", model.properties().properties().get("q")); + Assertions.assertEquals("hzmme", model.properties().tags().get("ckdlpag")); + Assertions.assertFalse(model.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java index a9fb13e515dd..02a044cb2ba4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,26 +14,25 @@ public final class EnvironmentContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnvironmentContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"zjcjbtr\",\"nextVersion\":\"ehvvib\",\"description\":\"jj\",\"tags\":{\"lftidgfcwqmpim\":\"qbeitpkxztmoob\",\"yhohujswtwkozzwc\":\"qxzhem\",\"wpfaj\":\"lkb\"},\"properties\":{\"vkcdmxzr\":\"ltlwtjjguktalhs\",\"aaomylweazu\":\"oaimlnw\",\"hwwn\":\"cse\",\"ousnfepgfewe\":\"jhlfzswpchwahf\"}}") + "{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"qnvb\",\"nextVersion\":\"ylaxxulcdi\",\"description\":\"osfjbjsv\",\"properties\":{\"gc\":\"whryvycytdcl\",\"dhttzaefedxihchr\":\"knfnwmbtmvpdv\",\"crjdqnsdfzpbgtg\":\"hk\"},\"tags\":{\"z\":\"kdghrjeuutlwx\",\"qlgehg\":\"zhokvbwnhh\"}}") .toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("jj", model.description()); - Assertions.assertEquals("qbeitpkxztmoob", model.tags().get("lftidgfcwqmpim")); - Assertions.assertEquals("ltlwtjjguktalhs", model.properties().get("vkcdmxzr")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("osfjbjsv", model.description()); + Assertions.assertEquals("whryvycytdcl", model.properties().get("gc")); + Assertions.assertEquals("kdghrjeuutlwx", model.tags().get("z")); + Assertions.assertFalse(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EnvironmentContainerProperties model = new EnvironmentContainerProperties().withDescription("jj") - .withTags(mapOf("lftidgfcwqmpim", "qbeitpkxztmoob", "yhohujswtwkozzwc", "qxzhem", "wpfaj", "lkb")) - .withProperties(mapOf("vkcdmxzr", "ltlwtjjguktalhs", "aaomylweazu", "oaimlnw", "hwwn", "cse", - "ousnfepgfewe", "jhlfzswpchwahf")) - .withIsArchived(true); + EnvironmentContainerProperties model = new EnvironmentContainerProperties().withDescription("osfjbjsv") + .withProperties(mapOf("gc", "whryvycytdcl", "dhttzaefedxihchr", "knfnwmbtmvpdv", "crjdqnsdfzpbgtg", "hk")) + .withTags(mapOf("z", "kdghrjeuutlwx", "qlgehg", "zhokvbwnhh")) + .withIsArchived(false); model = BinaryData.fromObject(model).toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("jj", model.description()); - Assertions.assertEquals("qbeitpkxztmoob", model.tags().get("lftidgfcwqmpim")); - Assertions.assertEquals("ltlwtjjguktalhs", model.properties().get("vkcdmxzr")); - Assertions.assertEquals(true, model.isArchived()); + Assertions.assertEquals("osfjbjsv", model.description()); + Assertions.assertEquals("whryvycytdcl", model.properties().get("gc")); + Assertions.assertEquals("kdghrjeuutlwx", model.tags().get("z")); + Assertions.assertFalse(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java index 07f37acf4096..d4201f1f81ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java @@ -1,68 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentContainerResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class EnvironmentContainerResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnvironmentContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"qvkjlmxho\",\"nextVersion\":\"ynhdwdigum\",\"description\":\"raauzzpt\",\"tags\":{\"wva\":\"ysdzhez\",\"hqyikvy\":\"qyuvvfonkp\"},\"properties\":{\"jfybvpoekrsgsgb\":\"yavluwmncstt\"}},\"id\":\"uzqgnjdgkynsc\",\"name\":\"i\",\"type\":\"hzvhxnkomtkubo\"},{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"xz\",\"nextVersion\":\"ihfrbbcevqa\",\"description\":\"ltd\",\"tags\":{\"py\":\"kqo\",\"ymbrnysuxmpraf\":\"vgtrdcnifmzzs\"},\"properties\":{\"roud\":\"khocxvdfffwaf\"}},\"id\":\"pavehhr\",\"name\":\"kbunzoz\",\"type\":\"dhcxgkmoy\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"bhmfdnbz\",\"nextVersion\":\"vfvfcj\",\"description\":\"eoisrvhmgor\",\"tags\":{\"faxvxil\":\"kiscvwmzhwpl\",\"nzeyqxtjj\":\"btgn\",\"vodggxdbee\":\"zqlqhyc\"},\"properties\":{\"iaa\":\"eknlra\",\"agt\":\"iuagydwqfbylyrfg\"}},\"id\":\"jocqwogfnzjvusf\",\"name\":\"ld\",\"type\":\"ozuxylfsbtkadpys\"}],\"nextLink\":\"nbtgkbugrjqctoj\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"pfeoajvgcxtxjcsh\",\"nextVersion\":\"fidltug\",\"description\":\"esmkssjhoiftxfkf\",\"properties\":{\"biqtgdq\":\"prhptillu\"},\"tags\":{\"etpwbralll\":\"cwsldri\",\"p\":\"bphbqzmizakakank\",\"zhajoylhjlmuo\":\"n\",\"eecjmeis\":\"xprimrsop\"}},\"id\":\"tvasy\",\"name\":\"wxdzaumweoohgu\",\"type\":\"fuzboyjathwtzolb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"xmeb\",\"nextVersion\":\"scjpahlxv\",\"description\":\"bfqxnmwmqtibxyi\",\"properties\":{\"mrsieekp\":\"tvqcttadijaeu\"},\"tags\":{\"dqmeqwigpibudq\":\"aapm\",\"ybpmzznrtffyaq\":\"yxeb\",\"hvseufuqyrx\":\"tmhheioqa\",\"dgamquhiosrsj\":\"dlcgqlsismjqfr\"}},\"id\":\"vfcdisyirn\",\"name\":\"zhczexrxzbujrtrh\",\"type\":\"vwrevkhgnlnzon\"}],\"nextLink\":\"rpiqywncv\"}") .toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("raauzzpt", model.value().get(0).properties().description()); - Assertions.assertEquals("ysdzhez", model.value().get(0).properties().tags().get("wva")); - Assertions.assertEquals("yavluwmncstt", model.value().get(0).properties().properties().get("jfybvpoekrsgsgb")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("nbtgkbugrjqctoj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model - = new EnvironmentContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("raauzzpt") - .withTags(mapOf("wva", "ysdzhez", "hqyikvy", "qyuvvfonkp")) - .withProperties(mapOf("jfybvpoekrsgsgb", "yavluwmncstt")) - .withIsArchived(true)), - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("ltd") - .withTags(mapOf("py", "kqo", "ymbrnysuxmpraf", "vgtrdcnifmzzs")) - .withProperties(mapOf("roud", "khocxvdfffwaf")) - .withIsArchived(true)), - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("eoisrvhmgor") - .withTags(mapOf("faxvxil", "kiscvwmzhwpl", "nzeyqxtjj", "btgn", "vodggxdbee", "zqlqhyc")) - .withProperties(mapOf("iaa", "eknlra", "agt", "iuagydwqfbylyrfg")) - .withIsArchived(true)))) - .withNextLink("nbtgkbugrjqctoj"); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("raauzzpt", model.value().get(0).properties().description()); - Assertions.assertEquals("ysdzhez", model.value().get(0).properties().tags().get("wva")); - Assertions.assertEquals("yavluwmncstt", model.value().get(0).properties().properties().get("jfybvpoekrsgsgb")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("nbtgkbugrjqctoj", 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; + Assertions.assertEquals("esmkssjhoiftxfkf", model.value().get(0).properties().description()); + Assertions.assertEquals("prhptillu", model.value().get(0).properties().properties().get("biqtgdq")); + Assertions.assertEquals("cwsldri", model.value().get(0).properties().tags().get("etpwbralll")); + Assertions.assertTrue(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("rpiqywncv", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java index 90da11514061..e9f483b5aa63 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; @@ -24,28 +24,29 @@ public final class EnvironmentContainersCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"ydemccqdssbmge\",\"nextVersion\":\"dudh\",\"description\":\"smnfgzmxtxfuhxy\",\"tags\":{\"e\":\"y\",\"sffrpjfxsyx\":\"cknglffnozzf\",\"ufrspreyilqcskxk\":\"dosyhhw\"},\"properties\":{\"dimnacklyrbv\":\"ykqrqtxqogr\"}},\"id\":\"dgexpnphtqwfpjp\",\"name\":\"b\",\"type\":\"x\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":false,\"latestVersion\":\"tenqsomuo\",\"nextVersion\":\"qe\",\"description\":\"aseqcppypfre\",\"properties\":{\"oiq\":\"zhndyv\"},\"tags\":{\"lwyoxzuhellitpqv\":\"ttqgt\",\"bzvtvxx\":\"ivrsgqbmolxeom\",\"cuedybkbgdwbmi\":\"sfoyacgihnal\"}},\"id\":\"ikatywedbpirb\",\"name\":\"pauzbbhxncs\",\"type\":\"dw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EnvironmentContainer response = manager.environmentContainers() - .define("emqcbnkiv") - .withExistingWorkspace("nqlwogq", "bjuaiu") - .withProperties(new EnvironmentContainerProperties().withDescription("dmxokbutb") - .withTags(mapOf("ayvcsejdh", "x", "oppybseckgaxmhas", "odyiitreddjt", "st", "jiet")) - .withProperties(mapOf("wrjtkrei", "dvzcnlk", "swmgrbkobmg", "ojh", "widteb", "avzmqpaa", "r", "ed")) + .define("ihkybgkyncyzj") + .withExistingWorkspace("yuyutkbxr", "rztkyqguau") + .withProperties(new EnvironmentContainerProperties().withDescription("roxpp") + .withProperties( + mapOf("dmzu", "myhxnpdggllyduyu", "nst", "xvzvwlxd", "xklr", "eurd", "dpkihqhnfubev", "atsiznymwz")) + .withTags(mapOf("iaklqakp", "xcezxevltfebqo", "hmriipzgfofuad", "tifmftwr", "qkgt", "jqne")) .withIsArchived(true)) .create(); - Assertions.assertEquals("smnfgzmxtxfuhxy", response.properties().description()); - Assertions.assertEquals("y", response.properties().tags().get("e")); - Assertions.assertEquals("ykqrqtxqogr", response.properties().properties().get("dimnacklyrbv")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("aseqcppypfre", response.properties().description()); + Assertions.assertEquals("zhndyv", response.properties().properties().get("oiq")); + Assertions.assertEquals("ttqgt", response.properties().tags().get("lwyoxzuhellitpqv")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java index bc3e7538876e..45ac51c7e9f2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.environmentContainers() - .deleteWithResponse("bwlbqn", "dderrxyiwuzpsvcm", "sfstyyy", com.azure.core.util.Context.NONE); + .deleteWithResponse("slqreofzrkrzt", "yaymhx", "nmwaxsymnrtvqmim", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java index 4f6fe4157fb6..4dd7c6f773be 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; @@ -21,22 +21,22 @@ public final class EnvironmentContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"kzqbvhvdulymkg\",\"nextVersion\":\"ryhxf\",\"description\":\"a\",\"tags\":{\"ghps\":\"ftkgmbmvxbiub\",\"rbusnaq\":\"tbame\",\"erlurgipvnbxle\":\"vruuhyncppmmwh\",\"gpxd\":\"smc\"},\"properties\":{\"iihrfcowlase\":\"qmguvdk\",\"vf\":\"ifywxjjylaqhx\"}},\"id\":\"rvjhwgkynxlwrj\",\"name\":\"otdtmcktkal\",\"type\":\"piybfnkylzri\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"ivjkhcoscol\",\"nextVersion\":\"hc\",\"description\":\"zooefzsdttbq\",\"properties\":{\"f\":\"dvwojvx\",\"kgygawyhpwmdkyfg\":\"hrqxrqghotingzi\"},\"tags\":{\"uqyrpubbk\":\"vyhvv\",\"mmixfzaupgblna\":\"cidcfwoolkugzow\",\"qjzri\":\"jnpahzhpqscuyil\",\"s\":\"ebmuiongmndwohoe\"}},\"id\":\"xfvbjimzwyns\",\"name\":\"mphvkyezwseyuoyj\",\"type\":\"jwq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EnvironmentContainer response = manager.environmentContainers() - .getWithResponse("qnwnlc", "zfjd", "kfthsydphdb", com.azure.core.util.Context.NONE) + .getWithResponse("ygcaxjymdqrf", "gicxt", "llqgnsydksvj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("a", response.properties().description()); - Assertions.assertEquals("ftkgmbmvxbiub", response.properties().tags().get("ghps")); - Assertions.assertEquals("qmguvdk", response.properties().properties().get("iihrfcowlase")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("zooefzsdttbq", response.properties().description()); + Assertions.assertEquals("dvwojvx", response.properties().properties().get("f")); + Assertions.assertEquals("vyhvv", response.properties().tags().get("uqyrpubbk")); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java index 70fd11b82ea7..580680ea89ac 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; @@ -23,21 +23,21 @@ public final class EnvironmentContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"ucqehyrnzmj\",\"nextVersion\":\"fbmpszwk\",\"description\":\"stzu\",\"tags\":{\"smaxdwxr\":\"a\",\"akxy\":\"qtbvwsd\",\"u\":\"lkgjhomywlypghhu\",\"b\":\"yfvgpqwgiqmbrisk\"},\"properties\":{\"vyqmmczuguvlieeg\":\"tq\",\"jscgqcr\":\"nqwhfjoxse\",\"uhffjjqvjyqmpmsk\":\"aucftotedhjxdl\",\"udpypboqlefxf\":\"axrhljwqu\"}},\"id\":\"majvwfi\",\"name\":\"f\",\"type\":\"jjrvsvhmsmrihdd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":false,\"latestVersion\":\"asfmhbx\",\"nextVersion\":\"wkqnatxvuzcc\",\"description\":\"irybytcaqpjohlc\",\"properties\":{\"qfrpanteqiw\":\"vxyyhhsisz\",\"xysjd\":\"uukaamimkjz\"},\"tags\":{\"vuyxuu\":\"ksijrjgyindexij\",\"datopdtphvjgv\":\"zea\",\"ngqyiyjxzxbtht\":\"zy\"}},\"id\":\"zpuonr\",\"name\":\"dlkoabfcvef\",\"type\":\"wxpmgyqshsasm\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.environmentContainers() - .list("nvpdvctqdapy", "sfp", "pj", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); + .list("vyotpcvpahhpk", "yqpvzxxz", "dwtominru", ListViewType.ALL, com.azure.core.util.Context.NONE); - Assertions.assertEquals("stzu", response.iterator().next().properties().description()); - Assertions.assertEquals("a", response.iterator().next().properties().tags().get("smaxdwxr")); - Assertions.assertEquals("tq", response.iterator().next().properties().properties().get("vyqmmczuguvlieeg")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("irybytcaqpjohlc", response.iterator().next().properties().description()); + Assertions.assertEquals("vxyyhhsisz", response.iterator().next().properties().properties().get("qfrpanteqiw")); + Assertions.assertEquals("ksijrjgyindexij", response.iterator().next().properties().tags().get("vuyxuu")); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java index 5973cdb59f71..d546c6519360 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,20 +15,21 @@ public final class EnvironmentVariableTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnvironmentVariable model = BinaryData.fromString( - "{\"type\":\"local\",\"value\":\"vbgikyj\",\"\":{\"kaoizjixw\":\"datakvlbishjvpzaptuo\",\"c\":\"datagcdiyk\",\"tmdmuqohhihr\":\"datawnujvqynvav\"}}") + "{\"type\":\"local\",\"value\":\"cm\",\"atvyrkljqkqws\":\"\\\"datadrp\\\"\",\"bypnkteiidlbov\":\"\\\"datajtvjkowggxawwd\\\"\"}") .toObject(EnvironmentVariable.class); Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.type()); - Assertions.assertEquals("vbgikyj", model.value()); + Assertions.assertEquals("cm", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EnvironmentVariable model = new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("vbgikyj") - .withAdditionalProperties(mapOf()); + .withValue("cm") + .withAdditionalProperties( + mapOf("bypnkteiidlbov", "\"datajtvjkowggxawwd\"", "atvyrkljqkqws", "\"datadrp\"")); model = BinaryData.fromObject(model).toObject(EnvironmentVariable.class); Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.type()); - Assertions.assertEquals("vbgikyj", model.value()); + Assertions.assertEquals("cm", model.value()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java index bd369e06db74..ec74b85a3d5d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,9 +9,17 @@ import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; import com.azure.resourcemanager.machinelearning.models.BuildContext; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.ImageDetails; +import com.azure.resourcemanager.machinelearning.models.ImageInfo; import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; +import com.azure.resourcemanager.machinelearning.models.PackageDetails; import com.azure.resourcemanager.machinelearning.models.Route; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -20,66 +28,173 @@ public final class EnvironmentVersionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnvironmentVersionInner model = BinaryData.fromString( - "{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"fhqlyvi\",\"condaFile\":\"uwivkxoy\",\"build\":{\"contextUri\":\"nbixxrti\",\"dockerfilePath\":\"cpwpg\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"vtsoxf\",\"port\":967528675},\"readinessRoute\":{\"path\":\"nxpmyyefrpmpdnq\",\"port\":663766748},\"scoringRoute\":{\"path\":\"awaoqvmmbnpqfrt\",\"port\":1516123032}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Canceled\",\"stage\":\"nitgvkxlz\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"gcealzxwh\",\"tags\":{\"lwigdivbkbx\":\"symoyq\",\"wasqvdaeyyg\":\"omfaj\",\"zkgimsid\":\"xakjsqzhzb\",\"ddyvvjskgfmo\":\"asi\"},\"properties\":{\"hnakzyb\":\"hpqgatjeaahhvj\"}},\"id\":\"jid\",\"name\":\"ksyxkyxvxevblbje\",\"type\":\"nljlageuaulx\"}") + "{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"cof\",\"dockerfilePath\":\"e\"},\"condaFile\":\"dhgbjkvre\",\"environmentType\":\"UserCreated\",\"image\":\"murvzm\",\"imageDetails\":{\"exists\":true,\"image\":{\"digest\":\"ashcxlpmjerbdk\",\"hostname\":\"vidizozsdb\",\"repository\":\"xjmonf\",\"tag\":\"nwncypuuw\"},\"vulnerabilityFindings\":{\"assetId\":\"v\",\"criticalFindingsCount\":26042024,\"data\":[{\"cve\":\"e\",\"cveUrl\":\"eifzzhmk\",\"dueDate\":\"2021-03-02T07:50:18Z\",\"id\":\"flyh\",\"packageDetails\":[{}],\"patchable\":true,\"providerId\":\"hxgsrboldfor\",\"publishDate\":\"2020-12-20T04:35:15Z\",\"risk\":\"LOW\",\"solution\":\"izbfhfovvacq\",\"title\":\"tuodxeszabbelaw\",\"vendorId\":\"ua\",\"vendorUrl\":\"zkwrrwoyc\"},{\"cve\":\"cwyhahno\",\"cveUrl\":\"rkywuhpsvfuu\",\"dueDate\":\"2021-01-22T12:10:56Z\",\"id\":\"we\",\"packageDetails\":[{},{},{},{}],\"patchable\":true,\"providerId\":\"niexzsrzpgepq\",\"publishDate\":\"2021-09-27T17:32:34Z\",\"risk\":\"HIGH\",\"solution\":\"pgdakchzyvli\",\"title\":\"nrkcxkj\",\"vendorId\":\"nxm\",\"vendorUrl\":\"uxswqrntvl\"}],\"generatedTime\":\"2021-01-20T04:09:54Z\",\"highFindingsCount\":1177215499,\"lastScanDate\":\"2021-08-15T15:59:55Z\",\"scanner\":\"xoqqpwcyyufmhrun\",\"source\":\"wmqs\",\"totalFindingsCount\":747129444}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"zhlctddunqndyfpc\",\"port\":2042763855},\"readinessRoute\":{\"path\":\"bnjj\",\"port\":479383954},\"scoringRoute\":{\"path\":\"egy\",\"port\":459036091},\"startupRoute\":{\"path\":\"boxjumvq\",\"port\":1707929789}},\"osType\":\"Windows\",\"provisioningState\":\"Creating\",\"stage\":\"aiouaubrjt\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"oj\",\"properties\":{\"mzdlyjdfqwmkyo\":\"iflrzpasccbiu\",\"lzo\":\"ufdvruz\",\"fnmdxotn\":\"hpc\",\"grkyuizabsnmfpph\":\"fdgugeyzi\"},\"tags\":{\"yhsgz\":\"evy\"}},\"id\":\"zbgomfgbeg\",\"name\":\"qgleohibetnluank\",\"type\":\"rfxeeebtij\"}") .toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("gcealzxwh", model.properties().description()); - Assertions.assertEquals("symoyq", model.properties().tags().get("lwigdivbkbx")); - Assertions.assertEquals("hpqgatjeaahhvj", model.properties().properties().get("hnakzyb")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("fhqlyvi", model.properties().image()); - Assertions.assertEquals("uwivkxoy", model.properties().condaFile()); - Assertions.assertEquals("nbixxrti", model.properties().build().contextUri()); - Assertions.assertEquals("cpwpg", model.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - Assertions.assertEquals("vtsoxf", model.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(967528675, model.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(663766748, model.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("awaoqvmmbnpqfrt", model.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1516123032, model.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("oj", model.properties().description()); + Assertions.assertEquals("iflrzpasccbiu", model.properties().properties().get("mzdlyjdfqwmkyo")); + Assertions.assertEquals("evy", model.properties().tags().get("yhsgz")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertTrue(model.properties().isArchived()); Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("nitgvkxlz", model.properties().stage()); + Assertions.assertEquals("cof", model.properties().build().contextUri()); + Assertions.assertEquals("e", model.properties().build().dockerfilePath()); + Assertions.assertEquals("dhgbjkvre", model.properties().condaFile()); + Assertions.assertEquals("murvzm", model.properties().image()); + Assertions.assertTrue(model.properties().imageDetails().exists()); + Assertions.assertEquals("ashcxlpmjerbdk", model.properties().imageDetails().image().digest()); + Assertions.assertEquals("vidizozsdb", model.properties().imageDetails().image().hostname()); + Assertions.assertEquals("xjmonf", model.properties().imageDetails().image().repository()); + Assertions.assertEquals("nwncypuuw", model.properties().imageDetails().image().tag()); + Assertions.assertEquals("v", model.properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals("e", model.properties().imageDetails().vulnerabilityFindings().data().get(0).cve()); + Assertions.assertEquals("eifzzhmk", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T07:50:18Z"), + model.properties().imageDetails().vulnerabilityFindings().data().get(0).dueDate()); + Assertions.assertTrue(model.properties().imageDetails().vulnerabilityFindings().data().get(0).patchable()); + Assertions.assertEquals("hxgsrboldfor", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-20T04:35:15Z"), + model.properties().imageDetails().vulnerabilityFindings().data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.LOW, + model.properties().imageDetails().vulnerabilityFindings().data().get(0).risk()); + Assertions.assertEquals("izbfhfovvacq", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).solution()); + Assertions.assertEquals("tuodxeszabbelaw", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).title()); + Assertions.assertEquals("ua", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).vendorId()); + Assertions.assertEquals("zkwrrwoyc", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T04:09:54Z"), + model.properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T15:59:55Z"), + model.properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("xoqqpwcyyufmhrun", + model.properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("wmqs", model.properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("zhlctddunqndyfpc", model.properties().inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(2042763855, model.properties().inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("bnjj", model.properties().inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(479383954, model.properties().inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("egy", model.properties().inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(459036091, model.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("boxjumvq", model.properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(1707929789, model.properties().inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.WINDOWS, model.properties().osType()); + Assertions.assertEquals("aiouaubrjt", model.properties().stage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EnvironmentVersionInner model = new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() - .withDescription("gcealzxwh") - .withTags( - mapOf("lwigdivbkbx", "symoyq", "wasqvdaeyyg", "omfaj", "zkgimsid", "xakjsqzhzb", "ddyvvjskgfmo", "asi")) - .withProperties(mapOf("hnakzyb", "hpqgatjeaahhvj")) - .withIsArchived(false) - .withIsAnonymous(false) - .withImage("fhqlyvi") - .withCondaFile("uwivkxoy") - .withBuild(new BuildContext().withContextUri("nbixxrti").withDockerfilePath("cpwpg")) - .withOsType(OperatingSystemType.LINUX) - .withInferenceConfig( - new InferenceContainerProperties().withLivenessRoute(new Route().withPath("vtsoxf").withPort(967528675)) - .withReadinessRoute(new Route().withPath("nxpmyyefrpmpdnq").withPort(663766748)) - .withScoringRoute(new Route().withPath("awaoqvmmbnpqfrt").withPort(1516123032))) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withStage("nitgvkxlz")); + EnvironmentVersionInner model + = new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties().withDescription("oj") + .withProperties(mapOf("mzdlyjdfqwmkyo", "iflrzpasccbiu", "lzo", "ufdvruz", "fnmdxotn", "hpc", + "grkyuizabsnmfpph", "fdgugeyzi")) + .withTags(mapOf("yhsgz", "evy")) + .withIsAnonymous(true) + .withIsArchived(true) + .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) + .withBuild(new BuildContext().withContextUri("cof").withDockerfilePath("e")) + .withCondaFile("dhgbjkvre") + .withImage("murvzm") + .withImageDetails(new ImageDetails().withExists(true) + .withImage(new ImageInfo().withDigest("ashcxlpmjerbdk") + .withHostname("vidizozsdb") + .withRepository("xjmonf") + .withTag("nwncypuuw")) + .withVulnerabilityFindings(new VulnerabilityFindings().withAssetId("v") + .withData(Arrays.asList( + new VulnerabilityDetails().withCve("e") + .withCveUrl("eifzzhmk") + .withDueDate(OffsetDateTime.parse("2021-03-02T07:50:18Z")) + .withPackageDetails(Arrays.asList(new PackageDetails())) + .withPatchable(true) + .withProviderId("hxgsrboldfor") + .withPublishDate(OffsetDateTime.parse("2020-12-20T04:35:15Z")) + .withRisk(VulnerabilityRisk.LOW) + .withSolution("izbfhfovvacq") + .withTitle("tuodxeszabbelaw") + .withVendorId("ua") + .withVendorUrl("zkwrrwoyc"), + new VulnerabilityDetails().withCve("cwyhahno") + .withCveUrl("rkywuhpsvfuu") + .withDueDate(OffsetDateTime.parse("2021-01-22T12:10:56Z")) + .withPackageDetails(Arrays.asList(new PackageDetails(), new PackageDetails(), + new PackageDetails(), new PackageDetails())) + .withPatchable(true) + .withProviderId("niexzsrzpgepq") + .withPublishDate(OffsetDateTime.parse("2021-09-27T17:32:34Z")) + .withRisk(VulnerabilityRisk.HIGH) + .withSolution("pgdakchzyvli") + .withTitle("nrkcxkj") + .withVendorId("nxm") + .withVendorUrl("uxswqrntvl"))) + .withGeneratedTime(OffsetDateTime.parse("2021-01-20T04:09:54Z")) + .withLastScanDate(OffsetDateTime.parse("2021-08-15T15:59:55Z")) + .withScanner("xoqqpwcyyufmhrun") + .withSource("wmqs"))) + .withInferenceConfig(new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("zhlctddunqndyfpc").withPort(2042763855)) + .withReadinessRoute(new Route().withPath("bnjj").withPort(479383954)) + .withScoringRoute(new Route().withPath("egy").withPort(459036091)) + .withStartupRoute(new Route().withPath("boxjumvq").withPort(1707929789))) + .withOsType(OperatingSystemType.WINDOWS) + .withStage("aiouaubrjt")); model = BinaryData.fromObject(model).toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("gcealzxwh", model.properties().description()); - Assertions.assertEquals("symoyq", model.properties().tags().get("lwigdivbkbx")); - Assertions.assertEquals("hpqgatjeaahhvj", model.properties().properties().get("hnakzyb")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("fhqlyvi", model.properties().image()); - Assertions.assertEquals("uwivkxoy", model.properties().condaFile()); - Assertions.assertEquals("nbixxrti", model.properties().build().contextUri()); - Assertions.assertEquals("cpwpg", model.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - Assertions.assertEquals("vtsoxf", model.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(967528675, model.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(663766748, model.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("awaoqvmmbnpqfrt", model.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1516123032, model.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("oj", model.properties().description()); + Assertions.assertEquals("iflrzpasccbiu", model.properties().properties().get("mzdlyjdfqwmkyo")); + Assertions.assertEquals("evy", model.properties().tags().get("yhsgz")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertTrue(model.properties().isArchived()); Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("nitgvkxlz", model.properties().stage()); + Assertions.assertEquals("cof", model.properties().build().contextUri()); + Assertions.assertEquals("e", model.properties().build().dockerfilePath()); + Assertions.assertEquals("dhgbjkvre", model.properties().condaFile()); + Assertions.assertEquals("murvzm", model.properties().image()); + Assertions.assertTrue(model.properties().imageDetails().exists()); + Assertions.assertEquals("ashcxlpmjerbdk", model.properties().imageDetails().image().digest()); + Assertions.assertEquals("vidizozsdb", model.properties().imageDetails().image().hostname()); + Assertions.assertEquals("xjmonf", model.properties().imageDetails().image().repository()); + Assertions.assertEquals("nwncypuuw", model.properties().imageDetails().image().tag()); + Assertions.assertEquals("v", model.properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals("e", model.properties().imageDetails().vulnerabilityFindings().data().get(0).cve()); + Assertions.assertEquals("eifzzhmk", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T07:50:18Z"), + model.properties().imageDetails().vulnerabilityFindings().data().get(0).dueDate()); + Assertions.assertTrue(model.properties().imageDetails().vulnerabilityFindings().data().get(0).patchable()); + Assertions.assertEquals("hxgsrboldfor", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-20T04:35:15Z"), + model.properties().imageDetails().vulnerabilityFindings().data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.LOW, + model.properties().imageDetails().vulnerabilityFindings().data().get(0).risk()); + Assertions.assertEquals("izbfhfovvacq", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).solution()); + Assertions.assertEquals("tuodxeszabbelaw", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).title()); + Assertions.assertEquals("ua", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).vendorId()); + Assertions.assertEquals("zkwrrwoyc", + model.properties().imageDetails().vulnerabilityFindings().data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T04:09:54Z"), + model.properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T15:59:55Z"), + model.properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("xoqqpwcyyufmhrun", + model.properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("wmqs", model.properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("zhlctddunqndyfpc", model.properties().inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(2042763855, model.properties().inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("bnjj", model.properties().inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(479383954, model.properties().inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("egy", model.properties().inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(459036091, model.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("boxjumvq", model.properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(1707929789, model.properties().inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.WINDOWS, model.properties().osType()); + Assertions.assertEquals("aiouaubrjt", model.properties().stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java index 43045b113823..7d93017362dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -8,9 +8,17 @@ import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; import com.azure.resourcemanager.machinelearning.models.BuildContext; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.ImageDetails; +import com.azure.resourcemanager.machinelearning.models.ImageInfo; import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; +import com.azure.resourcemanager.machinelearning.models.PackageDetails; import com.azure.resourcemanager.machinelearning.models.Route; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk; +import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -19,64 +27,146 @@ public final class EnvironmentVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnvironmentVersionProperties model = BinaryData.fromString( - "{\"environmentType\":\"UserCreated\",\"image\":\"jbnkpp\",\"condaFile\":\"nenlsvxeizzg\",\"build\":{\"contextUri\":\"lnsrmffe\",\"dockerfilePath\":\"xcktpiymerteeamm\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"kkzddrtkgdojbmx\",\"port\":37780018},\"readinessRoute\":{\"path\":\"refdee\",\"port\":2124341165},\"scoringRoute\":{\"path\":\"cuijpxt\",\"port\":214563643}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Creating\",\"stage\":\"ujwsawddjibabxvi\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"eexavo\",\"tags\":{\"gsfjac\":\"glecdmdqbwpypq\",\"d\":\"slhhxudbxv\",\"ud\":\"tnsi\"},\"properties\":{\"kdlpa\":\"mes\"}}") + "{\"autoRebuild\":\"Disabled\",\"build\":{\"contextUri\":\"bmqzbqqxlajrnwx\",\"dockerfilePath\":\"evehjkuyxoaf\"},\"condaFile\":\"oqltfae\",\"environmentType\":\"UserCreated\",\"image\":\"mfgvxirpghriypo\",\"imageDetails\":{\"exists\":true,\"image\":{\"digest\":\"h\",\"hostname\":\"prlpy\",\"repository\":\"uciqdsme\",\"tag\":\"itdfuxtyasiib\"},\"vulnerabilityFindings\":{\"assetId\":\"bnn\",\"criticalFindingsCount\":2019693740,\"data\":[{\"cve\":\"jh\",\"cveUrl\":\"g\",\"dueDate\":\"2021-02-27T14:41:49Z\",\"id\":\"mavmq\",\"packageDetails\":[{},{}],\"patchable\":false,\"providerId\":\"hcgyyprotwyp\",\"publishDate\":\"2021-05-09T02:53:19Z\",\"risk\":\"UNKNOWN\",\"solution\":\"hu\",\"title\":\"mjkavlgorbmft\",\"vendorId\":\"dtzfjltfvnzcy\",\"vendorUrl\":\"otp\"}],\"generatedTime\":\"2021-10-18T09:12:28Z\",\"highFindingsCount\":340160098,\"lastScanDate\":\"2021-04-20T00:08:35Z\",\"scanner\":\"zq\",\"source\":\"q\",\"totalFindingsCount\":284011666}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"vqwt\",\"port\":1013499255},\"readinessRoute\":{\"path\":\"yibcy\",\"port\":1158410329},\"scoringRoute\":{\"path\":\"sgqcwdho\",\"port\":1916069806},\"startupRoute\":{\"path\":\"tmcdzsufcohd\",\"port\":1610179215}},\"osType\":\"Linux\",\"provisioningState\":\"Canceled\",\"stage\":\"uapcvhdbevwqqxe\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"zinkfkbgbzbowxeq\",\"properties\":{\"qkjjeokbz\":\"jmygvk\",\"czurtlei\":\"fezrx\",\"bkwvzg\":\"q\",\"bzdixzmq\":\"zvd\"},\"tags\":{\"wopqhewjptmcgs\":\"d\",\"mzlbiojlvfhrb\":\"ostzelndlatu\",\"qvcww\":\"pn\",\"mo\":\"yurmochpprprs\"}}") .toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("eexavo", model.description()); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals("mes", model.properties().get("kdlpa")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("jbnkpp", model.image()); - Assertions.assertEquals("nenlsvxeizzg", model.condaFile()); - Assertions.assertEquals("lnsrmffe", model.build().contextUri()); - Assertions.assertEquals("xcktpiymerteeamm", model.build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.osType()); - Assertions.assertEquals("kkzddrtkgdojbmx", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(37780018, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("refdee", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(2124341165, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("cuijpxt", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(214563643, model.inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("zinkfkbgbzbowxeq", model.description()); + Assertions.assertEquals("jmygvk", model.properties().get("qkjjeokbz")); + Assertions.assertEquals("d", model.tags().get("wopqhewjptmcgs")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.autoRebuild()); - Assertions.assertEquals("ujwsawddjibabxvi", model.stage()); + Assertions.assertEquals("bmqzbqqxlajrnwx", model.build().contextUri()); + Assertions.assertEquals("evehjkuyxoaf", model.build().dockerfilePath()); + Assertions.assertEquals("oqltfae", model.condaFile()); + Assertions.assertEquals("mfgvxirpghriypo", model.image()); + Assertions.assertTrue(model.imageDetails().exists()); + Assertions.assertEquals("h", model.imageDetails().image().digest()); + Assertions.assertEquals("prlpy", model.imageDetails().image().hostname()); + Assertions.assertEquals("uciqdsme", model.imageDetails().image().repository()); + Assertions.assertEquals("itdfuxtyasiib", model.imageDetails().image().tag()); + Assertions.assertEquals("bnn", model.imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals("jh", model.imageDetails().vulnerabilityFindings().data().get(0).cve()); + Assertions.assertEquals("g", model.imageDetails().vulnerabilityFindings().data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-27T14:41:49Z"), + model.imageDetails().vulnerabilityFindings().data().get(0).dueDate()); + Assertions.assertFalse(model.imageDetails().vulnerabilityFindings().data().get(0).patchable()); + Assertions.assertEquals("hcgyyprotwyp", + model.imageDetails().vulnerabilityFindings().data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T02:53:19Z"), + model.imageDetails().vulnerabilityFindings().data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.UNKNOWN, + model.imageDetails().vulnerabilityFindings().data().get(0).risk()); + Assertions.assertEquals("hu", model.imageDetails().vulnerabilityFindings().data().get(0).solution()); + Assertions.assertEquals("mjkavlgorbmft", model.imageDetails().vulnerabilityFindings().data().get(0).title()); + Assertions.assertEquals("dtzfjltfvnzcy", model.imageDetails().vulnerabilityFindings().data().get(0).vendorId()); + Assertions.assertEquals("otp", model.imageDetails().vulnerabilityFindings().data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T09:12:28Z"), + model.imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T00:08:35Z"), + model.imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("zq", model.imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("q", model.imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("vqwt", model.inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(1013499255, model.inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("yibcy", model.inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(1158410329, model.inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("sgqcwdho", model.inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(1916069806, model.inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("tmcdzsufcohd", model.inferenceConfig().startupRoute().path()); + Assertions.assertEquals(1610179215, model.inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.LINUX, model.osType()); + Assertions.assertEquals("uapcvhdbevwqqxe", model.stage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EnvironmentVersionProperties model = new EnvironmentVersionProperties().withDescription("eexavo") - .withTags(mapOf("gsfjac", "glecdmdqbwpypq", "d", "slhhxudbxv", "ud", "tnsi")) - .withProperties(mapOf("kdlpa", "mes")) - .withIsArchived(true) + EnvironmentVersionProperties model = new EnvironmentVersionProperties().withDescription("zinkfkbgbzbowxeq") + .withProperties(mapOf("qkjjeokbz", "jmygvk", "czurtlei", "fezrx", "bkwvzg", "q", "bzdixzmq", "zvd")) + .withTags( + mapOf("wopqhewjptmcgs", "d", "mzlbiojlvfhrb", "ostzelndlatu", "qvcww", "pn", "mo", "yurmochpprprs")) .withIsAnonymous(false) - .withImage("jbnkpp") - .withCondaFile("nenlsvxeizzg") - .withBuild(new BuildContext().withContextUri("lnsrmffe").withDockerfilePath("xcktpiymerteeamm")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("kkzddrtkgdojbmx").withPort(37780018)) - .withReadinessRoute(new Route().withPath("refdee").withPort(2124341165)) - .withScoringRoute(new Route().withPath("cuijpxt").withPort(214563643))) + .withIsArchived(false) .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("ujwsawddjibabxvi"); + .withBuild(new BuildContext().withContextUri("bmqzbqqxlajrnwx").withDockerfilePath("evehjkuyxoaf")) + .withCondaFile("oqltfae") + .withImage("mfgvxirpghriypo") + .withImageDetails(new ImageDetails().withExists(true) + .withImage(new ImageInfo().withDigest("h") + .withHostname("prlpy") + .withRepository("uciqdsme") + .withTag("itdfuxtyasiib")) + .withVulnerabilityFindings(new VulnerabilityFindings().withAssetId("bnn") + .withData(Arrays.asList(new VulnerabilityDetails().withCve("jh") + .withCveUrl("g") + .withDueDate(OffsetDateTime.parse("2021-02-27T14:41:49Z")) + .withPackageDetails(Arrays.asList(new PackageDetails(), new PackageDetails())) + .withPatchable(false) + .withProviderId("hcgyyprotwyp") + .withPublishDate(OffsetDateTime.parse("2021-05-09T02:53:19Z")) + .withRisk(VulnerabilityRisk.UNKNOWN) + .withSolution("hu") + .withTitle("mjkavlgorbmft") + .withVendorId("dtzfjltfvnzcy") + .withVendorUrl("otp"))) + .withGeneratedTime(OffsetDateTime.parse("2021-10-18T09:12:28Z")) + .withLastScanDate(OffsetDateTime.parse("2021-04-20T00:08:35Z")) + .withScanner("zq") + .withSource("q"))) + .withInferenceConfig( + new InferenceContainerProperties().withLivenessRoute(new Route().withPath("vqwt").withPort(1013499255)) + .withReadinessRoute(new Route().withPath("yibcy").withPort(1158410329)) + .withScoringRoute(new Route().withPath("sgqcwdho").withPort(1916069806)) + .withStartupRoute(new Route().withPath("tmcdzsufcohd").withPort(1610179215))) + .withOsType(OperatingSystemType.LINUX) + .withStage("uapcvhdbevwqqxe"); model = BinaryData.fromObject(model).toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("eexavo", model.description()); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals("mes", model.properties().get("kdlpa")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("jbnkpp", model.image()); - Assertions.assertEquals("nenlsvxeizzg", model.condaFile()); - Assertions.assertEquals("lnsrmffe", model.build().contextUri()); - Assertions.assertEquals("xcktpiymerteeamm", model.build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.osType()); - Assertions.assertEquals("kkzddrtkgdojbmx", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(37780018, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("refdee", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(2124341165, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("cuijpxt", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(214563643, model.inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("zinkfkbgbzbowxeq", model.description()); + Assertions.assertEquals("jmygvk", model.properties().get("qkjjeokbz")); + Assertions.assertEquals("d", model.tags().get("wopqhewjptmcgs")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.autoRebuild()); - Assertions.assertEquals("ujwsawddjibabxvi", model.stage()); + Assertions.assertEquals("bmqzbqqxlajrnwx", model.build().contextUri()); + Assertions.assertEquals("evehjkuyxoaf", model.build().dockerfilePath()); + Assertions.assertEquals("oqltfae", model.condaFile()); + Assertions.assertEquals("mfgvxirpghriypo", model.image()); + Assertions.assertTrue(model.imageDetails().exists()); + Assertions.assertEquals("h", model.imageDetails().image().digest()); + Assertions.assertEquals("prlpy", model.imageDetails().image().hostname()); + Assertions.assertEquals("uciqdsme", model.imageDetails().image().repository()); + Assertions.assertEquals("itdfuxtyasiib", model.imageDetails().image().tag()); + Assertions.assertEquals("bnn", model.imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals("jh", model.imageDetails().vulnerabilityFindings().data().get(0).cve()); + Assertions.assertEquals("g", model.imageDetails().vulnerabilityFindings().data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-27T14:41:49Z"), + model.imageDetails().vulnerabilityFindings().data().get(0).dueDate()); + Assertions.assertFalse(model.imageDetails().vulnerabilityFindings().data().get(0).patchable()); + Assertions.assertEquals("hcgyyprotwyp", + model.imageDetails().vulnerabilityFindings().data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-09T02:53:19Z"), + model.imageDetails().vulnerabilityFindings().data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.UNKNOWN, + model.imageDetails().vulnerabilityFindings().data().get(0).risk()); + Assertions.assertEquals("hu", model.imageDetails().vulnerabilityFindings().data().get(0).solution()); + Assertions.assertEquals("mjkavlgorbmft", model.imageDetails().vulnerabilityFindings().data().get(0).title()); + Assertions.assertEquals("dtzfjltfvnzcy", model.imageDetails().vulnerabilityFindings().data().get(0).vendorId()); + Assertions.assertEquals("otp", model.imageDetails().vulnerabilityFindings().data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-18T09:12:28Z"), + model.imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T00:08:35Z"), + model.imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("zq", model.imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("q", model.imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("vqwt", model.inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(1013499255, model.inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("yibcy", model.inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(1158410329, model.inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("sgqcwdho", model.inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(1916069806, model.inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("tmcdzsufcohd", model.inferenceConfig().startupRoute().path()); + Assertions.assertEquals(1610179215, model.inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.LINUX, model.osType()); + Assertions.assertEquals("uapcvhdbevwqqxe", model.stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java index 0434e39dbaa5..730ebec11627 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java @@ -1,108 +1,59 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; +import com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; public final class EnvironmentVersionResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EnvironmentVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"ncxykxhdjhlimm\",\"condaFile\":\"x\",\"build\":{\"contextUri\":\"bcporxvxcjzhqizx\",\"dockerfilePath\":\"xtgqscjavftjuh\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mtggu\",\"port\":1404234385},\"readinessRoute\":{\"path\":\"jrajcivm\",\"port\":1977689221},\"scoringRoute\":{\"path\":\"f\",\"port\":2030059777}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Deleting\",\"stage\":\"kneuvyinzqo\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"hoxgsgbpf\",\"tags\":{\"lgafcqusrdve\":\"jtxvzflbqvgaq\",\"uzhyrmewipmvekdx\":\"nwsdtutnwlduyc\",\"zhhzjhfjmhvvmu\":\"kuqgsjjxundxgket\"},\"properties\":{\"qsxvmhf\":\"mun\",\"yue\":\"uzjyihsasbhudypo\"}},\"id\":\"lynsqyrpf\",\"name\":\"obrltt\",\"type\":\"msjnygqdnfw\"}],\"nextLink\":\"dzgtil\"}") + "{\"value\":[{\"properties\":{\"autoRebuild\":\"Disabled\",\"build\":{\"contextUri\":\"nidibgqjxg\",\"dockerfilePath\":\"r\"},\"condaFile\":\"ov\",\"environmentType\":\"Curated\",\"image\":\"kqmhhaowjr\",\"imageDetails\":{\"exists\":true,\"image\":{\"digest\":\"rqzdfuydzvkfvx\",\"hostname\":\"qmxq\",\"repository\":\"wokmvkhlggd\",\"tag\":\"em\"},\"vulnerabilityFindings\":{\"assetId\":\"zszuwiwtglxx\",\"criticalFindingsCount\":282023299,\"data\":[{}],\"generatedTime\":\"2021-03-07T09:12:02Z\",\"highFindingsCount\":1130709728,\"lastScanDate\":\"2020-12-30T08:49:07Z\",\"scanner\":\"zhrgmqgjsxvpqc\",\"source\":\"rmbodt\",\"totalFindingsCount\":1108610581}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"vriibakclacjfr\",\"port\":225802150},\"readinessRoute\":{\"path\":\"usx\",\"port\":22525493},\"scoringRoute\":{\"path\":\"lwvsgm\",\"port\":1950405956},\"startupRoute\":{\"path\":\"qf\",\"port\":965908942}},\"osType\":\"Linux\",\"provisioningState\":\"Updating\",\"stage\":\"mk\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"wpztekovmribia\",\"properties\":{\"cugswvxwlmzqw\":\"plucfotangcfhnyk\",\"cvclxynpdk\":\"vtxnjmxmcuqud\",\"neiknpg\":\"gfabuiyjibuzphdu\",\"btozipqwje\":\"xgjiuqh\"},\"tags\":{\"lkm\":\"rrxxgewpktvq\",\"gcl\":\"pzoyhlfbcg\",\"qinjipnwjf\":\"xoe\"}},\"id\":\"qlafcbahhpzpofoi\",\"name\":\"jwpfilkm\",\"type\":\"kholvd\"},{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"auo\",\"dockerfilePath\":\"huartv\"},\"condaFile\":\"ukyefchnmnahmnxh\",\"environmentType\":\"Curated\",\"image\":\"irwrwe\",\"imageDetails\":{\"exists\":false,\"image\":{\"digest\":\"fhxwrsne\",\"hostname\":\"ozqvbubqmam\",\"repository\":\"ycxhxzgaztta\",\"tag\":\"idvmfqhppubo\"},\"vulnerabilityFindings\":{\"assetId\":\"pdfgkmtdherngbt\",\"criticalFindingsCount\":1433738455,\"data\":[{}],\"generatedTime\":\"2021-06-28T17:20:58Z\",\"highFindingsCount\":1531879033,\"lastScanDate\":\"2021-07-06T05:59:48Z\",\"scanner\":\"auxofshfph\",\"source\":\"nulaiywzejywhsl\",\"totalFindingsCount\":2105999737}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"llndnpd\",\"port\":1233897437},\"readinessRoute\":{\"path\":\"qafgfugsnnfhyet\",\"port\":1268019829},\"scoringRoute\":{\"path\":\"pococtfjgt\",\"port\":1261981805},\"startupRoute\":{\"path\":\"jvzuy\",\"port\":1690979823}},\"osType\":\"Linux\",\"provisioningState\":\"Deleting\",\"stage\":\"owolbaui\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"szonwpngajinn\",\"properties\":{\"coxovn\":\"awrtmjfjmyccxlz\",\"nrd\":\"khenlus\",\"tjvidt\":\"jxtxrdc\"},\"tags\":{\"cvuwkasiz\":\"puslvyj\"}},\"id\":\"sfuughtuqfecjx\",\"name\":\"ygtuhx\",\"type\":\"ic\"}],\"nextLink\":\"ewmrswnjlxu\"}") .toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("hoxgsgbpf", model.value().get(0).properties().description()); - Assertions.assertEquals("jtxvzflbqvgaq", model.value().get(0).properties().tags().get("lgafcqusrdve")); - Assertions.assertEquals("mun", model.value().get(0).properties().properties().get("qsxvmhf")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ncxykxhdjhlimm", model.value().get(0).properties().image()); - Assertions.assertEquals("x", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).properties().build().contextUri()); - Assertions.assertEquals("xtgqscjavftjuh", model.value().get(0).properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - Assertions.assertEquals("mtggu", model.value().get(0).properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1404234385, model.value().get(0).properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("jrajcivm", - model.value().get(0).properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1977689221, - model.value().get(0).properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("f", model.value().get(0).properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2030059777, model.value().get(0).properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, - model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("kneuvyinzqo", model.value().get(0).properties().stage()); - Assertions.assertEquals("dzgtil", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = new EnvironmentVersionResourceArmPaginatedResult() - .withValue(Arrays.asList(new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() - .withDescription("hoxgsgbpf") - .withTags(mapOf("lgafcqusrdve", "jtxvzflbqvgaq", "uzhyrmewipmvekdx", "nwsdtutnwlduyc", "zhhzjhfjmhvvmu", - "kuqgsjjxundxgket")) - .withProperties(mapOf("qsxvmhf", "mun", "yue", "uzjyihsasbhudypo")) - .withIsArchived(true) - .withIsAnonymous(false) - .withImage("ncxykxhdjhlimm") - .withCondaFile("x") - .withBuild(new BuildContext().withContextUri("bcporxvxcjzhqizx").withDockerfilePath("xtgqscjavftjuh")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("mtggu").withPort(1404234385)) - .withReadinessRoute(new Route().withPath("jrajcivm").withPort(1977689221)) - .withScoringRoute(new Route().withPath("f").withPort(2030059777))) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withStage("kneuvyinzqo")))) - .withNextLink("dzgtil"); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("hoxgsgbpf", model.value().get(0).properties().description()); - Assertions.assertEquals("jtxvzflbqvgaq", model.value().get(0).properties().tags().get("lgafcqusrdve")); - Assertions.assertEquals("mun", model.value().get(0).properties().properties().get("qsxvmhf")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ncxykxhdjhlimm", model.value().get(0).properties().image()); - Assertions.assertEquals("x", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).properties().build().contextUri()); - Assertions.assertEquals("xtgqscjavftjuh", model.value().get(0).properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - Assertions.assertEquals("mtggu", model.value().get(0).properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1404234385, model.value().get(0).properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("jrajcivm", - model.value().get(0).properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1977689221, - model.value().get(0).properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("f", model.value().get(0).properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2030059777, model.value().get(0).properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, - model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("kneuvyinzqo", model.value().get(0).properties().stage()); - Assertions.assertEquals("dzgtil", 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; + Assertions.assertEquals("wpztekovmribia", model.value().get(0).properties().description()); + Assertions.assertEquals("plucfotangcfhnyk", + model.value().get(0).properties().properties().get("cugswvxwlmzqw")); + Assertions.assertEquals("rrxxgewpktvq", model.value().get(0).properties().tags().get("lkm")); + Assertions.assertFalse(model.value().get(0).properties().isAnonymous()); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.value().get(0).properties().autoRebuild()); + Assertions.assertEquals("nidibgqjxg", model.value().get(0).properties().build().contextUri()); + Assertions.assertEquals("r", model.value().get(0).properties().build().dockerfilePath()); + Assertions.assertEquals("ov", model.value().get(0).properties().condaFile()); + Assertions.assertEquals("kqmhhaowjr", model.value().get(0).properties().image()); + Assertions.assertTrue(model.value().get(0).properties().imageDetails().exists()); + Assertions.assertEquals("rqzdfuydzvkfvx", model.value().get(0).properties().imageDetails().image().digest()); + Assertions.assertEquals("qmxq", model.value().get(0).properties().imageDetails().image().hostname()); + Assertions.assertEquals("wokmvkhlggd", model.value().get(0).properties().imageDetails().image().repository()); + Assertions.assertEquals("em", model.value().get(0).properties().imageDetails().image().tag()); + Assertions.assertEquals("zszuwiwtglxx", + model.value().get(0).properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T09:12:02Z"), + model.value().get(0).properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-30T08:49:07Z"), + model.value().get(0).properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("zhrgmqgjsxvpqc", + model.value().get(0).properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("rmbodt", + model.value().get(0).properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("vriibakclacjfr", + model.value().get(0).properties().inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(225802150, model.value().get(0).properties().inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("usx", model.value().get(0).properties().inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(22525493, model.value().get(0).properties().inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("lwvsgm", model.value().get(0).properties().inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(1950405956, model.value().get(0).properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("qf", model.value().get(0).properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(965908942, model.value().get(0).properties().inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.LINUX, model.value().get(0).properties().osType()); + Assertions.assertEquals("mk", model.value().get(0).properties().stage()); + Assertions.assertEquals("ewmrswnjlxu", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java index e73e506273ca..d8004e5aebb3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java @@ -1,24 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; import com.azure.resourcemanager.machinelearning.models.BuildContext; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.ImageDetails; +import com.azure.resourcemanager.machinelearning.models.ImageInfo; import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; import com.azure.resourcemanager.machinelearning.models.Route; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -29,53 +34,81 @@ public final class EnvironmentVersionsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"jgrepbrbmc\",\"condaFile\":\"vxjwpvqrexlui\",\"build\":{\"contextUri\":\"lqwbrfiovpdl\",\"dockerfilePath\":\"drfiwerlbcetrvir\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"wpvnloop\",\"port\":940990727},\"readinessRoute\":{\"path\":\"egchtabhacjlf\",\"port\":856600088},\"scoringRoute\":{\"path\":\"klvvwvpfqtpvzhml\",\"port\":474864730}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Failed\",\"stage\":\"ffnsdmhawbx\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"hlewyroksayehf\",\"tags\":{\"tmdhbctk\":\"py\"},\"properties\":{\"hxope\":\"xzlphzujkqaxbe\",\"sykhdapxdiibjj\":\"el\",\"yhx\":\"uekhh\",\"ffajh\":\"uhhnrmmfzfkhfnz\"}},\"id\":\"bskgciedlqvpd\",\"name\":\"rlsmsrwlfgbu\",\"type\":\"gchjtpszcawf\"}"; + = "{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"pypbm\",\"dockerfilePath\":\"sxblmnxrxkuly\"},\"condaFile\":\"vviyqonbxxyf\",\"environmentType\":\"Curated\",\"image\":\"od\",\"imageDetails\":{\"exists\":false,\"image\":{\"digest\":\"frxvlusedpnkz\",\"hostname\":\"qaxtmvmyc\",\"repository\":\"paxjdqvv\",\"tag\":\"ehyv\"},\"vulnerabilityFindings\":{\"assetId\":\"ngoqmr\",\"criticalFindingsCount\":1399060719,\"data\":[{}],\"generatedTime\":\"2021-07-01T02:38:11Z\",\"highFindingsCount\":1034528810,\"lastScanDate\":\"2021-09-01T00:09:57Z\",\"scanner\":\"nwenbphyl\",\"source\":\"zgz\",\"totalFindingsCount\":2013976219}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"sebkc\",\"port\":1546662687},\"readinessRoute\":{\"path\":\"xpuntermasui\",\"port\":1624743024},\"scoringRoute\":{\"path\":\"n\",\"port\":138797569},\"startupRoute\":{\"path\":\"ubqwxvsxrbiyzjl\",\"port\":2134563588}},\"osType\":\"Linux\",\"provisioningState\":\"Deleting\",\"stage\":\"cukboc\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"vsg\",\"properties\":{\"yxjkctyq\":\"qi\",\"ft\":\"ttampqep\",\"l\":\"ub\"},\"tags\":{\"lctpqnofkwh\":\"peqlhbtysyize\",\"ooelm\":\"yzwfyfdb\",\"qqykgjjsmvs\":\"kd\"}},\"id\":\"qmlmwjwsmnwb\",\"name\":\"acvemmriyz\",\"type\":\"vque\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EnvironmentVersion response = manager.environmentVersions() - .define("lcbbu") - .withExistingEnvironment("vgjynuwcque", "anqdmmrodpgtblm", "blcbwvsqpea") - .withProperties(new EnvironmentVersionProperties().withDescription("oafdvxrlrsrfrxyl") - .withTags(mapOf("asnc", "pspipkpcvhqadj", "tkvoivcktjscjkex", "quixuqvat")) - .withProperties(mapOf("yunwmbfjjs", "yrcjgptxvz", "s", "eqvefnzvhmiwba", "ktytrivf", "fm")) + .define("mgmgnddaxaog") + .withExistingEnvironment("psjldgnimqoac", "qzxjziqcsotwqtk", "dcdefqoe") + .withProperties(new EnvironmentVersionProperties().withDescription("dcaqimodnbjmjx") + .withProperties(mapOf("ebgodj", "ucmzkqtkfjacktav", "cedsoqwexi", "yplavbvs")) + .withTags(mapOf("gywylavetqjvo", "zoteikffjqdfa", "dgjtpbtkogfg", "ys", "lrvwsgseqj", "ylyz", + "xirmgiswr", "eo")) + .withIsAnonymous(false) .withIsArchived(false) - .withIsAnonymous(true) - .withImage("girsfilxusyzcn") - .withCondaFile("vipeh") - .withBuild(new BuildContext().withContextUri("bburbxovgjipbnn").withDockerfilePath("sjxwjnw")) - .withOsType(OperatingSystemType.WINDOWS) + .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) + .withBuild(new BuildContext().withContextUri("mmmbipyse").withDockerfilePath("ybobfjcvmkk")) + .withCondaFile("gdiwdyyhdtie") + .withImage("qwvcwce") + .withImageDetails(new ImageDetails().withExists(false) + .withImage(new ImageInfo().withDigest("pdlbtbxhyf") + .withHostname("fqktuzrltpe") + .withRepository("dkbqfzbvttqj") + .withTag("vhnjpbhjlug")) + .withVulnerabilityFindings(new VulnerabilityFindings().withAssetId("cyfrho") + .withData(Arrays.asList(new VulnerabilityDetails(), new VulnerabilityDetails(), + new VulnerabilityDetails(), new VulnerabilityDetails())) + .withGeneratedTime(OffsetDateTime.parse("2021-03-07T10:53:56Z")) + .withLastScanDate(OffsetDateTime.parse("2021-09-15T10:33:34Z")) + .withScanner("dxsuwlynxzhgbsp") + .withSource("bhjquxkzxqomzdf"))) .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("hpyixibr").withPort(987704652)) - .withReadinessRoute(new Route().withPath("uzsojblyygftic").withPort(644261840)) - .withScoringRoute(new Route().withPath("rswqmteu").withPort(155856060))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("otrbnvoe")) + .withLivenessRoute(new Route().withPath("eidzwnk").withPort(837091999)) + .withReadinessRoute(new Route().withPath("pzmodwhqux").withPort(1876720469)) + .withScoringRoute(new Route().withPath("htux").withPort(404086333)) + .withStartupRoute(new Route().withPath("wz").withPort(79091213))) + .withOsType(OperatingSystemType.LINUX) + .withStage("nslcvynavwttts")) .create(); - Assertions.assertEquals("hlewyroksayehf", response.properties().description()); - Assertions.assertEquals("py", response.properties().tags().get("tmdhbctk")); - Assertions.assertEquals("xzlphzujkqaxbe", response.properties().properties().get("hxope")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("jgrepbrbmc", response.properties().image()); - Assertions.assertEquals("vxjwpvqrexlui", response.properties().condaFile()); - Assertions.assertEquals("lqwbrfiovpdl", response.properties().build().contextUri()); - Assertions.assertEquals("drfiwerlbcetrvir", response.properties().build().dockerfilePath()); + Assertions.assertEquals("vsg", response.properties().description()); + Assertions.assertEquals("qi", response.properties().properties().get("yxjkctyq")); + Assertions.assertEquals("peqlhbtysyize", response.properties().tags().get("lctpqnofkwh")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertFalse(response.properties().isArchived()); + Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); + Assertions.assertEquals("pypbm", response.properties().build().contextUri()); + Assertions.assertEquals("sxblmnxrxkuly", response.properties().build().dockerfilePath()); + Assertions.assertEquals("vviyqonbxxyf", response.properties().condaFile()); + Assertions.assertEquals("od", response.properties().image()); + Assertions.assertFalse(response.properties().imageDetails().exists()); + Assertions.assertEquals("frxvlusedpnkz", response.properties().imageDetails().image().digest()); + Assertions.assertEquals("qaxtmvmyc", response.properties().imageDetails().image().hostname()); + Assertions.assertEquals("paxjdqvv", response.properties().imageDetails().image().repository()); + Assertions.assertEquals("ehyv", response.properties().imageDetails().image().tag()); + Assertions.assertEquals("ngoqmr", response.properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-01T02:38:11Z"), + response.properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T00:09:57Z"), + response.properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("nwenbphyl", response.properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("zgz", response.properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("sebkc", response.properties().inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(1546662687, response.properties().inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("xpuntermasui", response.properties().inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(1624743024, response.properties().inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("n", response.properties().inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(138797569, response.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("ubqwxvsxrbiyzjl", response.properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(2134563588, response.properties().inferenceConfig().startupRoute().port()); Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); - Assertions.assertEquals("wpvnloop", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(940990727, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("egchtabhacjlf", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(856600088, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("klvvwvpfqtpvzhml", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(474864730, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.properties().autoRebuild()); - Assertions.assertEquals("ffnsdmhawbx", response.properties().stage()); + Assertions.assertEquals("cukboc", response.properties().stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java index e37cf57f79b7..37cfd4ec5f7a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.environmentVersions() - .deleteWithResponse("nypktgslkokqa", "gzcojgdq", "hzfec", "gpjnydkkgbvs", com.azure.core.util.Context.NONE); + .deleteWithResponse("cz", "tniwfcu", "whxm", "ibxkcegc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java index ae84875411a3..c16d1dd3ab06 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; @@ -23,36 +23,51 @@ public final class EnvironmentVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"yrpwzsmwgebpsk\",\"condaFile\":\"cifdvtwuncn\",\"build\":{\"contextUri\":\"yjwjmyubhtmlgjai\",\"dockerfilePath\":\"ymjdwirglqibj\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"w\",\"port\":375117512},\"readinessRoute\":{\"path\":\"bzfhu\",\"port\":1172708430},\"scoringRoute\":{\"path\":\"k\",\"port\":777274816}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Failed\",\"stage\":\"xxiglehylbna\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"hoem\",\"tags\":{\"vfgukrxumwdqwy\":\"mmpvo\",\"umhaeqboig\":\"nawzeleqpnkqxk\",\"fhivsytidzvvndp\":\"jxatwxiya\",\"uexhgdhpkplas\":\"w\"},\"properties\":{\"oiddv\":\"tqxfpfopekyzdzvh\",\"sifixolvny\":\"qyjekvzpqr\",\"bpwpuayx\":\"fut\"}},\"id\":\"piultybwwmj\",\"name\":\"smkjalorxeegiczr\",\"type\":\"n\"}"; + = "{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"eilhggajfeudb\",\"dockerfilePath\":\"moljirchhwlzihv\"},\"condaFile\":\"quajpo\",\"environmentType\":\"UserCreated\",\"image\":\"xyo\",\"imageDetails\":{\"exists\":true,\"image\":{\"digest\":\"hntoiwfszkrl\",\"hostname\":\"sjwrretsluqfgksd\",\"repository\":\"mioixvio\",\"tag\":\"wbngeuwhdqng\"},\"vulnerabilityFindings\":{\"assetId\":\"h\",\"criticalFindingsCount\":1606345492,\"data\":[{},{},{}],\"generatedTime\":\"2021-05-27T17:25:40Z\",\"highFindingsCount\":1439065994,\"lastScanDate\":\"2021-05-04T20:50:35Z\",\"scanner\":\"affzqodokstkvomd\",\"source\":\"noyzq\",\"totalFindingsCount\":98855594}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"fccydbjgh\",\"port\":362560188},\"readinessRoute\":{\"path\":\"nttrwocbzv\",\"port\":1672213494},\"scoringRoute\":{\"path\":\"v\",\"port\":1274843031},\"startupRoute\":{\"path\":\"mwwvxcaicbic\",\"port\":523022323}},\"osType\":\"Linux\",\"provisioningState\":\"Deleting\",\"stage\":\"k\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"gunrukcyyaa\",\"properties\":{\"zkifqbxmnnid\":\"ubzqazdlrkvi\",\"ttqhpvaru\":\"tmpumzuhoo\"},\"tags\":{\"yu\":\"w\"}},\"id\":\"fpqqllavzlhjgm\",\"name\":\"odbl\",\"type\":\"pqr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EnvironmentVersion response = manager.environmentVersions() - .getWithResponse("ks", "gkvga", "nrhrqqiwfysujcv", "clgp", com.azure.core.util.Context.NONE) + .getWithResponse("aveuxgmigs", "ebdltniui", "merf", "hgvcy", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hoem", response.properties().description()); - Assertions.assertEquals("mmpvo", response.properties().tags().get("vfgukrxumwdqwy")); - Assertions.assertEquals("tqxfpfopekyzdzvh", response.properties().properties().get("oiddv")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("yrpwzsmwgebpsk", response.properties().image()); - Assertions.assertEquals("cifdvtwuncn", response.properties().condaFile()); - Assertions.assertEquals("yjwjmyubhtmlgjai", response.properties().build().contextUri()); - Assertions.assertEquals("ymjdwirglqibj", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); - Assertions.assertEquals("w", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(375117512, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("bzfhu", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1172708430, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("k", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(777274816, response.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("gunrukcyyaa", response.properties().description()); + Assertions.assertEquals("ubzqazdlrkvi", response.properties().properties().get("zkifqbxmnnid")); + Assertions.assertEquals("w", response.properties().tags().get("yu")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertFalse(response.properties().isArchived()); Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("xxiglehylbna", response.properties().stage()); + Assertions.assertEquals("eilhggajfeudb", response.properties().build().contextUri()); + Assertions.assertEquals("moljirchhwlzihv", response.properties().build().dockerfilePath()); + Assertions.assertEquals("quajpo", response.properties().condaFile()); + Assertions.assertEquals("xyo", response.properties().image()); + Assertions.assertTrue(response.properties().imageDetails().exists()); + Assertions.assertEquals("hntoiwfszkrl", response.properties().imageDetails().image().digest()); + Assertions.assertEquals("sjwrretsluqfgksd", response.properties().imageDetails().image().hostname()); + Assertions.assertEquals("mioixvio", response.properties().imageDetails().image().repository()); + Assertions.assertEquals("wbngeuwhdqng", response.properties().imageDetails().image().tag()); + Assertions.assertEquals("h", response.properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-27T17:25:40Z"), + response.properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-04T20:50:35Z"), + response.properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("affzqodokstkvomd", + response.properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("noyzq", response.properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("fccydbjgh", response.properties().inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(362560188, response.properties().inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("nttrwocbzv", response.properties().inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(1672213494, response.properties().inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("v", response.properties().inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(1274843031, response.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("mwwvxcaicbic", response.properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(523022323, response.properties().inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); + Assertions.assertEquals("k", response.properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java index cf8dc11105fd..a3fce2878d22 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; @@ -25,42 +25,66 @@ public final class EnvironmentVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"aljomgzorprrap\",\"condaFile\":\"bjenylgebrsnvof\",\"build\":{\"contextUri\":\"zvbploazc\",\"dockerfilePath\":\"hgermm\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"uipsoawxugpu\",\"port\":1995117934},\"readinessRoute\":{\"path\":\"kwxzmuzg\",\"port\":1007623800},\"scoringRoute\":{\"path\":\"ygpbhauhej\",\"port\":803038260}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Deleting\",\"stage\":\"xxzxwrnqwdjvlw\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"wsfxqc\",\"tags\":{\"cbciu\":\"ez\",\"jguzsyfwamhmeo\":\"gakmxgwwmavllp\",\"nzcufysalbjfkje\":\"xbzagwnompvyis\"},\"properties\":{\"ridipw\":\"zmh\",\"jqhjenbdupfp\":\"zjnnmpi\",\"rsfghyye\":\"losadjffl\"}},\"id\":\"adzu\",\"name\":\"dcccls\",\"type\":\"flcxxp\"}]}"; + = "{\"value\":[{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"fiszhexum\",\"dockerfilePath\":\"vwesl\"},\"condaFile\":\"litxrrs\",\"environmentType\":\"Curated\",\"image\":\"sanjsou\",\"imageDetails\":{\"exists\":false,\"image\":{\"digest\":\"ujgbnclxhwkz\",\"hostname\":\"g\",\"repository\":\"zkvdantp\",\"tag\":\"iwazoabthutctca\"},\"vulnerabilityFindings\":{\"assetId\":\"wabzf\",\"criticalFindingsCount\":347395039,\"data\":[{},{},{},{}],\"generatedTime\":\"2021-09-13T08:23:34Z\",\"highFindingsCount\":1229170308,\"lastScanDate\":\"2021-11-03T16:05:47Z\",\"scanner\":\"wegvuojuwgweccvu\",\"source\":\"qvfcfsssmyaemk\",\"totalFindingsCount\":1468849815}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"gktlu\",\"port\":378863829},\"readinessRoute\":{\"path\":\"qgpqcpenobqysb\",\"port\":2096232068},\"scoringRoute\":{\"path\":\"pqbvvaerszsufz\",\"port\":591085440},\"startupRoute\":{\"path\":\"tbricvvofenint\",\"port\":883470274}},\"osType\":\"Windows\",\"provisioningState\":\"Updating\",\"stage\":\"xckdlxjpisrdn\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"es\",\"properties\":{\"yutezlghkv\":\"jnubxfiiytqxewj\",\"o\":\"xdporxkivbku\",\"dwdmuvya\":\"ecyqoytwssbvqnp\",\"blzrmiukothyfjbp\":\"rbqpwx\"},\"tags\":{\"fwgnpcjniaf\":\"hfrvsi\",\"mwr\":\"wcgjjioqwuuogdkp\"}},\"id\":\"qjdebyxqucnbgi\",\"name\":\"klscwdko\",\"type\":\"zyvihevb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.environmentVersions() - .list("iyapifcjl", "ugnrzowc", "r", "afqsozawqxnhlv", 633579364, "ugwxdwtfmfjk", ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); + .list("tgxkxtcxb", "jbeyqohviawp", "fkrarer", "lgbvtpxowgoww", 259176458, "cjasua", + ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - Assertions.assertEquals("wsfxqc", response.iterator().next().properties().description()); - Assertions.assertEquals("ez", response.iterator().next().properties().tags().get("cbciu")); - Assertions.assertEquals("zmh", response.iterator().next().properties().properties().get("ridipw")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("aljomgzorprrap", response.iterator().next().properties().image()); - Assertions.assertEquals("bjenylgebrsnvof", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("zvbploazc", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("hgermm", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.iterator().next().properties().osType()); - Assertions.assertEquals("uipsoawxugpu", + Assertions.assertEquals("es", response.iterator().next().properties().description()); + Assertions.assertEquals("jnubxfiiytqxewj", + response.iterator().next().properties().properties().get("yutezlghkv")); + Assertions.assertEquals("hfrvsi", response.iterator().next().properties().tags().get("fwgnpcjniaf")); + Assertions.assertTrue(response.iterator().next().properties().isAnonymous()); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); + Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, + response.iterator().next().properties().autoRebuild()); + Assertions.assertEquals("fiszhexum", response.iterator().next().properties().build().contextUri()); + Assertions.assertEquals("vwesl", response.iterator().next().properties().build().dockerfilePath()); + Assertions.assertEquals("litxrrs", response.iterator().next().properties().condaFile()); + Assertions.assertEquals("sanjsou", response.iterator().next().properties().image()); + Assertions.assertFalse(response.iterator().next().properties().imageDetails().exists()); + Assertions.assertEquals("ujgbnclxhwkz", + response.iterator().next().properties().imageDetails().image().digest()); + Assertions.assertEquals("g", response.iterator().next().properties().imageDetails().image().hostname()); + Assertions.assertEquals("zkvdantp", + response.iterator().next().properties().imageDetails().image().repository()); + Assertions.assertEquals("iwazoabthutctca", + response.iterator().next().properties().imageDetails().image().tag()); + Assertions.assertEquals("wabzf", + response.iterator().next().properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-13T08:23:34Z"), + response.iterator().next().properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T16:05:47Z"), + response.iterator().next().properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("wegvuojuwgweccvu", + response.iterator().next().properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("qvfcfsssmyaemk", + response.iterator().next().properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("gktlu", response.iterator().next().properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1995117934, + Assertions.assertEquals(378863829, response.iterator().next().properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("kwxzmuzg", + Assertions.assertEquals("qgpqcpenobqysb", response.iterator().next().properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1007623800, + Assertions.assertEquals(2096232068, response.iterator().next().properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("ygpbhauhej", + Assertions.assertEquals("pqbvvaerszsufz", response.iterator().next().properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(803038260, + Assertions.assertEquals(591085440, response.iterator().next().properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("xxzxwrnqwdjvlw", response.iterator().next().properties().stage()); + Assertions.assertEquals("tbricvvofenint", + response.iterator().next().properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(883470274, + response.iterator().next().properties().inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.WINDOWS, response.iterator().next().properties().osType()); + Assertions.assertEquals("xckdlxjpisrdn", response.iterator().next().properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java index 9289a518c784..2a7ad088d487 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; @@ -26,13 +26,13 @@ public void testPublish() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.environmentVersions() - .publish("zlcvndihkph", "zgkkucwmjmgsw", "w", "skuqgneorqtr", - new DestinationAsset().withRegistryName("eikqvaagnzbkqq") - .withDestinationName("cd") - .withDestinationVersion("csom"), + .publish("vxmtsmgk", "etsn", "rceulbyzzcxsyg", "oy", + new DestinationAsset().withDestinationName("ck") + .withDestinationVersion("z") + .withRegistryName("xbmljrjyfjleuxix"), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java index effb318ba179..8121f9f100d3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,20 +14,9 @@ public final class EstimatedVMPriceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EstimatedVMPrice model = BinaryData - .fromString("{\"retailPrice\":17.81756965941649,\"osType\":\"Windows\",\"vmTier\":\"Standard\"}") + .fromString("{\"retailPrice\":51.20405351507187,\"osType\":\"Windows\",\"vmTier\":\"Standard\"}") .toObject(EstimatedVMPrice.class); - Assertions.assertEquals(17.81756965941649, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.osType()); - Assertions.assertEquals(VMTier.STANDARD, model.vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrice model = new EstimatedVMPrice().withRetailPrice(17.81756965941649) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrice.class); - Assertions.assertEquals(17.81756965941649, model.retailPrice()); + Assertions.assertEquals(51.20405351507187, model.retailPrice()); Assertions.assertEquals(VMPriceOSType.WINDOWS, model.osType()); Assertions.assertEquals(VMTier.STANDARD, model.vmTier()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java index 0211ec8825d0..2454a08a9a73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java @@ -1,54 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class EstimatedVMPricesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EstimatedVMPrices model = BinaryData.fromString( - "{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":51.60313899930067,\"osType\":\"Linux\",\"vmTier\":\"Spot\"},{\"retailPrice\":9.272665097148082,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":45.65930032967857,\"osType\":\"Linux\",\"vmTier\":\"Spot\"},{\"retailPrice\":12.242522151631585,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}]}") + "{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":49.33737436072607,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":28.57186762072177,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]}") .toObject(EstimatedVMPrices.class); Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(51.60313899930067, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.SPOT, model.values().get(0).vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrices model = new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(51.60313899930067) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.SPOT), - new EstimatedVMPrice().withRetailPrice(9.272665097148082) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice().withRetailPrice(45.65930032967857) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.SPOT), - new EstimatedVMPrice().withRetailPrice(12.242522151631585) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY))); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(51.60313899930067, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.SPOT, model.values().get(0).vmTier()); + Assertions.assertEquals(49.33737436072607, model.values().get(0).retailPrice()); + Assertions.assertEquals(VMPriceOSType.WINDOWS, model.values().get(0).osType()); + Assertions.assertEquals(VMTier.STANDARD, model.values().get(0).vmTier()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java index a46a5b94f31f..11b1b587b9be 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java @@ -1,60 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ExternalFqdnResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExternalFqdnResponseInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"category\":\"knso\",\"endpoints\":[{\"domainName\":\"xbldtlwwrlkdmtn\",\"endpointDetails\":[{}]},{\"domainName\":\"otllxdyhgsyo\",\"endpointDetails\":[{},{},{},{}]}]}},{\"properties\":{\"category\":\"tdtbnnhadooc\",\"endpoints\":[{\"domainName\":\"ikhnvpamqgxqq\",\"endpointDetails\":[{},{}]},{\"domainName\":\"kywggxkallatmel\",\"endpointDetails\":[{},{}]},{\"domainName\":\"iccjzkzivgvvcna\",\"endpointDetails\":[{},{}]},{\"domainName\":\"rnxxmueed\",\"endpointDetails\":[{},{},{}]}]}}]}") + "{\"value\":[{\"properties\":{\"category\":\"wpzntxhdzh\",\"endpoints\":[{\"domainName\":\"bh\",\"endpointDetails\":[{}]}]}},{\"properties\":{\"category\":\"hrxsbk\",\"endpoints\":[{\"domainName\":\"ca\",\"endpointDetails\":[{}]},{\"domainName\":\"p\",\"endpointDetails\":[{},{}]},{\"domainName\":\"kuwbcrnwb\",\"endpointDetails\":[{},{}]}]}}]}") .toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("knso", model.value().get(0).properties().category()); - Assertions.assertEquals("xbldtlwwrlkdmtn", model.value().get(0).properties().endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalFqdnResponseInner model - = new ExternalFqdnResponseInner() - .withValue( - Arrays.asList(new FqdnEndpoints().withProperties(new FqdnEndpointsProperties().withCategory("knso") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("xbldtlwwrlkdmtn") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("otllxdyhgsyo") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), new FqdnEndpointDetail(), - new FqdnEndpointDetail(), new FqdnEndpointDetail()))))), - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties().withCategory("tdtbnnhadooc") - .withEndpoints( - Arrays - .asList( - new FqdnEndpoint().withDomainName("ikhnvpamqgxqq") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("kywggxkallatmel") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("iccjzkzivgvvcna") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("rnxxmueed") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail(), new FqdnEndpointDetail()))))))); - model = BinaryData.fromObject(model).toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("knso", model.value().get(0).properties().category()); - Assertions.assertEquals("xbldtlwwrlkdmtn", model.value().get(0).properties().endpoints().get(0).domainName()); + Assertions.assertEquals("wpzntxhdzh", model.value().get(0).properties().category()); + Assertions.assertEquals("bh", model.value().get(0).properties().endpoints().get(0).domainName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java index 06c7ce622f67..23938c80f3db 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -24,81 +24,88 @@ public final class FeatureAttributionDriftMonitoringSignalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureAttributionDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"FeatureAttributionDrift\",\"metricThreshold\":{\"threshold\":{\"value\":39.98706908901154},\"metric\":\"NormalizedDiscountedCumulativeGain\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"snstl\"},\"productionData\":[{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"pjnx\",\"jobInputType\":\"uri_file\",\"uri\":\"htupsvyouweuiy\",\"columns\":{\"sf\":\"kzts\",\"ztadopgfz\":\"evyllznfhkqyt\",\"gqkzjuqw\":\"gjfcycrsvloyyh\",\"nfdbgsoscienezf\":\"ajquzxpixhyoi\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"ennmf\",\"jobInputType\":\"mltable\",\"uri\":\"pjnrtekwwnthro\",\"columns\":{\"yiurztvktjh\":\"ud\",\"hpuzxkpye\":\"fecqkoqyouerga\",\"zfz\":\"hfdyldhgye\",\"tdereunokakzw\":\"iyuq\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jlwyxedzn\",\"jobInputType\":\"custom_model\",\"uri\":\"rfo\",\"columns\":{\"xfjjtpdyzout\":\"ewvmyifo\",\"gvad\":\"fptofhgnuywez\",\"pytpmpvdnogehlu\":\"aaqwvkg\",\"rtbnu\":\"b\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"faxzsvbxxyjissk\",\"jobInputType\":\"mlflow_model\",\"uri\":\"qocl\",\"columns\":{\"sqeq\":\"oewyhxessmvrkd\",\"esbrujbjpppktl\":\"bdxmd\",\"at\":\"dibfmthi\"}}],\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jrnm\",\"jobInputType\":\"triton_model\",\"uri\":\"zqpl\",\"columns\":{\"nikzs\":\"ih\",\"gkensckhbmcarmo\":\"zfffjilzfbpnt\"}},\"featureDataTypeOverride\":{\"kwykuqdndxl\":\"Numerical\",\"h\":\"Numerical\",\"gapvdgtfpeerscdx\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\"],\"properties\":{\"fmbgacn\":\"c\",\"cmspsanmameubkqi\":\"gfdt\",\"hlq\":\"mlf\",\"uugkw\":\"skkqjmxptuei\"}}") + "{\"signalType\":\"FeatureAttributionDrift\",\"featureDataTypeOverride\":{\"gczfc\":\"Categorical\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"bodetr\"},\"metricThreshold\":{\"metric\":\"NormalizedDiscountedCumulativeGain\",\"threshold\":{\"value\":40.97695756435513}},\"productionData\":[{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"uqk\":\"vftwaiv\",\"nhxmpdxxze\":\"vzgjyp\",\"foxqwecrsn\":\"wwzjwotnxlkfhglh\"},\"dataContext\":\"cselqxovppqibuk\",\"jobInputType\":\"triton_model\",\"uri\":\"vzrlrmlcc\"},{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"nzsieuscplh\":\"jsczivfqbqnasdsy\",\"kxitds\":\"vdgxly\",\"ozsaye\":\"ezsvkolrupjov\"},\"dataContext\":\"azwzlpzbtzuykyki\",\"jobInputType\":\"uri_file\",\"uri\":\"sdyepfno\"},{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"wyqejgaao\":\"ezacfpztga\",\"ngdyfcixrhlcq\":\"ctgkppgkqzkcyzmf\",\"goiutgw\":\"hoe\"},\"dataContext\":\"kahpqhazynta\",\"jobInputType\":\"mlflow_model\",\"uri\":\"hncogmipnml\"},{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"bhikeaqgr\":\"v\",\"dtsdfjy\":\"gpomxpu\",\"mpyzgleo\":\"esocwiqbuou\",\"bwwzvdajf\":\"jsb\"},\"dataContext\":\"n\",\"jobInputType\":\"custom_model\",\"uri\":\"maciqgjjrl\"}],\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"uxtndopgjttbasua\":\"lwixvtbou\",\"lndbeaqbkixv\":\"ap\",\"spugzfeuzjljmph\":\"lwynpbbfqvzfj\"},\"dataContext\":\"yezolgjzmicu\",\"jobInputType\":\"custom_model\",\"uri\":\"oc\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"sdohz\":\"zbuiadhbatecaa\",\"mbwiinjdllwktl\":\"iucbda\"}}") .toObject(FeatureAttributionDriftMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("c", model.properties().get("fmbgacn")); - Assertions.assertEquals(39.98706908901154D, model.metricThreshold().threshold().value()); + Assertions.assertEquals("zbuiadhbatecaa", model.properties().get("sdohz")); + Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("gczfc")); + Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); + Assertions.assertEquals("bodetr", model.featureImportanceSettings().targetColumn()); Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metricThreshold().metric()); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("snstl", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals("pjnx", model.productionData().get(0).dataContext()); - Assertions.assertEquals(JobInputType.URI_FILE, model.productionData().get(0).jobInputType()); - Assertions.assertEquals("htupsvyouweuiy", model.productionData().get(0).uri()); - Assertions.assertEquals("kzts", model.productionData().get(0).columns().get("sf")); - Assertions.assertEquals("jrnm", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("zqpl", model.referenceData().uri()); - Assertions.assertEquals("ih", model.referenceData().columns().get("nikzs")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, - model.featureDataTypeOverride().get("kwykuqdndxl")); + Assertions.assertEquals(40.97695756435513D, model.metricThreshold().threshold().value()); + Assertions.assertEquals("vftwaiv", model.productionData().get(0).columns().get("uqk")); + Assertions.assertEquals("cselqxovppqibuk", model.productionData().get(0).dataContext()); + Assertions.assertEquals(JobInputType.TRITON_MODEL, model.productionData().get(0).jobInputType()); + Assertions.assertEquals("vzrlrmlcc", model.productionData().get(0).uri()); + Assertions.assertEquals("lwixvtbou", model.referenceData().columns().get("uxtndopgjttbasua")); + Assertions.assertEquals("yezolgjzmicu", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); + Assertions.assertEquals("oc", model.referenceData().uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FeatureAttributionDriftMonitoringSignal model = new FeatureAttributionDriftMonitoringSignal() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("fmbgacn", "c", "cmspsanmameubkqi", "gfdt", "hlq", "mlf", "uugkw", "skkqjmxptuei")) - .withMetricThreshold(new FeatureAttributionMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(39.98706908901154D)) - .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN)) + .withNotificationTypes( + Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) + .withProperties(mapOf("sdohz", "zbuiadhbatecaa", "mbwiinjdllwktl", "iucbda")) + .withFeatureDataTypeOverride(mapOf("gczfc", MonitoringFeatureDataType.CATEGORICAL)) .withFeatureImportanceSettings( - new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("snstl")) - .withProductionData(Arrays.asList( - new MonitoringInputDataBase().withDataContext("pjnx") - .withJobInputType(JobInputType.URI_FILE) - .withUri("htupsvyouweuiy") - .withColumns(mapOf("sf", "kzts", "ztadopgfz", "evyllznfhkqyt", "gqkzjuqw", "gjfcycrsvloyyh", - "nfdbgsoscienezf", "ajquzxpixhyoi")), - new MonitoringInputDataBase().withDataContext("ennmf") - .withJobInputType(JobInputType.MLTABLE) - .withUri("pjnrtekwwnthro") - .withColumns(mapOf("yiurztvktjh", "ud", "hpuzxkpye", "fecqkoqyouerga", "zfz", "hfdyldhgye", - "tdereunokakzw", "iyuq")), - new MonitoringInputDataBase().withDataContext("jlwyxedzn") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("rfo") - .withColumns(mapOf("xfjjtpdyzout", "ewvmyifo", "gvad", "fptofhgnuywez", "pytpmpvdnogehlu", - "aaqwvkg", "rtbnu", "b")), - new MonitoringInputDataBase().withDataContext("faxzsvbxxyjissk") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("qocl") - .withColumns(mapOf("sqeq", "oewyhxessmvrkd", "esbrujbjpppktl", "bdxmd", "at", "dibfmthi")))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("jrnm") - .withJobInputType(JobInputType.TRITON_MODEL) - .withUri("zqpl") - .withColumns(mapOf("nikzs", "ih", "gkensckhbmcarmo", "zfffjilzfbpnt"))) - .withFeatureDataTypeOverride(mapOf("kwykuqdndxl", MonitoringFeatureDataType.NUMERICAL, "h", - MonitoringFeatureDataType.NUMERICAL, "gapvdgtfpeerscdx", MonitoringFeatureDataType.NUMERICAL)); + new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("bodetr")) + .withMetricThreshold(new FeatureAttributionMetricThreshold() + .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN) + .withThreshold(new MonitoringThreshold().withValue(40.97695756435513D))) + .withProductionData( + Arrays + .asList( + new MonitoringInputDataBase() + .withColumns( + mapOf("uqk", "vftwaiv", "nhxmpdxxze", "vzgjyp", "foxqwecrsn", "wwzjwotnxlkfhglh")) + .withDataContext("cselqxovppqibuk") + .withJobInputType(JobInputType.TRITON_MODEL) + .withUri("vzrlrmlcc"), + new MonitoringInputDataBase() + .withColumns( + mapOf("nzsieuscplh", "jsczivfqbqnasdsy", "kxitds", "vdgxly", "ozsaye", "ezsvkolrupjov")) + .withDataContext("azwzlpzbtzuykyki") + .withJobInputType(JobInputType.URI_FILE) + .withUri("sdyepfno"), + new MonitoringInputDataBase() + .withColumns( + mapOf("wyqejgaao", "ezacfpztga", "ngdyfcixrhlcq", "ctgkppgkqzkcyzmf", "goiutgw", "hoe")) + .withDataContext("kahpqhazynta") + .withJobInputType(JobInputType.MLFLOW_MODEL) + .withUri("hncogmipnml"), + new MonitoringInputDataBase() + .withColumns(mapOf("bhikeaqgr", "v", "dtsdfjy", "gpomxpu", "mpyzgleo", "esocwiqbuou", + "bwwzvdajf", "jsb")) + .withDataContext("n") + .withJobInputType(JobInputType.CUSTOM_MODEL) + .withUri("maciqgjjrl"))) + .withReferenceData(new MonitoringInputDataBase() + .withColumns( + mapOf("uxtndopgjttbasua", "lwixvtbou", "lndbeaqbkixv", "ap", "spugzfeuzjljmph", "lwynpbbfqvzfj")) + .withDataContext("yezolgjzmicu") + .withJobInputType(JobInputType.CUSTOM_MODEL) + .withUri("oc")); model = BinaryData.fromObject(model).toObject(FeatureAttributionDriftMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("c", model.properties().get("fmbgacn")); - Assertions.assertEquals(39.98706908901154D, model.metricThreshold().threshold().value()); + Assertions.assertEquals("zbuiadhbatecaa", model.properties().get("sdohz")); + Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("gczfc")); + Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); + Assertions.assertEquals("bodetr", model.featureImportanceSettings().targetColumn()); Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metricThreshold().metric()); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("snstl", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals("pjnx", model.productionData().get(0).dataContext()); - Assertions.assertEquals(JobInputType.URI_FILE, model.productionData().get(0).jobInputType()); - Assertions.assertEquals("htupsvyouweuiy", model.productionData().get(0).uri()); - Assertions.assertEquals("kzts", model.productionData().get(0).columns().get("sf")); - Assertions.assertEquals("jrnm", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("zqpl", model.referenceData().uri()); - Assertions.assertEquals("ih", model.referenceData().columns().get("nikzs")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, - model.featureDataTypeOverride().get("kwykuqdndxl")); + Assertions.assertEquals(40.97695756435513D, model.metricThreshold().threshold().value()); + Assertions.assertEquals("vftwaiv", model.productionData().get(0).columns().get("uqk")); + Assertions.assertEquals("cselqxovppqibuk", model.productionData().get(0).dataContext()); + Assertions.assertEquals(JobInputType.TRITON_MODEL, model.productionData().get(0).jobInputType()); + Assertions.assertEquals("vzrlrmlcc", model.productionData().get(0).uri()); + Assertions.assertEquals("lwixvtbou", model.referenceData().columns().get("uxtndopgjttbasua")); + Assertions.assertEquals("yezolgjzmicu", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); + Assertions.assertEquals("oc", model.referenceData().uri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java index eb8f10218a12..cca114549b32 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,19 +15,19 @@ public final class FeatureAttributionMetricThresholdTests { public void testDeserialize() throws Exception { FeatureAttributionMetricThreshold model = BinaryData .fromString( - "{\"threshold\":{\"value\":57.97533067862126},\"metric\":\"NormalizedDiscountedCumulativeGain\"}") + "{\"metric\":\"NormalizedDiscountedCumulativeGain\",\"threshold\":{\"value\":15.12342595695616}}") .toObject(FeatureAttributionMetricThreshold.class); - Assertions.assertEquals(57.97533067862126D, model.threshold().value()); Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metric()); + Assertions.assertEquals(15.12342595695616D, model.threshold().value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FeatureAttributionMetricThreshold model = new FeatureAttributionMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(57.97533067862126D)) - .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN); + .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN) + .withThreshold(new MonitoringThreshold().withValue(15.12342595695616D)); model = BinaryData.fromObject(model).toObject(FeatureAttributionMetricThreshold.class); - Assertions.assertEquals(57.97533067862126D, model.threshold().value()); Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metric()); + Assertions.assertEquals(15.12342595695616D, model.threshold().value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java index 2f094382acb5..d8d053026a8d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,18 @@ public final class FeatureImportanceSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureImportanceSettings model - = BinaryData.fromString("{\"mode\":\"Enabled\",\"targetColumn\":\"udhuaorhjk\"}") + = BinaryData.fromString("{\"mode\":\"Enabled\",\"targetColumn\":\"taneqadynzja\"}") .toObject(FeatureImportanceSettings.class); Assertions.assertEquals(FeatureImportanceMode.ENABLED, model.mode()); - Assertions.assertEquals("udhuaorhjk", model.targetColumn()); + Assertions.assertEquals("taneqadynzja", model.targetColumn()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FeatureImportanceSettings model - = new FeatureImportanceSettings().withMode(FeatureImportanceMode.ENABLED).withTargetColumn("udhuaorhjk"); + = new FeatureImportanceSettings().withMode(FeatureImportanceMode.ENABLED).withTargetColumn("taneqadynzja"); model = BinaryData.fromObject(model).toObject(FeatureImportanceSettings.class); Assertions.assertEquals(FeatureImportanceMode.ENABLED, model.mode()); - Assertions.assertEquals("udhuaorhjk", model.targetColumn()); + Assertions.assertEquals("taneqadynzja", model.targetColumn()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java index 73b59adbbd60..51561b98b9e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java @@ -1,54 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class FeatureInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureInner model = BinaryData.fromString( - "{\"properties\":{\"featureName\":\"itacgxmfcsserx\",\"dataType\":\"String\",\"description\":\"oxhlw\",\"tags\":{\"qrsxyp\":\"j\",\"yuel\":\"uuuybnchrsziz\",\"nlgmtrwahzjmu\":\"etndnbfqyggagf\"},\"properties\":{\"fusuckzmkwklsno\":\"byrplrohkpig\"}},\"id\":\"xmqeqalh\",\"name\":\"jnhgwydyyn\",\"type\":\"svkhgbv\"}") + "{\"properties\":{\"dataType\":\"Binary\",\"featureName\":\"lv\",\"description\":\"oakizvoai\",\"properties\":{\"nuwiguyxlykwph\":\"q\"},\"tags\":{\"lkexaonwivkcqh\":\"cwxhmpej\"}},\"id\":\"hxknlccrmmkyupi\",\"name\":\"ubyqj\",\"type\":\"kakfqfr\"}") .toObject(FeatureInner.class); - Assertions.assertEquals("oxhlw", model.properties().description()); - Assertions.assertEquals("j", model.properties().tags().get("qrsxyp")); - Assertions.assertEquals("byrplrohkpig", model.properties().properties().get("fusuckzmkwklsno")); - Assertions.assertEquals("itacgxmfcsserx", model.properties().featureName()); - Assertions.assertEquals(FeatureDataType.STRING, model.properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureInner model = new FeatureInner().withProperties(new FeatureProperties().withDescription("oxhlw") - .withTags(mapOf("qrsxyp", "j", "yuel", "uuuybnchrsziz", "nlgmtrwahzjmu", "etndnbfqyggagf")) - .withProperties(mapOf("fusuckzmkwklsno", "byrplrohkpig")) - .withFeatureName("itacgxmfcsserx") - .withDataType(FeatureDataType.STRING)); - model = BinaryData.fromObject(model).toObject(FeatureInner.class); - Assertions.assertEquals("oxhlw", model.properties().description()); - Assertions.assertEquals("j", model.properties().tags().get("qrsxyp")); - Assertions.assertEquals("byrplrohkpig", model.properties().properties().get("fusuckzmkwklsno")); - Assertions.assertEquals("itacgxmfcsserx", model.properties().featureName()); - Assertions.assertEquals(FeatureDataType.STRING, model.properties().dataType()); - } - - // 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; + Assertions.assertEquals("oakizvoai", model.properties().description()); + Assertions.assertEquals("q", model.properties().properties().get("nuwiguyxlykwph")); + Assertions.assertEquals("cwxhmpej", model.properties().tags().get("lkexaonwivkcqh")); + Assertions.assertEquals(FeatureDataType.BINARY, model.properties().dataType()); + Assertions.assertEquals("lv", model.properties().featureName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java index e3724ab33108..35154a32dac0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java @@ -1,54 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.FeatureDataType; import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class FeaturePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureProperties model = BinaryData.fromString( - "{\"featureName\":\"anarfdlpukhpyrne\",\"dataType\":\"Binary\",\"description\":\"pe\",\"tags\":{\"dbhfhp\":\"hnmgbroux\",\"zoyw\":\"paz\",\"htuevrhrljy\":\"xhpdulontacnpqwt\"},\"properties\":{\"duugwbsre\":\"wxhn\",\"nlvhhtklnvnafvv\":\"rfqkfuar\",\"lcqxypokk\":\"yfedevjbo\",\"zng\":\"minqcym\"}}") + "{\"dataType\":\"Binary\",\"featureName\":\"il\",\"description\":\"dxjascowvfdj\",\"properties\":{\"vyfijdkzuqnw\":\"xphlkksnmg\",\"uqoly\":\"it\"},\"tags\":{\"hyqezvqq\":\"uqwqulsutrjbhxyk\"}}") .toObject(FeatureProperties.class); - Assertions.assertEquals("pe", model.description()); - Assertions.assertEquals("hnmgbroux", model.tags().get("dbhfhp")); - Assertions.assertEquals("wxhn", model.properties().get("duugwbsre")); - Assertions.assertEquals("anarfdlpukhpyrne", model.featureName()); + Assertions.assertEquals("dxjascowvfdj", model.description()); + Assertions.assertEquals("xphlkksnmg", model.properties().get("vyfijdkzuqnw")); + Assertions.assertEquals("uqwqulsutrjbhxyk", model.tags().get("hyqezvqq")); Assertions.assertEquals(FeatureDataType.BINARY, model.dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureProperties model = new FeatureProperties().withDescription("pe") - .withTags(mapOf("dbhfhp", "hnmgbroux", "zoyw", "paz", "htuevrhrljy", "xhpdulontacnpqwt")) - .withProperties( - mapOf("duugwbsre", "wxhn", "nlvhhtklnvnafvv", "rfqkfuar", "lcqxypokk", "yfedevjbo", "zng", "minqcym")) - .withFeatureName("anarfdlpukhpyrne") - .withDataType(FeatureDataType.BINARY); - model = BinaryData.fromObject(model).toObject(FeatureProperties.class); - Assertions.assertEquals("pe", model.description()); - Assertions.assertEquals("hnmgbroux", model.tags().get("dbhfhp")); - Assertions.assertEquals("wxhn", model.properties().get("duugwbsre")); - Assertions.assertEquals("anarfdlpukhpyrne", model.featureName()); - Assertions.assertEquals(FeatureDataType.BINARY, model.dataType()); - } - - // 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; + Assertions.assertEquals("il", model.featureName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java index 4c65883d342e..5b8e17a83d28 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java @@ -1,74 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner; +import com.azure.resourcemanager.machinelearning.implementation.models.FeatureResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import com.azure.resourcemanager.machinelearning.models.FeatureResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class FeatureResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"featureName\":\"zonwpngajinnixj\",\"dataType\":\"Long\",\"description\":\"mjfjmyccxlzhcox\",\"tags\":{\"sfnrdtjxt\":\"ekhenl\",\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\",\"tuqfecjxeygtu\":\"iesfuug\"},\"properties\":{\"uewmrswnjlxuzrhw\":\"ic\",\"dohzjq\":\"usxjbaqehg\",\"o\":\"tu\"}},\"id\":\"e\",\"name\":\"xncnwfe\",\"type\":\"bnwgfmxj\"},{\"properties\":{\"featureName\":\"g\",\"dataType\":\"Binary\",\"description\":\"dlfgtdysnaq\",\"tags\":{\"zjrwdkqze\":\"qbctqha\",\"fza\":\"yjleziunjx\",\"eg\":\"tkw\",\"uooqjagmdit\":\"amlbnseqacjjvpil\"},\"properties\":{\"tdtpdelqacslmo\":\"iookjbsah\",\"xofvcjk\":\"oebn\",\"xejw\":\"dirazf\"}},\"id\":\"mdujtmvcopexcm\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"},{\"properties\":{\"featureName\":\"jk\",\"dataType\":\"Double\",\"description\":\"idfv\",\"tags\":{\"ikayiansharuj\":\"lxnfuijtkbusqogs\"},\"properties\":{\"qhjpenuygbqe\":\"qxfzyjqttvwk\"}},\"id\":\"ekewvnqvcdlguauc\",\"name\":\"f\",\"type\":\"jwnlax\"}],\"nextLink\":\"njqikcz\"}") + "{\"value\":[{\"properties\":{\"dataType\":\"Integer\",\"featureName\":\"tb\",\"description\":\"exreu\",\"properties\":{\"vfwhreagkhyxv\":\"wtl\",\"mdgglmepjpfs\":\"qtvbczsu\"},\"tags\":{\"angpszngafpgyl\":\"g\",\"oady\":\"vecjujcn\",\"rgjfoknubnoi\":\"dm\"}},\"id\":\"kpztrgd\",\"name\":\"x\",\"type\":\"coqra\"}],\"nextLink\":\"ugyxpqit\"}") .toObject(FeatureResourceArmPaginatedResult.class); - Assertions.assertEquals("mjfjmyccxlzhcox", model.value().get(0).properties().description()); - Assertions.assertEquals("ekhenl", model.value().get(0).properties().tags().get("sfnrdtjxt")); - Assertions.assertEquals("ic", model.value().get(0).properties().properties().get("uewmrswnjlxuzrhw")); - Assertions.assertEquals("zonwpngajinnixj", model.value().get(0).properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, model.value().get(0).properties().dataType()); - Assertions.assertEquals("njqikcz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureResourceArmPaginatedResult model - = new FeatureResourceArmPaginatedResult().withValue(Arrays.asList( - new FeatureInner().withProperties(new FeatureProperties() - .withDescription("mjfjmyccxlzhcox") - .withTags(mapOf("sfnrdtjxt", "ekhenl", "cq", "r", "uslvyjtcvuwkasi", "jvidttge", "tuqfecjxeygtu", - "iesfuug")) - .withProperties(mapOf("uewmrswnjlxuzrhw", "ic", "dohzjq", "usxjbaqehg", "o", "tu")) - .withFeatureName("zonwpngajinnixj") - .withDataType(FeatureDataType.LONG)), - new FeatureInner().withProperties(new FeatureProperties().withDescription("dlfgtdysnaq") - .withTags(mapOf("zjrwdkqze", "qbctqha", "fza", "yjleziunjx", "eg", "tkw", "uooqjagmdit", - "amlbnseqacjjvpil")) - .withProperties(mapOf("tdtpdelqacslmo", "iookjbsah", "xofvcjk", "oebn", "xejw", "dirazf")) - .withFeatureName("g") - .withDataType(FeatureDataType.BINARY)), - new FeatureInner().withProperties(new FeatureProperties().withDescription("idfv") - .withTags(mapOf("ikayiansharuj", "lxnfuijtkbusqogs")) - .withProperties(mapOf("qhjpenuygbqe", "qxfzyjqttvwk")) - .withFeatureName("jk") - .withDataType(FeatureDataType.DOUBLE)))) - .withNextLink("njqikcz"); - model = BinaryData.fromObject(model).toObject(FeatureResourceArmPaginatedResult.class); - Assertions.assertEquals("mjfjmyccxlzhcox", model.value().get(0).properties().description()); - Assertions.assertEquals("ekhenl", model.value().get(0).properties().tags().get("sfnrdtjxt")); - Assertions.assertEquals("ic", model.value().get(0).properties().properties().get("uewmrswnjlxuzrhw")); - Assertions.assertEquals("zonwpngajinnixj", model.value().get(0).properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, model.value().get(0).properties().dataType()); - Assertions.assertEquals("njqikcz", 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; + Assertions.assertEquals("exreu", model.value().get(0).properties().description()); + Assertions.assertEquals("wtl", model.value().get(0).properties().properties().get("vfwhreagkhyxv")); + Assertions.assertEquals("g", model.value().get(0).properties().tags().get("angpszngafpgyl")); + Assertions.assertEquals(FeatureDataType.INTEGER, model.value().get(0).properties().dataType()); + Assertions.assertEquals("tb", model.value().get(0).properties().featureName()); + Assertions.assertEquals("ugyxpqit", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java index f802cd4499cb..aab8cccecc7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,22 +13,22 @@ public final class FeatureStoreSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureStoreSettings model = BinaryData.fromString( - "{\"computeRuntime\":{\"sparkRuntimeVersion\":\"qsrxybzqqed\"},\"offlineStoreConnectionName\":\"tbciqfouflmm\",\"onlineStoreConnectionName\":\"zsm\"}") + "{\"computeRuntime\":{\"sparkRuntimeVersion\":\"uitnwuiz\"},\"offlineStoreConnectionName\":\"zxufiz\",\"onlineStoreConnectionName\":\"kyfi\"}") .toObject(FeatureStoreSettings.class); - Assertions.assertEquals("qsrxybzqqed", model.computeRuntime().sparkRuntimeVersion()); - Assertions.assertEquals("tbciqfouflmm", model.offlineStoreConnectionName()); - Assertions.assertEquals("zsm", model.onlineStoreConnectionName()); + Assertions.assertEquals("uitnwuiz", model.computeRuntime().sparkRuntimeVersion()); + Assertions.assertEquals("zxufiz", model.offlineStoreConnectionName()); + Assertions.assertEquals("kyfi", model.onlineStoreConnectionName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeatureStoreSettings model = new FeatureStoreSettings() - .withComputeRuntime(new ComputeRuntimeDto().withSparkRuntimeVersion("qsrxybzqqed")) - .withOfflineStoreConnectionName("tbciqfouflmm") - .withOnlineStoreConnectionName("zsm"); + FeatureStoreSettings model + = new FeatureStoreSettings().withComputeRuntime(new ComputeRuntimeDto().withSparkRuntimeVersion("uitnwuiz")) + .withOfflineStoreConnectionName("zxufiz") + .withOnlineStoreConnectionName("kyfi"); model = BinaryData.fromObject(model).toObject(FeatureStoreSettings.class); - Assertions.assertEquals("qsrxybzqqed", model.computeRuntime().sparkRuntimeVersion()); - Assertions.assertEquals("tbciqfouflmm", model.offlineStoreConnectionName()); - Assertions.assertEquals("zsm", model.onlineStoreConnectionName()); + Assertions.assertEquals("uitnwuiz", model.computeRuntime().sparkRuntimeVersion()); + Assertions.assertEquals("zxufiz", model.offlineStoreConnectionName()); + Assertions.assertEquals("kyfi", model.onlineStoreConnectionName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java index 5bb094f67de4..5d0ec2f4a432 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,17 @@ public final class FeatureSubsetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FeatureSubset model = BinaryData - .fromString( - "{\"filterType\":\"FeatureSubset\",\"features\":[\"huuonjkkxukg\",\"e\",\"vvpxjoeg\",\"jojlle\"]}") + FeatureSubset model = BinaryData.fromString( + "{\"filterType\":\"FeatureSubset\",\"features\":[\"riuomzczfkic\",\"evsaa\",\"wspcaxikhfjqebg\",\"cx\"]}") .toObject(FeatureSubset.class); - Assertions.assertEquals("huuonjkkxukg", model.features().get(0)); + Assertions.assertEquals("riuomzczfkic", model.features().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FeatureSubset model - = new FeatureSubset().withFeatures(Arrays.asList("huuonjkkxukg", "e", "vvpxjoeg", "jojlle")); + = new FeatureSubset().withFeatures(Arrays.asList("riuomzczfkic", "evsaa", "wspcaxikhfjqebg", "cx")); model = BinaryData.fromObject(model).toObject(FeatureSubset.class); - Assertions.assertEquals("huuonjkkxukg", model.features().get(0)); + Assertions.assertEquals("riuomzczfkic", model.features().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java index 5de019d54fb9..5b1eca8c9ae4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,19 @@ public final class FeatureWindowTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeatureWindow model = BinaryData - .fromString("{\"featureWindowStart\":\"2021-05-01T05:25:27Z\",\"featureWindowEnd\":\"2021-05-01T01:36Z\"}") + .fromString( + "{\"featureWindowEnd\":\"2021-05-17T02:37:06Z\",\"featureWindowStart\":\"2021-10-11T02:19:13Z\"}") .toObject(FeatureWindow.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T05:25:27Z"), model.featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T01:36Z"), model.featureWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T02:37:06Z"), model.featureWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T02:19:13Z"), model.featureWindowStart()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeatureWindow model = new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2021-05-01T05:25:27Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-05-01T01:36Z")); + FeatureWindow model = new FeatureWindow().withFeatureWindowEnd(OffsetDateTime.parse("2021-05-17T02:37:06Z")) + .withFeatureWindowStart(OffsetDateTime.parse("2021-10-11T02:19:13Z")); model = BinaryData.fromObject(model).toObject(FeatureWindow.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T05:25:27Z"), model.featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T01:36Z"), model.featureWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-17T02:37:06Z"), model.featureWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T02:19:13Z"), model.featureWindowStart()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java index 998857fe3239..6b77df49b112 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.Feature; @@ -22,24 +22,24 @@ public final class FeaturesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"featureName\":\"lcldoyohu\",\"dataType\":\"Long\",\"description\":\"lop\",\"tags\":{\"wfrgdmbgbht\":\"sylwsmdo\"},\"properties\":{\"lgrrsk\":\"iustkqywab\",\"dxgdjudek\":\"tzbkeeohpf\",\"zmehcdfdxthqnz\":\"xh\",\"ueweivaje\":\"ukirdedijdhzkw\"}},\"id\":\"wlxdknxctglzbcxd\",\"name\":\"sgw\",\"type\":\"gyiw\"}"; + = "{\"properties\":{\"dataType\":\"Binary\",\"featureName\":\"tclveqdqtzsh\",\"description\":\"wjxry\",\"properties\":{\"wbd\":\"sghhcmqdlk\",\"ulmka\":\"kbv\",\"wcxxccf\":\"dnxbssatpialrq\",\"iyvrexitpz\":\"fvoz\"},\"tags\":{\"awbncljkhmsobua\":\"nosclujywwumbus\",\"t\":\"okiclrmmudvo\",\"ttlizdoys\":\"scidkwzn\"}},\"id\":\"gbogdjwuybcppdv\",\"name\":\"o\",\"type\":\"kvkbpmkupb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Feature response = manager.features() - .getWithResponse("bizxq", "dmhzbcujdzl", "yermjemny", "hoqpbfjfcbweabpt", "mkuquvcgvn", + .getWithResponse("zuwwzc", "igbjbelnqalbso", "xajsiueai", "qjb", "zbwxuypcuri", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lop", response.properties().description()); - Assertions.assertEquals("sylwsmdo", response.properties().tags().get("wfrgdmbgbht")); - Assertions.assertEquals("iustkqywab", response.properties().properties().get("lgrrsk")); - Assertions.assertEquals("lcldoyohu", response.properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, response.properties().dataType()); + Assertions.assertEquals("wjxry", response.properties().description()); + Assertions.assertEquals("sghhcmqdlk", response.properties().properties().get("wbd")); + Assertions.assertEquals("nosclujywwumbus", response.properties().tags().get("awbncljkhmsobua")); + Assertions.assertEquals(FeatureDataType.BINARY, response.properties().dataType()); + Assertions.assertEquals("tclveqdqtzsh", response.properties().featureName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java index 53f749a5d473..bbc163a1efb3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.Feature; @@ -24,23 +24,23 @@ public final class FeaturesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"featureName\":\"bqrqbpiqfstkdlyj\",\"dataType\":\"Float\",\"description\":\"ef\",\"tags\":{\"kz\":\"kf\",\"xnnitrugotf\":\"chrkiwpadnhf\",\"exbrvbdyriyray\":\"dlfe\",\"cl\":\"igksni\"},\"properties\":{\"xeigyddp\":\"rezqx\"}},\"id\":\"mbxerz\",\"name\":\"pcr\",\"type\":\"lwvcnm\"}]}"; + = "{\"value\":[{\"properties\":{\"dataType\":\"Integer\",\"featureName\":\"anlvo\",\"description\":\"vzhdncqcuwt\",\"properties\":{\"egxlzd\":\"gqlnolspvxp\",\"smnwsffia\":\"atptzkmfvdrkcw\"},\"tags\":{\"zhrhki\":\"frzzxirxxkmozkd\",\"uuzny\":\"vpyznjwm\",\"xorhsxcsoaxcme\":\"bzzwsesqytktvof\",\"xynkubwk\":\"kpxt\"}},\"id\":\"hslnbyiowet\",\"name\":\"wjvxycygcvgebfe\",\"type\":\"tyantecvttkgopdj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.features() - .list("eirjrkak", "vnd", "bmazlxlbd", "kidgqeyqrlgpkypb", "kpardo", "dtedxz", "yhbzmgzsyt", "pfslrx", - ListViewType.ALL, 1571501996, com.azure.core.util.Context.NONE); + .list("kcwauylkbdskrp", "frtlukaf", "zylemp", "hyuxxeike", "npw", "nhqafuvvys", "hjkxg", "mesxjeqqfy", + ListViewType.ACTIVE_ONLY, 1347712591, com.azure.core.util.Context.NONE); - Assertions.assertEquals("ef", response.iterator().next().properties().description()); - Assertions.assertEquals("kf", response.iterator().next().properties().tags().get("kz")); - Assertions.assertEquals("rezqx", response.iterator().next().properties().properties().get("xeigyddp")); - Assertions.assertEquals("bqrqbpiqfstkdlyj", response.iterator().next().properties().featureName()); - Assertions.assertEquals(FeatureDataType.FLOAT, response.iterator().next().properties().dataType()); + Assertions.assertEquals("vzhdncqcuwt", response.iterator().next().properties().description()); + Assertions.assertEquals("gqlnolspvxp", response.iterator().next().properties().properties().get("egxlzd")); + Assertions.assertEquals("frzzxirxxkmozkd", response.iterator().next().properties().tags().get("zhrhki")); + Assertions.assertEquals(FeatureDataType.INTEGER, response.iterator().next().properties().dataType()); + Assertions.assertEquals("anlvo", response.iterator().next().properties().featureName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java index a4516c9489ba..65dc88fc6311 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,27 +15,26 @@ public final class FeaturesetContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"pnwjfujq\",\"nextVersion\":\"fcbahhp\",\"description\":\"ofoiy\",\"tags\":{\"ndviauogphuartvt\":\"filkmkkholv\"},\"properties\":{\"ahmnxhkxjqirw\":\"yefchnm\",\"ewmozqvbu\":\"weooxffifhxwrs\",\"ttaboidvmfqh\":\"qmamhsycxhxzga\",\"mtdherngb\":\"pubowsepdfg\"}},\"id\":\"juahokqto\",\"name\":\"kauxof\",\"type\":\"hfphwpnulaiywze\"}") + "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"ldotjvdkwisws\",\"nextVersion\":\"kjtasb\",\"description\":\"ispkxkdtx\",\"properties\":{\"mb\":\"dlqvtwknvg\",\"tgroesh\":\"gtywatmqaqkue\",\"yf\":\"ygzc\",\"faoytehqpuv\":\"x\"},\"tags\":{\"dwckygroe\":\"qm\",\"dljdjuskb\":\"n\",\"n\":\"req\",\"lwryshwddkvbxgkq\":\"ceysfaqeg\"}},\"id\":\"ybwptda\",\"name\":\"arvvlfnt\",\"type\":\"mt\"}") .toObject(FeaturesetContainerInner.class); - Assertions.assertEquals("ofoiy", model.properties().description()); - Assertions.assertEquals("filkmkkholv", model.properties().tags().get("ndviauogphuartvt")); - Assertions.assertEquals("yefchnm", model.properties().properties().get("ahmnxhkxjqirw")); - Assertions.assertEquals(false, model.properties().isArchived()); + Assertions.assertEquals("ispkxkdtx", model.properties().description()); + Assertions.assertEquals("dlqvtwknvg", model.properties().properties().get("mb")); + Assertions.assertEquals("qm", model.properties().tags().get("dwckygroe")); + Assertions.assertFalse(model.properties().isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturesetContainerInner model - = new FeaturesetContainerInner().withProperties(new FeaturesetContainerProperties().withDescription("ofoiy") - .withTags(mapOf("ndviauogphuartvt", "filkmkkholv")) - .withProperties(mapOf("ahmnxhkxjqirw", "yefchnm", "ewmozqvbu", "weooxffifhxwrs", "ttaboidvmfqh", - "qmamhsycxhxzga", "mtdherngb", "pubowsepdfg")) + FeaturesetContainerInner model = new FeaturesetContainerInner() + .withProperties(new FeaturesetContainerProperties().withDescription("ispkxkdtx") + .withProperties(mapOf("mb", "dlqvtwknvg", "tgroesh", "gtywatmqaqkue", "yf", "ygzc", "faoytehqpuv", "x")) + .withTags(mapOf("dwckygroe", "qm", "dljdjuskb", "n", "n", "req", "lwryshwddkvbxgkq", "ceysfaqeg")) .withIsArchived(false)); model = BinaryData.fromObject(model).toObject(FeaturesetContainerInner.class); - Assertions.assertEquals("ofoiy", model.properties().description()); - Assertions.assertEquals("filkmkkholv", model.properties().tags().get("ndviauogphuartvt")); - Assertions.assertEquals("yefchnm", model.properties().properties().get("ahmnxhkxjqirw")); - Assertions.assertEquals(false, model.properties().isArchived()); + Assertions.assertEquals("ispkxkdtx", model.properties().description()); + Assertions.assertEquals("dlqvtwknvg", model.properties().properties().get("mb")); + Assertions.assertEquals("qm", model.properties().tags().get("dwckygroe")); + Assertions.assertFalse(model.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java index b48202b04317..398a7d1f63e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,25 +14,25 @@ public final class FeaturesetContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"wkojpllndnpd\",\"nextVersion\":\"pqafgfugsnnfhy\",\"description\":\"efy\",\"tags\":{\"rmlmuowo\":\"octfjgtixrjvzuyt\"},\"properties\":{\"p\":\"uir\"}}") + "{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"azerohzrsq\",\"nextVersion\":\"sxkdnwqapfgsdpc\",\"description\":\"ssmzhhkuui\",\"properties\":{\"ctekval\":\"q\"},\"tags\":{\"emxhzzy\":\"tjqvqyvweht\",\"sxivzrrryvei\":\"ev\",\"yzatvfuzkaft\":\"ipsk\"}}") .toObject(FeaturesetContainerProperties.class); - Assertions.assertEquals("efy", model.description()); - Assertions.assertEquals("octfjgtixrjvzuyt", model.tags().get("rmlmuowo")); - Assertions.assertEquals("uir", model.properties().get("p")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("ssmzhhkuui", model.description()); + Assertions.assertEquals("q", model.properties().get("ctekval")); + Assertions.assertEquals("tjqvqyvweht", model.tags().get("emxhzzy")); + Assertions.assertTrue(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturesetContainerProperties model = new FeaturesetContainerProperties().withDescription("efy") - .withTags(mapOf("rmlmuowo", "octfjgtixrjvzuyt")) - .withProperties(mapOf("p", "uir")) - .withIsArchived(false); + FeaturesetContainerProperties model = new FeaturesetContainerProperties().withDescription("ssmzhhkuui") + .withProperties(mapOf("ctekval", "q")) + .withTags(mapOf("emxhzzy", "tjqvqyvweht", "sxivzrrryvei", "ev", "yzatvfuzkaft", "ipsk")) + .withIsArchived(true); model = BinaryData.fromObject(model).toObject(FeaturesetContainerProperties.class); - Assertions.assertEquals("efy", model.description()); - Assertions.assertEquals("octfjgtixrjvzuyt", model.tags().get("rmlmuowo")); - Assertions.assertEquals("uir", model.properties().get("p")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("ssmzhhkuui", model.description()); + Assertions.assertEquals("q", model.properties().get("ctekval")); + Assertions.assertEquals("tjqvqyvweht", model.tags().get("emxhzzy")); + Assertions.assertTrue(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java index abfa7683f1bb..912ebf3bdd73 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java @@ -1,64 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetContainerResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class FeaturesetContainerResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"ov\",\"nextVersion\":\"pikqmh\",\"description\":\"owjrmzvuporqz\",\"tags\":{\"xcnqmxqpswokmvkh\":\"ydzvkf\",\"wtglxx\":\"ggdhbemzqkzszuw\"},\"properties\":{\"gjsxv\":\"fpgpicrmnzhrgm\",\"qgvriibakcla\":\"qcbfrmbodths\",\"gmwohqfzizvu\":\"jfrnxousxauzlwv\"}},\"id\":\"mk\",\"name\":\"svth\",\"type\":\"wpztekovmribia\"},{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"cfotangcfhnykzcu\",\"nextVersion\":\"wvxwlmzqwmvt\",\"description\":\"jmxmcuqud\",\"tags\":{\"dkvgfabuiyjibuzp\":\"clxyn\"},\"properties\":{\"pgoxgji\":\"gneik\",\"rrxxgewpktvq\":\"qhibtozipqwjedm\"}},\"id\":\"kmqp\",\"name\":\"o\",\"type\":\"hlfbcgwgc\"}],\"nextLink\":\"xoe\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"igsyeipqdsmjt\",\"nextVersion\":\"qgdgkkile\",\"description\":\"kcsmk\",\"properties\":{\"oygbdgwumgxd\":\"tbbaedorvvmqf\",\"bgd\":\"dhp\",\"vjsaqwotm\":\"xjd\",\"xaptefhexcgjok\":\"wllcolsr\"},\"tags\":{\"eksnbksdqhjvyk\":\"nhvlqjbekp\",\"vnwqjwgo\":\"xeslkhhustcpoqm\",\"bkjbz\":\"nlejjjkxybwf\",\"nsxfwu\":\"ensvkzykjtj\"}},\"id\":\"cdp\",\"name\":\"upnqrmgjfb\",\"type\":\"kuwxeoiojfizfavk\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"yay\",\"nextVersion\":\"mfzsbf\",\"description\":\"rzx\",\"properties\":{\"ejwwviyoyps\":\"wsrsxkrplbja\",\"qwjhqkbiwetpozyc\":\"hbrnnhjx\",\"ledynojpz\":\"qiqyhgfsetzlexbs\",\"ljselp\":\"uwfbzkkdtnhqsy\"},\"tags\":{\"by\":\"afvafh\",\"rsofpltdbmairrh\":\"ccbevxrhyzdf\",\"npq\":\"hfnrac\",\"uuj\":\"g\"}},\"id\":\"uhd\",\"name\":\"wsigrbjbxsj\",\"type\":\"bvitvqkjya\"}],\"nextLink\":\"umtggmuwdchozfn\"}") .toObject(FeaturesetContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("owjrmzvuporqz", model.value().get(0).properties().description()); - Assertions.assertEquals("ydzvkf", model.value().get(0).properties().tags().get("xcnqmxqpswokmvkh")); - Assertions.assertEquals("fpgpicrmnzhrgm", model.value().get(0).properties().properties().get("gjsxv")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("xoe", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetContainerResourceArmPaginatedResult model - = new FeaturesetContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new FeaturesetContainerInner() - .withProperties(new FeaturesetContainerProperties().withDescription("owjrmzvuporqz") - .withTags(mapOf("xcnqmxqpswokmvkh", "ydzvkf", "wtglxx", "ggdhbemzqkzszuw")) - .withProperties(mapOf("gjsxv", "fpgpicrmnzhrgm", "qgvriibakcla", "qcbfrmbodths", "gmwohqfzizvu", - "jfrnxousxauzlwv")) - .withIsArchived(false)), - new FeaturesetContainerInner() - .withProperties(new FeaturesetContainerProperties().withDescription("jmxmcuqud") - .withTags(mapOf("dkvgfabuiyjibuzp", "clxyn")) - .withProperties(mapOf("pgoxgji", "gneik", "rrxxgewpktvq", "qhibtozipqwjedm")) - .withIsArchived(false)))) - .withNextLink("xoe"); - model = BinaryData.fromObject(model).toObject(FeaturesetContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("owjrmzvuporqz", model.value().get(0).properties().description()); - Assertions.assertEquals("ydzvkf", model.value().get(0).properties().tags().get("xcnqmxqpswokmvkh")); - Assertions.assertEquals("fpgpicrmnzhrgm", model.value().get(0).properties().properties().get("gjsxv")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("xoe", 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; + Assertions.assertEquals("kcsmk", model.value().get(0).properties().description()); + Assertions.assertEquals("tbbaedorvvmqf", model.value().get(0).properties().properties().get("oygbdgwumgxd")); + Assertions.assertEquals("nhvlqjbekp", model.value().get(0).properties().tags().get("eksnbksdqhjvyk")); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("umtggmuwdchozfn", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java index 317df1aa1f37..a604012a8cce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; @@ -24,29 +24,29 @@ public final class FeaturesetContainersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"d\",\"nextVersion\":\"bjzxrpxji\",\"description\":\"upirvdonka\",\"tags\":{\"n\":\"vgjgcwwuusjjhtcy\",\"svwq\":\"highnxhgmfrnk\"},\"properties\":{\"auksttximeztasf\":\"jteqlujmmkn\"}},\"id\":\"mecweohlerpt\",\"name\":\"wvzapybdeea\",\"type\":\"igbpabacp\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"bctitexrbalv\",\"nextVersion\":\"dqilp\",\"description\":\"hxf\",\"properties\":{\"ckbjvdxhyf\":\"pdyrqlazfjl\"},\"tags\":{\"fdz\":\"de\"}},\"id\":\"alkqlvbkz\",\"name\":\"iyrnwwoivin\",\"type\":\"yo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturesetContainer response = manager.featuresetContainers() - .define("xy") - .withExistingWorkspace("iweyuigyzsebk", "fykgmwurcxxj") - .withProperties(new FeaturesetContainerProperties().withDescription("nk") - .withTags(mapOf("lwujobdqi", "pmqffgjsqqqairoo", "v", "pp", "trwgljfatezdxq", "ovijpmegnkrvtfbi")) - .withProperties(mapOf("lgnieeqjdfxxxnn", "phgimyomje", "rijbiterqfu", "uxkepga", "dd", "errcanlpf", - "qawupqkvmy", "wpg")) - .withIsArchived(false)) + .define("bibfviacghygmt") + .withExistingWorkspace("nbcpiadjslvxs", "lcd") + .withProperties(new FeaturesetContainerProperties().withDescription("w") + .withProperties( + mapOf("fjuvhuo", "zmsyezx", "zdheknmcvm", "fotwvkuhtdxdco", "kccru", "iundifuaht", "foqody", "rz")) + .withTags(mapOf("lvtiploaws", "yx", "ynjtudfhpelza", "ctilbxn")) + .withIsArchived(true)) .create(); - Assertions.assertEquals("upirvdonka", response.properties().description()); - Assertions.assertEquals("vgjgcwwuusjjhtcy", response.properties().tags().get("n")); - Assertions.assertEquals("jteqlujmmkn", response.properties().properties().get("auksttximeztasf")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("hxf", response.properties().description()); + Assertions.assertEquals("pdyrqlazfjl", response.properties().properties().get("ckbjvdxhyf")); + Assertions.assertEquals("de", response.properties().tags().get("fdz")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java index 0cb46c2f66f7..741ce00ee052 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.featuresetContainers() - .delete("flhhbupqovuw", "vqihmqhqjd", "bgcemjt", com.azure.core.util.Context.NONE); + manager.featuresetContainers().delete("u", "mzozb", "htvughu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java index edbcb7328bfc..00246fe0ce25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; @@ -21,22 +21,22 @@ public final class FeaturesetContainersGetEntityWithResponseMockTests { @Test public void testGetEntityWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"pxe\",\"nextVersion\":\"becxuvkbao\",\"description\":\"vyhgpgjdrng\",\"tags\":{\"ucyackgka\":\"eepukuofzwizt\"},\"properties\":{\"smurjab\":\"gtpcohfksixvwkpc\"}},\"id\":\"xohagcojgmyzjd\",\"name\":\"mqe\",\"type\":\"rqtgdipbn\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"igitra\",\"nextVersion\":\"dy\",\"description\":\"irnbpiddvbxqxoli\",\"properties\":{\"mzvtzyfktba\":\"lsr\",\"zyzxkrdfdssof\":\"hasnjalkiyzlkqy\",\"tkqvi\":\"xyst\"},\"tags\":{\"eiydoqbr\":\"iqajfwzubfgoqvzb\",\"zjtrjawpz\":\"xlxptxhedn\",\"cmkwcyeljni\":\"tseixpkrwgzn\"}},\"id\":\"gzxb\",\"name\":\"nyy\",\"type\":\"hct\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturesetContainer response = manager.featuresetContainers() - .getEntityWithResponse("ljxagcalyq", "craxilzdxcm", "dmdsypksfrhi", com.azure.core.util.Context.NONE) + .getEntityWithResponse("kkzjsnxz", "jxaayxpdzvgyuj", "xj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vyhgpgjdrng", response.properties().description()); - Assertions.assertEquals("eepukuofzwizt", response.properties().tags().get("ucyackgka")); - Assertions.assertEquals("gtpcohfksixvwkpc", response.properties().properties().get("smurjab")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("irnbpiddvbxqxoli", response.properties().description()); + Assertions.assertEquals("lsr", response.properties().properties().get("mzvtzyfktba")); + Assertions.assertEquals("iqajfwzubfgoqvzb", response.properties().tags().get("eiydoqbr")); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java index 26153b624830..ed192e6ed8ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; @@ -23,23 +23,23 @@ public final class FeaturesetContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"vpdu\",\"nextVersion\":\"plpdzriettnmiuf\",\"description\":\"fqmlmbyqyekuw\",\"tags\":{\"rt\":\"zpegumydo\"},\"properties\":{\"evqjdxiiqwqbvanv\":\"ecgbxrc\",\"nkruywrxnksmaebd\":\"pxnaaii\",\"wfuxnt\":\"xjsmrseauxeovbgr\"}},\"id\":\"gylleketkv\",\"name\":\"ptqhatfg\",\"type\":\"hhbxgfhgkdm\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"ebuafbddmcfq\",\"nextVersion\":\"mldh\",\"description\":\"zohtag\",\"properties\":{\"obovsvhbtdgxgllm\":\"hdqhqgrksypoosfx\",\"wem\":\"eoubvfxi\"},\"tags\":{\"aicmvbsjtfqwlbe\":\"hmvvz\",\"i\":\"czzscgropuq\"}},\"id\":\"gkoci\",\"name\":\"ikqlyoorme\",\"type\":\"gglqijykckyhxu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.featuresetContainers() - .list("pny", "luivrjselauzrpes", "eb", "egzxrusafvf", ListViewType.ALL, 1984547680, "a", "uoh", - "kimntxdvlqmn", com.azure.core.util.Context.NONE); + .list("iql", "vnfyfyftkvzb", "lj", "ki", ListViewType.ARCHIVED_ONLY, 1185344601, "gfyinmajjzpl", "twf", + "fl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fqmlmbyqyekuw", response.iterator().next().properties().description()); - Assertions.assertEquals("zpegumydo", response.iterator().next().properties().tags().get("rt")); - Assertions.assertEquals("ecgbxrc", - response.iterator().next().properties().properties().get("evqjdxiiqwqbvanv")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("zohtag", response.iterator().next().properties().description()); + Assertions.assertEquals("hdqhqgrksypoosfx", + response.iterator().next().properties().properties().get("obovsvhbtdgxgllm")); + Assertions.assertEquals("hmvvz", response.iterator().next().properties().tags().get("aicmvbsjtfqwlbe")); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java index 1624a6353867..6dddf9204fca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class FeaturesetSpecificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetSpecification model - = BinaryData.fromString("{\"path\":\"msplzgaufcshhvn\"}").toObject(FeaturesetSpecification.class); - Assertions.assertEquals("msplzgaufcshhvn", model.path()); + = BinaryData.fromString("{\"path\":\"qcs\"}").toObject(FeaturesetSpecification.class); + Assertions.assertEquals("qcs", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturesetSpecification model = new FeaturesetSpecification().withPath("msplzgaufcshhvn"); + FeaturesetSpecification model = new FeaturesetSpecification().withPath("qcs"); model = BinaryData.fromObject(model).toObject(FeaturesetSpecification.class); - Assertions.assertEquals("msplzgaufcshhvn", model.path()); + Assertions.assertEquals("qcs", model.path()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java index deaadee64e46..db0ab62b138f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; import com.azure.resourcemanager.machinelearning.models.FeatureWindow; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; import java.time.OffsetDateTime; import java.util.Arrays; @@ -19,48 +19,46 @@ public final class FeaturesetVersionBackfillRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetVersionBackfillRequest model = BinaryData.fromString( - "{\"displayName\":\"bwzohmnrxxbs\",\"description\":\"klinhmdptysprq\",\"featureWindow\":{\"featureWindowStart\":\"2021-03-17T04:51:43Z\",\"featureWindowEnd\":\"2021-09-05T11:06:21Z\"},\"dataAvailabilityStatus\":[\"Incomplete\",\"Incomplete\"],\"jobId\":\"vjgp\",\"tags\":{\"qvapcohhoucq\":\"fiqwoy\",\"jxcx\":\"q\",\"tzqdd\":\"rzdcgdzbenribcaw\",\"mzwcjjncqt\":\"jwfljhznamtua\"},\"resource\":{\"instanceType\":\"izvg\"},\"sparkConfiguration\":{\"ngrebwg\":\"tzuuvb\",\"x\":\"ahttzlswvajqfut\"},\"properties\":{\"aohcmbuocn\":\"zasunwqrjzfrgq\",\"hmbpyryxamebly\":\"r\",\"kmrocxne\":\"yvk\",\"mtodl\":\"v\"}}") + "{\"dataAvailabilityStatus\":[\"Complete\"],\"description\":\"pa\",\"displayName\":\"rzrv\",\"featureWindow\":{\"featureWindowEnd\":\"2021-06-18T17:32:58Z\",\"featureWindowStart\":\"2021-05-19T02:17:13Z\"},\"jobId\":\"cnxzcmj\",\"properties\":{\"evhdlmydid\":\"xnoqrxtdisn\",\"xhmw\":\"hepfwwtjfdoes\",\"kxkxhnegk\":\"dbckyo\"},\"resource\":{\"instanceType\":\"rbhtmeplvukaobr\"},\"sparkConfiguration\":{\"emuowakyw\":\"gsnbagnchjh\"},\"tags\":{\"gdrclssolj\":\"jymxcgqt\"}}") .toObject(FeaturesetVersionBackfillRequest.class); - Assertions.assertEquals("bwzohmnrxxbs", model.displayName()); - Assertions.assertEquals("klinhmdptysprq", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T04:51:43Z"), + Assertions.assertEquals(DataAvailabilityStatus.COMPLETE, model.dataAvailabilityStatus().get(0)); + Assertions.assertEquals("pa", model.description()); + Assertions.assertEquals("rzrv", model.displayName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T17:32:58Z"), model.featureWindow().featureWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-19T02:17:13Z"), model.featureWindow().featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T11:06:21Z"), model.featureWindow().featureWindowEnd()); - Assertions.assertEquals(DataAvailabilityStatus.INCOMPLETE, model.dataAvailabilityStatus().get(0)); - Assertions.assertEquals("vjgp", model.jobId()); - Assertions.assertEquals("fiqwoy", model.tags().get("qvapcohhoucq")); - Assertions.assertEquals("izvg", model.resource().instanceType()); - Assertions.assertEquals("tzuuvb", model.sparkConfiguration().get("ngrebwg")); - Assertions.assertEquals("zasunwqrjzfrgq", model.properties().get("aohcmbuocn")); + Assertions.assertEquals("cnxzcmj", model.jobId()); + Assertions.assertEquals("xnoqrxtdisn", model.properties().get("evhdlmydid")); + Assertions.assertEquals("rbhtmeplvukaobr", model.resource().instanceType()); + Assertions.assertEquals("gsnbagnchjh", model.sparkConfiguration().get("emuowakyw")); + Assertions.assertEquals("jymxcgqt", model.tags().get("gdrclssolj")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturesetVersionBackfillRequest model = new FeaturesetVersionBackfillRequest().withDisplayName("bwzohmnrxxbs") - .withDescription("klinhmdptysprq") - .withFeatureWindow(new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2021-03-17T04:51:43Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-09-05T11:06:21Z"))) - .withDataAvailabilityStatus( - Arrays.asList(DataAvailabilityStatus.INCOMPLETE, DataAvailabilityStatus.INCOMPLETE)) - .withJobId("vjgp") - .withTags(mapOf("qvapcohhoucq", "fiqwoy", "jxcx", "q", "tzqdd", "rzdcgdzbenribcaw", "mzwcjjncqt", - "jwfljhznamtua")) - .withResource(new MaterializationComputeResource().withInstanceType("izvg")) - .withSparkConfiguration(mapOf("ngrebwg", "tzuuvb", "x", "ahttzlswvajqfut")) - .withProperties( - mapOf("aohcmbuocn", "zasunwqrjzfrgq", "hmbpyryxamebly", "r", "kmrocxne", "yvk", "mtodl", "v")); + FeaturesetVersionBackfillRequest model = new FeaturesetVersionBackfillRequest() + .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.COMPLETE)) + .withDescription("pa") + .withDisplayName("rzrv") + .withFeatureWindow(new FeatureWindow().withFeatureWindowEnd(OffsetDateTime.parse("2021-06-18T17:32:58Z")) + .withFeatureWindowStart(OffsetDateTime.parse("2021-05-19T02:17:13Z"))) + .withJobId("cnxzcmj") + .withProperties(mapOf("evhdlmydid", "xnoqrxtdisn", "xhmw", "hepfwwtjfdoes", "kxkxhnegk", "dbckyo")) + .withResource(new MaterializationComputeResource().withInstanceType("rbhtmeplvukaobr")) + .withSparkConfiguration(mapOf("emuowakyw", "gsnbagnchjh")) + .withTags(mapOf("gdrclssolj", "jymxcgqt")); model = BinaryData.fromObject(model).toObject(FeaturesetVersionBackfillRequest.class); - Assertions.assertEquals("bwzohmnrxxbs", model.displayName()); - Assertions.assertEquals("klinhmdptysprq", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T04:51:43Z"), + Assertions.assertEquals(DataAvailabilityStatus.COMPLETE, model.dataAvailabilityStatus().get(0)); + Assertions.assertEquals("pa", model.description()); + Assertions.assertEquals("rzrv", model.displayName()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-18T17:32:58Z"), model.featureWindow().featureWindowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-19T02:17:13Z"), model.featureWindow().featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T11:06:21Z"), model.featureWindow().featureWindowEnd()); - Assertions.assertEquals(DataAvailabilityStatus.INCOMPLETE, model.dataAvailabilityStatus().get(0)); - Assertions.assertEquals("vjgp", model.jobId()); - Assertions.assertEquals("fiqwoy", model.tags().get("qvapcohhoucq")); - Assertions.assertEquals("izvg", model.resource().instanceType()); - Assertions.assertEquals("tzuuvb", model.sparkConfiguration().get("ngrebwg")); - Assertions.assertEquals("zasunwqrjzfrgq", model.properties().get("aohcmbuocn")); + Assertions.assertEquals("cnxzcmj", model.jobId()); + Assertions.assertEquals("xnoqrxtdisn", model.properties().get("evhdlmydid")); + Assertions.assertEquals("rbhtmeplvukaobr", model.resource().instanceType()); + Assertions.assertEquals("gsnbagnchjh", model.sparkConfiguration().get("emuowakyw")); + Assertions.assertEquals("jymxcgqt", model.tags().get("gdrclssolj")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java index a3bae11b08a0..2e8f37f5bdc4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java @@ -1,28 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class FeaturesetVersionBackfillResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetVersionBackfillResponseInner model - = BinaryData.fromString("{\"jobIds\":[\"ygvoavyunssxlgh\",\"ee\",\"jlgvvpase\",\"sgb\"]}") + = BinaryData.fromString("{\"jobIds\":[\"cnlbv\",\"jcodkkgjiiytssi\",\"izbcufqbvntnr\"]}") .toObject(FeaturesetVersionBackfillResponseInner.class); - Assertions.assertEquals("ygvoavyunssxlgh", model.jobIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionBackfillResponseInner model = new FeaturesetVersionBackfillResponseInner() - .withJobIds(Arrays.asList("ygvoavyunssxlgh", "ee", "jlgvvpase", "sgb")); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionBackfillResponseInner.class); - Assertions.assertEquals("ygvoavyunssxlgh", model.jobIds().get(0)); + Assertions.assertEquals("cnlbv", model.jobIds().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java index ed0c9bc96baf..a4e7b6fc5a98 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -27,110 +27,107 @@ public final class FeaturesetVersionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetVersionInner model = BinaryData.fromString( - "{\"properties\":{\"specification\":{\"path\":\"sxcdgljplkeuach\"},\"materializationSettings\":{\"storeType\":\"Offline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":1553395151,\"schedule\":{\"hours\":[286506544,1823247004],\"minutes\":[467932979,1819324739],\"weekDays\":[\"Tuesday\",\"Tuesday\",\"Wednesday\",\"Tuesday\"],\"monthDays\":[1207457404]},\"endTime\":\"hqjjys\",\"startTime\":\"rlpshhkv\",\"timeZone\":\"dwqslsrhmpqvw\"},\"notification\":{\"emails\":[\"ndcbrwi\",\"uvqejosovyrrle\"],\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"bmrqbrjbbmp\":{\"webhookType\":\"Webhook\",\"eventType\":\"qobbpihehcec\"},\"rseqwjksghudgz\":{\"webhookType\":\"Webhook\",\"eventType\":\"lvykfrex\"},\"hrkmdyomkxfbvfbh\":{\"webhookType\":\"Webhook\",\"eventType\":\"ogjggsvoujkxibda\"},\"hpwpgddeimawzovg\":{\"webhookType\":\"Webhook\",\"eventType\":\"i\"}}},\"resource\":{\"instanceType\":\"muikjcjcaztbws\"},\"sparkConfiguration\":{\"ytwvczcswkacve\":\"owxwcomli\",\"pqthehnmnaoya\":\"yfdvlvhbwrnfxtgd\"}},\"stage\":\"coeqswankltytm\",\"entities\":[\"oznnhdrlktgj\",\"sggux\",\"eml\",\"ywaeeczgf\"],\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"sxbly\",\"tags\":{\"plpvm\":\"zujksrlsmdes\",\"eowxvgpi\":\"cdoewbidyv\",\"xzecpaxwkufykhvu\":\"deugf\"},\"properties\":{\"znabaobns\":\"pmru\",\"ihywartspph\":\"ujdjltymkmvg\"}},\"id\":\"xkykxdssjp\",\"name\":\"mmuc\",\"type\":\"xhikkflrmymyin\"}") + "{\"properties\":{\"entities\":[\"alwvskbu\",\"z\"],\"materializationSettings\":{\"notification\":{\"emailOn\":[\"JobCancelled\"],\"emails\":[\"co\"],\"webhooks\":{\"bizt\":{\"webhookType\":\"Webhook\",\"eventType\":\"pdsxzakuejkm\"},\"f\":{\"webhookType\":\"Webhook\",\"eventType\":\"fqcvovj\"},\"lbemyej\":{\"webhookType\":\"Webhook\",\"eventType\":\"sj\"}}},\"resource\":{\"instanceType\":\"uxegthortudawlpj\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Month\",\"interval\":1318552091,\"schedule\":{\"hours\":[1502657115,722590291,1753796230,902490226],\"minutes\":[1270842979,230855548],\"monthDays\":[1405675230,1066790788,212805555],\"weekDays\":[\"Sunday\",\"Friday\",\"Monday\"]},\"endTime\":\"w\",\"startTime\":\"gckbb\",\"timeZone\":\"cgzpraoxnyu\"},\"sparkConfiguration\":{\"qdx\":\"tsgftipwcxbyubh\"},\"storeType\":\"OnlineAndOffline\"},\"provisioningState\":\"Creating\",\"specification\":{\"path\":\"hza\"},\"stage\":\"cnuhiigbylbuigv\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"rkdlb\",\"properties\":{\"hzlwxaea\":\"xvhcs\",\"ndsbdw\":\"vurex\",\"t\":\"aderzmw\",\"tmvmmagoaqylkjz\":\"pag\"},\"tags\":{\"pdltkrlg\":\"uazjcgmxitpfinz\"}},\"id\":\"tbdrvcqgue\",\"name\":\"zhomp\",\"type\":\"eqdurelyujlfyoum\"}") .toObject(FeaturesetVersionInner.class); - Assertions.assertEquals("sxbly", model.properties().description()); - Assertions.assertEquals("zujksrlsmdes", model.properties().tags().get("plpvm")); - Assertions.assertEquals("pmru", model.properties().properties().get("znabaobns")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("sxcdgljplkeuach", model.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, - model.properties().materializationSettings().storeType()); - Assertions.assertEquals("hqjjys", model.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("rlpshhkv", model.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("dwqslsrhmpqvw", model.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, + Assertions.assertEquals("rkdlb", model.properties().description()); + Assertions.assertEquals("xvhcs", model.properties().properties().get("hzlwxaea")); + Assertions.assertEquals("uazjcgmxitpfinz", model.properties().tags().get("pdltkrlg")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertFalse(model.properties().isArchived()); + Assertions.assertEquals("alwvskbu", model.properties().entities().get(0)); + Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, + model.properties().materializationSettings().notification().emailOn().get(0)); + Assertions.assertEquals("co", model.properties().materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("pdsxzakuejkm", + model.properties().materializationSettings().notification().webhooks().get("bizt").eventType()); + Assertions.assertEquals("uxegthortudawlpj", + model.properties().materializationSettings().resource().instanceType()); + Assertions.assertEquals("w", model.properties().materializationSettings().schedule().endTime()); + Assertions.assertEquals("gckbb", model.properties().materializationSettings().schedule().startTime()); + Assertions.assertEquals("cgzpraoxnyu", model.properties().materializationSettings().schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.MONTH, model.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553395151, model.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(286506544, + Assertions.assertEquals(1318552091, model.properties().materializationSettings().schedule().interval()); + Assertions.assertEquals(1502657115, model.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(467932979, + Assertions.assertEquals(1270842979, model.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.TUESDAY, - model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1207457404, + Assertions.assertEquals(1405675230, model.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("ndcbrwi", model.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("qobbpihehcec", - model.properties().materializationSettings().notification().webhooks().get("bmrqbrjbbmp").eventType()); - Assertions.assertEquals("muikjcjcaztbws", - model.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("owxwcomli", - model.properties().materializationSettings().sparkConfiguration().get("ytwvczcswkacve")); - Assertions.assertEquals("coeqswankltytm", model.properties().stage()); - Assertions.assertEquals("oznnhdrlktgj", model.properties().entities().get(0)); + Assertions.assertEquals(WeekDay.SUNDAY, + model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("tsgftipwcxbyubh", + model.properties().materializationSettings().sparkConfiguration().get("qdx")); + Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, + model.properties().materializationSettings().storeType()); + Assertions.assertEquals("hza", model.properties().specification().path()); + Assertions.assertEquals("cnuhiigbylbuigv", model.properties().stage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturesetVersionInner model = new FeaturesetVersionInner().withProperties(new FeaturesetVersionProperties() - .withDescription("sxbly") - .withTags(mapOf("plpvm", "zujksrlsmdes", "eowxvgpi", "cdoewbidyv", "xzecpaxwkufykhvu", "deugf")) - .withProperties(mapOf("znabaobns", "pmru", "ihywartspph", "ujdjltymkmvg")) - .withIsArchived(true) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("sxcdgljplkeuach")) - .withMaterializationSettings(new MaterializationSettings().withStoreType(MaterializationStoreType.OFFLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("hqjjys") - .withStartTime("rlpshhkv") - .withTimeZone("dwqslsrhmpqvw") - .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(1553395151) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(286506544, 1823247004)) - .withMinutes(Arrays.asList(467932979, 1819324739)) - .withWeekDays( - Arrays.asList(WeekDay.TUESDAY, WeekDay.TUESDAY, WeekDay.WEDNESDAY, WeekDay.TUESDAY)) - .withMonthDays(Arrays.asList(1207457404)))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("ndcbrwi", "uvqejosovyrrle")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("bmrqbrjbbmp", new Webhook().withEventType("qobbpihehcec"), - "rseqwjksghudgz", new Webhook().withEventType("lvykfrex"), "hrkmdyomkxfbvfbh", - new Webhook().withEventType("ogjggsvoujkxibda"), "hpwpgddeimawzovg", - new Webhook().withEventType("i")))) - .withResource(new MaterializationComputeResource().withInstanceType("muikjcjcaztbws")) - .withSparkConfiguration(mapOf("ytwvczcswkacve", "owxwcomli", "pqthehnmnaoya", "yfdvlvhbwrnfxtgd"))) - .withStage("coeqswankltytm") - .withEntities(Arrays.asList("oznnhdrlktgj", "sggux", "eml", "ywaeeczgf"))); + FeaturesetVersionInner model + = new FeaturesetVersionInner().withProperties(new FeaturesetVersionProperties().withDescription("rkdlb") + .withProperties(mapOf("hzlwxaea", "xvhcs", "ndsbdw", "vurex", "t", "aderzmw", "tmvmmagoaqylkjz", "pag")) + .withTags(mapOf("pdltkrlg", "uazjcgmxitpfinz")) + .withIsAnonymous(true) + .withIsArchived(false) + .withEntities(Arrays.asList("alwvskbu", "z")) + .withMaterializationSettings(new MaterializationSettings() + .withNotification( + new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) + .withEmails(Arrays.asList("co")) + .withWebhooks(mapOf("bizt", new Webhook().withEventType("pdsxzakuejkm"), "f", + new Webhook().withEventType("fqcvovj"), "lbemyej", new Webhook().withEventType("sj")))) + .withResource(new MaterializationComputeResource().withInstanceType("uxegthortudawlpj")) + .withSchedule(new RecurrenceTrigger().withEndTime("w") + .withStartTime("gckbb") + .withTimeZone("cgzpraoxnyu") + .withFrequency(RecurrenceFrequency.MONTH) + .withInterval(1318552091) + .withSchedule(new RecurrenceSchedule() + .withHours(Arrays.asList(1502657115, 722590291, 1753796230, 902490226)) + .withMinutes(Arrays.asList(1270842979, 230855548)) + .withMonthDays(Arrays.asList(1405675230, 1066790788, 212805555)) + .withWeekDays(Arrays.asList(WeekDay.SUNDAY, WeekDay.FRIDAY, WeekDay.MONDAY)))) + .withSparkConfiguration(mapOf("qdx", "tsgftipwcxbyubh")) + .withStoreType(MaterializationStoreType.ONLINE_AND_OFFLINE)) + .withSpecification(new FeaturesetSpecification().withPath("hza")) + .withStage("cnuhiigbylbuigv")); model = BinaryData.fromObject(model).toObject(FeaturesetVersionInner.class); - Assertions.assertEquals("sxbly", model.properties().description()); - Assertions.assertEquals("zujksrlsmdes", model.properties().tags().get("plpvm")); - Assertions.assertEquals("pmru", model.properties().properties().get("znabaobns")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("sxcdgljplkeuach", model.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, - model.properties().materializationSettings().storeType()); - Assertions.assertEquals("hqjjys", model.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("rlpshhkv", model.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("dwqslsrhmpqvw", model.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, + Assertions.assertEquals("rkdlb", model.properties().description()); + Assertions.assertEquals("xvhcs", model.properties().properties().get("hzlwxaea")); + Assertions.assertEquals("uazjcgmxitpfinz", model.properties().tags().get("pdltkrlg")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertFalse(model.properties().isArchived()); + Assertions.assertEquals("alwvskbu", model.properties().entities().get(0)); + Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, + model.properties().materializationSettings().notification().emailOn().get(0)); + Assertions.assertEquals("co", model.properties().materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("pdsxzakuejkm", + model.properties().materializationSettings().notification().webhooks().get("bizt").eventType()); + Assertions.assertEquals("uxegthortudawlpj", + model.properties().materializationSettings().resource().instanceType()); + Assertions.assertEquals("w", model.properties().materializationSettings().schedule().endTime()); + Assertions.assertEquals("gckbb", model.properties().materializationSettings().schedule().startTime()); + Assertions.assertEquals("cgzpraoxnyu", model.properties().materializationSettings().schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.MONTH, model.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553395151, model.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(286506544, + Assertions.assertEquals(1318552091, model.properties().materializationSettings().schedule().interval()); + Assertions.assertEquals(1502657115, model.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(467932979, + Assertions.assertEquals(1270842979, model.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.TUESDAY, - model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1207457404, + Assertions.assertEquals(1405675230, model.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("ndcbrwi", model.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("qobbpihehcec", - model.properties().materializationSettings().notification().webhooks().get("bmrqbrjbbmp").eventType()); - Assertions.assertEquals("muikjcjcaztbws", - model.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("owxwcomli", - model.properties().materializationSettings().sparkConfiguration().get("ytwvczcswkacve")); - Assertions.assertEquals("coeqswankltytm", model.properties().stage()); - Assertions.assertEquals("oznnhdrlktgj", model.properties().entities().get(0)); + Assertions.assertEquals(WeekDay.SUNDAY, + model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("tsgftipwcxbyubh", + model.properties().materializationSettings().sparkConfiguration().get("qdx")); + Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, + model.properties().materializationSettings().storeType()); + Assertions.assertEquals("hza", model.properties().specification().path()); + Assertions.assertEquals("cnuhiigbylbuigv", model.properties().stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java index 6b17297a1aba..aecf66f93000 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -26,92 +26,98 @@ public final class FeaturesetVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetVersionProperties model = BinaryData.fromString( - "{\"specification\":{\"path\":\"hr\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Minute\",\"interval\":1553660421,\"schedule\":{\"hours\":[2094134008],\"minutes\":[809500058],\"weekDays\":[\"Saturday\",\"Wednesday\",\"Saturday\",\"Tuesday\"],\"monthDays\":[1275151185,264674589,1965793317,753182470]},\"endTime\":\"iowlxteqdptj\",\"startTime\":\"dtguk\",\"timeZone\":\"nblwphqlkcc\"},\"notification\":{\"emails\":[\"gqwa\",\"oiulwgniipr\",\"lvawuwzdufypivls\"],\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"phavpmhbrb\":{\"webhookType\":\"Webhook\",\"eventType\":\"kmifoxxkub\"},\"sqyzqedikdfr\":{\"webhookType\":\"Webhook\",\"eventType\":\"vgovpbbttefjokn\"}}},\"resource\":{\"instanceType\":\"qmrjg\"},\"sparkConfiguration\":{\"iwzcxmjpbyeph\":\"fqlggw\",\"ljvrcmyfqipgxhnp\":\"gt\"}},\"stage\":\"yqwcabvnuil\",\"entities\":[\"aswlp\",\"ugmrmf\",\"lrxw\"],\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"vcisiz\",\"tags\":{\"jwuive\":\"eds\"},\"properties\":{\"psmgo\":\"gyeewxeiq\",\"l\":\"guamlj\"}}") + "{\"entities\":[\"yec\",\"cdigpt\",\"jbrzmqxucyc\"],\"materializationSettings\":{\"notification\":{\"emailOn\":[\"JobCompleted\",\"JobCompleted\",\"JobCancelled\",\"JobFailed\"],\"emails\":[\"cyzyzjdnrqjbt\"],\"webhooks\":{\"bzgyhfwwvuatbw\":{\"webhookType\":\"Webhook\",\"eventType\":\"oqa\"},\"mw\":{\"webhookType\":\"Webhook\",\"eventType\":\"amteuliyslpkc\"},\"pmywbormcq\":{\"webhookType\":\"Webhook\",\"eventType\":\"uxx\"}}},\"resource\":{\"instanceType\":\"iijq\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":1691281722,\"schedule\":{\"hours\":[375122648,1736738271,1627817955,1008531310],\"minutes\":[2016154693],\"monthDays\":[521731364,1564180549,1583646552,528949685],\"weekDays\":[\"Friday\"]},\"endTime\":\"nkwywzwofa\",\"startTime\":\"ckduoiqtamtyvskn\",\"timeZone\":\"wzawnvsbcfhzagxn\"},\"sparkConfiguration\":{\"mwrzregzgyufutrw\":\"cvd\",\"hmeott\":\"weryekzk\"},\"storeType\":\"Online\"},\"provisioningState\":\"Succeeded\",\"specification\":{\"path\":\"wwhnhjtfvpn\"},\"stage\":\"miljpnwynud\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"uzpjlxeehux\",\"properties\":{\"xls\":\"zlrayme\",\"yyshtuwgmevua\":\"ihmxrfdsajredn\",\"rkgwltxeqip\":\"pwzyi\",\"avkjog\":\"gzdyimsfayorp\"},\"tags\":{\"wynqxaekqsykvwj\":\"abnsmj\",\"spxklu\":\"qpkevmyltjc\",\"ytzpo\":\"cclfgxannn\"}}") .toObject(FeaturesetVersionProperties.class); - Assertions.assertEquals("vcisiz", model.description()); - Assertions.assertEquals("eds", model.tags().get("jwuive")); - Assertions.assertEquals("gyeewxeiq", model.properties().get("psmgo")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("hr", model.specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, model.materializationSettings().storeType()); - Assertions.assertEquals("iowlxteqdptj", model.materializationSettings().schedule().endTime()); - Assertions.assertEquals("dtguk", model.materializationSettings().schedule().startTime()); - Assertions.assertEquals("nblwphqlkcc", model.materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.MINUTE, model.materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553660421, model.materializationSettings().schedule().interval()); - Assertions.assertEquals(2094134008, model.materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(809500058, model.materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.SATURDAY, - model.materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1275151185, model.materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("gqwa", model.materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, + Assertions.assertEquals("uzpjlxeehux", model.description()); + Assertions.assertEquals("zlrayme", model.properties().get("xls")); + Assertions.assertEquals("abnsmj", model.tags().get("wynqxaekqsykvwj")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals("yec", model.entities().get(0)); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("kmifoxxkub", - model.materializationSettings().notification().webhooks().get("phavpmhbrb").eventType()); - Assertions.assertEquals("qmrjg", model.materializationSettings().resource().instanceType()); - Assertions.assertEquals("fqlggw", model.materializationSettings().sparkConfiguration().get("iwzcxmjpbyeph")); - Assertions.assertEquals("yqwcabvnuil", model.stage()); - Assertions.assertEquals("aswlp", model.entities().get(0)); + Assertions.assertEquals("cyzyzjdnrqjbt", model.materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("oqa", + model.materializationSettings().notification().webhooks().get("bzgyhfwwvuatbw").eventType()); + Assertions.assertEquals("iijq", model.materializationSettings().resource().instanceType()); + Assertions.assertEquals("nkwywzwofa", model.materializationSettings().schedule().endTime()); + Assertions.assertEquals("ckduoiqtamtyvskn", model.materializationSettings().schedule().startTime()); + Assertions.assertEquals("wzawnvsbcfhzagxn", model.materializationSettings().schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.DAY, model.materializationSettings().schedule().frequency()); + Assertions.assertEquals(1691281722, model.materializationSettings().schedule().interval()); + Assertions.assertEquals(375122648, model.materializationSettings().schedule().schedule().hours().get(0)); + Assertions.assertEquals(2016154693, model.materializationSettings().schedule().schedule().minutes().get(0)); + Assertions.assertEquals(521731364, model.materializationSettings().schedule().schedule().monthDays().get(0)); + Assertions.assertEquals(WeekDay.FRIDAY, + model.materializationSettings().schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("cvd", model.materializationSettings().sparkConfiguration().get("mwrzregzgyufutrw")); + Assertions.assertEquals(MaterializationStoreType.ONLINE, model.materializationSettings().storeType()); + Assertions.assertEquals("wwhnhjtfvpn", model.specification().path()); + Assertions.assertEquals("miljpnwynud", model.stage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturesetVersionProperties model = new FeaturesetVersionProperties().withDescription("vcisiz") - .withTags(mapOf("jwuive", "eds")) - .withProperties(mapOf("psmgo", "gyeewxeiq", "l", "guamlj")) - .withIsArchived(true) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("hr")) - .withMaterializationSettings(new MaterializationSettings().withStoreType(MaterializationStoreType.NONE) - .withSchedule(new RecurrenceTrigger().withEndTime("iowlxteqdptj") - .withStartTime("dtguk") - .withTimeZone("nblwphqlkcc") - .withFrequency(RecurrenceFrequency.MINUTE) - .withInterval(1553660421) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(2094134008)) - .withMinutes(Arrays.asList(809500058)) - .withWeekDays( - Arrays.asList(WeekDay.SATURDAY, WeekDay.WEDNESDAY, WeekDay.SATURDAY, WeekDay.TUESDAY)) - .withMonthDays(Arrays.asList(1275151185, 264674589, 1965793317, 753182470)))) - .withNotification(new NotificationSetting() - .withEmails(Arrays.asList("gqwa", "oiulwgniipr", "lvawuwzdufypivls")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("phavpmhbrb", new Webhook().withEventType("kmifoxxkub"), "sqyzqedikdfr", - new Webhook().withEventType("vgovpbbttefjokn")))) - .withResource(new MaterializationComputeResource().withInstanceType("qmrjg")) - .withSparkConfiguration(mapOf("iwzcxmjpbyeph", "fqlggw", "ljvrcmyfqipgxhnp", "gt"))) - .withStage("yqwcabvnuil") - .withEntities(Arrays.asList("aswlp", "ugmrmf", "lrxw")); + FeaturesetVersionProperties model + = new FeaturesetVersionProperties().withDescription("uzpjlxeehux") + .withProperties(mapOf("xls", "zlrayme", "yyshtuwgmevua", "ihmxrfdsajredn", "rkgwltxeqip", "pwzyi", + "avkjog", "gzdyimsfayorp")) + .withTags(mapOf("wynqxaekqsykvwj", "abnsmj", "spxklu", "qpkevmyltjc", "ytzpo", "cclfgxannn")) + .withIsAnonymous(false) + .withIsArchived(false) + .withEntities(Arrays.asList("yec", "cdigpt", "jbrzmqxucyc")) + .withMaterializationSettings( + new MaterializationSettings() + .withNotification(new NotificationSetting() + .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, + EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_CANCELLED, + EmailNotificationEnableType.JOB_FAILED)) + .withEmails(Arrays.asList("cyzyzjdnrqjbt")) + .withWebhooks(mapOf("bzgyhfwwvuatbw", new Webhook().withEventType("oqa"), "mw", + new Webhook().withEventType("amteuliyslpkc"), "pmywbormcq", + new Webhook().withEventType("uxx")))) + .withResource(new MaterializationComputeResource().withInstanceType("iijq")) + .withSchedule(new RecurrenceTrigger().withEndTime("nkwywzwofa") + .withStartTime("ckduoiqtamtyvskn") + .withTimeZone("wzawnvsbcfhzagxn") + .withFrequency(RecurrenceFrequency.DAY) + .withInterval(1691281722) + .withSchedule(new RecurrenceSchedule() + .withHours(Arrays.asList(375122648, 1736738271, 1627817955, 1008531310)) + .withMinutes(Arrays.asList(2016154693)) + .withMonthDays(Arrays.asList(521731364, 1564180549, 1583646552, 528949685)) + .withWeekDays(Arrays.asList(WeekDay.FRIDAY)))) + .withSparkConfiguration(mapOf("mwrzregzgyufutrw", "cvd", "hmeott", "weryekzk")) + .withStoreType(MaterializationStoreType.ONLINE)) + .withSpecification(new FeaturesetSpecification().withPath("wwhnhjtfvpn")) + .withStage("miljpnwynud"); model = BinaryData.fromObject(model).toObject(FeaturesetVersionProperties.class); - Assertions.assertEquals("vcisiz", model.description()); - Assertions.assertEquals("eds", model.tags().get("jwuive")); - Assertions.assertEquals("gyeewxeiq", model.properties().get("psmgo")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("hr", model.specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, model.materializationSettings().storeType()); - Assertions.assertEquals("iowlxteqdptj", model.materializationSettings().schedule().endTime()); - Assertions.assertEquals("dtguk", model.materializationSettings().schedule().startTime()); - Assertions.assertEquals("nblwphqlkcc", model.materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.MINUTE, model.materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553660421, model.materializationSettings().schedule().interval()); - Assertions.assertEquals(2094134008, model.materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(809500058, model.materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.SATURDAY, - model.materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1275151185, model.materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("gqwa", model.materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, + Assertions.assertEquals("uzpjlxeehux", model.description()); + Assertions.assertEquals("zlrayme", model.properties().get("xls")); + Assertions.assertEquals("abnsmj", model.tags().get("wynqxaekqsykvwj")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals("yec", model.entities().get(0)); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("kmifoxxkub", - model.materializationSettings().notification().webhooks().get("phavpmhbrb").eventType()); - Assertions.assertEquals("qmrjg", model.materializationSettings().resource().instanceType()); - Assertions.assertEquals("fqlggw", model.materializationSettings().sparkConfiguration().get("iwzcxmjpbyeph")); - Assertions.assertEquals("yqwcabvnuil", model.stage()); - Assertions.assertEquals("aswlp", model.entities().get(0)); + Assertions.assertEquals("cyzyzjdnrqjbt", model.materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("oqa", + model.materializationSettings().notification().webhooks().get("bzgyhfwwvuatbw").eventType()); + Assertions.assertEquals("iijq", model.materializationSettings().resource().instanceType()); + Assertions.assertEquals("nkwywzwofa", model.materializationSettings().schedule().endTime()); + Assertions.assertEquals("ckduoiqtamtyvskn", model.materializationSettings().schedule().startTime()); + Assertions.assertEquals("wzawnvsbcfhzagxn", model.materializationSettings().schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.DAY, model.materializationSettings().schedule().frequency()); + Assertions.assertEquals(1691281722, model.materializationSettings().schedule().interval()); + Assertions.assertEquals(375122648, model.materializationSettings().schedule().schedule().hours().get(0)); + Assertions.assertEquals(2016154693, model.materializationSettings().schedule().schedule().minutes().get(0)); + Assertions.assertEquals(521731364, model.materializationSettings().schedule().schedule().monthDays().get(0)); + Assertions.assertEquals(WeekDay.FRIDAY, + model.materializationSettings().schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("cvd", model.materializationSettings().sparkConfiguration().get("mwrzregzgyufutrw")); + Assertions.assertEquals(MaterializationStoreType.ONLINE, model.materializationSettings().storeType()); + Assertions.assertEquals("wwhnhjtfvpn", model.specification().path()); + Assertions.assertEquals("miljpnwynud", model.stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java index db21b4d547ce..b3e3354ff27d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java @@ -1,191 +1,49 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class FeaturesetVersionResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturesetVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"specification\":{\"path\":\"ewuninvud\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":709462942,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"ec\",\"startTime\":\"ct\",\"timeZone\":\"xdtddmflhuytxzv\"},\"notification\":{\"emails\":[\"pxbannovvoxc\",\"ytprwnwvroev\",\"tlyo\",\"rrrouuxvnsa\"],\"emailOn\":[\"JobCompleted\",\"JobCancelled\",\"JobCompleted\",\"JobCancelled\"],\"webhooks\":{\"zrxklobd\":{\"webhookType\":\"Webhook\"},\"nazpmk\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"vevfxz\"},\"sparkConfiguration\":{\"hrdd\":\"hbzxli\",\"nzqcy\":\"tfgxqbawpcb\",\"yuicdhzbdy\":\"napqo\",\"bid\":\"wwgbdv\"}},\"stage\":\"m\",\"entities\":[\"plfmuvapckccrrvw\"],\"provisioningState\":\"Canceled\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"k\",\"tags\":{\"pyyrmfs\":\"immoiroqboshbrag\",\"opfppdbwnupgah\":\"bpav\",\"jcaacfdmmcpugm\":\"kuma\"},\"properties\":{\"oqhnlb\":\"epvufhbzehew\",\"krsrrmoucs\":\"nbldxeaclgschori\",\"abeolhbhlvbm\":\"fldpuviyfc\"}},\"id\":\"qi\",\"name\":\"s\",\"type\":\"tkcudfbsfarfsiow\"},{\"properties\":{\"specification\":{\"path\":\"xnq\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Minute\",\"interval\":1896459173,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"qyki\",\"startTime\":\"d\",\"timeZone\":\"aoaf\"},\"notification\":{\"emails\":[\"v\",\"xmycjimryvwgcw\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\"],\"webhooks\":{\"esyds\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"fo\"},\"sparkConfiguration\":{\"llklmtk\":\"bvopwndyqle\",\"dfjmzsyzfhotlh\":\"lowkxxpvb\",\"yych\":\"k\",\"hv\":\"nsjlpjrtws\"}},\"stage\":\"icphvtrrmhw\",\"entities\":[\"dpyflubhv\",\"glrocuy\",\"lw\"],\"provisioningState\":\"Deleting\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"clutnpqme\",\"tags\":{\"mykyujxsglhs\":\"jk\",\"fihotj\":\"rryejylmbkzudnig\",\"refqy\":\"wlpxuzzjg\"},\"properties\":{\"fb\":\"toihiqakydi\",\"spodaqax\":\"kwpzdqtvh\"}},\"id\":\"pie\",\"name\":\"gbebjf\",\"type\":\"lbmoichd\"},{\"properties\":{\"specification\":{\"path\":\"fpubntnbatz\"},\"materializationSettings\":{\"storeType\":\"Online\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Month\",\"interval\":1702744153,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"el\",\"startTime\":\"ttcjuhplrvkmjc\",\"timeZone\":\"jvlgfggcvkyyliz\"},\"notification\":{\"emails\":[\"psfxsf\",\"ztlvtmvagbwidqlv\"],\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"fizr\":{\"webhookType\":\"Webhook\"},\"jfnmjmvlwyz\":{\"webhookType\":\"Webhook\"},\"iblkujr\":{\"webhookType\":\"Webhook\"},\"lfojuidjp\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"jucejikzoeovvtz\"},\"sparkConfiguration\":{\"bqzolxr\":\"tjklntikyjuzk\"}},\"stage\":\"hqjwtrhtgvg\",\"entities\":[\"rrkolawjmjs\"],\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"fzzzwyjafitlhg\",\"tags\":{\"whmozusgzvlnsnnj\":\"uchlgmltx\",\"rag\":\"fpafolpymwamxq\",\"vl\":\"gdphtvdula\",\"rupdwvnphcnzq\":\"jchcsrlzknmzla\"},\"properties\":{\"smlzzhzdtxetlgy\":\"hmqrhvthlaiwdc\",\"geaar\":\"lhqvlnnpxybafi\",\"lidwcwvmzegjon\":\"gjekglklby\"}},\"id\":\"jirwgdnqzbrfk\",\"name\":\"pzhz\",\"type\":\"tk\"}],\"nextLink\":\"cit\"}") + "{\"value\":[{\"properties\":{\"entities\":[\"khufmpqumqyjgydz\",\"lod\"],\"materializationSettings\":{\"notification\":{\"emailOn\":[\"JobCompleted\",\"JobCompleted\",\"JobFailed\",\"JobCompleted\"],\"emails\":[\"hse\",\"wphpzfngqj\",\"lidftujwjj\",\"fwbeqrkuorh\"],\"webhooks\":{\"ruqnm\":{\"webhookType\":\"Webhook\"},\"vhazcv\":{\"webhookType\":\"Webhook\"},\"ytiq\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"qer\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Month\",\"interval\":1079278403,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"x\",\"startTime\":\"gukvlbpkt\",\"timeZone\":\"styoua\"},\"sparkConfiguration\":{\"uteyxeyguq\":\"wreswmowegm\",\"sygrijwa\":\"gijiitnspxlzd\"},\"storeType\":\"Offline\"},\"provisioningState\":\"Updating\",\"specification\":{\"path\":\"ybfueqfrojsydgr\"},\"stage\":\"dkygywezski\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"zmxieqvdsmaklix\",\"properties\":{\"ybxawoijpodtblx\":\"hyhxa\"},\"tags\":{\"n\":\"wjdjodqhykin\",\"eumoqod\":\"emehllizh\",\"qladywrxwhydtlu\":\"adppyibn\"}},\"id\":\"adswz\",\"name\":\"nuyemlowuo\",\"type\":\"hlxlnwyrmou\"},{\"properties\":{\"entities\":[\"gmokzkltrfowt\",\"vrfmvlihcvjd\"],\"materializationSettings\":{\"notification\":{\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"emails\":[\"tuk\",\"hdxlw\"],\"webhooks\":{\"bfqz\":{\"webhookType\":\"Webhook\"},\"kfnjyixhafrat\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"bjroumzzn\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":817301523,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"huzgfxo\",\"startTime\":\"tpusllywp\",\"timeZone\":\"iotzbpdbollgryfq\"},\"sparkConfiguration\":{\"bo\":\"sigrowsocnequygd\",\"evadrmmwiu\":\"grmtqjk\",\"kxiidisczskoswo\":\"wvcmj\"},\"storeType\":\"None\"},\"provisioningState\":\"Succeeded\",\"specification\":{\"path\":\"am\"},\"stage\":\"krrcoiisbamnpp\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"tdsbezax\",\"properties\":{\"y\":\"kzxuiz\",\"etiarxqiubxdukec\":\"nepk\"},\"tags\":{\"dblnsntrp\":\"azvdhctmmkosz\",\"fmhklbnld\":\"aqkiofkb\",\"hez\":\"vcb\"}},\"id\":\"u\",\"name\":\"usqxutrpbrr\",\"type\":\"yuuatvlmbjwcolbm\"}],\"nextLink\":\"b\"}") .toObject(FeaturesetVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("k", model.value().get(0).properties().description()); - Assertions.assertEquals("immoiroqboshbrag", model.value().get(0).properties().tags().get("pyyrmfs")); - Assertions.assertEquals("epvufhbzehew", model.value().get(0).properties().properties().get("oqhnlb")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - model.value().get(0).properties().materializationSettings().storeType()); - Assertions.assertEquals("ec", model.value().get(0).properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("ct", - model.value().get(0).properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xdtddmflhuytxzv", - model.value().get(0).properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - model.value().get(0).properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(709462942, - model.value().get(0).properties().materializationSettings().schedule().interval()); - Assertions.assertEquals("pxbannovvoxc", - model.value().get(0).properties().materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("zmxieqvdsmaklix", model.value().get(0).properties().description()); + Assertions.assertEquals("hyhxa", model.value().get(0).properties().properties().get("ybxawoijpodtblx")); + Assertions.assertEquals("wjdjodqhykin", model.value().get(0).properties().tags().get("n")); + Assertions.assertTrue(model.value().get(0).properties().isAnonymous()); + Assertions.assertTrue(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("khufmpqumqyjgydz", model.value().get(0).properties().entities().get(0)); Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.value().get(0).properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("vevfxz", + Assertions.assertEquals("hse", + model.value().get(0).properties().materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("qer", model.value().get(0).properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("hbzxli", - model.value().get(0).properties().materializationSettings().sparkConfiguration().get("hrdd")); - Assertions.assertEquals("m", model.value().get(0).properties().stage()); - Assertions.assertEquals("plfmuvapckccrrvw", model.value().get(0).properties().entities().get(0)); - Assertions.assertEquals("cit", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionResourceArmPaginatedResult model - = new FeaturesetVersionResourceArmPaginatedResult().withValue(Arrays.asList( - new FeaturesetVersionInner().withProperties(new FeaturesetVersionProperties().withDescription("k") - .withTags(mapOf("pyyrmfs", "immoiroqboshbrag", "opfppdbwnupgah", "bpav", "jcaacfdmmcpugm", "kuma")) - .withProperties( - mapOf("oqhnlb", "epvufhbzehew", "krsrrmoucs", "nbldxeaclgschori", "abeolhbhlvbm", "fldpuviyfc")) - .withIsArchived(false) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("ewuninvud")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE_AND_OFFLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("ec") - .withStartTime("ct") - .withTimeZone("xdtddmflhuytxzv") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(709462942) - .withSchedule( - new RecurrenceSchedule().withHours(Arrays.asList()).withMinutes(Arrays.asList()))) - .withNotification(new NotificationSetting() - .withEmails(Arrays.asList("pxbannovvoxc", "ytprwnwvroev", "tlyo", "rrrouuxvnsa")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("zrxklobd", new Webhook(), "nazpmk", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("vevfxz")) - .withSparkConfiguration( - mapOf("hrdd", "hbzxli", "nzqcy", "tfgxqbawpcb", "yuicdhzbdy", "napqo", "bid", "wwgbdv"))) - .withStage("m") - .withEntities(Arrays.asList("plfmuvapckccrrvw"))), - new FeaturesetVersionInner() - .withProperties(new FeaturesetVersionProperties().withDescription("clutnpqme") - .withTags(mapOf("mykyujxsglhs", "jk", "fihotj", "rryejylmbkzudnig", "refqy", "wlpxuzzjg")) - .withProperties(mapOf("fb", "toihiqakydi", "spodaqax", "kwpzdqtvh")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("xnq")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.NONE) - .withSchedule(new RecurrenceTrigger().withEndTime("qyki") - .withStartTime("d") - .withTimeZone("aoaf") - .withFrequency(RecurrenceFrequency.MINUTE) - .withInterval(1896459173) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList()) - .withMinutes(Arrays.asList()))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("v", "xmycjimryvwgcw")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("esyds", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("fo")) - .withSparkConfiguration(mapOf("llklmtk", "bvopwndyqle", "dfjmzsyzfhotlh", "lowkxxpvb", - "yych", "k", "hv", "nsjlpjrtws"))) - .withStage("icphvtrrmhw") - .withEntities(Arrays.asList("dpyflubhv", "glrocuy", "lw"))), - new FeaturesetVersionInner() - .withProperties( - new FeaturesetVersionProperties().withDescription("fzzzwyjafitlhg") - .withTags(mapOf("whmozusgzvlnsnnj", "uchlgmltx", "rag", "fpafolpymwamxq", "vl", - "gdphtvdula", "rupdwvnphcnzq", "jchcsrlzknmzla")) - .withProperties(mapOf("smlzzhzdtxetlgy", "hmqrhvthlaiwdc", "geaar", "lhqvlnnpxybafi", - "lidwcwvmzegjon", "gjekglklby")) - .withIsArchived(true) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("fpubntnbatz")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("el") - .withStartTime("ttcjuhplrvkmjc") - .withTimeZone("jvlgfggcvkyyliz") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1702744153) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList()) - .withMinutes(Arrays.asList()))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("psfxsf", "ztlvtmvagbwidqlv")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("fizr", new Webhook(), "jfnmjmvlwyz", new Webhook(), - "iblkujr", new Webhook(), "lfojuidjp", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("jucejikzoeovvtz")) - .withSparkConfiguration(mapOf("bqzolxr", "tjklntikyjuzk"))) - .withStage("hqjwtrhtgvg") - .withEntities(Arrays.asList("rrkolawjmjs"))))) - .withNextLink("cit"); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("k", model.value().get(0).properties().description()); - Assertions.assertEquals("immoiroqboshbrag", model.value().get(0).properties().tags().get("pyyrmfs")); - Assertions.assertEquals("epvufhbzehew", model.value().get(0).properties().properties().get("oqhnlb")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - model.value().get(0).properties().materializationSettings().storeType()); - Assertions.assertEquals("ec", model.value().get(0).properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("ct", + Assertions.assertEquals("x", model.value().get(0).properties().materializationSettings().schedule().endTime()); + Assertions.assertEquals("gukvlbpkt", model.value().get(0).properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xdtddmflhuytxzv", + Assertions.assertEquals("styoua", model.value().get(0).properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, + Assertions.assertEquals(RecurrenceFrequency.MONTH, model.value().get(0).properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(709462942, + Assertions.assertEquals(1079278403, model.value().get(0).properties().materializationSettings().schedule().interval()); - Assertions.assertEquals("pxbannovvoxc", - model.value().get(0).properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.value().get(0).properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("vevfxz", - model.value().get(0).properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("hbzxli", - model.value().get(0).properties().materializationSettings().sparkConfiguration().get("hrdd")); - Assertions.assertEquals("m", model.value().get(0).properties().stage()); - Assertions.assertEquals("plfmuvapckccrrvw", model.value().get(0).properties().entities().get(0)); - Assertions.assertEquals("cit", 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; + Assertions.assertEquals("wreswmowegm", + model.value().get(0).properties().materializationSettings().sparkConfiguration().get("uteyxeyguq")); + Assertions.assertEquals(MaterializationStoreType.OFFLINE, + model.value().get(0).properties().materializationSettings().storeType()); + Assertions.assertEquals("ybfueqfrojsydgr", model.value().get(0).properties().specification().path()); + Assertions.assertEquals("dkygywezski", model.value().get(0).properties().stage()); + Assertions.assertEquals("b", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java index 5759b0c494b9..6ee4cdcdb021 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java @@ -1,19 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; +import com.azure.resourcemanager.machinelearning.models.FeatureWindow; import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; -import com.azure.resourcemanager.machinelearning.models.FeatureWindow; import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -27,32 +27,31 @@ public final class FeaturesetVersionsBackfillMockTests { @Test public void testBackfill() throws Exception { - String responseStr = "{\"jobIds\":[\"mmud\",\"ow\",\"bscidkwznw\",\"tlizdoys\"]}"; + String responseStr = "{\"jobIds\":[\"n\"]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturesetVersionBackfillResponse response = manager.featuresetVersions() - .backfill("qxajsiueaibqjbi", "bwxuypcuriwll", "tclveqdqtzsh", "lwjxrymiysgh", - new FeaturesetVersionBackfillRequest().withDisplayName("mq") - .withDescription("kkw") - .withFeatureWindow( - new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2020-12-23T10:58Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-01-24T18:11:33Z"))) - .withDataAvailabilityStatus( - Arrays.asList(DataAvailabilityStatus.NONE, DataAvailabilityStatus.INCOMPLETE)) - .withJobId("aadnxbss") - .withTags(mapOf("xxccf", "ialrqhw")) - .withResource(new MaterializationComputeResource().withInstanceType("ozaiyvrex")) - .withSparkConfiguration(mapOf("clujyww", "zrikno")) - .withProperties(mapOf("msobuahoki", "usnawbncljk")), - com.azure.core.util.Context.NONE); + .backfill("heqjc", "hrrxmc", "trqnuahhkedvbrbd", "jpshisziv", new FeaturesetVersionBackfillRequest() + .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE, DataAvailabilityStatus.COMPLETE, + DataAvailabilityStatus.INCOMPLETE, DataAvailabilityStatus.PENDING)) + .withDescription("jorvsgmk") + .withDisplayName("les") + .withFeatureWindow( + new FeatureWindow().withFeatureWindowEnd(OffsetDateTime.parse("2021-12-10T04:00:20Z")) + .withFeatureWindowStart(OffsetDateTime.parse("2021-04-22T23:28:12Z"))) + .withJobId("ybrlwdm") + .withProperties(mapOf("tnhyyli", "fslae")) + .withResource(new MaterializationComputeResource().withInstanceType("pqumexnpoaeruy")) + .withSparkConfiguration(mapOf("prlcgqewm", "ltwlzlmp", "mkmx", "wyhqly")) + .withTags(mapOf("ko", "kpapepwpbnj")), com.azure.core.util.Context.NONE); - Assertions.assertEquals("mmud", response.jobIds().get(0)); + Assertions.assertEquals("n", response.jobIds().get(0)); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java index 8c49e9542b43..c043312f3d57 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; @@ -36,78 +36,83 @@ public final class FeaturesetVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"specification\":{\"path\":\"nlcvlmrvhe\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":460923091,\"schedule\":{\"hours\":[1207128416],\"minutes\":[850079120],\"weekDays\":[\"Friday\"],\"monthDays\":[1640588997,1906393199]},\"endTime\":\"d\",\"startTime\":\"talzcjaw\",\"timeZone\":\"xownoypqussxi\"},\"notification\":{\"emails\":[\"rsd\",\"tjxlopncca\"],\"emailOn\":[\"JobCancelled\",\"JobCompleted\",\"JobCancelled\",\"JobCancelled\"],\"webhooks\":{\"ijlwr\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"bzjpgh\"},\"sparkConfiguration\":{\"xi\":\"pceqaklsfxl\",\"xpuokk\":\"ymfqmvnhsfjxtusb\"}},\"stage\":\"tsppgt\",\"entities\":[\"nalpwa\",\"lkw\"],\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"njdrnfgtm\",\"tags\":{\"xufuwcajyezlk\":\"lhnxqvzzi\",\"bpnrgnxwrfu\":\"iveftugiwsvlfp\",\"xzyfqcjc\":\"zaysfzuvu\",\"nazpgvfcubxlmq\":\"vbqovkzueytp\"},\"properties\":{\"yfuupqkrzvdjpcev\":\"bqrlbyh\",\"phhpwxghwwfqzwys\":\"kkgqfjw\"}},\"id\":\"qqmdajsqepxftyi\",\"name\":\"adsliifdrbsrpjsp\",\"type\":\"ib\"}"; + = "{\"properties\":{\"entities\":[\"ey\",\"mvri\",\"jjhqvypqgncg\"],\"materializationSettings\":{\"notification\":{\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobFailed\"],\"emails\":[\"fitpucky\"],\"webhooks\":{\"yjdvyxxbawjgyn\":{\"webhookType\":\"Webhook\"},\"oudclridqly\":{\"webhookType\":\"Webhook\"},\"xbdisje\":{\"webhookType\":\"Webhook\"},\"vgcfhchgjo\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"dibzvpdjytmeouiu\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":677485672,\"schedule\":{\"hours\":[863823381,243413743],\"minutes\":[264792063,610950943,382138943,1934606772],\"monthDays\":[1566386639,1026911415,319005675],\"weekDays\":[\"Monday\",\"Saturday\"]},\"endTime\":\"dslpbyejsg\",\"startTime\":\"jjnblbkakn\",\"timeZone\":\"wbddnddctkjcqhx\"},\"sparkConfiguration\":{\"abqtjchxsfwe\":\"ttqils\",\"ekdqqwcspfhrndq\":\"leiyemjips\",\"oslqgsdqnqqzq\":\"m\",\"tkgoyn\":\"vgno\"},\"storeType\":\"None\"},\"provisioningState\":\"Succeeded\",\"specification\":{\"path\":\"buzm\"},\"stage\":\"iltl\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"paiwhrjw\",\"properties\":{\"nuvjdywpf\":\"uwim\",\"yjdbc\":\"iwjfkmnjtksw\",\"dkcbpkig\":\"nsojtm\",\"dwgussctnppxxeys\":\"vvaitkce\"},\"tags\":{\"ys\":\"fwugo\",\"uk\":\"munvzmvnbcklssx\",\"ckpnnenrcez\":\"vfsukpkieal\",\"zwk\":\"or\"}},\"id\":\"hjxocmmv\",\"name\":\"amorhkneu\",\"type\":\"udrwizzn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturesetVersion response = manager.featuresetVersions() - .define("dvuotkvkbpmk") - .withExistingFeatureset("z", "bogdj", "uybcp") - .withProperties(new FeaturesetVersionProperties().withDescription("kdihslnbyi") - .withTags(mapOf("wjvxycygcvgebfe", "t", "nsicucqteciexsc", "tyantecvttkgopdj", "jlypwgwbycfam", "hzh", - "irhhbogxw", "ikisppygothi")) - .withProperties( - mapOf("oza", "ymyerpu", "wdkgbzjoyyptno", "utjliwb", "ejzxkflzqwkxxboa", "doqxkzeowizv")) - .withIsArchived(false) + .define("ouzo") + .withExistingFeatureset("umy", "vnddllbwnmv", "bzypmmyrggs") + .withProperties(new FeaturesetVersionProperties().withDescription("sxrsmvnn") + .withProperties(mapOf("wwqchxowppvux", "woxve", "ir", "actoqqehn", "tvnlbkizebbrwlp", "gnvuolv", + "zgwywyxbwuam", "qmisoiqge")) + .withTags( + mapOf("xpjkuq", "pqqiyjrehedcheng", "tgqpqfwuplfjkb", "ngromlxsqdzyyalr", "gta", "xvuseimuip")) .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("nkcwauylkb")) + .withIsArchived(false) + .withEntities(Arrays.asList("qlwyqsxeq")) .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("hyuxxeike") - .withStartTime("pwrnhqaf") - .withTimeZone("vysphjkxgfmes") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1882121848) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1636152298, 1171310815)) - .withMinutes(Arrays.asList(799567544, 1872935428)) - .withWeekDays(Arrays.asList(WeekDay.SATURDAY, WeekDay.WEDNESDAY)) - .withMonthDays(Arrays.asList(558205337)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("qfynvckx", "anlvo", "rvzhdn")) + .withNotification(new NotificationSetting() .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("ssgq", new Webhook(), "nolspvxpiegxlzd", new Webhook(), "atptzkmfvdrkcw", - new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("nwsffiahf")) - .withSparkConfiguration(mapOf("ozkdqzhr", "zzxirxxk"))) - .withStage("ivvpyznjwmduuzn") - .withEntities(Arrays.asList("zzwsesqy", "ktvofgxorhsxcs", "axcme", "kpxt"))) + EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED, + EmailNotificationEnableType.JOB_COMPLETED)) + .withEmails(Arrays.asList("aneuepgqztak", "vslvwp", "dmtfcstucm", "qsd")) + .withWebhooks(mapOf("qqgs", new Webhook(), "itiut", new Webhook()))) + .withResource(new MaterializationComputeResource().withInstanceType("sxjkclzq")) + .withSchedule(new RecurrenceTrigger().withEndTime("vqe") + .withStartTime("rqiwxeppuhk") + .withTimeZone("oakzvjyvobevfbmx") + .withFrequency(RecurrenceFrequency.WEEK) + .withInterval(140029693) + .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1973423971)) + .withMinutes(Arrays.asList(866109751)) + .withMonthDays(Arrays.asList(352936866, 1458636662)) + .withWeekDays(Arrays.asList(WeekDay.TUESDAY, WeekDay.SUNDAY, WeekDay.SATURDAY)))) + .withSparkConfiguration(mapOf("lhdbbxmeuyxhcw", "pghsrlkpajiobyby", "tlaqq", "btegoachoj", + "lxrifbsb", "rgi", "oijsxv", "vfkvdbb")) + .withStoreType(MaterializationStoreType.OFFLINE)) + .withSpecification(new FeaturesetSpecification().withPath("ufkn")) + .withStage("scxnkt")) .create(); - Assertions.assertEquals("njdrnfgtm", response.properties().description()); - Assertions.assertEquals("lhnxqvzzi", response.properties().tags().get("xufuwcajyezlk")); - Assertions.assertEquals("bqrlbyh", response.properties().properties().get("yfuupqkrzvdjpcev")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("nlcvlmrvhe", response.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - response.properties().materializationSettings().storeType()); - Assertions.assertEquals("d", response.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("talzcjaw", response.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xownoypqussxi", response.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, + Assertions.assertEquals("paiwhrjw", response.properties().description()); + Assertions.assertEquals("uwim", response.properties().properties().get("nuvjdywpf")); + Assertions.assertEquals("fwugo", response.properties().tags().get("ys")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("ey", response.properties().entities().get(0)); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, + response.properties().materializationSettings().notification().emailOn().get(0)); + Assertions.assertEquals("fitpucky", + response.properties().materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("dibzvpdjytmeouiu", + response.properties().materializationSettings().resource().instanceType()); + Assertions.assertEquals("dslpbyejsg", response.properties().materializationSettings().schedule().endTime()); + Assertions.assertEquals("jjnblbkakn", response.properties().materializationSettings().schedule().startTime()); + Assertions.assertEquals("wbddnddctkjcqhx", + response.properties().materializationSettings().schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.WEEK, response.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(460923091, response.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(1207128416, + Assertions.assertEquals(677485672, response.properties().materializationSettings().schedule().interval()); + Assertions.assertEquals(863823381, response.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(850079120, + Assertions.assertEquals(264792063, response.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, - response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1640588997, + Assertions.assertEquals(1566386639, response.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rsd", response.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("bzjpgh", response.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("pceqaklsfxl", - response.properties().materializationSettings().sparkConfiguration().get("xi")); - Assertions.assertEquals("tsppgt", response.properties().stage()); - Assertions.assertEquals("nalpwa", response.properties().entities().get(0)); + Assertions.assertEquals(WeekDay.MONDAY, + response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("ttqils", + response.properties().materializationSettings().sparkConfiguration().get("abqtjchxsfwe")); + Assertions.assertEquals(MaterializationStoreType.NONE, + response.properties().materializationSettings().storeType()); + Assertions.assertEquals("buzm", response.properties().specification().path()); + Assertions.assertEquals("iltl", response.properties().stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java index 50fcbf89107a..b7e77db24786 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.featuresetVersions() - .delete("lj", "ki", "magfyinmajj", "plgtwfkflcvbzkbe", com.azure.core.util.Context.NONE); + .delete("rgnx", "rfufzaysfzuvuo", "zyfqcjclvbqo", "kzueytphnaz", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java index 658f5f3caf42..e91259e6b7c3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; @@ -25,49 +25,49 @@ public final class FeaturesetVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"specification\":{\"path\":\"deoubv\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":1311355901,\"schedule\":{\"hours\":[1757358361,1263017411,513981146],\"minutes\":[2095072946,1962296302],\"weekDays\":[\"Wednesday\",\"Thursday\",\"Saturday\",\"Thursday\"],\"monthDays\":[1281228089,1358126478,1774923631,1733089394]},\"endTime\":\"lbeqczzscgrop\",\"startTime\":\"giscgk\",\"timeZone\":\"iyikqlyoorm\"},\"notification\":{\"emails\":[\"lqijykck\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"bcpiadjslvxs\":{\"webhookType\":\"Webhook\"},\"lcd\":{\"webhookType\":\"Webhook\"},\"bibfviacghygmt\":{\"webhookType\":\"Webhook\"},\"ivpzjnrw\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"zmxqyj\"},\"sparkConfiguration\":{\"kew\":\"jpy\"}},\"stage\":\"kzmsyezxifjuvhuo\",\"entities\":[\"twvkuhtdxd\",\"odzdh\",\"knmcvmxiun\",\"ifuahtkkccrusrzs\"],\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ayxnlvt\",\"tags\":{\"wslctilbxnny\":\"o\",\"dfhpelzavohv\":\"jt\",\"liqcbonqjoek\":\"bncdrchuew\",\"xrbalvkfdq\":\"jcglvobctit\"},\"properties\":{\"yrqlazfjltck\":\"rqhxfqkqp\",\"pxalkqlvbkzaiyr\":\"jvdxhyfvqtdexfd\"}},\"id\":\"woi\",\"name\":\"iniyoizuww\",\"type\":\"crigbjbelnqalbs\"}"; + = "{\"properties\":{\"entities\":[\"hhbogxwngpym\"],\"materializationSettings\":{\"notification\":{\"emailOn\":[\"JobFailed\",\"JobCompleted\"],\"emails\":[\"outj\",\"iw\"],\"webhooks\":{\"dkgbzjoyyptn\":{\"webhookType\":\"Webhook\"},\"kdoqxkzeowizvjej\":{\"webhookType\":\"Webhook\"},\"xkflzqwkxxbo\":{\"webhookType\":\"Webhook\"},\"uvkkcowgnwhldc\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"chuqmdy\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":426344478,\"schedule\":{\"hours\":[879586661,1716978607,1084900907,1081939064],\"minutes\":[1624078266,1612577579],\"monthDays\":[1021718239,1187334907,947531234,664503995],\"weekDays\":[\"Saturday\"]},\"endTime\":\"wxw\",\"startTime\":\"dkdlxd\",\"timeZone\":\"talzcjaw\"},\"sparkConfiguration\":{\"sxiaj\":\"ownoypqu\",\"lop\":\"crsdgtj\",\"tpprszehijlw\":\"cca\",\"hjmg\":\"feabzjp\"},\"storeType\":\"Online\"},\"provisioningState\":\"Canceled\",\"specification\":{\"path\":\"sfxl\"},\"stage\":\"i\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"vnhsfjxt\",\"properties\":{\"tsppgt\":\"jxpuokkd\",\"sjwnwn\":\"lonalpwaulkwuy\",\"nfgtmupblh\":\"d\"},\"tags\":{\"kxufuw\":\"vzz\"}},\"id\":\"jyezlkuiveftugi\",\"name\":\"svlfpm\",\"type\":\"p\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturesetVersion response = manager.featuresetVersions() - .getWithResponse("uafbddm", "fqynmldhgzzohtag", "yuhdqhqgrksypoo", "fxzobovsvhbtdgxg", + .getWithResponse("nsicucqteciexsc", "hzh", "jlypwgwbycfam", "ikisppygothi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ayxnlvt", response.properties().description()); - Assertions.assertEquals("o", response.properties().tags().get("wslctilbxnny")); - Assertions.assertEquals("rqhxfqkqp", response.properties().properties().get("yrqlazfjltck")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("deoubv", response.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - response.properties().materializationSettings().storeType()); - Assertions.assertEquals("lbeqczzscgrop", response.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("giscgk", response.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("iyikqlyoorm", response.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, + Assertions.assertEquals("vnhsfjxt", response.properties().description()); + Assertions.assertEquals("jxpuokkd", response.properties().properties().get("tsppgt")); + Assertions.assertEquals("vzz", response.properties().tags().get("kxufuw")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("hhbogxwngpym", response.properties().entities().get(0)); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, + response.properties().materializationSettings().notification().emailOn().get(0)); + Assertions.assertEquals("outj", response.properties().materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("chuqmdy", response.properties().materializationSettings().resource().instanceType()); + Assertions.assertEquals("wxw", response.properties().materializationSettings().schedule().endTime()); + Assertions.assertEquals("dkdlxd", response.properties().materializationSettings().schedule().startTime()); + Assertions.assertEquals("talzcjaw", response.properties().materializationSettings().schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.HOUR, response.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1311355901, response.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(1757358361, + Assertions.assertEquals(426344478, response.properties().materializationSettings().schedule().interval()); + Assertions.assertEquals(879586661, response.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(2095072946, + Assertions.assertEquals(1624078266, response.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.WEDNESDAY, - response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1281228089, + Assertions.assertEquals(1021718239, response.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("lqijykck", - response.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("zmxqyj", response.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("jpy", response.properties().materializationSettings().sparkConfiguration().get("kew")); - Assertions.assertEquals("kzmsyezxifjuvhuo", response.properties().stage()); - Assertions.assertEquals("twvkuhtdxd", response.properties().entities().get(0)); + Assertions.assertEquals(WeekDay.SATURDAY, + response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("ownoypqu", + response.properties().materializationSettings().sparkConfiguration().get("sxiaj")); + Assertions.assertEquals(MaterializationStoreType.ONLINE, + response.properties().materializationSettings().storeType()); + Assertions.assertEquals("sfxl", response.properties().specification().path()); + Assertions.assertEquals("i", response.properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java index eef98e00dceb..034359b8c4e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; @@ -27,54 +27,56 @@ public final class FeaturesetVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"specification\":{\"path\":\"zuimpiybmybtihcg\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":754391268,\"schedule\":{\"hours\":[471304798,2070713613],\"minutes\":[78034116,484189663,1618494270],\"weekDays\":[\"Thursday\",\"Monday\",\"Wednesday\"],\"monthDays\":[1881150095,1100953393]},\"endTime\":\"iasichhxqnlmjv\",\"startTime\":\"sdfibwvhw\",\"timeZone\":\"hysrmk\"},\"notification\":{\"emails\":[\"nxzljxaayxpd\",\"vgyujkxjge\",\"zdbigitra\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"irnbpiddvbxqxoli\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"lsr\"},\"sparkConfiguration\":{\"ktbay\":\"vtzy\",\"lk\":\"asnj\",\"fdssofuxys\":\"yzlkqyezyzxkr\",\"qajfwz\":\"ltkqvikoi\"}},\"stage\":\"fgoqv\",\"entities\":[\"eiydoqbr\"],\"provisioningState\":\"Failed\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"ednkz\",\"tags\":{\"xpkrwgznacmkw\":\"jawpzrtse\"},\"properties\":{\"niadgzxbwn\":\"l\",\"u\":\"yihct\"}},\"id\":\"zozbkh\",\"name\":\"vughutiql\",\"type\":\"vnfyfyftkvzb\"}]}"; + = "{\"value\":[{\"properties\":{\"entities\":[\"rfvq\",\"cu\",\"gkmqcbrewtfuxkt\"],\"materializationSettings\":{\"notification\":{\"emailOn\":[\"JobCompleted\",\"JobFailed\",\"JobCompleted\",\"JobCancelled\"],\"emails\":[\"mlpihtep\",\"sjeb\",\"invfcdsijsinybn\"],\"webhooks\":{\"w\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"ujzoxgakqt\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Minute\",\"interval\":432694670,\"schedule\":{\"hours\":[1206543417,2028416935,311187989,2044098976],\"minutes\":[1130058229],\"monthDays\":[270875632,973229682,741272111],\"weekDays\":[\"Monday\",\"Friday\"]},\"endTime\":\"anudvqannenxg\",\"startTime\":\"mmgb\",\"timeZone\":\"yfgz\"},\"sparkConfiguration\":{\"pdsohwn\":\"qifsgzfgxwfxji\",\"hpppnksqiwl\":\"ayooghj\",\"eohoygowdzizzu\":\"egjto\"},\"storeType\":\"Offline\"},\"provisioningState\":\"Creating\",\"specification\":{\"path\":\"qvov\"},\"stage\":\"rtasepiplpexh\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"e\",\"properties\":{\"insihdzxeuf\":\"iroxamnvrcqjpb\",\"m\":\"ybt\",\"wqjcphofyoqfvm\":\"xdmppib\"},\"tags\":{\"muzltnneolghgte\":\"l\",\"qdtykcaocjuuxqnk\":\"tyxlsycckj\",\"mrwc\":\"c\"}},\"id\":\"njcvew\",\"name\":\"rjrnaktj\",\"type\":\"pigla\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.featuresetVersions() - .list("wjudx", "fvn", "zcffchn", "iyevjeht", "eaoxxsehfl", ListViewType.ARCHIVED_ONLY, 1116596337, "bpyz", - "cplphfstvurtkce", "yvaxwzbwxx", "disxsrrhr", "rbbedrn", com.azure.core.util.Context.NONE); + .list("gvfcu", "xlmqhedbqrlbyhz", "fuupqkrzvd", "pcevbkkgqfjwg", "hhpwxghwwfq", ListViewType.ALL, + 1080452613, "smsqqmdajsqe", "xftyifadsliifdr", "sr", "jspb", "bsnxmfooi", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("ednkz", response.iterator().next().properties().description()); - Assertions.assertEquals("jawpzrtse", response.iterator().next().properties().tags().get("xpkrwgznacmkw")); - Assertions.assertEquals("l", response.iterator().next().properties().properties().get("niadgzxbwn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("zuimpiybmybtihcg", response.iterator().next().properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, - response.iterator().next().properties().materializationSettings().storeType()); - Assertions.assertEquals("iasichhxqnlmjv", + Assertions.assertEquals("e", response.iterator().next().properties().description()); + Assertions.assertEquals("iroxamnvrcqjpb", + response.iterator().next().properties().properties().get("insihdzxeuf")); + Assertions.assertEquals("l", response.iterator().next().properties().tags().get("muzltnneolghgte")); + Assertions.assertFalse(response.iterator().next().properties().isAnonymous()); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); + Assertions.assertEquals("rfvq", response.iterator().next().properties().entities().get(0)); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, + response.iterator().next().properties().materializationSettings().notification().emailOn().get(0)); + Assertions.assertEquals("mlpihtep", + response.iterator().next().properties().materializationSettings().notification().emails().get(0)); + Assertions.assertEquals("ujzoxgakqt", + response.iterator().next().properties().materializationSettings().resource().instanceType()); + Assertions.assertEquals("anudvqannenxg", response.iterator().next().properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("sdfibwvhw", + Assertions.assertEquals("mmgb", response.iterator().next().properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("hysrmk", + Assertions.assertEquals("yfgz", response.iterator().next().properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, + Assertions.assertEquals(RecurrenceFrequency.MINUTE, response.iterator().next().properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(754391268, + Assertions.assertEquals(432694670, response.iterator().next().properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(471304798, + Assertions.assertEquals(1206543417, response.iterator().next().properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(78034116, + Assertions.assertEquals(1130058229, response.iterator().next().properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, - response.iterator().next().properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1881150095, + Assertions.assertEquals(270875632, response.iterator().next().properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("nxzljxaayxpd", - response.iterator().next().properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.iterator().next().properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("lsr", - response.iterator().next().properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("vtzy", - response.iterator().next().properties().materializationSettings().sparkConfiguration().get("ktbay")); - Assertions.assertEquals("fgoqv", response.iterator().next().properties().stage()); - Assertions.assertEquals("eiydoqbr", response.iterator().next().properties().entities().get(0)); + Assertions.assertEquals(WeekDay.MONDAY, + response.iterator().next().properties().materializationSettings().schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("qifsgzfgxwfxji", + response.iterator().next().properties().materializationSettings().sparkConfiguration().get("pdsohwn")); + Assertions.assertEquals(MaterializationStoreType.OFFLINE, + response.iterator().next().properties().materializationSettings().storeType()); + Assertions.assertEquals("qvov", response.iterator().next().properties().specification().path()); + Assertions.assertEquals("rtasepiplpexh", response.iterator().next().properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java index 80982e3bc57d..ccb5028eaeb3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,26 +15,27 @@ public final class FeaturestoreEntityContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturestoreEntityContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"scubiwsdrnpxqwod\",\"nextVersion\":\"fjxcjrmmuabwibv\",\"description\":\"gjonmcy\",\"tags\":{\"bamwineo\":\"y\",\"vevboclzh\":\"vfkakpold\",\"gvttx\":\"jknyu\",\"a\":\"nrup\"},\"properties\":{\"swyskbruffg\":\"dixtreki\",\"lcouqehbhbcdszir\":\"lukkutvlxhrpqhvm\"}},\"id\":\"an\",\"name\":\"oypmbltoorm\",\"type\":\"fqlwxldykalsy\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"hcekxgnlykm\",\"nextVersion\":\"pwzvmdoksqdti\",\"description\":\"wxlboncqbazqicq\",\"properties\":{\"nepubdpkxyqvgx\":\"gtvxbyj\",\"hkxdxuwsaifmc\":\"aodetv\",\"ehgcvkbcknjo\":\"nosbz\",\"pvelszerqze\":\"gjyy\"},\"tags\":{\"ntxwaljglzob\":\"qe\"}},\"id\":\"waafrqulh\",\"name\":\"zyqbhd\",\"type\":\"afjrqpjiyrqjcrg\"}") .toObject(FeaturestoreEntityContainerInner.class); - Assertions.assertEquals("gjonmcy", model.properties().description()); - Assertions.assertEquals("y", model.properties().tags().get("bamwineo")); - Assertions.assertEquals("dixtreki", model.properties().properties().get("swyskbruffg")); - Assertions.assertEquals(true, model.properties().isArchived()); + Assertions.assertEquals("wxlboncqbazqicq", model.properties().description()); + Assertions.assertEquals("gtvxbyj", model.properties().properties().get("nepubdpkxyqvgx")); + Assertions.assertEquals("qe", model.properties().tags().get("ntxwaljglzob")); + Assertions.assertFalse(model.properties().isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FeaturestoreEntityContainerInner model = new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("gjonmcy") - .withTags(mapOf("bamwineo", "y", "vevboclzh", "vfkakpold", "gvttx", "jknyu", "a", "nrup")) - .withProperties(mapOf("swyskbruffg", "dixtreki", "lcouqehbhbcdszir", "lukkutvlxhrpqhvm")) - .withIsArchived(true)); + .withProperties(new FeaturestoreEntityContainerProperties().withDescription("wxlboncqbazqicq") + .withProperties(mapOf("nepubdpkxyqvgx", "gtvxbyj", "hkxdxuwsaifmc", "aodetv", "ehgcvkbcknjo", "nosbz", + "pvelszerqze", "gjyy")) + .withTags(mapOf("ntxwaljglzob", "qe")) + .withIsArchived(false)); model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerInner.class); - Assertions.assertEquals("gjonmcy", model.properties().description()); - Assertions.assertEquals("y", model.properties().tags().get("bamwineo")); - Assertions.assertEquals("dixtreki", model.properties().properties().get("swyskbruffg")); - Assertions.assertEquals(true, model.properties().isArchived()); + Assertions.assertEquals("wxlboncqbazqicq", model.properties().description()); + Assertions.assertEquals("gtvxbyj", model.properties().properties().get("nepubdpkxyqvgx")); + Assertions.assertEquals("qe", model.properties().tags().get("ntxwaljglzob")); + Assertions.assertFalse(model.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java index 12af91c10e5d..a9c50a6eab9d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,26 +14,27 @@ public final class FeaturestoreEntityContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturestoreEntityContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"pnnbm\",\"nextVersion\":\"sibjgs\",\"description\":\"xxahmrnadzyqegxy\",\"tags\":{\"bjijkgqxnh\":\"inbmh\",\"aujvaa\":\"bkezn\",\"xw\":\"nggiycwkdtaa\",\"rq\":\"ekaum\"},\"properties\":{\"bnxwbjsidbirkf\":\"mqkra\",\"dgo\":\"kso\",\"zkye\":\"ewijymrhbguz\",\"o\":\"nfnzhhh\"}}") + "{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"dfkbnrzorpdltbq\",\"nextVersion\":\"qjf\",\"description\":\"xsaetg\",\"properties\":{\"lzdcduwjoedxng\":\"vpyigdaqq\",\"ilfjqqacdmk\":\"caifpaurww\",\"akeciqchx\":\"wxdcvjwcyz\",\"wdfmmpzhzzwvywr\":\"tuicds\"},\"tags\":{\"ondjrkclam\":\"gydgrpxncakiq\",\"ltygxhqfgqkayej\":\"glvlmfejdoqeyk\"}}") .toObject(FeaturestoreEntityContainerProperties.class); - Assertions.assertEquals("xxahmrnadzyqegxy", model.description()); - Assertions.assertEquals("inbmh", model.tags().get("bjijkgqxnh")); - Assertions.assertEquals("mqkra", model.properties().get("bnxwbjsidbirkf")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("xsaetg", model.description()); + Assertions.assertEquals("vpyigdaqq", model.properties().get("lzdcduwjoedxng")); + Assertions.assertEquals("gydgrpxncakiq", model.tags().get("ondjrkclam")); + Assertions.assertFalse(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FeaturestoreEntityContainerProperties model - = new FeaturestoreEntityContainerProperties().withDescription("xxahmrnadzyqegxy") - .withTags(mapOf("bjijkgqxnh", "inbmh", "aujvaa", "bkezn", "xw", "nggiycwkdtaa", "rq", "ekaum")) - .withProperties(mapOf("bnxwbjsidbirkf", "mqkra", "dgo", "kso", "zkye", "ewijymrhbguz", "o", "nfnzhhh")) + = new FeaturestoreEntityContainerProperties().withDescription("xsaetg") + .withProperties(mapOf("lzdcduwjoedxng", "vpyigdaqq", "ilfjqqacdmk", "caifpaurww", "akeciqchx", + "wxdcvjwcyz", "wdfmmpzhzzwvywr", "tuicds")) + .withTags(mapOf("ondjrkclam", "gydgrpxncakiq", "ltygxhqfgqkayej", "glvlmfejdoqeyk")) .withIsArchived(false); model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerProperties.class); - Assertions.assertEquals("xxahmrnadzyqegxy", model.description()); - Assertions.assertEquals("inbmh", model.tags().get("bjijkgqxnh")); - Assertions.assertEquals("mqkra", model.properties().get("bnxwbjsidbirkf")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("xsaetg", model.description()); + Assertions.assertEquals("vpyigdaqq", model.properties().get("lzdcduwjoedxng")); + Assertions.assertEquals("gydgrpxncakiq", model.tags().get("ondjrkclam")); + Assertions.assertFalse(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java index 8d9c0bd9778e..52155dcdfe36 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java @@ -1,79 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityContainerResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class FeaturestoreEntityContainerResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturestoreEntityContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"dhga\",\"nextVersion\":\"pirpiwrqof\",\"description\":\"o\",\"tags\":{\"cbjpibkephuu\":\"nlexw\",\"qpbrlc\":\"erctatoyin\"},\"properties\":{\"crrpcjttbstvje\":\"uczkgofxyfsruc\",\"mlghktuidvrmazlp\":\"qnrmvvfko\"}},\"id\":\"wex\",\"name\":\"mzvlazipbh\",\"type\":\"wvqsgny\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"ens\",\"nextVersion\":\"meyyvpkpatlb\",\"description\":\"pzgsk\",\"tags\":{\"xwcdomm\":\"hfvolmknb\"},\"properties\":{\"zfgbrttuiaclkie\":\"qa\",\"hiqfyuttdiy\":\"hajlfn\",\"vnwsw\":\"b\",\"cvogygzyvne\":\"txkyctwwgzwxjlm\"}},\"id\":\"aifghtmoqqt\",\"name\":\"ffhzbkrkjjjavfq\",\"type\":\"vhnqo\"},{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"yetesy\",\"nextVersion\":\"idbz\",\"description\":\"hqtfbovn\",\"tags\":{\"kzyaup\":\"bwetnjuhpsp\",\"vmaonurjt\":\"accxnafbwqroohtu\"},\"properties\":{\"lbl\":\"hihpvecmsl\",\"bsjuscvsfx\":\"jxl\",\"cydrtceukdqkk\":\"gctmgxuupbezq\"}},\"id\":\"hztgeqmgqzgwld\",\"name\":\"ychillcecfe\",\"type\":\"uwaoaguhicqlli\"},{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"jvhrweft\",\"nextVersion\":\"qejpmvssehaepwa\",\"description\":\"xtczhupeuknijd\",\"tags\":{\"ydjfb\":\"es\",\"v\":\"c\",\"uflgbhgauacdixm\":\"hulrtywikdmhla\",\"ryjqgdkf\":\"ufr\"},\"properties\":{\"vjhvefgwbm\":\"oeoq\"}},\"id\":\"c\",\"name\":\"ntasfaymxbu\",\"type\":\"pzealbmqkyojw\"}],\"nextLink\":\"fkmbtsuahxsgxj\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"wf\",\"nextVersion\":\"ii\",\"description\":\"ijjcea\",\"properties\":{\"tvamcaszknx\":\"jjj\"},\"tags\":{\"k\":\"cxetyvkunmignoh\",\"bxbhmedeilbj\":\"gqogjwpindedva\",\"hvwyp\":\"wfcfxzirzz\"}},\"id\":\"u\",\"name\":\"jslczwciidj\",\"type\":\"llfryvdmvxadq\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"awba\",\"nextVersion\":\"fbktyjmfczlf\",\"description\":\"qkfrbzgowoxqmj\",\"properties\":{\"qg\":\"cxn\"},\"tags\":{\"simjceagbjqvlsu\":\"usrvx\",\"gon\":\"ywzash\"}},\"id\":\"jfqipubyznclkfk\",\"name\":\"ebgvo\",\"type\":\"e\"},{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"jly\",\"nextVersion\":\"qavn\",\"description\":\"flqqbtnyjpylxd\",\"properties\":{\"kottlwuhvajmailf\":\"abmvmsxbaevwjc\"},\"tags\":{\"xbdmvrscmqernd\":\"jzakzwjiqull\",\"dj\":\"rnyeofltfnnxrk\",\"ipfohykfkx\":\"ynnfmuiii\",\"woiymrvz\":\"bcbrwjiutgnjizbe\"}},\"id\":\"uyrsrziuctix\",\"name\":\"bdsuifr\",\"type\":\"vka\"}],\"nextLink\":\"ezkiswqjmdghsypa\"}") .toObject(FeaturestoreEntityContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("o", model.value().get(0).properties().description()); - Assertions.assertEquals("nlexw", model.value().get(0).properties().tags().get("cbjpibkephuu")); - Assertions.assertEquals("uczkgofxyfsruc", model.value().get(0).properties().properties().get("crrpcjttbstvje")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("fkmbtsuahxsgxj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityContainerResourceArmPaginatedResult model - = new FeaturestoreEntityContainerResourceArmPaginatedResult() - .withValue( - Arrays.asList( - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("o") - .withTags(mapOf("cbjpibkephuu", "nlexw", "qpbrlc", "erctatoyin")) - .withProperties( - mapOf("crrpcjttbstvje", "uczkgofxyfsruc", "mlghktuidvrmazlp", "qnrmvvfko")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("pzgsk") - .withTags(mapOf("xwcdomm", "hfvolmknb")) - .withProperties(mapOf("zfgbrttuiaclkie", "qa", "hiqfyuttdiy", "hajlfn", "vnwsw", "b", - "cvogygzyvne", "txkyctwwgzwxjlm")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("hqtfbovn") - .withTags(mapOf("kzyaup", "bwetnjuhpsp", "vmaonurjt", "accxnafbwqroohtu")) - .withProperties( - mapOf("lbl", "hihpvecmsl", "bsjuscvsfx", "jxl", "cydrtceukdqkk", "gctmgxuupbezq")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner().withProperties( - new FeaturestoreEntityContainerProperties().withDescription("xtczhupeuknijd") - .withTags(mapOf("ydjfb", "es", "v", "c", "uflgbhgauacdixm", "hulrtywikdmhla", - "ryjqgdkf", "ufr")) - .withProperties(mapOf("vjhvefgwbm", "oeoq")) - .withIsArchived(true)))) - .withNextLink("fkmbtsuahxsgxj"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("o", model.value().get(0).properties().description()); - Assertions.assertEquals("nlexw", model.value().get(0).properties().tags().get("cbjpibkephuu")); - Assertions.assertEquals("uczkgofxyfsruc", model.value().get(0).properties().properties().get("crrpcjttbstvje")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("fkmbtsuahxsgxj", 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; + Assertions.assertEquals("ijjcea", model.value().get(0).properties().description()); + Assertions.assertEquals("jjj", model.value().get(0).properties().properties().get("tvamcaszknx")); + Assertions.assertEquals("cxetyvkunmignoh", model.value().get(0).properties().tags().get("k")); + Assertions.assertTrue(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("ezkiswqjmdghsypa", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java index f7d14448a078..ec4688d11058 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; @@ -24,29 +24,29 @@ public final class FeaturestoreEntityContainersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"wxrqiwxeppu\",\"nextVersion\":\"izoak\",\"description\":\"jyv\",\"tags\":{\"s\":\"vfbmxzobpg\",\"ybyilhdbb\":\"lkpajio\",\"t\":\"meuyxhcwu\",\"choji\":\"go\"},\"properties\":{\"frgiplxrifbsbk\":\"q\",\"dbbpoijsxvrutji\":\"fk\",\"ktpj\":\"uufknarscx\"}},\"id\":\"zos\",\"name\":\"rsm\",\"type\":\"nn\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"lhjeuewaauxkvrur\",\"nextVersion\":\"qytaqjho\",\"description\":\"ijgh\",\"properties\":{\"tbwyarqthb\":\"qpxkikd\",\"fqw\":\"blh\"},\"tags\":{\"lnbxoucsddplgjfh\":\"xtpzdgyilwuiklb\",\"t\":\"iahokeacmadyo\",\"cctwbe\":\"dauo\"}},\"id\":\"ntoe\",\"name\":\"eufgdg\",\"type\":\"zftsb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturestoreEntityContainer response = manager.featurestoreEntityContainers() - .define("jckyocyb") - .withExistingWorkspace("cyulwzjorvsgmkk", "les") - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("uywfhltwlz") - .withTags(mapOf("ybmkmxusm", "iprlcgqewmnwyhq", "uniu", "papepwpbnjckow", "zypmmyr", "ysvnddllbwnmvh")) - .withProperties(mapOf("tltlmczcxouane", "douzohihqlwyqsxe", "pvdmtfcstucmi", "epgqztakovslv", "qitiut", - "sdsnuqqg", "xjkclz", "ka")) + .define("pufhwpkpejfszw") + .withExistingWorkspace("ohsymgkirfzvtz", "qoilipmuufsekz") + .withProperties(new FeaturestoreEntityContainerProperties().withDescription("ka") + .withProperties( + mapOf("dc", "fj", "frzqwytgggidr", "qja", "cpqkpgbssjqj", "dykjchzcz", "pbko", "tcvdzytsd")) + .withTags(mapOf("vmfsfruenqfn", "jcrppnjzb")) .withIsArchived(true)) .create(); - Assertions.assertEquals("jyv", response.properties().description()); - Assertions.assertEquals("vfbmxzobpg", response.properties().tags().get("s")); - Assertions.assertEquals("q", response.properties().properties().get("frgiplxrifbsbk")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("ijgh", response.properties().description()); + Assertions.assertEquals("qpxkikd", response.properties().properties().get("tbwyarqthb")); + Assertions.assertEquals("xtpzdgyilwuiklb", response.properties().tags().get("lnbxoucsddplgjfh")); + Assertions.assertTrue(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java index ff4f3f76de62..d7fe12fb91cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.featurestoreEntityContainers() - .delete("lmegj", "oseohoygowdzizzu", "d", com.azure.core.util.Context.NONE); + manager.featurestoreEntityContainers().delete("oe", "jikwsuxrs", "xtx", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java index 3a1a5c42f35e..994eeb84b35b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; @@ -21,23 +21,22 @@ public final class FeaturestoreEntityContainersGetEntityWithResponseMockTests { @Test public void testGetEntityWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"sihdzxeufjybtz\",\"nextVersion\":\"xdmppib\",\"description\":\"qjcphofyoqfvm\",\"tags\":{\"muzltnneolghgte\":\"l\",\"qdtykcaocjuuxqnk\":\"tyxlsycckj\",\"mrwc\":\"c\"},\"properties\":{\"pigla\":\"jcvewlrjrnaktj\",\"hrrxmc\":\"heqjc\"}},\"id\":\"rqnuahhke\",\"name\":\"v\",\"type\":\"rbdujpshiszivr\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"mfvjz\",\"nextVersion\":\"etpdezebvtkgzjna\",\"description\":\"hheilnhkcxuou\",\"properties\":{\"yofts\":\"ckogcvazozov\",\"tnqeonyizqdw\":\"diydwklkuamxho\",\"ppf\":\"gmkztwzlwellh\"},\"tags\":{\"zedudktgd\":\"f\",\"cflhycluou\":\"watfvjvumim\"}},\"id\":\"rqvxnoazari\",\"name\":\"czezeewcrblksddb\",\"type\":\"hgvj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturestoreEntityContainer response = manager.featurestoreEntityContainers() - .getEntityWithResponse("rcppqvovsirtas", "piplpexhhjjatlep", "biroxamnvrcq", - com.azure.core.util.Context.NONE) + .getEntityWithResponse("rarjiijpbychc", "hlhdz", "crlfcmeyxyp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qjcphofyoqfvm", response.properties().description()); - Assertions.assertEquals("l", response.properties().tags().get("muzltnneolghgte")); - Assertions.assertEquals("jcvewlrjrnaktj", response.properties().properties().get("pigla")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("hheilnhkcxuou", response.properties().description()); + Assertions.assertEquals("ckogcvazozov", response.properties().properties().get("yofts")); + Assertions.assertEquals("f", response.properties().tags().get("zedudktgd")); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java index 19f9395e6d13..e925c605655c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; @@ -23,22 +23,23 @@ public final class FeaturestoreEntityContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":true,\"latestVersion\":\"nybnt\",\"nextVersion\":\"w\",\"description\":\"xujzox\",\"tags\":{\"hulxgce\":\"qtkrjucazwedm\",\"anudvqannenxg\":\"x\"},\"properties\":{\"pqifsgzfgxwf\":\"mgblqyfgzb\"}},\"id\":\"iq\",\"name\":\"dsohwnnayo\",\"type\":\"ghjxhpppnksqi\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"meyoncxjevmawxr\",\"nextVersion\":\"tynqbhhfhi\",\"description\":\"wkhiyubykxz\",\"properties\":{\"anzolqqpanzpzmo\":\"ttyihpsrjzpvojw\",\"yowisqfifmit\":\"upqlusxkzdnot\"},\"tags\":{\"bceims\":\"pkiqloue\",\"wqmraih\":\"otynaehl\"}},\"id\":\"cjvzlgclia\",\"name\":\"qwxvihyirp\",\"type\":\"oxexvt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.featurestoreEntityContainers() - .list("n", "mfooi", "pn", "fvqgcuwgkmqcbr", ListViewType.ACTIVE_ONLY, 785699585, "fuxktsxnikc", "ittfmlp", - "htepasjebrinvfc", com.azure.core.util.Context.NONE); + .list("uypdcgx", "kbwv", "wbbzcm", "b", ListViewType.ACTIVE_ONLY, 1340845429, "gclksmrgjf", "fmjckct", + "bhsgqi", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xujzox", response.iterator().next().properties().description()); - Assertions.assertEquals("qtkrjucazwedm", response.iterator().next().properties().tags().get("hulxgce")); - Assertions.assertEquals("mgblqyfgzb", response.iterator().next().properties().properties().get("pqifsgzfgxwf")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("wkhiyubykxz", response.iterator().next().properties().description()); + Assertions.assertEquals("ttyihpsrjzpvojw", + response.iterator().next().properties().properties().get("anzolqqpanzpzmo")); + Assertions.assertEquals("pkiqloue", response.iterator().next().properties().tags().get("bceims")); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java index 89e29e41dab9..a8a36ce143dc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,38 +18,41 @@ public final class FeaturestoreEntityVersionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturestoreEntityVersionInner model = BinaryData.fromString( - "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Float\",\"columnName\":\"xhzzyse\"}],\"stage\":\"sxivzrrryvei\",\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"atvfuzkaftj\",\"tags\":{\"tgrqgdgkkile\":\"uxwigsyeipqdsm\"},\"properties\":{\"baedorvvmqfl\":\"csmknhwt\",\"gdexjd\":\"ygbdgwumgxdgdhpa\"}},\"id\":\"jsaqwotmmwllcols\",\"name\":\"sxap\",\"type\":\"efh\"}") + "{\"properties\":{\"indexColumns\":[{\"columnName\":\"ufptb\",\"dataType\":\"String\"},{\"columnName\":\"nciuiyqvldaswvpp\",\"dataType\":\"Double\"},{\"columnName\":\"zlgcndhzxrrf\",\"dataType\":\"Boolean\"},{\"columnName\":\"hkhg\",\"dataType\":\"Long\"}],\"provisioningState\":\"Canceled\",\"stage\":\"kpphefsbzx\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"eikjclwza\",\"properties\":{\"qbxyxoyfpuqqi\":\"wpfsuqtaaz\",\"wvpsoz\":\"ezxlhdjzqdca\"},\"tags\":{\"rz\":\"hjriyb\"}},\"id\":\"pnx\",\"name\":\"dvwnjkgvfnmxa\",\"type\":\"rsqftib\"}") .toObject(FeaturestoreEntityVersionInner.class); - Assertions.assertEquals("atvfuzkaftj", model.properties().description()); - Assertions.assertEquals("uxwigsyeipqdsm", model.properties().tags().get("tgrqgdgkkile")); - Assertions.assertEquals("csmknhwt", model.properties().properties().get("baedorvvmqfl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.FLOAT, model.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("xhzzyse", model.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("sxivzrrryvei", model.properties().stage()); + Assertions.assertEquals("eikjclwza", model.properties().description()); + Assertions.assertEquals("wpfsuqtaaz", model.properties().properties().get("qbxyxoyfpuqqi")); + Assertions.assertEquals("hjriyb", model.properties().tags().get("rz")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertFalse(model.properties().isArchived()); + Assertions.assertEquals("ufptb", model.properties().indexColumns().get(0).columnName()); + Assertions.assertEquals(FeatureDataType.STRING, model.properties().indexColumns().get(0).dataType()); + Assertions.assertEquals("kpphefsbzx", model.properties().stage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FeaturestoreEntityVersionInner model = new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("atvfuzkaftj") - .withTags(mapOf("tgrqgdgkkile", "uxwigsyeipqdsm")) - .withProperties(mapOf("baedorvvmqfl", "csmknhwt", "gdexjd", "ygbdgwumgxdgdhpa")) - .withIsArchived(true) + .withProperties(new FeaturestoreEntityVersionProperties().withDescription("eikjclwza") + .withProperties(mapOf("qbxyxoyfpuqqi", "wpfsuqtaaz", "wvpsoz", "ezxlhdjzqdca")) + .withTags(mapOf("rz", "hjriyb")) .withIsAnonymous(true) + .withIsArchived(false) .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.FLOAT).withColumnName("xhzzyse"))) - .withStage("sxivzrrryvei")); + Arrays.asList(new IndexColumn().withColumnName("ufptb").withDataType(FeatureDataType.STRING), + new IndexColumn().withColumnName("nciuiyqvldaswvpp").withDataType(FeatureDataType.DOUBLE), + new IndexColumn().withColumnName("zlgcndhzxrrf").withDataType(FeatureDataType.BOOLEAN), + new IndexColumn().withColumnName("hkhg").withDataType(FeatureDataType.LONG))) + .withStage("kpphefsbzx")); model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionInner.class); - Assertions.assertEquals("atvfuzkaftj", model.properties().description()); - Assertions.assertEquals("uxwigsyeipqdsm", model.properties().tags().get("tgrqgdgkkile")); - Assertions.assertEquals("csmknhwt", model.properties().properties().get("baedorvvmqfl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.FLOAT, model.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("xhzzyse", model.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("sxivzrrryvei", model.properties().stage()); + Assertions.assertEquals("eikjclwza", model.properties().description()); + Assertions.assertEquals("wpfsuqtaaz", model.properties().properties().get("qbxyxoyfpuqqi")); + Assertions.assertEquals("hjriyb", model.properties().tags().get("rz")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertFalse(model.properties().isArchived()); + Assertions.assertEquals("ufptb", model.properties().indexColumns().get(0).columnName()); + Assertions.assertEquals(FeatureDataType.STRING, model.properties().indexColumns().get(0).dataType()); + Assertions.assertEquals("kpphefsbzx", model.properties().stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java index 4f4a75c911be..5af97181d4c8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,40 +17,40 @@ public final class FeaturestoreEntityVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturestoreEntityVersionProperties model = BinaryData.fromString( - "{\"indexColumns\":[{\"dataType\":\"Long\",\"columnName\":\"kjljnhv\"},{\"dataType\":\"Boolean\",\"columnName\":\"ek\"},{\"dataType\":\"Datetime\",\"columnName\":\"snbksdqhj\"},{\"dataType\":\"Long\",\"columnName\":\"xeslkhhustcpoqm\"}],\"stage\":\"nwqjwgokn\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"b\",\"tags\":{\"ensvkzykjtj\":\"bkjbz\",\"hcdpkupnqrmgj\":\"nsxfwu\",\"fiz\":\"bpkuwxeoio\",\"jzwfb\":\"av\"},\"properties\":{\"mmfz\":\"y\",\"rzx\":\"bfw\"}}") + "{\"indexColumns\":[{\"columnName\":\"uyvpirf\",\"dataType\":\"Integer\"},{\"columnName\":\"qnoowsbedenrex\",\"dataType\":\"Integer\"},{\"columnName\":\"xvucnul\",\"dataType\":\"Integer\"}],\"provisioningState\":\"Deleting\",\"stage\":\"vdyznf\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"kmq\",\"properties\":{\"jrliiz\":\"kivy\",\"nqqlmgnl\":\"ixlqfhefkwabsolr\",\"o\":\"xsjxtelexhvuqboz\",\"lbcnndt\":\"zqocarku\"},\"tags\":{\"ckze\":\"awqytllhdyzm\",\"mxgaabjkdtfohfao\":\"nxakckyw\"}}") .toObject(FeaturestoreEntityVersionProperties.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals("bkjbz", model.tags().get("ensvkzykjtj")); - Assertions.assertEquals("y", model.properties().get("mmfz")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(FeatureDataType.LONG, model.indexColumns().get(0).dataType()); - Assertions.assertEquals("kjljnhv", model.indexColumns().get(0).columnName()); - Assertions.assertEquals("nwqjwgokn", model.stage()); + Assertions.assertEquals("kmq", model.description()); + Assertions.assertEquals("kivy", model.properties().get("jrliiz")); + Assertions.assertEquals("awqytllhdyzm", model.tags().get("ckze")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("uyvpirf", model.indexColumns().get(0).columnName()); + Assertions.assertEquals(FeatureDataType.INTEGER, model.indexColumns().get(0).dataType()); + Assertions.assertEquals("vdyznf", model.stage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturestoreEntityVersionProperties model = new FeaturestoreEntityVersionProperties().withDescription("b") - .withTags(mapOf("ensvkzykjtj", "bkjbz", "hcdpkupnqrmgj", "nsxfwu", "fiz", "bpkuwxeoio", "jzwfb", "av")) - .withProperties(mapOf("mmfz", "y", "rzx", "bfw")) - .withIsArchived(false) + FeaturestoreEntityVersionProperties model = new FeaturestoreEntityVersionProperties().withDescription("kmq") + .withProperties( + mapOf("jrliiz", "kivy", "nqqlmgnl", "ixlqfhefkwabsolr", "o", "xsjxtelexhvuqboz", "lbcnndt", "zqocarku")) + .withTags(mapOf("ckze", "awqytllhdyzm", "mxgaabjkdtfohfao", "nxakckyw")) .withIsAnonymous(true) + .withIsArchived(true) .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("kjljnhv"), - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("ek"), - new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("snbksdqhj"), - new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("xeslkhhustcpoqm"))) - .withStage("nwqjwgokn"); + Arrays.asList(new IndexColumn().withColumnName("uyvpirf").withDataType(FeatureDataType.INTEGER), + new IndexColumn().withColumnName("qnoowsbedenrex").withDataType(FeatureDataType.INTEGER), + new IndexColumn().withColumnName("xvucnul").withDataType(FeatureDataType.INTEGER))) + .withStage("vdyznf"); model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionProperties.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals("bkjbz", model.tags().get("ensvkzykjtj")); - Assertions.assertEquals("y", model.properties().get("mmfz")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(FeatureDataType.LONG, model.indexColumns().get(0).dataType()); - Assertions.assertEquals("kjljnhv", model.indexColumns().get(0).columnName()); - Assertions.assertEquals("nwqjwgokn", model.stage()); + Assertions.assertEquals("kmq", model.description()); + Assertions.assertEquals("kivy", model.properties().get("jrliiz")); + Assertions.assertEquals("awqytllhdyzm", model.tags().get("ckze")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("uyvpirf", model.indexColumns().get(0).columnName()); + Assertions.assertEquals(FeatureDataType.INTEGER, model.indexColumns().get(0).dataType()); + Assertions.assertEquals("vdyznf", model.stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java index c8dcd9cf9512..93eca4c6f08d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java @@ -1,112 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; +import com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityVersionResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class FeaturestoreEntityVersionResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturestoreEntityVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"indexColumns\":[{\"dataType\":\"Boolean\",\"columnName\":\"ycyarnroohg\"},{\"dataType\":\"Integer\",\"columnName\":\"oghktdpycz\"},{\"dataType\":\"Binary\",\"columnName\":\"ocnhzqrottjzcfyj\"}],\"stage\":\"twrlohapqin\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"d\",\"tags\":{\"pjby\":\"jzralc\",\"hf\":\"psjoqcjenk\"},\"properties\":{\"jhhhqxu\":\"sqxfxjelgcmpz\",\"oyvivbsiz\":\"yvca\",\"bscm\":\"sjsz\",\"v\":\"lzijiufehgmvflnw\"}},\"id\":\"xrerlniylylyf\",\"name\":\"xzutgqztwhghmupg\",\"type\":\"yjtcdxabbujftab\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Long\",\"columnName\":\"qpxzucafeddwwn\"},{\"dataType\":\"String\",\"columnName\":\"wxudgn\"},{\"dataType\":\"Binary\",\"columnName\":\"krtalvn\"}],\"stage\":\"gpbemeluclvdjju\",\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"xahhxhqfaqnvzo\",\"tags\":{\"ejdtxptl\":\"ipemchgavscz\",\"zhomewjjstliu\":\"h\",\"nvodrrs\":\"qawmoaianc\",\"vvbxiwkgfbqljnq\":\"blxydkxr\"},\"properties\":{\"lrqff\":\"chocokulehur\",\"ravjuq\":\"weyurkphyjd\",\"apx\":\"brxmrgch\"}},\"id\":\"y\",\"name\":\"jjk\",\"type\":\"ajb\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Boolean\",\"columnName\":\"u\"},{\"dataType\":\"Double\",\"columnName\":\"cblevpmc\"}],\"stage\":\"jy\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"jgkz\",\"tags\":{\"ovwmbjlzqsczpgvd\":\"afhbzf\"},\"properties\":{\"jtks\":\"pfdqwowftptnu\"}},\"id\":\"gcgqyhleseyqrhvy\",\"name\":\"ldotjvdkwisws\",\"type\":\"ukjtasbvwispkxk\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Binary\",\"columnName\":\"dlqvtwknvg\"},{\"dataType\":\"Binary\",\"columnName\":\"gtywatmqaqkue\"},{\"dataType\":\"Double\",\"columnName\":\"oeshoygzcbyfq\"},{\"dataType\":\"Binary\",\"columnName\":\"oytehqpuvjm\"}],\"stage\":\"mtdwcky\",\"provisioningState\":\"Deleting\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ljdjuskbrreqy\",\"tags\":{\"ysh\":\"eysfaqegplw\",\"ybwptda\":\"ddkvbxgkqu\",\"mt\":\"arvvlfnt\"},\"properties\":{\"r\":\"wenaz\",\"qalsxkd\":\"hzr\",\"vessm\":\"wqapfgsdp\"}},\"id\":\"h\",\"name\":\"uuipldq\",\"type\":\"ctekval\"}],\"nextLink\":\"htjqvqyvw\"}") + "{\"value\":[{\"properties\":{\"indexColumns\":[{\"columnName\":\"ueekcsue\",\"dataType\":\"Integer\"},{\"columnName\":\"dac\",\"dataType\":\"Binary\"},{\"columnName\":\"ydl\",\"dataType\":\"String\"}],\"provisioningState\":\"Succeeded\",\"stage\":\"hmptyrilkfbn\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"tpbnfnqtxjtoma\",\"properties\":{\"dwq\":\"bnfddep\",\"zygleexahvm\":\"ns\",\"sjjzyvoaqajuveh\":\"whsbrcary\"},\"tags\":{\"mpfu\":\"dmkrrb\",\"mpzkrvfyifkd\":\"ubefgybpmfbfunu\",\"tnkjjwgcwnphb\":\"chlzvfi\",\"fp\":\"gfyrtogmhmjpjsc\"}},\"id\":\"wtyg\",\"name\":\"vgwmseharxifvqnr\",\"type\":\"tmbpjp\"},{\"properties\":{\"indexColumns\":[{\"columnName\":\"jhrsidqpxlb\",\"dataType\":\"Long\"},{\"columnName\":\"f\",\"dataType\":\"Double\"},{\"columnName\":\"twmykyut\",\"dataType\":\"Long\"},{\"columnName\":\"wmfjhp\",\"dataType\":\"Double\"}],\"provisioningState\":\"Failed\",\"stage\":\"vdwkqpldr\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"avuagnteta\",\"properties\":{\"dc\":\"n\",\"uyld\":\"uhspfefyihduy\",\"mwynefxexlfciatx\":\"hmtybkcgsuthhll\",\"kmdskjhhxd\":\"jrr\"},\"tags\":{\"cvslxlhuavkrmukm\":\"foxcx\",\"qid\":\"jmkxettcslojf\",\"tkbtnqlrngl\":\"qtoqxjhqxcsq\",\"nxhhl\":\"mbiipsnawwlqk\"}},\"id\":\"ricctkwmuqqoa\",\"name\":\"xeiyglesr\",\"type\":\"vaexh\"},{\"properties\":{\"indexColumns\":[{\"columnName\":\"ceqnkbrupobehd\",\"dataType\":\"Boolean\"},{\"columnName\":\"acvumepj\",\"dataType\":\"Long\"},{\"columnName\":\"nzpphepife\",\"dataType\":\"Integer\"},{\"columnName\":\"i\",\"dataType\":\"Double\"}],\"provisioningState\":\"Failed\",\"stage\":\"ykcgxvrpjlvcz\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"u\",\"properties\":{\"oy\":\"tepdjxqes\",\"aewse\":\"uiylpc\",\"xegqphr\":\"vesk\"},\"tags\":{\"tsghpbcbcp\":\"zhctm\",\"ypefcpczshnuqnda\":\"arpzeqacdldtzm\",\"vtvegwqiukvzw\":\"zupfkhuytuszxhm\"}},\"id\":\"wtthaokgksk\",\"name\":\"i\",\"type\":\"bs\"}],\"nextLink\":\"ajq\"}") .toObject(FeaturestoreEntityVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("jzralc", model.value().get(0).properties().tags().get("pjby")); - Assertions.assertEquals("sqxfxjelgcmpz", model.value().get(0).properties().properties().get("jhhhqxu")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.BOOLEAN, + Assertions.assertEquals("tpbnfnqtxjtoma", model.value().get(0).properties().description()); + Assertions.assertEquals("bnfddep", model.value().get(0).properties().properties().get("dwq")); + Assertions.assertEquals("dmkrrb", model.value().get(0).properties().tags().get("mpfu")); + Assertions.assertTrue(model.value().get(0).properties().isAnonymous()); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("ueekcsue", model.value().get(0).properties().indexColumns().get(0).columnName()); + Assertions.assertEquals(FeatureDataType.INTEGER, model.value().get(0).properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ycyarnroohg", model.value().get(0).properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("twrlohapqin", model.value().get(0).properties().stage()); - Assertions.assertEquals("htjqvqyvw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityVersionResourceArmPaginatedResult model - = new FeaturestoreEntityVersionResourceArmPaginatedResult() - .withValue(Arrays.asList( - new FeaturestoreEntityVersionInner().withProperties(new FeaturestoreEntityVersionProperties() - .withDescription("d") - .withTags(mapOf("pjby", "jzralc", "hf", "psjoqcjenk")) - .withProperties(mapOf("jhhhqxu", "sqxfxjelgcmpz", "oyvivbsiz", "yvca", "bscm", "sjsz", "v", - "lzijiufehgmvflnw")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("ycyarnroohg"), - new IndexColumn().withDataType(FeatureDataType.INTEGER).withColumnName("oghktdpycz"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("ocnhzqrottjzcfyj"))) - .withStage("twrlohapqin")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("xahhxhqfaqnvzo") - .withTags(mapOf("ejdtxptl", "ipemchgavscz", "zhomewjjstliu", "h", "nvodrrs", "qawmoaianc", - "vvbxiwkgfbqljnq", "blxydkxr")) - .withProperties(mapOf("lrqff", "chocokulehur", "ravjuq", "weyurkphyjd", "apx", "brxmrgch")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("qpxzucafeddwwn"), - new IndexColumn().withDataType(FeatureDataType.STRING).withColumnName("wxudgn"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("krtalvn"))) - .withStage("gpbemeluclvdjju")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("jgkz") - .withTags(mapOf("ovwmbjlzqsczpgvd", "afhbzf")) - .withProperties(mapOf("jtks", "pfdqwowftptnu")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("u"), - new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("cblevpmc"))) - .withStage("jy")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("ljdjuskbrreqy") - .withTags(mapOf("ysh", "eysfaqegplw", "ybwptda", "ddkvbxgkqu", "mt", "arvvlfnt")) - .withProperties(mapOf("r", "wenaz", "qalsxkd", "hzr", "vessm", "wqapfgsdp")) - .withIsArchived(false) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("dlqvtwknvg"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("gtywatmqaqkue"), - new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("oeshoygzcbyfq"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("oytehqpuvjm"))) - .withStage("mtdwcky")))) - .withNextLink("htjqvqyvw"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("jzralc", model.value().get(0).properties().tags().get("pjby")); - Assertions.assertEquals("sqxfxjelgcmpz", model.value().get(0).properties().properties().get("jhhhqxu")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.BOOLEAN, - model.value().get(0).properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ycyarnroohg", model.value().get(0).properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("twrlohapqin", model.value().get(0).properties().stage()); - Assertions.assertEquals("htjqvqyvw", 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; + Assertions.assertEquals("hmptyrilkfbn", model.value().get(0).properties().stage()); + Assertions.assertEquals("ajq", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java index f013b12920d8..f57ae291667c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeatureDataType; @@ -27,40 +27,38 @@ public final class FeaturestoreEntityVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Double\",\"columnName\":\"kwsuxrs\"},{\"dataType\":\"String\",\"columnName\":\"uu\"}],\"stage\":\"dcgxnkbwvuwbbz\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"cl\",\"tags\":{\"jfyfmjc\":\"r\"},\"properties\":{\"lmeyoncxjevma\":\"ybhsgqiumkt\"}},\"id\":\"rgwtynqbhhfhi\",\"name\":\"wwkhiyubykxzcvut\",\"type\":\"yihpsrjzpvojwjan\"}"; + = "{\"properties\":{\"indexColumns\":[{\"columnName\":\"dvytecuvejlc\",\"dataType\":\"String\"},{\"columnName\":\"kkjvrrvj\",\"dataType\":\"Binary\"},{\"columnName\":\"hyirsvred\",\"dataType\":\"Boolean\"},{\"columnName\":\"qpblqubfpeomegyn\",\"dataType\":\"String\"}],\"provisioningState\":\"Succeeded\",\"stage\":\"qvajz\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"ythuioixpfgq\",\"properties\":{\"ehuweuitqe\":\"ojwvvqcjrmnverbf\",\"gawlojwvrovjvjj\":\"onmo\",\"jmujz\":\"ypcnbucb\"},\"tags\":{\"axhfu\":\"s\",\"mssdvjvdcc\":\"ygssssjcpfepy\",\"fmmwkakyxyksd\":\"yzrd\",\"fvbhtueynxkxqnwc\":\"lrwqm\"}},\"id\":\"qsbncadfapzebjeg\",\"name\":\"wgverbywu\",\"type\":\"veisjbpzdwhxputk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturestoreEntityVersion response = manager.featurestoreEntityVersions() - .define("razwkcohjxoc") - .withExistingFeaturestoreEntity("bckl", "sxuuksvfsukpk", "ealbckpnnenrcezt") - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("jnadfhheilnh") - .withTags(mapOf("azozo", "uounzzckogc", "diydwklkuamxho", "nyofts", "gmkztwzlwellh", "tnqeonyizqdw", - "vrfuzedudkt", "ppf")) - .withProperties(mapOf("cflhycluou", "watfvjvumim")) - .withIsArchived(false) + .define("szcwwv") + .withExistingFeaturestoreEntity("hyjueddtkpysmal", "jabzs", "buzaxmkuthooaic") + .withProperties(new FeaturestoreEntityVersionProperties().withDescription("seceuvyn") + .withProperties(mapOf("xfyzq", "zcu", "tbiycepjklly", "suxmlsu", "xeyumwlbpyidecff", "dsormbvir")) + .withTags(mapOf("swhdglxppewtl", "zwqzbsqwjypioszc", "nffczwzrxvvblb", "swul", "mcwmqpcwoe", + "priyttiqdcjg", "bsibzmvd", "jrfrucpefwdxbp")) .withIsAnonymous(true) - .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("orhkneu"), - new IndexColumn().withDataType(FeatureDataType.INTEGER).withColumnName("wizznkrarjii"), - new IndexColumn().withDataType(FeatureDataType.FLOAT).withColumnName("chcwhlhdzdcrlf"), - new IndexColumn().withDataType(FeatureDataType.STRING).withColumnName("xypxlzcrtmfvjzcv"))) - .withStage("pde")) + .withIsArchived(true) + .withIndexColumns(Arrays.asList( + new IndexColumn().withColumnName("bivhjryppmmtqx").withDataType(FeatureDataType.STRING), + new IndexColumn().withColumnName("e").withDataType(FeatureDataType.FLOAT))) + .withStage("orajdbglkff")) .create(); - Assertions.assertEquals("cl", response.properties().description()); - Assertions.assertEquals("r", response.properties().tags().get("jfyfmjc")); - Assertions.assertEquals("ybhsgqiumkt", response.properties().properties().get("lmeyoncxjevma")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DOUBLE, response.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("kwsuxrs", response.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("dcgxnkbwvuwbbz", response.properties().stage()); + Assertions.assertEquals("ythuioixpfgq", response.properties().description()); + Assertions.assertEquals("ojwvvqcjrmnverbf", response.properties().properties().get("ehuweuitqe")); + Assertions.assertEquals("s", response.properties().tags().get("axhfu")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("dvytecuvejlc", response.properties().indexColumns().get(0).columnName()); + Assertions.assertEquals(FeatureDataType.STRING, response.properties().indexColumns().get(0).dataType()); + Assertions.assertEquals("qvajz", response.properties().stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java index 019d9ff409dd..ef66f463e927 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.featurestoreEntityVersions() - .delete("b", "wsfllzykzp", "jdslpbyejsgbpjjn", "lbkaknivw", com.azure.core.util.Context.NONE); + .delete("svxbagccvhnoq", "owepcntqos", "rwkkxdnxuyygdoi", "d", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java index c81d229a2fb6..cd8dfc103d5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeatureDataType; @@ -22,26 +22,26 @@ public final class FeaturestoreEntityVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Double\",\"columnName\":\"ekdqqwcspfhrndq\"},{\"dataType\":\"Datetime\",\"columnName\":\"s\"}],\"stage\":\"gsdqnqqzqdvg\",\"provisioningState\":\"Canceled\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"nyaarwphbuzmvjil\",\"tags\":{\"jw\":\"mfkctpaiwh\",\"vjdywpfxi\":\"xduwimwn\"},\"properties\":{\"swmyjdbcknso\":\"kmnjt\",\"uvvaitk\":\"tmpdkcbpki\"}},\"id\":\"ndwguss\",\"name\":\"tnppxxeysqenfwug\",\"type\":\"nysemunvzmv\"}"; + = "{\"properties\":{\"indexColumns\":[{\"columnName\":\"pqk\",\"dataType\":\"Double\"}],\"provisioningState\":\"Updating\",\"stage\":\"zawenrv\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"ixkepladohnizv\",\"properties\":{\"ovxmiooqekzxqrzs\":\"pqiyqvmhtyafcvto\",\"jrh\":\"gltlbsnlfpl\"},\"tags\":{\"yjgto\":\"iorhwuujymyjvk\",\"hlhz\":\"rrqm\"}},\"id\":\"mwe\",\"name\":\"zvq\",\"type\":\"k\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); FeaturestoreEntityVersion response = manager.featurestoreEntityVersions() - .getWithResponse("ddnddctkjcq", "xdir", "tqilsbabqtjchxsf", "eyleiye", com.azure.core.util.Context.NONE) + .getWithResponse("efrfugthcdbzoxh", "i", "gpbogpbwefoxlz", "ijpkbr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nyaarwphbuzmvjil", response.properties().description()); - Assertions.assertEquals("mfkctpaiwh", response.properties().tags().get("jw")); - Assertions.assertEquals("kmnjt", response.properties().properties().get("swmyjdbcknso")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); + Assertions.assertEquals("ixkepladohnizv", response.properties().description()); + Assertions.assertEquals("pqiyqvmhtyafcvto", response.properties().properties().get("ovxmiooqekzxqrzs")); + Assertions.assertEquals("iorhwuujymyjvk", response.properties().tags().get("yjgto")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("pqk", response.properties().indexColumns().get(0).columnName()); Assertions.assertEquals(FeatureDataType.DOUBLE, response.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ekdqqwcspfhrndq", response.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("gsdqnqqzqdvg", response.properties().stage()); + Assertions.assertEquals("zawenrv", response.properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java index c0d67f09ae45..d35f7d10e330 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.FeatureDataType; @@ -24,28 +24,29 @@ public final class FeaturestoreEntityVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"indexColumns\":[{\"dataType\":\"Datetime\",\"columnName\":\"mxpjkuqbng\"}],\"stage\":\"mlxs\",\"provisioningState\":\"Failed\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"xtgqpqfwuplfjkba\",\"tags\":{\"hxbfhbip\":\"seimuipggt\",\"fefznxcleyamv\":\"dziphe\",\"vbtkafcnfitpu\":\"itjjhqvypqgncgw\"},\"properties\":{\"xb\":\"kdwyjdvy\",\"nxbdisjeovgc\":\"wjgyngoudclridql\"}},\"id\":\"chgjonrhdib\",\"name\":\"vpdjytme\",\"type\":\"uiuvkcnqonj\"}]}"; + = "{\"value\":[{\"properties\":{\"indexColumns\":[{\"columnName\":\"xb\",\"dataType\":\"Integer\"}],\"provisioningState\":\"Updating\",\"stage\":\"ynwaofnoiphwaedp\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"hidjwszxmcqenyjw\",\"properties\":{\"wjdmjdphtfpjrbn\":\"fqrvtymn\",\"qbfimageiqjn\":\"bem\",\"srpjmevszbjnqkt\":\"prhxskt\"},\"tags\":{\"b\":\"jckm\",\"akqwtozxltjsf\":\"xxdxnhinn\",\"gxwzznocrbtazopf\":\"x\",\"mak\":\"htfm\"}},\"id\":\"pucfvxqrmxcr\",\"name\":\"zecnvd\",\"type\":\"miuxxmrnt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.featurestoreEntityVersions() - .list("wnwoxve", "wwqchxowppvux", "actoqqehn", "ir", "gnvuolv", ListViewType.ALL, 408724874, "nlbkizebbrwl", - "eq", "isoiqgetzgwywy", "bwuamo", "opqqiyjrehe", com.azure.core.util.Context.NONE); + .list("c", "x", "byvbdvgztjtzs", "enbdqxf", "ejcng", ListViewType.ARCHIVED_ONLY, 731616657, + "ykkpnfvzbvtxgsnu", "qjjcwggjimlcbmh", "fgaxuvae", "yafszxnzjx", "dnfvdlptulwgp", + com.azure.core.util.Context.NONE); - Assertions.assertEquals("xtgqpqfwuplfjkba", response.iterator().next().properties().description()); - Assertions.assertEquals("seimuipggt", response.iterator().next().properties().tags().get("hxbfhbip")); - Assertions.assertEquals("kdwyjdvy", response.iterator().next().properties().properties().get("xb")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DATETIME, + Assertions.assertEquals("hidjwszxmcqenyjw", response.iterator().next().properties().description()); + Assertions.assertEquals("fqrvtymn", + response.iterator().next().properties().properties().get("wjdmjdphtfpjrbn")); + Assertions.assertEquals("jckm", response.iterator().next().properties().tags().get("b")); + Assertions.assertFalse(response.iterator().next().properties().isAnonymous()); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); + Assertions.assertEquals("xb", response.iterator().next().properties().indexColumns().get(0).columnName()); + Assertions.assertEquals(FeatureDataType.INTEGER, response.iterator().next().properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("mxpjkuqbng", - response.iterator().next().properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("mlxs", response.iterator().next().properties().stage()); + Assertions.assertEquals("ynwaofnoiphwaedp", response.iterator().next().properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java index fea23d4afea9..c48785458832 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class FeaturizationSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FeaturizationSettings model - = BinaryData.fromString("{\"datasetLanguage\":\"auwxsuykznhrfgsl\"}").toObject(FeaturizationSettings.class); - Assertions.assertEquals("auwxsuykznhrfgsl", model.datasetLanguage()); + = BinaryData.fromString("{\"datasetLanguage\":\"isvpztdivykpxkqe\"}").toObject(FeaturizationSettings.class); + Assertions.assertEquals("isvpztdivykpxkqe", model.datasetLanguage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FeaturizationSettings model = new FeaturizationSettings().withDatasetLanguage("auwxsuykznhrfgsl"); + FeaturizationSettings model = new FeaturizationSettings().withDatasetLanguage("isvpztdivykpxkqe"); model = BinaryData.fromObject(model).toObject(FeaturizationSettings.class); - Assertions.assertEquals("auwxsuykznhrfgsl", model.datasetLanguage()); + Assertions.assertEquals("isvpztdivykpxkqe", model.datasetLanguage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningJobTests.java new file mode 100644 index 000000000000..52a47a961ebf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningJobTests.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FineTuningJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.FineTuningVertical; +import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobInput; +import com.azure.resourcemanager.machinelearning.models.JobOutput; +import com.azure.resourcemanager.machinelearning.models.JobResources; +import com.azure.resourcemanager.machinelearning.models.JobService; +import com.azure.resourcemanager.machinelearning.models.JobTier; +import com.azure.resourcemanager.machinelearning.models.Nodes; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.QueueSettings; +import com.azure.resourcemanager.machinelearning.models.Webhook; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class FineTuningJobTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FineTuningJob model = BinaryData.fromString( + "{\"jobType\":\"FineTuning\",\"fineTuningDetails\":{\"modelProvider\":\"FineTuningVertical\",\"model\":{\"jobInputType\":\"JobInput\",\"description\":\"ujzflmcd\"},\"taskType\":\"QuestionAnswering\",\"trainingData\":{\"jobInputType\":\"JobInput\",\"description\":\"celuj\"},\"validationData\":{\"jobInputType\":\"JobInput\",\"description\":\"lluunxh\"}},\"outputs\":{\"u\":{\"jobOutputType\":\"JobOutput\",\"description\":\"fxzf\"},\"jdmngsytqpdzfyxc\":{\"jobOutputType\":\"JobOutput\",\"description\":\"upcknecexkgrvfp\"}},\"queueSettings\":{\"jobTier\":\"Standard\"},\"resources\":{\"instanceTypes\":[\"gzb\"]},\"componentId\":\"qfbifo\",\"computeId\":\"jxdwdrpazqjkr\",\"displayName\":\"bwotfcuuugtji\",\"experimentName\":\"gayiawohfmhnn\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"notificationSetting\":{\"emailOn\":[\"JobCancelled\",\"JobCompleted\"],\"emails\":[\"haidzrpvsg\",\"oiovslvivq\",\"uvwtenbgpi\",\"pkhc\"],\"webhooks\":{\"anduew\":{\"webhookType\":\"Webhook\",\"eventType\":\"xukuicjuftekio\"},\"abbwzgvzu\":{\"webhookType\":\"Webhook\",\"eventType\":\"vpxjhxzubfj\"},\"gavkmv\":{\"webhookType\":\"Webhook\",\"eventType\":\"xcdckixspsa\"},\"pzjbyetjxryo\":{\"webhookType\":\"Webhook\",\"eventType\":\"zerejr\"}}},\"parentJobName\":\"ae\",\"services\":{\"ogzmsimehtcuuwdh\":{\"endpoint\":\"lbecgihzbpemnrr\",\"errorMessage\":\"ovrwwx\",\"jobServiceType\":\"pjhspb\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":737215091,\"properties\":{\"uajxwwvcmmpeg\":\"pskpeswyhhmif\",\"qvcml\":\"y\",\"m\":\"exbzbqufpnezsjza\"},\"status\":\"rorh\"},\"dveywetkrhlol\":{\"endpoint\":\"qhyhni\",\"errorMessage\":\"tnsugisno\",\"jobServiceType\":\"nwnghojov\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1993383284,\"properties\":{\"fpcrtnuguef\":\"cjixxf\"},\"status\":\"ijte\"},\"kdzdzffzjw\":{\"endpoint\":\"nwepfgsvbbv\",\"errorMessage\":\"dljnpetl\",\"jobServiceType\":\"rdetawevxehuekdx\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1658177350,\"properties\":{\"dd\":\"vbrblerlprdaqc\",\"xwbpwyykdig\":\"bnygdjc\",\"dasdni\":\"zlrz\",\"tgkiqlarh\":\"mjqmv\"},\"status\":\"wvcaz\"},\"ddhgajkrdyd\":{\"endpoint\":\"smpc\",\"errorMessage\":\"gryelgfyat\",\"jobServiceType\":\"fgfrrkdknc\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1584228857,\"properties\":{\"hqvbkarbpyh\":\"nvojtvmdevd\",\"kpkpkocmacc\":\"srl\",\"yicyvspeslhwy\":\"bxxo\"},\"status\":\"gvrccpu\"}},\"status\":\"Running\",\"description\":\"c\",\"properties\":{\"qnxhgk\":\"afnbfbqve\",\"ejpec\":\"rdw\",\"udayprldidwmtf\":\"zvcmbpwd\"},\"tags\":{\"zch\":\"tzl\",\"igvlghfrbzakpjtc\":\"bagwnlzu\",\"jpsucmxi\":\"raqp\",\"xyn\":\"cw\"}}") + .toObject(FineTuningJob.class); + Assertions.assertEquals("c", model.description()); + Assertions.assertEquals("afnbfbqve", model.properties().get("qnxhgk")); + Assertions.assertEquals("tzl", model.tags().get("zch")); + Assertions.assertEquals("qfbifo", model.componentId()); + Assertions.assertEquals("jxdwdrpazqjkr", model.computeId()); + Assertions.assertEquals("bwotfcuuugtji", model.displayName()); + Assertions.assertEquals("gayiawohfmhnn", model.experimentName()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, + model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("haidzrpvsg", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("xukuicjuftekio", model.notificationSetting().webhooks().get("anduew").eventType()); + Assertions.assertEquals("ae", model.parentJobName()); + Assertions.assertEquals("lbecgihzbpemnrr", model.services().get("ogzmsimehtcuuwdh").endpoint()); + Assertions.assertEquals("pjhspb", model.services().get("ogzmsimehtcuuwdh").jobServiceType()); + Assertions.assertEquals(737215091, model.services().get("ogzmsimehtcuuwdh").port()); + Assertions.assertEquals("pskpeswyhhmif", + model.services().get("ogzmsimehtcuuwdh").properties().get("uajxwwvcmmpeg")); + Assertions.assertEquals("ujzflmcd", model.fineTuningDetails().model().description()); + Assertions.assertEquals(FineTuningTaskType.QUESTION_ANSWERING, model.fineTuningDetails().taskType()); + Assertions.assertEquals("celuj", model.fineTuningDetails().trainingData().description()); + Assertions.assertEquals("lluunxh", model.fineTuningDetails().validationData().description()); + Assertions.assertEquals("fxzf", model.outputs().get("u").description()); + Assertions.assertEquals(JobTier.STANDARD, model.queueSettings().jobTier()); + Assertions.assertEquals("gzb", model.resources().instanceTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FineTuningJob model = new FineTuningJob().withDescription("c") + .withProperties(mapOf("qnxhgk", "afnbfbqve", "ejpec", "rdw", "udayprldidwmtf", "zvcmbpwd")) + .withTags(mapOf("zch", "tzl", "igvlghfrbzakpjtc", "bagwnlzu", "jpsucmxi", "raqp", "xyn", "cw")) + .withComponentId("qfbifo") + .withComputeId("jxdwdrpazqjkr") + .withDisplayName("bwotfcuuugtji") + .withExperimentName("gayiawohfmhnn") + .withIdentity(new IdentityConfiguration()) + .withIsArchived(true) + .withNotificationSetting(new NotificationSetting() + .withEmailOn( + Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED)) + .withEmails(Arrays.asList("haidzrpvsg", "oiovslvivq", "uvwtenbgpi", "pkhc")) + .withWebhooks(mapOf("anduew", new Webhook().withEventType("xukuicjuftekio"), "abbwzgvzu", + new Webhook().withEventType("vpxjhxzubfj"), "gavkmv", new Webhook().withEventType("xcdckixspsa"), + "pzjbyetjxryo", new Webhook().withEventType("zerejr")))) + .withParentJobName("ae") + .withServices(mapOf("ogzmsimehtcuuwdh", + new JobService().withEndpoint("lbecgihzbpemnrr") + .withJobServiceType("pjhspb") + .withNodes(new Nodes()) + .withPort(737215091) + .withProperties(mapOf("uajxwwvcmmpeg", "pskpeswyhhmif", "qvcml", "y", "m", "exbzbqufpnezsjza")), + "dveywetkrhlol", + new JobService().withEndpoint("qhyhni") + .withJobServiceType("nwnghojov") + .withNodes(new Nodes()) + .withPort(1993383284) + .withProperties(mapOf("fpcrtnuguef", "cjixxf")), + "kdzdzffzjw", + new JobService().withEndpoint("nwepfgsvbbv") + .withJobServiceType("rdetawevxehuekdx") + .withNodes(new Nodes()) + .withPort(1658177350) + .withProperties(mapOf( + "dd", "vbrblerlprdaqc", "xwbpwyykdig", "bnygdjc", "dasdni", "zlrz", "tgkiqlarh", "mjqmv")), + "ddhgajkrdyd", + new JobService().withEndpoint("smpc") + .withJobServiceType("fgfrrkdknc") + .withNodes(new Nodes()) + .withPort(1584228857) + .withProperties( + mapOf("hqvbkarbpyh", "nvojtvmdevd", "kpkpkocmacc", "srl", "yicyvspeslhwy", "bxxo")))) + .withFineTuningDetails(new FineTuningVertical().withModel(new JobInput().withDescription("ujzflmcd")) + .withTaskType(FineTuningTaskType.QUESTION_ANSWERING) + .withTrainingData(new JobInput().withDescription("celuj")) + .withValidationData(new JobInput().withDescription("lluunxh"))) + .withOutputs(mapOf("u", new JobOutput().withDescription("fxzf"), "jdmngsytqpdzfyxc", + new JobOutput().withDescription("upcknecexkgrvfp"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.STANDARD)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("gzb"))); + model = BinaryData.fromObject(model).toObject(FineTuningJob.class); + Assertions.assertEquals("c", model.description()); + Assertions.assertEquals("afnbfbqve", model.properties().get("qnxhgk")); + Assertions.assertEquals("tzl", model.tags().get("zch")); + Assertions.assertEquals("qfbifo", model.componentId()); + Assertions.assertEquals("jxdwdrpazqjkr", model.computeId()); + Assertions.assertEquals("bwotfcuuugtji", model.displayName()); + Assertions.assertEquals("gayiawohfmhnn", model.experimentName()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, + model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("haidzrpvsg", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("xukuicjuftekio", model.notificationSetting().webhooks().get("anduew").eventType()); + Assertions.assertEquals("ae", model.parentJobName()); + Assertions.assertEquals("lbecgihzbpemnrr", model.services().get("ogzmsimehtcuuwdh").endpoint()); + Assertions.assertEquals("pjhspb", model.services().get("ogzmsimehtcuuwdh").jobServiceType()); + Assertions.assertEquals(737215091, model.services().get("ogzmsimehtcuuwdh").port()); + Assertions.assertEquals("pskpeswyhhmif", + model.services().get("ogzmsimehtcuuwdh").properties().get("uajxwwvcmmpeg")); + Assertions.assertEquals("ujzflmcd", model.fineTuningDetails().model().description()); + Assertions.assertEquals(FineTuningTaskType.QUESTION_ANSWERING, model.fineTuningDetails().taskType()); + Assertions.assertEquals("celuj", model.fineTuningDetails().trainingData().description()); + Assertions.assertEquals("lluunxh", model.fineTuningDetails().validationData().description()); + Assertions.assertEquals("fxzf", model.outputs().get("u").description()); + Assertions.assertEquals(JobTier.STANDARD, model.queueSettings().jobTier()); + Assertions.assertEquals("gzb", model.resources().instanceTypes().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningVerticalTests.java new file mode 100644 index 000000000000..cb16e67642a4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FineTuningVerticalTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; +import com.azure.resourcemanager.machinelearning.models.FineTuningVertical; +import com.azure.resourcemanager.machinelearning.models.JobInput; +import org.junit.jupiter.api.Assertions; + +public final class FineTuningVerticalTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FineTuningVertical model = BinaryData.fromString( + "{\"modelProvider\":\"FineTuningVertical\",\"model\":{\"jobInputType\":\"JobInput\",\"description\":\"gs\"},\"taskType\":\"VideoMultiObjectTracking\",\"trainingData\":{\"jobInputType\":\"JobInput\",\"description\":\"yv\"},\"validationData\":{\"jobInputType\":\"JobInput\",\"description\":\"gngc\"}}") + .toObject(FineTuningVertical.class); + Assertions.assertEquals("gs", model.model().description()); + Assertions.assertEquals(FineTuningTaskType.VIDEO_MULTI_OBJECT_TRACKING, model.taskType()); + Assertions.assertEquals("yv", model.trainingData().description()); + Assertions.assertEquals("gngc", model.validationData().description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FineTuningVertical model = new FineTuningVertical().withModel(new JobInput().withDescription("gs")) + .withTaskType(FineTuningTaskType.VIDEO_MULTI_OBJECT_TRACKING) + .withTrainingData(new JobInput().withDescription("yv")) + .withValidationData(new JobInput().withDescription("gngc")); + model = BinaryData.fromObject(model).toObject(FineTuningVertical.class); + Assertions.assertEquals("gs", model.model().description()); + Assertions.assertEquals(FineTuningTaskType.VIDEO_MULTI_OBJECT_TRACKING, model.taskType()); + Assertions.assertEquals("yv", model.trainingData().description()); + Assertions.assertEquals("gngc", model.validationData().description()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FinetuningDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FinetuningDetailsTests.java new file mode 100644 index 000000000000..08cf08b6f31b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FinetuningDetailsTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.FinetuningDetails; +import com.azure.resourcemanager.machinelearning.models.JobInput; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class FinetuningDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FinetuningDetails model = BinaryData.fromString( + "{\"hyperParameters\":{\"uookrjfls\":\"culwkqic\"},\"studentModel\":{\"jobInputType\":\"JobInput\",\"description\":\"ojbtqpqsd\"}}") + .toObject(FinetuningDetails.class); + Assertions.assertEquals("culwkqic", model.hyperParameters().get("uookrjfls")); + Assertions.assertEquals("ojbtqpqsd", model.studentModel().description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FinetuningDetails model = new FinetuningDetails().withHyperParameters(mapOf("uookrjfls", "culwkqic")) + .withStudentModel(new JobInput().withDescription("ojbtqpqsd")); + model = BinaryData.fromObject(model).toObject(FinetuningDetails.class); + Assertions.assertEquals("culwkqic", model.hyperParameters().get("uookrjfls")); + Assertions.assertEquals("ojbtqpqsd", model.studentModel().description()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java index 4742da42e998..b7534a8ddcfc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,26 +15,25 @@ public final class FixedInputDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FixedInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Fixed\",\"dataContext\":\"dpmtonvhgn\",\"jobInputType\":\"uri_folder\",\"uri\":\"me\",\"columns\":{\"mmmkvavucgjiuaiq\":\"bpjbapm\",\"hr\":\"mnuf\",\"vwlvivjmxmlit\":\"hxwwuzdm\",\"iifef\":\"dsjipdviscotyxb\"}}") + "{\"inputDataType\":\"Fixed\",\"columns\":{\"mftzgyy\":\"myfc\",\"lugekdfqnhtt\":\"y\"},\"dataContext\":\"owrczfjjnnuxxr\",\"jobInputType\":\"uri_folder\",\"uri\":\"mhmnulwemp\"}") .toObject(FixedInputData.class); - Assertions.assertEquals("dpmtonvhgn", model.dataContext()); + Assertions.assertEquals("myfc", model.columns().get("mftzgyy")); + Assertions.assertEquals("owrczfjjnnuxxr", model.dataContext()); Assertions.assertEquals(JobInputType.URI_FOLDER, model.jobInputType()); - Assertions.assertEquals("me", model.uri()); - Assertions.assertEquals("bpjbapm", model.columns().get("mmmkvavucgjiuaiq")); + Assertions.assertEquals("mhmnulwemp", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FixedInputData model = new FixedInputData().withDataContext("dpmtonvhgn") + FixedInputData model = new FixedInputData().withColumns(mapOf("mftzgyy", "myfc", "lugekdfqnhtt", "y")) + .withDataContext("owrczfjjnnuxxr") .withJobInputType(JobInputType.URI_FOLDER) - .withUri("me") - .withColumns(mapOf("mmmkvavucgjiuaiq", "bpjbapm", "hr", "mnuf", "vwlvivjmxmlit", "hxwwuzdm", "iifef", - "dsjipdviscotyxb")); + .withUri("mhmnulwemp"); model = BinaryData.fromObject(model).toObject(FixedInputData.class); - Assertions.assertEquals("dpmtonvhgn", model.dataContext()); + Assertions.assertEquals("myfc", model.columns().get("mftzgyy")); + Assertions.assertEquals("owrczfjjnnuxxr", model.dataContext()); Assertions.assertEquals(JobInputType.URI_FOLDER, model.jobInputType()); - Assertions.assertEquals("me", model.uri()); - Assertions.assertEquals("bpjbapm", model.columns().get("mmmkvavucgjiuaiq")); + Assertions.assertEquals("mhmnulwemp", model.uri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java index da2593a6d20c..530b3f55421f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,16 @@ public final class FlavorDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FlavorData model = BinaryData - .fromString("{\"data\":{\"nm\":\"ltxijjumfqwazln\",\"qdqx\":\"jng\",\"zsvtuikzhajqgl\":\"bjwgnyfus\"}}") - .toObject(FlavorData.class); - Assertions.assertEquals("ltxijjumfqwazln", model.data().get("nm")); + FlavorData model + = BinaryData.fromString("{\"data\":{\"odaqaxsi\":\"iwfbrkwpzdqtvhcs\"}}").toObject(FlavorData.class); + Assertions.assertEquals("iwfbrkwpzdqtvhcs", model.data().get("odaqaxsi")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FlavorData model - = new FlavorData().withData(mapOf("nm", "ltxijjumfqwazln", "qdqx", "jng", "zsvtuikzhajqgl", "bjwgnyfus")); + FlavorData model = new FlavorData().withData(mapOf("odaqaxsi", "iwfbrkwpzdqtvhcs")); model = BinaryData.fromObject(model).toObject(FlavorData.class); - Assertions.assertEquals("ltxijjumfqwazln", model.data().get("nm")); + Assertions.assertEquals("iwfbrkwpzdqtvhcs", model.data().get("odaqaxsi")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java index ba53d60d641c..db35250b2363 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java index c44ab2c114d3..e671520c1f84 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -21,43 +21,43 @@ public final class ForecastingSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ForecastingSettings model = BinaryData.fromString( - "{\"countryOrRegionForHolidays\":\"tphuykuninttl\",\"timeColumnName\":\"jdszdbuzi\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"timeSeriesIdColumnNames\":[\"qvgpnewuh\",\"fwjnoxuoxtfn\",\"essfepgckncj\"],\"frequency\":\"vsnvbtqdxfmj\",\"featureLags\":\"None\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Pad\",\"useStl\":\"SeasonTrend\",\"targetAggregateFunction\":\"Max\",\"cvStepSize\":1226506395}") + "{\"countryOrRegionForHolidays\":\"kll\",\"cvStepSize\":1781554864,\"featureLags\":\"Auto\",\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"frequency\":\"kig\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Auto\",\"targetAggregateFunction\":\"Min\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"timeColumnName\":\"ubhg\",\"timeSeriesIdColumnNames\":[\"etxdqcmyctajqzj\",\"alec\",\"bibiwks\",\"egyxsbfpzvoik\"],\"useStl\":\"None\"}") .toObject(ForecastingSettings.class); - Assertions.assertEquals("tphuykuninttl", model.countryOrRegionForHolidays()); - Assertions.assertEquals("jdszdbuzi", model.timeColumnName()); - Assertions.assertEquals("qvgpnewuh", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("vsnvbtqdxfmj", model.frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.PAD, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.SEASON_TREND, model.useStl()); - Assertions.assertEquals(TargetAggregationFunction.MAX, model.targetAggregateFunction()); - Assertions.assertEquals(1226506395, model.cvStepSize()); + Assertions.assertEquals("kll", model.countryOrRegionForHolidays()); + Assertions.assertEquals(1781554864, model.cvStepSize()); + Assertions.assertEquals(FeatureLags.AUTO, model.featureLags()); + Assertions.assertEquals("kig", model.frequency()); + Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, model.shortSeriesHandlingConfig()); + Assertions.assertEquals(TargetAggregationFunction.MIN, model.targetAggregateFunction()); + Assertions.assertEquals("ubhg", model.timeColumnName()); + Assertions.assertEquals("etxdqcmyctajqzj", model.timeSeriesIdColumnNames().get(0)); + Assertions.assertEquals(UseStl.NONE, model.useStl()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ForecastingSettings model = new ForecastingSettings().withCountryOrRegionForHolidays("tphuykuninttl") - .withTimeColumnName("jdszdbuzi") - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) + ForecastingSettings model = new ForecastingSettings().withCountryOrRegionForHolidays("kll") + .withCvStepSize(1781554864) + .withFeatureLags(FeatureLags.AUTO) .withForecastHorizon(new ForecastHorizon()) - .withTimeSeriesIdColumnNames(Arrays.asList("qvgpnewuh", "fwjnoxuoxtfn", "essfepgckncj")) - .withFrequency("vsnvbtqdxfmj") - .withFeatureLags(FeatureLags.NONE) + .withFrequency("kig") .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.PAD) - .withUseStl(UseStl.SEASON_TREND) - .withTargetAggregateFunction(TargetAggregationFunction.MAX) - .withCvStepSize(1226506395); + .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.AUTO) + .withTargetAggregateFunction(TargetAggregationFunction.MIN) + .withTargetLags(new TargetLags()) + .withTargetRollingWindowSize(new TargetRollingWindowSize()) + .withTimeColumnName("ubhg") + .withTimeSeriesIdColumnNames(Arrays.asList("etxdqcmyctajqzj", "alec", "bibiwks", "egyxsbfpzvoik")) + .withUseStl(UseStl.NONE); model = BinaryData.fromObject(model).toObject(ForecastingSettings.class); - Assertions.assertEquals("tphuykuninttl", model.countryOrRegionForHolidays()); - Assertions.assertEquals("jdszdbuzi", model.timeColumnName()); - Assertions.assertEquals("qvgpnewuh", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("vsnvbtqdxfmj", model.frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.PAD, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.SEASON_TREND, model.useStl()); - Assertions.assertEquals(TargetAggregationFunction.MAX, model.targetAggregateFunction()); - Assertions.assertEquals(1226506395, model.cvStepSize()); + Assertions.assertEquals("kll", model.countryOrRegionForHolidays()); + Assertions.assertEquals(1781554864, model.cvStepSize()); + Assertions.assertEquals(FeatureLags.AUTO, model.featureLags()); + Assertions.assertEquals("kig", model.frequency()); + Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, model.shortSeriesHandlingConfig()); + Assertions.assertEquals(TargetAggregationFunction.MIN, model.targetAggregateFunction()); + Assertions.assertEquals("ubhg", model.timeColumnName()); + Assertions.assertEquals("etxdqcmyctajqzj", model.timeSeriesIdColumnNames().get(0)); + Assertions.assertEquals(UseStl.NONE, model.useStl()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java index 19341b1a0bde..75ec1aedc342 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -39,212 +39,185 @@ public final class ForecastingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Forecasting model = BinaryData.fromString( - "{\"taskType\":\"Forecasting\",\"primaryMetric\":\"SpearmanCorrelation\",\"forecastingSettings\":{\"countryOrRegionForHolidays\":\"rqoemwsieeailwdq\",\"timeColumnName\":\"fydeotmfxlkd\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"timeSeriesIdColumnNames\":[\"mkuuyiuy\",\"afixlxicwgpthd\",\"fmfzcfasfodropa\",\"v\"],\"frequency\":\"tw\",\"featureLags\":\"None\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Auto\",\"useStl\":\"None\",\"targetAggregateFunction\":\"Mean\",\"cvStepSize\":1700774376},\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"SeasonalNaive\",\"TCNForecaster\",\"LassoLars\"],\"blockedTrainingAlgorithms\":[\"GradientBoosting\",\"XGBoostRegressor\",\"ElasticNet\"],\"enableOnnxCompatibleModels\":true,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"ElasticNet\",\"stackMetaLearnerTrainPercentage\":66.84514235526332,\"stackMetaLearnerKWargs\":\"dataxlzmiyddee\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT182H54M43S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true},\"limitSettings\":{\"maxTrials\":656139727,\"trialTimeout\":\"PT61H59M4S\",\"timeout\":\"PT204H44M19S\",\"maxConcurrentTrials\":1030669826,\"maxCoresPerTrial\":1032949821,\"exitScore\":48.61053148417434,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"pxyazk\",\"pirgzxvbczwhy\"],\"weightColumnName\":\"bthmsritj\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"iggrunoz\",\"mode\":\"Direct\",\"description\":\"ljthoiv\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"wsn\",\"mode\":\"EvalMount\",\"description\":\"ihscjvakmhzbhw\"},\"validationDataSize\":28.61316181159782,\"testDataSize\":4.746102486575632,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"WordEmbedding\"],\"columnNameAndTypes\":{\"fzs\":\"nuqqkotauratnicp\",\"yrletndqlmf\":\"le\",\"evnoqayrehjuqwva\":\"ggnbbuypwovvvsfl\",\"enqqzlxnqzu\":\"xrlzhpziha\"},\"transformerParams\":{\"gzsdtmwbyorjp\":[{\"fields\":[\"bg\",\"kfwmjcwtewfh\",\"wyrkbrehzlrynjpc\",\"amkaepl\"],\"parameters\":\"datajub\"},{\"fields\":[\"ywevtjrieikmw\",\"aoklfnis\",\"xgucbmtredscnn\",\"tjcyyuv\"],\"parameters\":\"datarx\"},{\"fields\":[\"lecwwtz\"],\"parameters\":\"datacloyhy\"},{\"fields\":[\"idhz\"],\"parameters\":\"datare\"}],\"ifq\":[{\"fields\":[\"ychakvy\",\"fbqvumkxqj\",\"iuepmaxfnzlpqmp\",\"t\"],\"parameters\":\"datafvulb\"},{\"fields\":[\"tuxy\"],\"parameters\":\"datahfcaeo\"}],\"nivrxpfduio\":[{\"fields\":[\"flobhahq\",\"omfecorkfro\",\"gbmxldjmz\",\"zbjesylslur\"],\"parameters\":\"datafygpnyhgd\"},{\"fields\":[\"sc\",\"gqyvouprsytqzss\"],\"parameters\":\"datamgw\"}],\"tewuvcy\":[{\"fields\":[\"qvpbfjpoqzucfzl\",\"czdquurbo\",\"mvhvz\"],\"parameters\":\"datal\"},{\"fields\":[\"nqujywz\",\"qyggmnwsvhb\",\"gqiwy\"],\"parameters\":\"datatobdrrpnre\"},{\"fields\":[\"nsbfjhhlwtpkvege\",\"tt\",\"zkgtzqn\"],\"parameters\":\"datas\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"fjxflpditfno\"},\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"yuxlvrhprrv\",\"mode\":\"EvalMount\",\"description\":\"leqflv\"},\"targetColumnName\":\"rv\"}") + "{\"taskType\":\"Forecasting\",\"cvSplitColumnNames\":[\"dxolousdv\",\"g\"],\"featurizationSettings\":{\"blockedTransformers\":[\"CountVectorizer\"],\"columnNameAndTypes\":{\"btqgkujdsoox\":\"jdrpizfulgycts\",\"arikeejdpdfhtwmm\":\"qwoeurbtigapd\"},\"enableDnnFeaturization\":false,\"mode\":\"Custom\",\"transformerParams\":{\"wsttxsrgx\":[{\"fields\":[\"wtrjmeqkvyhzokp\",\"yuoh\"],\"parameters\":\"\\\"datansnaajphmp\\\"\"},{\"fields\":[\"nglpwsada\",\"jsumxpezcoio\",\"jrmfqzwqd\"],\"parameters\":\"\\\"datakeedcnw\\\"\"},{\"fields\":[\"xfqzkvemyzd\"],\"parameters\":\"\\\"datazaqpqi\\\"\"},{\"fields\":[\"m\",\"trwtxzuisam\",\"natnizexroqsqjg\"],\"parameters\":\"\\\"datamthsp\\\"\"}]},\"datasetLanguage\":\"paniceo\"},\"limitSettings\":{\"enableEarlyTermination\":true,\"exitScore\":89.08337987784148,\"maxConcurrentTrials\":1311165954,\"maxCoresPerTrial\":855945074,\"maxTrials\":536051147,\"timeout\":\"PT4H3M53S\",\"trialTimeout\":\"PT52H38M24S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"yohzixyq\",\"description\":\"nkvycqqqdseipnqu\"},\"testDataSize\":60.39028608572187,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"yodlhkfktltddsob\",\"description\":\"pnouhbqezkqx\"},\"validationDataSize\":9.946556369720794,\"weightColumnName\":\"yigfcvcew\",\"forecastingSettings\":{\"countryOrRegionForHolidays\":\"hdgsjsatm\",\"cvStepSize\":94161263,\"featureLags\":\"Auto\",\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"frequency\":\"fsq\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"None\",\"targetAggregateFunction\":\"Max\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"timeColumnName\":\"arnpvgrsz\",\"timeSeriesIdColumnNames\":[\"tdrcwgzwl\",\"xzlh\"],\"useStl\":\"SeasonTrend\"},\"primaryMetric\":\"NormalizedMeanAbsoluteError\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"TCNForecaster\"],\"blockedTrainingAlgorithms\":[\"Average\",\"ElasticNet\",\"ElasticNet\",\"XGBoostRegressor\"],\"enableDnnTraining\":true,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT195H5M53S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"\\\"datasoxinu\\\"\",\"stackMetaLearnerTrainPercentage\":64.9240845047007,\"stackMetaLearnerType\":\"ElasticNet\"}},\"logVerbosity\":\"Critical\",\"targetColumnName\":\"qsxytqqtcmiw\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"svnmeylajamcajy\",\"description\":\"tpzcr\"}}") .toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("leqflv", model.trainingData().description()); - Assertions.assertEquals("yuxlvrhprrv", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rv", model.targetColumnName()); - Assertions.assertEquals(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); - Assertions.assertEquals("rqoemwsieeailwdq", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals("fydeotmfxlkd", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("mkuuyiuy", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("tw", model.forecastingSettings().frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.forecastingSettings().featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, + Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); + Assertions.assertEquals("qsxytqqtcmiw", model.targetColumnName()); + Assertions.assertEquals("tpzcr", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); + Assertions.assertEquals("svnmeylajamcajy", model.trainingData().uri()); + Assertions.assertEquals("dxolousdv", model.cvSplitColumnNames().get(0)); + Assertions.assertEquals("paniceo", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.COUNT_VECTORIZER, + model.featurizationSettings().blockedTransformers().get(0)); + Assertions.assertEquals("jdrpizfulgycts", + model.featurizationSettings().columnNameAndTypes().get("btqgkujdsoox")); + Assertions.assertFalse(model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); + Assertions.assertEquals("wtrjmeqkvyhzokp", + model.featurizationSettings().transformerParams().get("wsttxsrgx").get(0).fields().get(0)); + Assertions.assertTrue(model.limitSettings().enableEarlyTermination()); + Assertions.assertEquals(89.08337987784148D, model.limitSettings().exitScore()); + Assertions.assertEquals(1311165954, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(855945074, model.limitSettings().maxCoresPerTrial()); + Assertions.assertEquals(536051147, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT4H3M53S"), model.limitSettings().timeout()); + Assertions.assertEquals(Duration.parse("PT52H38M24S"), model.limitSettings().trialTimeout()); + Assertions.assertEquals("nkvycqqqdseipnqu", model.testData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); + Assertions.assertEquals("yohzixyq", model.testData().uri()); + Assertions.assertEquals(60.39028608572187D, model.testDataSize()); + Assertions.assertEquals("pnouhbqezkqx", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("yodlhkfktltddsob", model.validationData().uri()); + Assertions.assertEquals(9.946556369720794D, model.validationDataSize()); + Assertions.assertEquals("yigfcvcew", model.weightColumnName()); + Assertions.assertEquals("hdgsjsatm", model.forecastingSettings().countryOrRegionForHolidays()); + Assertions.assertEquals(94161263, model.forecastingSettings().cvStepSize()); + Assertions.assertEquals(FeatureLags.AUTO, model.forecastingSettings().featureLags()); + Assertions.assertEquals("fsq", model.forecastingSettings().frequency()); + Assertions.assertEquals(ShortSeriesHandlingConfiguration.NONE, model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(TargetAggregationFunction.MEAN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals(1700774376, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertEquals(TargetAggregationFunction.MAX, model.forecastingSettings().targetAggregateFunction()); + Assertions.assertEquals("arnpvgrsz", model.forecastingSettings().timeColumnName()); + Assertions.assertEquals("tdrcwgzwl", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); + Assertions.assertEquals(UseStl.SEASON_TREND, model.forecastingSettings().useStl()); + Assertions.assertEquals(ForecastingPrimaryMetrics.NORMALIZED_MEAN_ABSOLUTE_ERROR, model.primaryMetric()); + Assertions.assertTrue(model.trainingSettings().enableDnnTraining()); + Assertions.assertTrue(model.trainingSettings().enableModelExplainability()); + Assertions.assertTrue(model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertFalse(model.trainingSettings().enableStackEnsemble()); + Assertions.assertTrue(model.trainingSettings().enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT195H5M53S"), model.trainingSettings().ensembleModelDownloadTimeout()); + Assertions.assertEquals(64.9240845047007D, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(66.84514235526332D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT182H54M43S"), - model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.EXTREME_RANDOM_TREES, + Assertions.assertEquals(ForecastingModels.TCNFORECASTER, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.GRADIENT_BOOSTING, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(656139727, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT61H59M4S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT204H44M19S"), model.limitSettings().timeout()); - Assertions.assertEquals(1030669826, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1032949821, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(48.61053148417434D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("pxyazk", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("bthmsritj", model.weightColumnName()); - Assertions.assertEquals("ljthoiv", model.validationData().description()); - Assertions.assertEquals("iggrunoz", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("ihscjvakmhzbhw", model.testData().description()); - Assertions.assertEquals("wsn", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(28.61316181159782D, model.validationDataSize()); - Assertions.assertEquals(4.746102486575632D, model.testDataSize()); - Assertions.assertEquals("fjxflpditfno", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.WORD_EMBEDDING, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("nuqqkotauratnicp", model.featurizationSettings().columnNameAndTypes().get("fzs")); - Assertions.assertEquals("bg", - model.featurizationSettings().transformerParams().get("gzsdtmwbyorjp").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(ForecastingModels.AVERAGE, model.trainingSettings().blockedTrainingAlgorithms().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Forecasting model = new Forecasting().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("leqflv") - .withUri("yuxlvrhprrv") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withTargetColumnName("rv") - .withPrimaryMetric(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION) - .withForecastingSettings(new ForecastingSettings().withCountryOrRegionForHolidays("rqoemwsieeailwdq") - .withTimeColumnName("fydeotmfxlkd") - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) + Forecasting model = new Forecasting().withLogVerbosity(LogVerbosity.CRITICAL) + .withTargetColumnName("qsxytqqtcmiw") + .withTrainingData(new MLTableJobInput().withDescription("tpzcr") + .withMode(InputDeliveryMode.DOWNLOAD) + .withUri("svnmeylajamcajy")) + .withCvSplitColumnNames(Arrays.asList("dxolousdv", "g")) + .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("paniceo") + .withBlockedTransformers(Arrays.asList(BlockedTransformers.COUNT_VECTORIZER)) + .withColumnNameAndTypes(mapOf("btqgkujdsoox", "jdrpizfulgycts", "arikeejdpdfhtwmm", "qwoeurbtigapd")) + .withEnableDnnFeaturization(false) + .withMode(FeaturizationMode.CUSTOM) + .withTransformerParams(mapOf("wsttxsrgx", Arrays.asList( + new ColumnTransformer().withFields(Arrays.asList("wtrjmeqkvyhzokp", "yuoh")) + .withParameters("\"datansnaajphmp\""), + new ColumnTransformer().withFields(Arrays.asList("nglpwsada", "jsumxpezcoio", "jrmfqzwqd")) + .withParameters("\"datakeedcnw\""), + new ColumnTransformer().withFields(Arrays.asList("xfqzkvemyzd")).withParameters("\"datazaqpqi\""), + new ColumnTransformer().withFields(Arrays.asList("m", "trwtxzuisam", "natnizexroqsqjg")) + .withParameters("\"datamthsp\""))))) + .withLimitSettings(new TableVerticalLimitSettings().withEnableEarlyTermination(true) + .withExitScore(89.08337987784148D) + .withMaxConcurrentTrials(1311165954) + .withMaxCoresPerTrial(855945074) + .withMaxTrials(536051147) + .withTimeout(Duration.parse("PT4H3M53S")) + .withTrialTimeout(Duration.parse("PT52H38M24S"))) + .withNCrossValidations(new NCrossValidations()) + .withTestData(new MLTableJobInput().withDescription("nkvycqqqdseipnqu") + .withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("yohzixyq")) + .withTestDataSize(60.39028608572187D) + .withValidationData(new MLTableJobInput().withDescription("pnouhbqezkqx") + .withMode(InputDeliveryMode.EVAL_DOWNLOAD) + .withUri("yodlhkfktltddsob")) + .withValidationDataSize(9.946556369720794D) + .withWeightColumnName("yigfcvcew") + .withForecastingSettings(new ForecastingSettings().withCountryOrRegionForHolidays("hdgsjsatm") + .withCvStepSize(94161263) + .withFeatureLags(FeatureLags.AUTO) .withForecastHorizon(new ForecastHorizon()) - .withTimeSeriesIdColumnNames(Arrays.asList("mkuuyiuy", "afixlxicwgpthd", "fmfzcfasfodropa", "v")) - .withFrequency("tw") - .withFeatureLags(FeatureLags.NONE) + .withFrequency("fsq") .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.AUTO) - .withUseStl(UseStl.NONE) - .withTargetAggregateFunction(TargetAggregationFunction.MEAN) - .withCvStepSize(1700774376)) - .withTrainingSettings(new ForecastingTrainingSettings().withEnableOnnxCompatibleModels(true) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.ELASTIC_NET) - .withStackMetaLearnerTrainPercentage(66.84514235526332D) - .withStackMetaLearnerKWargs("dataxlzmiyddee")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT182H54M43S")) + .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.NONE) + .withTargetAggregateFunction(TargetAggregationFunction.MAX) + .withTargetLags(new TargetLags()) + .withTargetRollingWindowSize(new TargetRollingWindowSize()) + .withTimeColumnName("arnpvgrsz") + .withTimeSeriesIdColumnNames(Arrays.asList("tdrcwgzwl", "xzlh")) + .withUseStl(UseStl.SEASON_TREND)) + .withPrimaryMetric(ForecastingPrimaryMetrics.NORMALIZED_MEAN_ABSOLUTE_ERROR) + .withTrainingSettings(new ForecastingTrainingSettings().withEnableDnnTraining(true) .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.EXTREME_RANDOM_TREES, - ForecastingModels.SEASONAL_NAIVE, ForecastingModels.TCNFORECASTER, ForecastingModels.LASSO_LARS)) - .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.GRADIENT_BOOSTING, - ForecastingModels.XGBOOST_REGRESSOR, ForecastingModels.ELASTIC_NET))) - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(656139727) - .withTrialTimeout(Duration.parse("PT61H59M4S")) - .withTimeout(Duration.parse("PT204H44M19S")) - .withMaxConcurrentTrials(1030669826) - .withMaxCoresPerTrial(1032949821) - .withExitScore(48.61053148417434D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("pxyazk", "pirgzxvbczwhy")) - .withWeightColumnName("bthmsritj") - .withValidationData( - new MLTableJobInput().withDescription("ljthoiv").withUri("iggrunoz").withMode(InputDeliveryMode.DIRECT)) - .withTestData(new MLTableJobInput().withDescription("ihscjvakmhzbhw") - .withUri("wsn") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withValidationDataSize(28.61316181159782D) - .withTestDataSize(4.746102486575632D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("fjxflpditfno") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.WORD_EMBEDDING)) - .withColumnNameAndTypes(mapOf("fzs", "nuqqkotauratnicp", "yrletndqlmf", "le", "evnoqayrehjuqwva", - "ggnbbuypwovvvsfl", "enqqzlxnqzu", "xrlzhpziha")) - .withTransformerParams(mapOf("gzsdtmwbyorjp", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("bg", "kfwmjcwtewfh", "wyrkbrehzlrynjpc", "amkaepl")) - .withParameters("datajub"), - new ColumnTransformer() - .withFields(Arrays.asList("ywevtjrieikmw", "aoklfnis", "xgucbmtredscnn", "tjcyyuv")) - .withParameters("datarx"), - new ColumnTransformer().withFields(Arrays.asList("lecwwtz")).withParameters("datacloyhy"), - new ColumnTransformer().withFields(Arrays.asList("idhz")).withParameters("datare")), - "ifq", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("ychakvy", "fbqvumkxqj", "iuepmaxfnzlpqmp", "t")) - .withParameters("datafvulb"), - new ColumnTransformer().withFields(Arrays.asList("tuxy")).withParameters("datahfcaeo")), - "nivrxpfduio", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("flobhahq", "omfecorkfro", "gbmxldjmz", "zbjesylslur")) - .withParameters("datafygpnyhgd"), - new ColumnTransformer().withFields(Arrays.asList("sc", "gqyvouprsytqzss")) - .withParameters("datamgw")), - "tewuvcy", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("qvpbfjpoqzucfzl", "czdquurbo", "mvhvz")) - .withParameters("datal"), - new ColumnTransformer().withFields(Arrays.asList("nqujywz", "qyggmnwsvhb", "gqiwy")) - .withParameters("datatobdrrpnre"), - new ColumnTransformer().withFields(Arrays.asList("nsbfjhhlwtpkvege", "tt", "zkgtzqn")) - .withParameters("datas")))) - .withEnableDnnFeaturization(true)); + .withEnableOnnxCompatibleModels(true) + .withEnableStackEnsemble(false) + .withEnableVoteEnsemble(true) + .withEnsembleModelDownloadTimeout(Duration.parse("PT195H5M53S")) + .withStackEnsembleSettings(new StackEnsembleSettings().withStackMetaLearnerKWargs("\"datasoxinu\"") + .withStackMetaLearnerTrainPercentage(64.9240845047007D) + .withStackMetaLearnerType(StackMetaLearnerType.ELASTIC_NET)) + .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.TCNFORECASTER)) + .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.AVERAGE, ForecastingModels.ELASTIC_NET, + ForecastingModels.ELASTIC_NET, ForecastingModels.XGBOOST_REGRESSOR))); model = BinaryData.fromObject(model).toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("leqflv", model.trainingData().description()); - Assertions.assertEquals("yuxlvrhprrv", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rv", model.targetColumnName()); - Assertions.assertEquals(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); - Assertions.assertEquals("rqoemwsieeailwdq", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals("fydeotmfxlkd", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("mkuuyiuy", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("tw", model.forecastingSettings().frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.forecastingSettings().featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, + Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); + Assertions.assertEquals("qsxytqqtcmiw", model.targetColumnName()); + Assertions.assertEquals("tpzcr", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); + Assertions.assertEquals("svnmeylajamcajy", model.trainingData().uri()); + Assertions.assertEquals("dxolousdv", model.cvSplitColumnNames().get(0)); + Assertions.assertEquals("paniceo", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.COUNT_VECTORIZER, + model.featurizationSettings().blockedTransformers().get(0)); + Assertions.assertEquals("jdrpizfulgycts", + model.featurizationSettings().columnNameAndTypes().get("btqgkujdsoox")); + Assertions.assertFalse(model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); + Assertions.assertEquals("wtrjmeqkvyhzokp", + model.featurizationSettings().transformerParams().get("wsttxsrgx").get(0).fields().get(0)); + Assertions.assertTrue(model.limitSettings().enableEarlyTermination()); + Assertions.assertEquals(89.08337987784148D, model.limitSettings().exitScore()); + Assertions.assertEquals(1311165954, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(855945074, model.limitSettings().maxCoresPerTrial()); + Assertions.assertEquals(536051147, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT4H3M53S"), model.limitSettings().timeout()); + Assertions.assertEquals(Duration.parse("PT52H38M24S"), model.limitSettings().trialTimeout()); + Assertions.assertEquals("nkvycqqqdseipnqu", model.testData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); + Assertions.assertEquals("yohzixyq", model.testData().uri()); + Assertions.assertEquals(60.39028608572187D, model.testDataSize()); + Assertions.assertEquals("pnouhbqezkqx", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("yodlhkfktltddsob", model.validationData().uri()); + Assertions.assertEquals(9.946556369720794D, model.validationDataSize()); + Assertions.assertEquals("yigfcvcew", model.weightColumnName()); + Assertions.assertEquals("hdgsjsatm", model.forecastingSettings().countryOrRegionForHolidays()); + Assertions.assertEquals(94161263, model.forecastingSettings().cvStepSize()); + Assertions.assertEquals(FeatureLags.AUTO, model.forecastingSettings().featureLags()); + Assertions.assertEquals("fsq", model.forecastingSettings().frequency()); + Assertions.assertEquals(ShortSeriesHandlingConfiguration.NONE, model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(TargetAggregationFunction.MEAN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals(1700774376, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertEquals(TargetAggregationFunction.MAX, model.forecastingSettings().targetAggregateFunction()); + Assertions.assertEquals("arnpvgrsz", model.forecastingSettings().timeColumnName()); + Assertions.assertEquals("tdrcwgzwl", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); + Assertions.assertEquals(UseStl.SEASON_TREND, model.forecastingSettings().useStl()); + Assertions.assertEquals(ForecastingPrimaryMetrics.NORMALIZED_MEAN_ABSOLUTE_ERROR, model.primaryMetric()); + Assertions.assertTrue(model.trainingSettings().enableDnnTraining()); + Assertions.assertTrue(model.trainingSettings().enableModelExplainability()); + Assertions.assertTrue(model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertFalse(model.trainingSettings().enableStackEnsemble()); + Assertions.assertTrue(model.trainingSettings().enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT195H5M53S"), model.trainingSettings().ensembleModelDownloadTimeout()); + Assertions.assertEquals(64.9240845047007D, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(66.84514235526332D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT182H54M43S"), - model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.EXTREME_RANDOM_TREES, + Assertions.assertEquals(ForecastingModels.TCNFORECASTER, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.GRADIENT_BOOSTING, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(656139727, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT61H59M4S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT204H44M19S"), model.limitSettings().timeout()); - Assertions.assertEquals(1030669826, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1032949821, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(48.61053148417434D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("pxyazk", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("bthmsritj", model.weightColumnName()); - Assertions.assertEquals("ljthoiv", model.validationData().description()); - Assertions.assertEquals("iggrunoz", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("ihscjvakmhzbhw", model.testData().description()); - Assertions.assertEquals("wsn", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(28.61316181159782D, model.validationDataSize()); - Assertions.assertEquals(4.746102486575632D, model.testDataSize()); - Assertions.assertEquals("fjxflpditfno", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.WORD_EMBEDDING, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("nuqqkotauratnicp", model.featurizationSettings().columnNameAndTypes().get("fzs")); - Assertions.assertEquals("bg", - model.featurizationSettings().transformerParams().get("gzsdtmwbyorjp").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(ForecastingModels.AVERAGE, model.trainingSettings().blockedTrainingAlgorithms().get(0)); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java index 3ee8a0dc9b38..7555b2ad9ef4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,47 +17,44 @@ public final class ForecastingTrainingSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ForecastingTrainingSettings model = BinaryData.fromString( - "{\"allowedTrainingAlgorithms\":[\"SeasonalNaive\",\"SeasonalAverage\",\"SeasonalAverage\"],\"blockedTrainingAlgorithms\":[\"ExponentialSmoothing\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMClassifier\",\"stackMetaLearnerTrainPercentage\":13.408561162477984,\"stackMetaLearnerKWargs\":\"datakvbos\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT27H40M3S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true}") + "{\"allowedTrainingAlgorithms\":[\"AutoArima\"],\"blockedTrainingAlgorithms\":[\"Naive\",\"TCNForecaster\",\"ExponentialSmoothing\",\"ExponentialSmoothing\"],\"enableDnnTraining\":false,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT64H5M8S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"\\\"datadqzsaaoqdsgp\\\"\",\"stackMetaLearnerTrainPercentage\":55.170473316715174,\"stackMetaLearnerType\":\"None\"}}") .toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(13.408561162477984D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H40M3S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.SEASONAL_NAIVE, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.EXPONENTIAL_SMOOTHING, model.blockedTrainingAlgorithms().get(0)); + Assertions.assertFalse(model.enableDnnTraining()); + Assertions.assertTrue(model.enableModelExplainability()); + Assertions.assertFalse(model.enableOnnxCompatibleModels()); + Assertions.assertTrue(model.enableStackEnsemble()); + Assertions.assertTrue(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT64H5M8S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(55.170473316715174D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.NONE, model.stackEnsembleSettings().stackMetaLearnerType()); + Assertions.assertEquals(ForecastingModels.AUTO_ARIMA, model.allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ForecastingModels.NAIVE, model.blockedTrainingAlgorithms().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ForecastingTrainingSettings model = new ForecastingTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER) - .withStackMetaLearnerTrainPercentage(13.408561162477984D) - .withStackMetaLearnerKWargs("datakvbos")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT27H40M3S")) + ForecastingTrainingSettings model = new ForecastingTrainingSettings().withEnableDnnTraining(false) .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.SEASONAL_NAIVE, - ForecastingModels.SEASONAL_AVERAGE, ForecastingModels.SEASONAL_AVERAGE)) - .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.EXPONENTIAL_SMOOTHING)); + .withEnableOnnxCompatibleModels(false) + .withEnableStackEnsemble(true) + .withEnableVoteEnsemble(true) + .withEnsembleModelDownloadTimeout(Duration.parse("PT64H5M8S")) + .withStackEnsembleSettings(new StackEnsembleSettings().withStackMetaLearnerKWargs("\"datadqzsaaoqdsgp\"") + .withStackMetaLearnerTrainPercentage(55.170473316715174D) + .withStackMetaLearnerType(StackMetaLearnerType.NONE)) + .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.AUTO_ARIMA)) + .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.NAIVE, ForecastingModels.TCNFORECASTER, + ForecastingModels.EXPONENTIAL_SMOOTHING, ForecastingModels.EXPONENTIAL_SMOOTHING)); model = BinaryData.fromObject(model).toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(13.408561162477984D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H40M3S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.SEASONAL_NAIVE, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.EXPONENTIAL_SMOOTHING, model.blockedTrainingAlgorithms().get(0)); + Assertions.assertFalse(model.enableDnnTraining()); + Assertions.assertTrue(model.enableModelExplainability()); + Assertions.assertFalse(model.enableOnnxCompatibleModels()); + Assertions.assertTrue(model.enableStackEnsemble()); + Assertions.assertTrue(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT64H5M8S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(55.170473316715174D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.NONE, model.stackEnsembleSettings().stackMetaLearnerType()); + Assertions.assertEquals(ForecastingModels.AUTO_ARIMA, model.allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(ForecastingModels.NAIVE, model.blockedTrainingAlgorithms().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java index 1678ef64f69a..f931c1442508 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,7 @@ public final class FqdnEndpointDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FqdnEndpointDetail model = BinaryData.fromString("{\"port\":1449386799}").toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1449386799, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointDetail model = new FqdnEndpointDetail().withPort(1449386799); - model = BinaryData.fromObject(model).toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1449386799, model.port()); + FqdnEndpointDetail model = BinaryData.fromString("{\"port\":224847160}").toObject(FqdnEndpointDetail.class); + Assertions.assertEquals(224847160, model.port()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java index 440265ccd2ac..98a61ff2bbae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java @@ -1,32 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class FqdnEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FqdnEndpoint model = BinaryData - .fromString("{\"domainName\":\"irels\",\"endpointDetails\":[{\"port\":730394428},{\"port\":1632471353}]}") - .toObject(FqdnEndpoint.class); - Assertions.assertEquals("irels", model.domainName()); - Assertions.assertEquals(730394428, model.endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoint model = new FqdnEndpoint().withDomainName("irels") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(730394428), - new FqdnEndpointDetail().withPort(1632471353))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoint.class); - Assertions.assertEquals("irels", model.domainName()); - Assertions.assertEquals(730394428, model.endpointDetails().get(0).port()); + FqdnEndpoint model + = BinaryData.fromString("{\"domainName\":\"qhakauhashsf\",\"endpointDetails\":[{\"port\":1405822792}]}") + .toObject(FqdnEndpoint.class); + Assertions.assertEquals("qhakauhashsf", model.domainName()); + Assertions.assertEquals(1405822792, model.endpointDetails().get(0).port()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java deleted file mode 100644 index 526ca2a4dc6e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpointsProperties model = BinaryData.fromString( - "{\"category\":\"njhf\",\"endpoints\":[{\"domainName\":\"szkkfoqre\",\"endpointDetails\":[{\"port\":648968318},{\"port\":1648570452},{\"port\":498356163},{\"port\":195683064}]},{\"domainName\":\"a\",\"endpointDetails\":[{\"port\":322973840},{\"port\":1950360907},{\"port\":1038031643}]}]}") - .toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("njhf", model.category()); - Assertions.assertEquals("szkkfoqre", model.endpoints().get(0).domainName()); - Assertions.assertEquals(648968318, model.endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointsProperties model = new FqdnEndpointsProperties().withCategory("njhf") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("szkkfoqre") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(648968318), - new FqdnEndpointDetail().withPort(1648570452), new FqdnEndpointDetail().withPort(498356163), - new FqdnEndpointDetail().withPort(195683064))), - new FqdnEndpoint().withDomainName("a") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(322973840), - new FqdnEndpointDetail().withPort(1950360907), - new FqdnEndpointDetail().withPort(1038031643))))); - model = BinaryData.fromObject(model).toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("njhf", model.category()); - Assertions.assertEquals("szkkfoqre", model.endpoints().get(0).domainName()); - Assertions.assertEquals(648968318, model.endpoints().get(0).endpointDetails().get(0).port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertyBagTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertyBagTests.java new file mode 100644 index 000000000000..d8f5e0a166bd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertyBagTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag; +import org.junit.jupiter.api.Assertions; + +public final class FqdnEndpointsPropertyBagTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + FqdnEndpointsPropertyBag model = BinaryData.fromString( + "{\"properties\":{\"category\":\"eyvjusrtslhspkde\",\"endpoints\":[{\"domainName\":\"fm\",\"endpointDetails\":[{\"port\":375290729},{\"port\":230289658},{\"port\":696697077},{\"port\":683816537}]},{\"domainName\":\"rhahvljuahaquhcd\",\"endpointDetails\":[{\"port\":2135401961},{\"port\":591978059}]},{\"domainName\":\"xqpvfadmw\",\"endpointDetails\":[{\"port\":872144971},{\"port\":1259983494},{\"port\":1281697798}]}]}}") + .toObject(FqdnEndpointsPropertyBag.class); + Assertions.assertEquals("eyvjusrtslhspkde", model.properties().category()); + Assertions.assertEquals("fm", model.properties().endpoints().get(0).domainName()); + Assertions.assertEquals(375290729, model.properties().endpoints().get(0).endpointDetails().get(0).port()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java index e74791131143..19bab215809a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java @@ -1,44 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class FqdnEndpointsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FqdnEndpoints model = BinaryData.fromString( - "{\"properties\":{\"category\":\"stkwqqtch\",\"endpoints\":[{\"domainName\":\"fmtdaaygdvwvgp\",\"endpointDetails\":[{\"port\":976430532},{\"port\":434631779},{\"port\":1822865162}]},{\"domainName\":\"dxepxgyq\",\"endpointDetails\":[{\"port\":1825902686},{\"port\":1104557585},{\"port\":128514806},{\"port\":1947559864}]},{\"domainName\":\"himdbl\",\"endpointDetails\":[{\"port\":1230098756}]}]}}") + "{\"category\":\"omzlfmi\",\"endpoints\":[{\"domainName\":\"nbbelda\",\"endpointDetails\":[{\"port\":585337534},{\"port\":315307846},{\"port\":1774200717}]}]}") .toObject(FqdnEndpoints.class); - Assertions.assertEquals("stkwqqtch", model.properties().category()); - Assertions.assertEquals("fmtdaaygdvwvgp", model.properties().endpoints().get(0).domainName()); - Assertions.assertEquals(976430532, model.properties().endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoints model = new FqdnEndpoints().withProperties(new FqdnEndpointsProperties().withCategory("stkwqqtch") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("fmtdaaygdvwvgp") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(976430532), - new FqdnEndpointDetail().withPort(434631779), new FqdnEndpointDetail().withPort(1822865162))), - new FqdnEndpoint().withDomainName("dxepxgyq") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(1825902686), - new FqdnEndpointDetail().withPort(1104557585), new FqdnEndpointDetail().withPort(128514806), - new FqdnEndpointDetail().withPort(1947559864))), - new FqdnEndpoint().withDomainName("himdbl") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(1230098756)))))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoints.class); - Assertions.assertEquals("stkwqqtch", model.properties().category()); - Assertions.assertEquals("fmtdaaygdvwvgp", model.properties().endpoints().get(0).domainName()); - Assertions.assertEquals(976430532, model.properties().endpoints().get(0).endpointDetails().get(0).port()); + Assertions.assertEquals("omzlfmi", model.category()); + Assertions.assertEquals("nbbelda", model.endpoints().get(0).domainName()); + Assertions.assertEquals(585337534, model.endpoints().get(0).endpointDetails().get(0).port()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java index 28f818b124a0..06131a27f96f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,23 +13,22 @@ public final class FqdnOutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - FqdnOutboundRule model = BinaryData - .fromString( - "{\"type\":\"FQDN\",\"destination\":\"sfeqbbe\",\"category\":\"Required\",\"status\":\"Active\"}") + FqdnOutboundRule model = BinaryData.fromString( + "{\"type\":\"FQDN\",\"destination\":\"jwzrl\",\"category\":\"Required\",\"status\":\"Inactive\",\"errorInformation\":\"hijco\",\"parentRuleNames\":[\"tbzaqsqsycbkbfk\",\"ukdkexxppofmxa\"]}") .toObject(FqdnOutboundRule.class); Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("sfeqbbe", model.destination()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); + Assertions.assertEquals("jwzrl", model.destination()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { FqdnOutboundRule model = new FqdnOutboundRule().withCategory(RuleCategory.REQUIRED) - .withStatus(RuleStatus.ACTIVE) - .withDestination("sfeqbbe"); + .withStatus(RuleStatus.INACTIVE) + .withDestination("jwzrl"); model = BinaryData.fromObject(model).toObject(FqdnOutboundRule.class); Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("sfeqbbe", model.destination()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); + Assertions.assertEquals("jwzrl", model.destination()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java index 48db3aa77e09..ebc1a6e180e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,18 +11,19 @@ public final class GetBlobReferenceSasRequestDtoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - GetBlobReferenceSasRequestDto model = BinaryData.fromString("{\"assetId\":\"lgzurig\",\"blobUri\":\"ecxn\"}") - .toObject(GetBlobReferenceSasRequestDto.class); - Assertions.assertEquals("lgzurig", model.assetId()); - Assertions.assertEquals("ecxn", model.blobUri()); + GetBlobReferenceSasRequestDto model + = BinaryData.fromString("{\"assetId\":\"jzhdtrsyfezf\",\"blobUri\":\"yljdzyyrwnmwt\"}") + .toObject(GetBlobReferenceSasRequestDto.class); + Assertions.assertEquals("jzhdtrsyfezf", model.assetId()); + Assertions.assertEquals("yljdzyyrwnmwt", model.blobUri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { GetBlobReferenceSasRequestDto model - = new GetBlobReferenceSasRequestDto().withAssetId("lgzurig").withBlobUri("ecxn"); + = new GetBlobReferenceSasRequestDto().withAssetId("jzhdtrsyfezf").withBlobUri("yljdzyyrwnmwt"); model = BinaryData.fromObject(model).toObject(GetBlobReferenceSasRequestDto.class); - Assertions.assertEquals("lgzurig", model.assetId()); - Assertions.assertEquals("ecxn", model.blobUri()); + Assertions.assertEquals("jzhdtrsyfezf", model.assetId()); + Assertions.assertEquals("yljdzyyrwnmwt", model.blobUri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java index dcfaa3f75da8..d0f3f390bc8e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupModelConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupModelConfigurationTests.java new file mode 100644 index 000000000000..f19c646d69e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupModelConfigurationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class GroupModelConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GroupModelConfiguration model + = BinaryData.fromString("{\"modelId\":\"byqecroo\"}").toObject(GroupModelConfiguration.class); + Assertions.assertEquals("byqecroo", model.modelId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GroupModelConfiguration model = new GroupModelConfiguration().withModelId("byqecroo"); + model = BinaryData.fromObject(model).toObject(GroupModelConfiguration.class); + Assertions.assertEquals("byqecroo", model.modelId()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupStatusInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupStatusInnerTests.java new file mode 100644 index 000000000000..a163dbf5aa19 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GroupStatusInnerTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner; +import org.junit.jupiter.api.Assertions; + +public final class GroupStatusInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GroupStatusInner model = BinaryData.fromString( + "{\"actualCapacityInfo\":{\"total\":2005722569,\"succeeded\":2082895999,\"failed\":49091821,\"outdatedSucceeded\":1302685190,\"outdatedFailed\":24212267},\"endpointCount\":1157102161,\"requestedCapacity\":520743961}") + .toObject(GroupStatusInner.class); + Assertions.assertEquals(2005722569, model.actualCapacityInfo().total()); + Assertions.assertEquals(2082895999, model.actualCapacityInfo().succeeded()); + Assertions.assertEquals(49091821, model.actualCapacityInfo().failed()); + Assertions.assertEquals(1302685190, model.actualCapacityInfo().outdatedSucceeded()); + Assertions.assertEquals(24212267, model.actualCapacityInfo().outdatedFailed()); + Assertions.assertEquals(1157102161, model.endpointCount()); + Assertions.assertEquals(520743961, model.requestedCapacity()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IPRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IPRuleTests.java new file mode 100644 index 000000000000..0e42de1b618e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IPRuleTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.IPRule; +import org.junit.jupiter.api.Assertions; + +public final class IPRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IPRule model = BinaryData.fromString("{\"value\":\"nj\"}").toObject(IPRule.class); + Assertions.assertEquals("nj", model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IPRule model = new IPRule().withValue("nj"); + model = BinaryData.fromObject(model).toObject(IPRule.class); + Assertions.assertEquals("nj", model.value()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java index 7bde49429902..db2df16f4694 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class IdAssetReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IdAssetReference model - = BinaryData.fromString("{\"referenceType\":\"Id\",\"assetId\":\"jow\"}").toObject(IdAssetReference.class); - Assertions.assertEquals("jow", model.assetId()); + IdAssetReference model = BinaryData.fromString("{\"referenceType\":\"Id\",\"assetId\":\"txkyctwwgzwxjlm\"}") + .toObject(IdAssetReference.class); + Assertions.assertEquals("txkyctwwgzwxjlm", model.assetId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IdAssetReference model = new IdAssetReference().withAssetId("jow"); + IdAssetReference model = new IdAssetReference().withAssetId("txkyctwwgzwxjlm"); model = BinaryData.fromObject(model).toObject(IdAssetReference.class); - Assertions.assertEquals("jow", model.assetId()); + Assertions.assertEquals("txkyctwwgzwxjlm", model.assetId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java index bc70959300eb..a83cf0d4cff2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java index 48f754db7dfe..fbec4ce04e81 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,15 @@ public final class IdentityForCmkTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IdentityForCmk model = BinaryData.fromString("{\"userAssignedIdentity\":\"o\"}").toObject(IdentityForCmk.class); - Assertions.assertEquals("o", model.userAssignedIdentity()); + IdentityForCmk model + = BinaryData.fromString("{\"userAssignedIdentity\":\"sszdnru\"}").toObject(IdentityForCmk.class); + Assertions.assertEquals("sszdnru", model.userAssignedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IdentityForCmk model = new IdentityForCmk().withUserAssignedIdentity("o"); + IdentityForCmk model = new IdentityForCmk().withUserAssignedIdentity("sszdnru"); model = BinaryData.fromObject(model).toObject(IdentityForCmk.class); - Assertions.assertEquals("o", model.userAssignedIdentity()); + Assertions.assertEquals("sszdnru", model.userAssignedIdentity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdleShutdownSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdleShutdownSettingTests.java new file mode 100644 index 000000000000..8e8eb91d20c7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdleShutdownSettingTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; +import org.junit.jupiter.api.Assertions; + +public final class IdleShutdownSettingTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IdleShutdownSetting model = BinaryData.fromString("{\"idleTimeBeforeShutdown\":\"jffzwncvdefxonzt\"}") + .toObject(IdleShutdownSetting.class); + Assertions.assertEquals("jffzwncvdefxonzt", model.idleTimeBeforeShutdown()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IdleShutdownSetting model = new IdleShutdownSetting().withIdleTimeBeforeShutdown("jffzwncvdefxonzt"); + model = BinaryData.fromObject(model).toObject(IdleShutdownSetting.class); + Assertions.assertEquals("jffzwncvdefxonzt", model.idleTimeBeforeShutdown()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java deleted file mode 100644 index b6f33efdf815..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassificationBase; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassificationBase model = BinaryData.fromString( - "{\"modelSettings\":{\"trainingCropSize\":1122478262,\"validationCropSize\":945558500,\"validationResizeSize\":1406574230,\"weightedLoss\":1632810931,\"amsGradient\":false,\"advancedSettings\":\"zfwugeup\",\"augmentations\":\"necexkgrvfps\",\"beta1\":4.8045993,\"beta2\":81.08034,\"checkpointFrequency\":383318348,\"checkpointRunId\":\"qpdzf\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"cnwawoxc\",\"mode\":\"EvalDownload\",\"description\":\"jqfbifop\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":299031519,\"earlyStoppingPatience\":280683238,\"evaluationFrequency\":182536431,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1311462683,\"layersToFreeze\":1166812452,\"learningRate\":85.73021,\"learningRateScheduler\":\"Step\",\"modelName\":\"uuugtjig\",\"momentum\":52.275288,\"nesterov\":true,\"numberOfEpochs\":1076686728,\"numberOfWorkers\":1071396721,\"optimizer\":\"Adam\",\"randomSeed\":1057852499,\"stepLRGamma\":86.41818,\"stepLRStepSize\":1698348781,\"trainingBatchSize\":124401453,\"validationBatchSize\":1482539415,\"warmupCosineLRCycles\":69.18967,\"warmupCosineLRWarmupEpochs\":1390476760,\"weightDecay\":69.7827},\"searchSpace\":[{\"trainingCropSize\":\"rpvsgloiovs\",\"validationCropSize\":\"ivqsuvwtenb\",\"validationResizeSize\":\"i\",\"weightedLoss\":\"khcyoaqxuk\",\"amsGradient\":\"cjuftekio\",\"augmentations\":\"nd\",\"beta1\":\"wfhvpxjhxzu\",\"beta2\":\"jzabbwz\",\"distributed\":\"zuaixcdckixspsa\",\"earlyStopping\":\"avkmvyxzerejrkpz\",\"earlyStoppingDelay\":\"yetjxryo\",\"earlyStoppingPatience\":\"ae\",\"evaluationFrequency\":\"whlbecgihzbpem\",\"enableOnnxNormalization\":\"rab\",\"gradientAccumulationStep\":\"rwwxywpj\",\"layersToFreeze\":\"pboxhifppsk\",\"learningRate\":\"s\",\"learningRateScheduler\":\"hhmifjuaj\",\"modelName\":\"wvcmmpeglyuq\",\"momentum\":\"m\",\"nesterov\":\"exbzbqufpnezsjza\",\"numberOfEpochs\":\"ldrorhyogzmsimeh\",\"numberOfWorkers\":\"uuwdhtq\",\"optimizer\":\"yhn\",\"randomSeed\":\"xtnsugisn\",\"stepLRGamma\":\"wnwngh\",\"stepLRStepSize\":\"ovke\",\"trainingBatchSize\":\"micjixxfsf\",\"validationBatchSize\":\"rtnuguefxxijteb\",\"warmupCosineLRCycles\":\"eywetkrhlolmcn\",\"warmupCosineLRWarmupEpochs\":\"pfgsvbbvaqdljnp\",\"weightDecay\":\"l\"},{\"trainingCropSize\":\"rdetawevxehuekdx\",\"validationCropSize\":\"zvdov\",\"validationResizeSize\":\"blerlpr\",\"weightedLoss\":\"qccddcbny\",\"amsGradient\":\"jccxwbp\",\"augmentations\":\"ykdigqzlrznda\",\"beta1\":\"nidmjqmvytg\",\"beta2\":\"qlarhqt\",\"distributed\":\"caz\",\"earlyStopping\":\"d\",\"earlyStoppingDelay\":\"zffzjwztsmp\",\"earlyStoppingPatience\":\"ggr\",\"evaluationFrequency\":\"lgf\",\"enableOnnxNormalization\":\"tig\",\"gradientAccumulationStep\":\"frrkdknczgorywnv\",\"layersToFreeze\":\"tv\",\"learningRate\":\"evdlh\",\"learningRateScheduler\":\"bkarbpyhssr\",\"modelName\":\"kpkpkocmacc\",\"momentum\":\"xxopyi\",\"nesterov\":\"vspeslhwyykgvr\",\"numberOfEpochs\":\"pumdd\",\"numberOfWorkers\":\"ajk\",\"optimizer\":\"yddt\",\"randomSeed\":\"c\",\"stepLRGamma\":\"vafnbfbqvenq\",\"stepLRStepSize\":\"hgko\",\"trainingBatchSize\":\"wzejpecwzvcm\",\"validationBatchSize\":\"wdlu\",\"warmupCosineLRCycles\":\"ypr\",\"warmupCosineLRWarmupEpochs\":\"idwmt\",\"weightDecay\":\"bvtzldzchub\"}],\"limitSettings\":{\"maxTrials\":1777593025,\"timeout\":\"PT78H18M45S\",\"maxConcurrentTrials\":1190773271},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1889059190,\"delayEvaluation\":482125528}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"rbzakpjtcqr\",\"mode\":\"ReadOnlyMount\",\"description\":\"jpsucmxi\"},\"validationDataSize\":94.50327063126527}") - .toObject(ImageClassificationBase.class); - Assertions.assertEquals(1777593025, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT78H18M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(1190773271, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1889059190, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(482125528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("jpsucmxi", model.validationData().description()); - Assertions.assertEquals("rbzakpjtcqr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(94.50327063126527D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("zfwugeup", model.modelSettings().advancedSettings()); - Assertions.assertEquals("necexkgrvfps", model.modelSettings().augmentations()); - Assertions.assertEquals(4.8045993F, model.modelSettings().beta1()); - Assertions.assertEquals(81.08034F, model.modelSettings().beta2()); - Assertions.assertEquals(383318348, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qpdzf", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("jqfbifop", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("cnwawoxc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(299031519, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(280683238, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(182536431, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1311462683, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1166812452, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(85.73021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uuugtjig", model.modelSettings().modelName()); - Assertions.assertEquals(52.275288F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1076686728, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1071396721, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1057852499, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.41818F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1698348781, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(124401453, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1482539415, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(69.18967F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1390476760, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(69.7827F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1122478262, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(945558500, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1406574230, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1632810931, model.modelSettings().weightedLoss()); - Assertions.assertEquals("cjuftekio", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("nd", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wfhvpxjhxzu", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("jzabbwz", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("zuaixcdckixspsa", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("avkmvyxzerejrkpz", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("yetjxryo", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ae", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("whlbecgihzbpem", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("rab", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("rwwxywpj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("pboxhifppsk", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("s", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("hhmifjuaj", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("wvcmmpeglyuq", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("m", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("exbzbqufpnezsjza", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ldrorhyogzmsimeh", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("uuwdhtq", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("yhn", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xtnsugisn", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("wnwngh", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("ovke", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("micjixxfsf", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rtnuguefxxijteb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("eywetkrhlolmcn", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("pfgsvbbvaqdljnp", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("l", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("rpvsgloiovs", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("ivqsuvwtenb", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("i", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("khcyoaqxuk", model.searchSpace().get(0).weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationBase model - = new ImageClassificationBase() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1777593025) - .withTimeout(Duration.parse("PT78H18M45S")) - .withMaxConcurrentTrials(1190773271)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(1889059190) - .withDelayEvaluation(482125528))) - .withValidationData(new MLTableJobInput().withDescription("jpsucmxi") - .withUri("rbzakpjtcqr") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(94.50327063126527D) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(false) - .withAdvancedSettings("zfwugeup") - .withAugmentations("necexkgrvfps") - .withBeta1(4.8045993F) - .withBeta2(81.08034F) - .withCheckpointFrequency(383318348) - .withCheckpointRunId("qpdzf") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("jqfbifop") - .withUri("cnwawoxc") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(299031519) - .withEarlyStoppingPatience(280683238) - .withEvaluationFrequency(182536431) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1311462683) - .withLayersToFreeze(1166812452) - .withLearningRate(85.73021F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("uuugtjig") - .withMomentum(52.275288F) - .withNesterov(true) - .withNumberOfEpochs(1076686728) - .withNumberOfWorkers(1071396721) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(1057852499) - .withStepLRGamma(86.41818F) - .withStepLRStepSize(1698348781) - .withTrainingBatchSize(124401453) - .withValidationBatchSize(1482539415) - .withWarmupCosineLRCycles(69.18967F) - .withWarmupCosineLRWarmupEpochs(1390476760) - .withWeightDecay(69.7827F) - .withTrainingCropSize(1122478262) - .withValidationCropSize(945558500) - .withValidationResizeSize(1406574230) - .withWeightedLoss(1632810931)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsClassification().withAmsGradient("cjuftekio") - .withAugmentations("nd") - .withBeta1("wfhvpxjhxzu") - .withBeta2("jzabbwz") - .withDistributed("zuaixcdckixspsa") - .withEarlyStopping("avkmvyxzerejrkpz") - .withEarlyStoppingDelay("yetjxryo") - .withEarlyStoppingPatience("ae") - .withEvaluationFrequency("whlbecgihzbpem") - .withEnableOnnxNormalization("rab") - .withGradientAccumulationStep("rwwxywpj") - .withLayersToFreeze("pboxhifppsk") - .withLearningRate("s") - .withLearningRateScheduler("hhmifjuaj") - .withModelName("wvcmmpeglyuq") - .withMomentum("m") - .withNesterov("exbzbqufpnezsjza") - .withNumberOfEpochs("ldrorhyogzmsimeh") - .withNumberOfWorkers("uuwdhtq") - .withOptimizer("yhn") - .withRandomSeed("xtnsugisn") - .withStepLRGamma("wnwngh") - .withStepLRStepSize("ovke") - .withTrainingBatchSize("micjixxfsf") - .withValidationBatchSize("rtnuguefxxijteb") - .withWarmupCosineLRCycles("eywetkrhlolmcn") - .withWarmupCosineLRWarmupEpochs("pfgsvbbvaqdljnp") - .withWeightDecay("l") - .withTrainingCropSize("rpvsgloiovs") - .withValidationCropSize("ivqsuvwtenb") - .withValidationResizeSize("i") - .withWeightedLoss("khcyoaqxuk"), - new ImageModelDistributionSettingsClassification().withAmsGradient("jccxwbp") - .withAugmentations("ykdigqzlrznda") - .withBeta1("nidmjqmvytg") - .withBeta2("qlarhqt") - .withDistributed("caz") - .withEarlyStopping("d") - .withEarlyStoppingDelay("zffzjwztsmp") - .withEarlyStoppingPatience("ggr") - .withEvaluationFrequency("lgf") - .withEnableOnnxNormalization("tig") - .withGradientAccumulationStep("frrkdknczgorywnv") - .withLayersToFreeze("tv") - .withLearningRate("evdlh") - .withLearningRateScheduler("bkarbpyhssr") - .withModelName("kpkpkocmacc") - .withMomentum("xxopyi") - .withNesterov("vspeslhwyykgvr") - .withNumberOfEpochs("pumdd") - .withNumberOfWorkers("ajk") - .withOptimizer("yddt") - .withRandomSeed("c") - .withStepLRGamma("vafnbfbqvenq") - .withStepLRStepSize("hgko") - .withTrainingBatchSize("wzejpecwzvcm") - .withValidationBatchSize("wdlu") - .withWarmupCosineLRCycles("ypr") - .withWarmupCosineLRWarmupEpochs("idwmt") - .withWeightDecay("bvtzldzchub") - .withTrainingCropSize("rdetawevxehuekdx") - .withValidationCropSize("zvdov") - .withValidationResizeSize("blerlpr") - .withWeightedLoss("qccddcbny"))); - model = BinaryData.fromObject(model).toObject(ImageClassificationBase.class); - Assertions.assertEquals(1777593025, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT78H18M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(1190773271, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1889059190, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(482125528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("jpsucmxi", model.validationData().description()); - Assertions.assertEquals("rbzakpjtcqr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(94.50327063126527D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("zfwugeup", model.modelSettings().advancedSettings()); - Assertions.assertEquals("necexkgrvfps", model.modelSettings().augmentations()); - Assertions.assertEquals(4.8045993F, model.modelSettings().beta1()); - Assertions.assertEquals(81.08034F, model.modelSettings().beta2()); - Assertions.assertEquals(383318348, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qpdzf", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("jqfbifop", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("cnwawoxc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(299031519, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(280683238, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(182536431, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1311462683, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1166812452, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(85.73021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uuugtjig", model.modelSettings().modelName()); - Assertions.assertEquals(52.275288F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1076686728, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1071396721, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1057852499, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.41818F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1698348781, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(124401453, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1482539415, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(69.18967F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1390476760, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(69.7827F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1122478262, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(945558500, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1406574230, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1632810931, model.modelSettings().weightedLoss()); - Assertions.assertEquals("cjuftekio", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("nd", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wfhvpxjhxzu", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("jzabbwz", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("zuaixcdckixspsa", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("avkmvyxzerejrkpz", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("yetjxryo", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ae", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("whlbecgihzbpem", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("rab", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("rwwxywpj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("pboxhifppsk", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("s", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("hhmifjuaj", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("wvcmmpeglyuq", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("m", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("exbzbqufpnezsjza", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ldrorhyogzmsimeh", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("uuwdhtq", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("yhn", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xtnsugisn", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("wnwngh", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("ovke", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("micjixxfsf", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rtnuguefxxijteb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("eywetkrhlolmcn", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("pfgsvbbvaqdljnp", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("l", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("rpvsgloiovs", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("ivqsuvwtenb", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("i", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("khcyoaqxuk", model.searchSpace().get(0).weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java index 98c86f7c4467..dbcb0157d487 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -27,367 +27,303 @@ public final class ImageClassificationMultilabelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageClassificationMultilabel model = BinaryData.fromString( - "{\"taskType\":\"ImageClassificationMultilabel\",\"primaryMetric\":\"AUCWeighted\",\"modelSettings\":{\"trainingCropSize\":617578345,\"validationCropSize\":102589944,\"validationResizeSize\":1980460749,\"weightedLoss\":1156963756,\"amsGradient\":true,\"advancedSettings\":\"ctcxs\",\"augmentations\":\"bzdxmsynb\",\"beta1\":54.66098,\"beta2\":69.80503,\"checkpointFrequency\":1543500625,\"checkpointRunId\":\"uzmsvzyqrbr\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"hj\",\"mode\":\"EvalDownload\",\"description\":\"i\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":583009502,\"earlyStoppingPatience\":858094139,\"evaluationFrequency\":1286684068,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":47403047,\"layersToFreeze\":1160956769,\"learningRate\":47.12773,\"learningRateScheduler\":\"Step\",\"modelName\":\"boz\",\"momentum\":40.360588,\"nesterov\":true,\"numberOfEpochs\":766236373,\"numberOfWorkers\":2064309702,\"optimizer\":\"None\",\"randomSeed\":26532947,\"stepLRGamma\":11.640281,\"stepLRStepSize\":1577359960,\"trainingBatchSize\":1671141270,\"validationBatchSize\":426588698,\"warmupCosineLRCycles\":4.2323647,\"warmupCosineLRWarmupEpochs\":913521751,\"weightDecay\":38.36152},\"searchSpace\":[{\"trainingCropSize\":\"orgfhjxsawooauff\",\"validationCropSize\":\"fqkmwz\",\"validationResizeSize\":\"q\",\"weightedLoss\":\"ybmrnotoc\",\"amsGradient\":\"zdaiovrb\",\"augmentations\":\"pqphk\",\"beta1\":\"yzadcrxylaypdt\",\"beta2\":\"velffohuriw\",\"distributed\":\"dfrwpsshrm\",\"earlyStopping\":\"cclpct\",\"earlyStoppingDelay\":\"gkscxjfsgmosp\",\"earlyStoppingPatience\":\"bnxsqc\",\"evaluationFrequency\":\"scuyfqlamfbqhsuj\",\"enableOnnxNormalization\":\"fu\",\"gradientAccumulationStep\":\"nxqpwnikxkcajgrb\",\"layersToFreeze\":\"tsvgoocqs\",\"learningRate\":\"mzlpcx\",\"learningRateScheduler\":\"mhxxrqicfzfvwjd\",\"modelName\":\"kvpyeyo\",\"momentum\":\"inmpnqupdkjrzfwk\",\"nesterov\":\"uobdxw\",\"numberOfEpochs\":\"dcclcvqsr\",\"numberOfWorkers\":\"ay\",\"optimizer\":\"vwbzmfxlrymf\",\"randomSeed\":\"lpiywqnpfydrfbg\",\"stepLRGamma\":\"y\",\"stepLRStepSize\":\"yxmkhmqyncgaul\",\"trainingBatchSize\":\"styygjq\",\"validationBatchSize\":\"lmwqg\",\"warmupCosineLRCycles\":\"mqmiwxzfvvzu\",\"warmupCosineLRWarmupEpochs\":\"fgufjnbx\",\"weightDecay\":\"mwdukinhl\"},{\"trainingCropSize\":\"gde\",\"validationCropSize\":\"kzou\",\"validationResizeSize\":\"ewwpz\",\"weightedLoss\":\"wcgldohgcandx\",\"amsGradient\":\"hhtestdqt\",\"augmentations\":\"nckkpljdshv\",\"beta1\":\"k\",\"beta2\":\"ccyijjimhi\",\"distributed\":\"rqnjxmvvsduydwnw\",\"earlyStopping\":\"uhhqldrdymnswxie\",\"earlyStoppingDelay\":\"wqnghxnimvyuj\",\"earlyStoppingPatience\":\"gunnqgypuqt\",\"evaluationFrequency\":\"lque\",\"enableOnnxNormalization\":\"mvyumgmmuebsnzn\",\"gradientAccumulationStep\":\"squfmjxcyoseq\",\"layersToFreeze\":\"zisvbrqgcyjpgaw\",\"learningRate\":\"kwonrzpghl\",\"learningRateScheduler\":\"tbgblxbuibrvjzta\",\"modelName\":\"vs\",\"momentum\":\"jihvfjcqrttjfuq\",\"nesterov\":\"fjewfeqbavdo\",\"numberOfEpochs\":\"wy\",\"numberOfWorkers\":\"fm\",\"optimizer\":\"lvxgwzz\",\"randomSeed\":\"dtlcjgpvcqzv\",\"stepLRGamma\":\"b\",\"stepLRStepSize\":\"wx\",\"trainingBatchSize\":\"xrmx\",\"validationBatchSize\":\"drwynbgovazoym\",\"warmupCosineLRCycles\":\"hhplkhww\",\"warmupCosineLRWarmupEpochs\":\"atveqm\",\"weightDecay\":\"cswzeyxrye\"},{\"trainingCropSize\":\"mhpwbukl\",\"validationCropSize\":\"mfasgtlvhqpoilos\",\"validationResizeSize\":\"emcezevftm\",\"weightedLoss\":\"l\",\"amsGradient\":\"kjyghztms\",\"augmentations\":\"wtpcflcezswwvw\",\"beta1\":\"tdjtvbfpfhru\",\"beta2\":\"syqcjnqswxdowum\",\"distributed\":\"ukrcdiohcl\",\"earlyStopping\":\"dnhfknebwedd\",\"earlyStoppingDelay\":\"yzcwy\",\"earlyStoppingPatience\":\"mkaqldqabnwvpaq\",\"evaluationFrequency\":\"xf\",\"enableOnnxNormalization\":\"igcfddofxnf\",\"gradientAccumulationStep\":\"jyyrqaedw\",\"layersToFreeze\":\"ocytjgoeayokrw\",\"learningRate\":\"ihwpadhedbfobd\",\"learningRateScheduler\":\"vothmkhjaoz\",\"modelName\":\"wfcn\",\"momentum\":\"bpoelhscmyhrhjv\",\"nesterov\":\"fqbokndwp\",\"numberOfEpochs\":\"qwojoev\",\"numberOfWorkers\":\"ufytdxmly\",\"optimizer\":\"lyvapbkrbu\",\"randomSeed\":\"gtdltlcuha\",\"stepLRGamma\":\"ijvaylze\",\"stepLRStepSize\":\"lpsftqkrvm\",\"trainingBatchSize\":\"bvvcpw\",\"validationBatchSize\":\"suspnhmzy\",\"warmupCosineLRCycles\":\"fetev\",\"warmupCosineLRWarmupEpochs\":\"tf\",\"weightDecay\":\"wacycsyotctkhf\"},{\"trainingCropSize\":\"satvcs\",\"validationCropSize\":\"mhnmizhvprhqqw\",\"validationResizeSize\":\"blehhkplo\",\"weightedLoss\":\"gottaksad\",\"amsGradient\":\"ghmmtbtdvucfvvra\",\"augmentations\":\"eurdeewlsuxp\",\"beta1\":\"wkdwjyjiznioroof\",\"beta2\":\"taspmcrei\",\"distributed\":\"ftrnighminuwqxu\",\"earlyStopping\":\"robgwfmsxj\",\"earlyStoppingDelay\":\"ylwx\",\"earlyStoppingPatience\":\"zjow\",\"evaluationFrequency\":\"geerclbl\",\"enableOnnxNormalization\":\"hpwachyeu\",\"gradientAccumulationStep\":\"wmvwryvdi\",\"layersToFreeze\":\"ii\",\"learningRate\":\"pruccwme\",\"learningRateScheduler\":\"txsytrtexegwmrq\",\"modelName\":\"wi\",\"momentum\":\"vycfjncindi\",\"nesterov\":\"q\",\"numberOfEpochs\":\"jwjuriarsb\",\"numberOfWorkers\":\"lanhzcknjxizba\",\"optimizer\":\"ygzkztxfexwacyy\",\"randomSeed\":\"lxppd\",\"stepLRGamma\":\"zkf\",\"stepLRStepSize\":\"uiiu\",\"trainingBatchSize\":\"b\",\"validationBatchSize\":\"cjy\",\"warmupCosineLRCycles\":\"dcizeqqfop\",\"warmupCosineLRWarmupEpochs\":\"opmotdsf\",\"weightDecay\":\"xqlyoazyfbkmvl\"}],\"limitSettings\":{\"maxTrials\":1571107486,\"timeout\":\"PT193H51S\",\"maxConcurrentTrials\":2050591523},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":490867132,\"delayEvaluation\":787891741}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"kvhyejth\",\"mode\":\"ReadOnlyMount\",\"description\":\"bpergwlck\"},\"validationDataSize\":60.27486371298584,\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"qsokknpug\",\"mode\":\"EvalDownload\",\"description\":\"izcrjix\"},\"targetColumnName\":\"j\"}") + "{\"taskType\":\"ImageClassificationMultilabel\",\"modelSettings\":{\"trainingCropSize\":585946725,\"validationCropSize\":2014358559,\"validationResizeSize\":1672119617,\"weightedLoss\":1452005164,\"advancedSettings\":\"ctdscn\",\"amsGradient\":true,\"augmentations\":\"h\",\"beta1\":60.10520467518128,\"beta2\":17.581116308893563,\"checkpointFrequency\":1534418349,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"EvalDownload\",\"uri\":\"ehlbzqixbnjrqvzy\",\"description\":\"xozony\"},\"checkpointRunId\":\"ameudpabcreu\",\"distributed\":false,\"earlyStopping\":false,\"earlyStoppingDelay\":1977884580,\"earlyStoppingPatience\":934141618,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1762255404,\"gradientAccumulationStep\":702740224,\"layersToFreeze\":77534105,\"learningRate\":15.073407182340981,\"learningRateScheduler\":\"Step\",\"modelName\":\"b\",\"momentum\":69.62649712158013,\"nesterov\":false,\"numberOfEpochs\":472275599,\"numberOfWorkers\":2139027754,\"optimizer\":\"Sgd\",\"randomSeed\":2021961064,\"stepLRGamma\":35.91523550842026,\"stepLRStepSize\":1285055909,\"trainingBatchSize\":1029596150,\"validationBatchSize\":1177092838,\"warmupCosineLRCycles\":96.88068519247959,\"warmupCosineLRWarmupEpochs\":181548547,\"weightDecay\":7.777646921747583},\"searchSpace\":[{\"trainingCropSize\":\"pkeqsifj\",\"validationCropSize\":\"lng\",\"validationResizeSize\":\"nhr\",\"weightedLoss\":\"mbcdtajdopggorw\",\"amsGradient\":\"qtrotpvclp\",\"augmentations\":\"yrlmwkptsk\",\"beta1\":\"jgvhxcc\",\"beta2\":\"kakmkookbputmgvm\",\"distributed\":\"akmlwktfowzkroyr\",\"earlyStopping\":\"r\",\"earlyStoppingDelay\":\"lzqjimejtgzjxx\",\"earlyStoppingPatience\":\"e\",\"enableOnnxNormalization\":\"zuqloiwyayyzivr\",\"evaluationFrequency\":\"tcdqlh\",\"gradientAccumulationStep\":\"whrktjleifibfipl\",\"layersToFreeze\":\"fnsmycjowly\",\"learningRate\":\"zmudsqcm\",\"learningRateScheduler\":\"x\",\"modelName\":\"buwodmachbkv\",\"momentum\":\"pbjrmvgoqplehm\",\"nesterov\":\"kzdllczdprwnhkgq\",\"numberOfEpochs\":\"oxsstc\",\"numberOfWorkers\":\"rak\",\"optimizer\":\"ry\",\"randomSeed\":\"cwmhlymgnukxrk\",\"stepLRGamma\":\"jpequlrlzaudgjt\",\"stepLRStepSize\":\"clakku\",\"trainingBatchSize\":\"dwnhczbutoucgjti\",\"validationBatchSize\":\"way\",\"warmupCosineLRCycles\":\"cqqwwvgwkslvlize\",\"warmupCosineLRWarmupEpochs\":\"biabvnsrgekz\",\"weightDecay\":\"xadyfhb\"},{\"trainingCropSize\":\"khojqttbspvk\",\"validationCropSize\":\"laqjsgyzstujrzx\",\"validationResizeSize\":\"nsfdrlduye\",\"weightedLoss\":\"iitt\",\"amsGradient\":\"yuqwrldaxurfqazc\",\"augmentations\":\"zjvxdzcigg\",\"beta1\":\"vt\",\"beta2\":\"fwalzyxwhoeamo\",\"distributed\":\"bdoeysf\",\"earlyStopping\":\"imtwuuhau\",\"earlyStoppingDelay\":\"nkwmnfeub\",\"earlyStoppingPatience\":\"jyrkwfug\",\"enableOnnxNormalization\":\"hrrk\",\"evaluationFrequency\":\"mnqdu\",\"gradientAccumulationStep\":\"zzfopu\",\"layersToFreeze\":\"qusvwlujopwnib\",\"learningRate\":\"toztjd\",\"learningRateScheduler\":\"mqvfm\",\"modelName\":\"ad\",\"momentum\":\"gctxegtvgwyur\",\"nesterov\":\"lfnzzryizwbxg\",\"numberOfEpochs\":\"bxlayunomirhpf\",\"numberOfWorkers\":\"enqlamwmgewayx\",\"optimizer\":\"nbcpjstbhemhcucs\",\"randomSeed\":\"nxfbx\",\"stepLRGamma\":\"eapdrbzyv\",\"stepLRStepSize\":\"uadulpodkaxpfo\",\"trainingBatchSize\":\"zh\",\"validationBatchSize\":\"jdqltdeluqro\",\"warmupCosineLRCycles\":\"dhfztlra\",\"warmupCosineLRWarmupEpochs\":\"rkgzkyhudbkuw\",\"weightDecay\":\"qxlcweakfecjvx\"}],\"limitSettings\":{\"maxConcurrentTrials\":1816914268,\"maxTrials\":712500505,\"timeout\":\"PT237H29M16S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1741595014,\"evaluationInterval\":297815263},\"samplingAlgorithm\":\"Grid\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"eyyjmjj\",\"description\":\"zxpxhn\"},\"validationDataSize\":29.465030428286976,\"primaryMetric\":\"AUCWeighted\",\"logVerbosity\":\"Error\",\"targetColumnName\":\"gzkj\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"p\",\"description\":\"adeghztldsvc\"}}") .toObject(ImageClassificationMultilabel.class); Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("izcrjix", model.trainingData().description()); - Assertions.assertEquals("qsokknpug", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("j", model.targetColumnName()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ctcxs", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bzdxmsynb", model.modelSettings().augmentations()); - Assertions.assertEquals(54.66098F, model.modelSettings().beta1()); - Assertions.assertEquals(69.80503F, model.modelSettings().beta2()); - Assertions.assertEquals(1543500625, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("uzmsvzyqrbr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("i", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("hj", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("gzkj", model.targetColumnName()); + Assertions.assertEquals("adeghztldsvc", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("p", model.trainingData().uri()); + Assertions.assertEquals("ctdscn", model.modelSettings().advancedSettings()); + Assertions.assertTrue(model.modelSettings().amsGradient()); + Assertions.assertEquals("h", model.modelSettings().augmentations()); + Assertions.assertEquals(60.10520467518128D, model.modelSettings().beta1()); + Assertions.assertEquals(17.581116308893563D, model.modelSettings().beta2()); + Assertions.assertEquals(1534418349, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("xozony", model.modelSettings().checkpointModel().description()); Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(583009502, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(858094139, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1286684068, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(47403047, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1160956769, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(47.12773F, model.modelSettings().learningRate()); + Assertions.assertEquals("ehlbzqixbnjrqvzy", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("ameudpabcreu", model.modelSettings().checkpointRunId()); + Assertions.assertFalse(model.modelSettings().distributed()); + Assertions.assertFalse(model.modelSettings().earlyStopping()); + Assertions.assertEquals(1977884580, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(934141618, model.modelSettings().earlyStoppingPatience()); + Assertions.assertTrue(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(1762255404, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(702740224, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(77534105, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(15.073407182340981D, model.modelSettings().learningRate()); Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("boz", model.modelSettings().modelName()); - Assertions.assertEquals(40.360588F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(766236373, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2064309702, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(26532947, model.modelSettings().randomSeed()); - Assertions.assertEquals(11.640281F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1577359960, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1671141270, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(426588698, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.2323647F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(913521751, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.36152F, model.modelSettings().weightDecay()); - Assertions.assertEquals(617578345, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(102589944, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1980460749, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1156963756, model.modelSettings().weightedLoss()); - Assertions.assertEquals("zdaiovrb", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pqphk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("yzadcrxylaypdt", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("velffohuriw", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dfrwpsshrm", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cclpct", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("gkscxjfsgmosp", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("bnxsqc", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("scuyfqlamfbqhsuj", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("nxqpwnikxkcajgrb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("tsvgoocqs", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("mzlpcx", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("mhxxrqicfzfvwjd", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("kvpyeyo", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("inmpnqupdkjrzfwk", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("uobdxw", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("dcclcvqsr", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ay", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("vwbzmfxlrymf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lpiywqnpfydrfbg", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("y", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxmkhmqyncgaul", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("styygjq", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("lmwqg", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("mqmiwxzfvvzu", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("fgufjnbx", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("mwdukinhl", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("orgfhjxsawooauff", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("fqkmwz", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("q", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("ybmrnotoc", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1571107486, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51S"), model.limitSettings().timeout()); - Assertions.assertEquals(2050591523, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(490867132, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(787891741, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("bpergwlck", model.validationData().description()); - Assertions.assertEquals("kvhyejth", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(60.27486371298584D, model.validationDataSize()); + Assertions.assertEquals("b", model.modelSettings().modelName()); + Assertions.assertEquals(69.62649712158013D, model.modelSettings().momentum()); + Assertions.assertFalse(model.modelSettings().nesterov()); + Assertions.assertEquals(472275599, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(2139027754, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); + Assertions.assertEquals(2021961064, model.modelSettings().randomSeed()); + Assertions.assertEquals(35.91523550842026D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(1285055909, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(1029596150, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(1177092838, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(96.88068519247959D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(181548547, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(7.777646921747583D, model.modelSettings().weightDecay()); + Assertions.assertEquals(585946725, model.modelSettings().trainingCropSize()); + Assertions.assertEquals(2014358559, model.modelSettings().validationCropSize()); + Assertions.assertEquals(1672119617, model.modelSettings().validationResizeSize()); + Assertions.assertEquals(1452005164, model.modelSettings().weightedLoss()); + Assertions.assertEquals("qtrotpvclp", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("yrlmwkptsk", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("jgvhxcc", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("kakmkookbputmgvm", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("akmlwktfowzkroyr", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("r", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("lzqjimejtgzjxx", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("e", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("zuqloiwyayyzivr", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("tcdqlh", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("whrktjleifibfipl", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("fnsmycjowly", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("zmudsqcm", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("x", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("buwodmachbkv", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("pbjrmvgoqplehm", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("kzdllczdprwnhkgq", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("oxsstc", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("rak", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("ry", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("cwmhlymgnukxrk", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("jpequlrlzaudgjt", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("clakku", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("dwnhczbutoucgjti", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("way", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("cqqwwvgwkslvlize", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("biabvnsrgekz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("xadyfhb", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("pkeqsifj", model.searchSpace().get(0).trainingCropSize()); + Assertions.assertEquals("lng", model.searchSpace().get(0).validationCropSize()); + Assertions.assertEquals("nhr", model.searchSpace().get(0).validationResizeSize()); + Assertions.assertEquals("mbcdtajdopggorw", model.searchSpace().get(0).weightedLoss()); + Assertions.assertEquals(1816914268, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(712500505, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT237H29M16S"), model.limitSettings().timeout()); + Assertions.assertEquals(1741595014, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(297815263, model.sweepSettings().earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); + Assertions.assertEquals("zxpxhn", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("eyyjmjj", model.validationData().uri()); + Assertions.assertEquals(29.465030428286976D, model.validationDataSize()); + Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ImageClassificationMultilabel model = new ImageClassificationMultilabel().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("izcrjix") - .withUri("qsokknpug") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("j") - .withPrimaryMetric(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("ctcxs") - .withAugmentations("bzdxmsynb") - .withBeta1(54.66098F) - .withBeta2(69.80503F) - .withCheckpointFrequency(1543500625) - .withCheckpointRunId("uzmsvzyqrbr") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("i") - .withUri("hj") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(true) + .withTargetColumnName("gzkj") + .withTrainingData(new MLTableJobInput().withDescription("adeghztldsvc") + .withMode(InputDeliveryMode.EVAL_MOUNT) + .withUri("p")) + .withModelSettings(new ImageModelSettingsClassification().withAdvancedSettings("ctdscn") + .withAmsGradient(true) + .withAugmentations("h") + .withBeta1(60.10520467518128D) + .withBeta2(17.581116308893563D) + .withCheckpointFrequency(1534418349) + .withCheckpointModel(new MLFlowModelJobInput().withDescription("xozony") + .withMode(InputDeliveryMode.EVAL_DOWNLOAD) + .withUri("ehlbzqixbnjrqvzy")) + .withCheckpointRunId("ameudpabcreu") + .withDistributed(false) .withEarlyStopping(false) - .withEarlyStoppingDelay(583009502) - .withEarlyStoppingPatience(858094139) - .withEvaluationFrequency(1286684068) + .withEarlyStoppingDelay(1977884580) + .withEarlyStoppingPatience(934141618) .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(47403047) - .withLayersToFreeze(1160956769) - .withLearningRate(47.12773F) + .withEvaluationFrequency(1762255404) + .withGradientAccumulationStep(702740224) + .withLayersToFreeze(77534105) + .withLearningRate(15.073407182340981D) .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("boz") - .withMomentum(40.360588F) - .withNesterov(true) - .withNumberOfEpochs(766236373) - .withNumberOfWorkers(2064309702) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(26532947) - .withStepLRGamma(11.640281F) - .withStepLRStepSize(1577359960) - .withTrainingBatchSize(1671141270) - .withValidationBatchSize(426588698) - .withWarmupCosineLRCycles(4.2323647F) - .withWarmupCosineLRWarmupEpochs(913521751) - .withWeightDecay(38.36152F) - .withTrainingCropSize(617578345) - .withValidationCropSize(102589944) - .withValidationResizeSize(1980460749) - .withWeightedLoss(1156963756)) + .withModelName("b") + .withMomentum(69.62649712158013D) + .withNesterov(false) + .withNumberOfEpochs(472275599) + .withNumberOfWorkers(2139027754) + .withOptimizer(StochasticOptimizer.SGD) + .withRandomSeed(2021961064) + .withStepLRGamma(35.91523550842026D) + .withStepLRStepSize(1285055909) + .withTrainingBatchSize(1029596150) + .withValidationBatchSize(1177092838) + .withWarmupCosineLRCycles(96.88068519247959D) + .withWarmupCosineLRWarmupEpochs(181548547) + .withWeightDecay(7.777646921747583D) + .withTrainingCropSize(585946725) + .withValidationCropSize(2014358559) + .withValidationResizeSize(1672119617) + .withWeightedLoss(1452005164)) .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsClassification().withAmsGradient("zdaiovrb") - .withAugmentations("pqphk") - .withBeta1("yzadcrxylaypdt") - .withBeta2("velffohuriw") - .withDistributed("dfrwpsshrm") - .withEarlyStopping("cclpct") - .withEarlyStoppingDelay("gkscxjfsgmosp") - .withEarlyStoppingPatience("bnxsqc") - .withEvaluationFrequency("scuyfqlamfbqhsuj") - .withEnableOnnxNormalization("fu") - .withGradientAccumulationStep("nxqpwnikxkcajgrb") - .withLayersToFreeze("tsvgoocqs") - .withLearningRate("mzlpcx") - .withLearningRateScheduler("mhxxrqicfzfvwjd") - .withModelName("kvpyeyo") - .withMomentum("inmpnqupdkjrzfwk") - .withNesterov("uobdxw") - .withNumberOfEpochs("dcclcvqsr") - .withNumberOfWorkers("ay") - .withOptimizer("vwbzmfxlrymf") - .withRandomSeed("lpiywqnpfydrfbg") - .withStepLRGamma("y") - .withStepLRStepSize("yxmkhmqyncgaul") - .withTrainingBatchSize("styygjq") - .withValidationBatchSize("lmwqg") - .withWarmupCosineLRCycles("mqmiwxzfvvzu") - .withWarmupCosineLRWarmupEpochs("fgufjnbx") - .withWeightDecay("mwdukinhl") - .withTrainingCropSize("orgfhjxsawooauff") - .withValidationCropSize("fqkmwz") - .withValidationResizeSize("q") - .withWeightedLoss("ybmrnotoc"), - new ImageModelDistributionSettingsClassification().withAmsGradient("hhtestdqt") - .withAugmentations("nckkpljdshv") - .withBeta1("k") - .withBeta2("ccyijjimhi") - .withDistributed("rqnjxmvvsduydwnw") - .withEarlyStopping("uhhqldrdymnswxie") - .withEarlyStoppingDelay("wqnghxnimvyuj") - .withEarlyStoppingPatience("gunnqgypuqt") - .withEvaluationFrequency("lque") - .withEnableOnnxNormalization("mvyumgmmuebsnzn") - .withGradientAccumulationStep("squfmjxcyoseq") - .withLayersToFreeze("zisvbrqgcyjpgaw") - .withLearningRate("kwonrzpghl") - .withLearningRateScheduler("tbgblxbuibrvjzta") - .withModelName("vs") - .withMomentum("jihvfjcqrttjfuq") - .withNesterov("fjewfeqbavdo") - .withNumberOfEpochs("wy") - .withNumberOfWorkers("fm") - .withOptimizer("lvxgwzz") - .withRandomSeed("dtlcjgpvcqzv") - .withStepLRGamma("b") - .withStepLRStepSize("wx") - .withTrainingBatchSize("xrmx") - .withValidationBatchSize("drwynbgovazoym") - .withWarmupCosineLRCycles("hhplkhww") - .withWarmupCosineLRWarmupEpochs("atveqm") - .withWeightDecay("cswzeyxrye") - .withTrainingCropSize("gde") - .withValidationCropSize("kzou") - .withValidationResizeSize("ewwpz") - .withWeightedLoss("wcgldohgcandx"), - new ImageModelDistributionSettingsClassification().withAmsGradient("kjyghztms") - .withAugmentations("wtpcflcezswwvw") - .withBeta1("tdjtvbfpfhru") - .withBeta2("syqcjnqswxdowum") - .withDistributed("ukrcdiohcl") - .withEarlyStopping("dnhfknebwedd") - .withEarlyStoppingDelay("yzcwy") - .withEarlyStoppingPatience("mkaqldqabnwvpaq") - .withEvaluationFrequency("xf") - .withEnableOnnxNormalization("igcfddofxnf") - .withGradientAccumulationStep("jyyrqaedw") - .withLayersToFreeze("ocytjgoeayokrw") - .withLearningRate("ihwpadhedbfobd") - .withLearningRateScheduler("vothmkhjaoz") - .withModelName("wfcn") - .withMomentum("bpoelhscmyhrhjv") - .withNesterov("fqbokndwp") - .withNumberOfEpochs("qwojoev") - .withNumberOfWorkers("ufytdxmly") - .withOptimizer("lyvapbkrbu") - .withRandomSeed("gtdltlcuha") - .withStepLRGamma("ijvaylze") - .withStepLRStepSize("lpsftqkrvm") - .withTrainingBatchSize("bvvcpw") - .withValidationBatchSize("suspnhmzy") - .withWarmupCosineLRCycles("fetev") - .withWarmupCosineLRWarmupEpochs("tf") - .withWeightDecay("wacycsyotctkhf") - .withTrainingCropSize("mhpwbukl") - .withValidationCropSize("mfasgtlvhqpoilos") - .withValidationResizeSize("emcezevftm") - .withWeightedLoss("l"), - new ImageModelDistributionSettingsClassification().withAmsGradient("ghmmtbtdvucfvvra") - .withAugmentations("eurdeewlsuxp") - .withBeta1("wkdwjyjiznioroof") - .withBeta2("taspmcrei") - .withDistributed("ftrnighminuwqxu") - .withEarlyStopping("robgwfmsxj") - .withEarlyStoppingDelay("ylwx") - .withEarlyStoppingPatience("zjow") - .withEvaluationFrequency("geerclbl") - .withEnableOnnxNormalization("hpwachyeu") - .withGradientAccumulationStep("wmvwryvdi") - .withLayersToFreeze("ii") - .withLearningRate("pruccwme") - .withLearningRateScheduler("txsytrtexegwmrq") - .withModelName("wi") - .withMomentum("vycfjncindi") - .withNesterov("q") - .withNumberOfEpochs("jwjuriarsb") - .withNumberOfWorkers("lanhzcknjxizba") - .withOptimizer("ygzkztxfexwacyy") - .withRandomSeed("lxppd") - .withStepLRGamma("zkf") - .withStepLRStepSize("uiiu") - .withTrainingBatchSize("b") - .withValidationBatchSize("cjy") - .withWarmupCosineLRCycles("dcizeqqfop") - .withWarmupCosineLRWarmupEpochs("opmotdsf") - .withWeightDecay("xqlyoazyfbkmvl") - .withTrainingCropSize("satvcs") - .withValidationCropSize("mhnmizhvprhqqw") - .withValidationResizeSize("blehhkplo") - .withWeightedLoss("gottaksad"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1571107486) - .withTimeout(Duration.parse("PT193H51S")) - .withMaxConcurrentTrials(2050591523)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) + new ImageModelDistributionSettingsClassification().withAmsGradient("qtrotpvclp") + .withAugmentations("yrlmwkptsk") + .withBeta1("jgvhxcc") + .withBeta2("kakmkookbputmgvm") + .withDistributed("akmlwktfowzkroyr") + .withEarlyStopping("r") + .withEarlyStoppingDelay("lzqjimejtgzjxx") + .withEarlyStoppingPatience("e") + .withEnableOnnxNormalization("zuqloiwyayyzivr") + .withEvaluationFrequency("tcdqlh") + .withGradientAccumulationStep("whrktjleifibfipl") + .withLayersToFreeze("fnsmycjowly") + .withLearningRate("zmudsqcm") + .withLearningRateScheduler("x") + .withModelName("buwodmachbkv") + .withMomentum("pbjrmvgoqplehm") + .withNesterov("kzdllczdprwnhkgq") + .withNumberOfEpochs("oxsstc") + .withNumberOfWorkers("rak") + .withOptimizer("ry") + .withRandomSeed("cwmhlymgnukxrk") + .withStepLRGamma("jpequlrlzaudgjt") + .withStepLRStepSize("clakku") + .withTrainingBatchSize("dwnhczbutoucgjti") + .withValidationBatchSize("way") + .withWarmupCosineLRCycles("cqqwwvgwkslvlize") + .withWarmupCosineLRWarmupEpochs("biabvnsrgekz") + .withWeightDecay("xadyfhb") + .withTrainingCropSize("pkeqsifj") + .withValidationCropSize("lng") + .withValidationResizeSize("nhr") + .withWeightedLoss("mbcdtajdopggorw"), + new ImageModelDistributionSettingsClassification().withAmsGradient("yuqwrldaxurfqazc") + .withAugmentations("zjvxdzcigg") + .withBeta1("vt") + .withBeta2("fwalzyxwhoeamo") + .withDistributed("bdoeysf") + .withEarlyStopping("imtwuuhau") + .withEarlyStoppingDelay("nkwmnfeub") + .withEarlyStoppingPatience("jyrkwfug") + .withEnableOnnxNormalization("hrrk") + .withEvaluationFrequency("mnqdu") + .withGradientAccumulationStep("zzfopu") + .withLayersToFreeze("qusvwlujopwnib") + .withLearningRate("toztjd") + .withLearningRateScheduler("mqvfm") + .withModelName("ad") + .withMomentum("gctxegtvgwyur") + .withNesterov("lfnzzryizwbxg") + .withNumberOfEpochs("bxlayunomirhpf") + .withNumberOfWorkers("enqlamwmgewayx") + .withOptimizer("nbcpjstbhemhcucs") + .withRandomSeed("nxfbx") + .withStepLRGamma("eapdrbzyv") + .withStepLRStepSize("uadulpodkaxpfo") + .withTrainingBatchSize("zh") + .withValidationBatchSize("jdqltdeluqro") + .withWarmupCosineLRCycles("dhfztlra") + .withWarmupCosineLRWarmupEpochs("rkgzkyhudbkuw") + .withWeightDecay("qxlcweakfecjvx") + .withTrainingCropSize("khojqttbspvk") + .withValidationCropSize("laqjsgyzstujrzx") + .withValidationResizeSize("nsfdrlduye") + .withWeightedLoss("iitt"))) + .withLimitSettings(new ImageLimitSettings().withMaxConcurrentTrials(1816914268) + .withMaxTrials(712500505) + .withTimeout(Duration.parse("PT237H29M16S"))) + .withSweepSettings(new ImageSweepSettings() .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(490867132).withDelayEvaluation(787891741))) - .withValidationData(new MLTableJobInput().withDescription("bpergwlck") - .withUri("kvhyejth") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(60.27486371298584D); + new EarlyTerminationPolicy().withDelayEvaluation(1741595014).withEvaluationInterval(297815263)) + .withSamplingAlgorithm(SamplingAlgorithmType.GRID)) + .withValidationData( + new MLTableJobInput().withDescription("zxpxhn").withMode(InputDeliveryMode.DOWNLOAD).withUri("eyyjmjj")) + .withValidationDataSize(29.465030428286976D) + .withPrimaryMetric(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED); model = BinaryData.fromObject(model).toObject(ImageClassificationMultilabel.class); Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("izcrjix", model.trainingData().description()); - Assertions.assertEquals("qsokknpug", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("j", model.targetColumnName()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ctcxs", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bzdxmsynb", model.modelSettings().augmentations()); - Assertions.assertEquals(54.66098F, model.modelSettings().beta1()); - Assertions.assertEquals(69.80503F, model.modelSettings().beta2()); - Assertions.assertEquals(1543500625, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("uzmsvzyqrbr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("i", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("hj", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("gzkj", model.targetColumnName()); + Assertions.assertEquals("adeghztldsvc", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("p", model.trainingData().uri()); + Assertions.assertEquals("ctdscn", model.modelSettings().advancedSettings()); + Assertions.assertTrue(model.modelSettings().amsGradient()); + Assertions.assertEquals("h", model.modelSettings().augmentations()); + Assertions.assertEquals(60.10520467518128D, model.modelSettings().beta1()); + Assertions.assertEquals(17.581116308893563D, model.modelSettings().beta2()); + Assertions.assertEquals(1534418349, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("xozony", model.modelSettings().checkpointModel().description()); Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(583009502, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(858094139, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1286684068, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(47403047, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1160956769, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(47.12773F, model.modelSettings().learningRate()); + Assertions.assertEquals("ehlbzqixbnjrqvzy", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("ameudpabcreu", model.modelSettings().checkpointRunId()); + Assertions.assertFalse(model.modelSettings().distributed()); + Assertions.assertFalse(model.modelSettings().earlyStopping()); + Assertions.assertEquals(1977884580, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(934141618, model.modelSettings().earlyStoppingPatience()); + Assertions.assertTrue(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(1762255404, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(702740224, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(77534105, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(15.073407182340981D, model.modelSettings().learningRate()); Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("boz", model.modelSettings().modelName()); - Assertions.assertEquals(40.360588F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(766236373, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2064309702, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(26532947, model.modelSettings().randomSeed()); - Assertions.assertEquals(11.640281F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1577359960, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1671141270, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(426588698, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.2323647F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(913521751, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.36152F, model.modelSettings().weightDecay()); - Assertions.assertEquals(617578345, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(102589944, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1980460749, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1156963756, model.modelSettings().weightedLoss()); - Assertions.assertEquals("zdaiovrb", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pqphk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("yzadcrxylaypdt", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("velffohuriw", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dfrwpsshrm", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cclpct", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("gkscxjfsgmosp", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("bnxsqc", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("scuyfqlamfbqhsuj", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("nxqpwnikxkcajgrb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("tsvgoocqs", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("mzlpcx", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("mhxxrqicfzfvwjd", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("kvpyeyo", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("inmpnqupdkjrzfwk", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("uobdxw", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("dcclcvqsr", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ay", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("vwbzmfxlrymf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lpiywqnpfydrfbg", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("y", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxmkhmqyncgaul", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("styygjq", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("lmwqg", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("mqmiwxzfvvzu", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("fgufjnbx", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("mwdukinhl", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("orgfhjxsawooauff", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("fqkmwz", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("q", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("ybmrnotoc", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1571107486, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51S"), model.limitSettings().timeout()); - Assertions.assertEquals(2050591523, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(490867132, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(787891741, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("bpergwlck", model.validationData().description()); - Assertions.assertEquals("kvhyejth", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(60.27486371298584D, model.validationDataSize()); + Assertions.assertEquals("b", model.modelSettings().modelName()); + Assertions.assertEquals(69.62649712158013D, model.modelSettings().momentum()); + Assertions.assertFalse(model.modelSettings().nesterov()); + Assertions.assertEquals(472275599, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(2139027754, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); + Assertions.assertEquals(2021961064, model.modelSettings().randomSeed()); + Assertions.assertEquals(35.91523550842026D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(1285055909, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(1029596150, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(1177092838, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(96.88068519247959D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(181548547, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(7.777646921747583D, model.modelSettings().weightDecay()); + Assertions.assertEquals(585946725, model.modelSettings().trainingCropSize()); + Assertions.assertEquals(2014358559, model.modelSettings().validationCropSize()); + Assertions.assertEquals(1672119617, model.modelSettings().validationResizeSize()); + Assertions.assertEquals(1452005164, model.modelSettings().weightedLoss()); + Assertions.assertEquals("qtrotpvclp", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("yrlmwkptsk", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("jgvhxcc", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("kakmkookbputmgvm", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("akmlwktfowzkroyr", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("r", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("lzqjimejtgzjxx", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("e", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("zuqloiwyayyzivr", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("tcdqlh", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("whrktjleifibfipl", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("fnsmycjowly", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("zmudsqcm", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("x", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("buwodmachbkv", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("pbjrmvgoqplehm", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("kzdllczdprwnhkgq", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("oxsstc", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("rak", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("ry", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("cwmhlymgnukxrk", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("jpequlrlzaudgjt", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("clakku", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("dwnhczbutoucgjti", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("way", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("cqqwwvgwkslvlize", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("biabvnsrgekz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("xadyfhb", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("pkeqsifj", model.searchSpace().get(0).trainingCropSize()); + Assertions.assertEquals("lng", model.searchSpace().get(0).validationCropSize()); + Assertions.assertEquals("nhr", model.searchSpace().get(0).validationResizeSize()); + Assertions.assertEquals("mbcdtajdopggorw", model.searchSpace().get(0).weightedLoss()); + Assertions.assertEquals(1816914268, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(712500505, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT237H29M16S"), model.limitSettings().timeout()); + Assertions.assertEquals(1741595014, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(297815263, model.sweepSettings().earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); + Assertions.assertEquals("zxpxhn", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("eyyjmjj", model.validationData().uri()); + Assertions.assertEquals(29.465030428286976D, model.validationDataSize()); + Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java index 4775d08f446f..55ce47510ae1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -27,273 +27,303 @@ public final class ImageClassificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageClassification model = BinaryData.fromString( - "{\"taskType\":\"ImageClassification\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"modelSettings\":{\"trainingCropSize\":1833679290,\"validationCropSize\":381440577,\"validationResizeSize\":1189124637,\"weightedLoss\":2517837,\"amsGradient\":true,\"advancedSettings\":\"uarlcjiwgsxfaioc\",\"augmentations\":\"gujjgn\",\"beta1\":54.415714,\"beta2\":11.673647,\"checkpointFrequency\":1680002171,\"checkpointRunId\":\"cbpaefzqsym\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"enjc\",\"mode\":\"EvalDownload\",\"description\":\"mfucrtfod\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1307803742,\"earlyStoppingPatience\":532002430,\"evaluationFrequency\":1547790235,\"enableOnnxNormalization\":false,\"gradientAccumulationStep\":2075191599,\"layersToFreeze\":1027792262,\"learningRate\":20.873022,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"udxdyyrudmahswt\",\"momentum\":75.429596,\"nesterov\":false,\"numberOfEpochs\":1978635992,\"numberOfWorkers\":1173715021,\"optimizer\":\"None\",\"randomSeed\":1829590179,\"stepLRGamma\":37.33512,\"stepLRStepSize\":230541163,\"trainingBatchSize\":1518427810,\"validationBatchSize\":1851126067,\"warmupCosineLRCycles\":98.75179,\"warmupCosineLRWarmupEpochs\":453414511,\"weightDecay\":4.1702747},\"searchSpace\":[{\"trainingCropSize\":\"anx\",\"validationCropSize\":\"muvardlmzjot\",\"validationResizeSize\":\"rmuhcuhtuzlx\",\"weightedLoss\":\"yo\",\"amsGradient\":\"arpfctwrap\",\"augmentations\":\"dojq\",\"beta1\":\"zesi\",\"beta2\":\"ysnjqyowaadc\",\"distributed\":\"azab\",\"earlyStopping\":\"dtsewkaupwhlzyc\",\"earlyStoppingDelay\":\"emgjlm\",\"earlyStoppingPatience\":\"dorsirxxhy\",\"evaluationFrequency\":\"qakofajf\",\"enableOnnxNormalization\":\"prfvmkinwteyrqsh\",\"gradientAccumulationStep\":\"bcejopylbl\",\"layersToFreeze\":\"prrw\",\"learningRate\":\"pimtc\",\"learningRateScheduler\":\"fx\",\"modelName\":\"ytzfsl\",\"momentum\":\"zhqikm\",\"nesterov\":\"bliqemcdiiiskl\",\"numberOfEpochs\":\"nxx\",\"numberOfWorkers\":\"jxvtrkfkgenjqnnp\",\"optimizer\":\"kosnyxigfoujjc\",\"randomSeed\":\"dqmrlhnzkwopsw\",\"stepLRGamma\":\"inxupr\",\"stepLRStepSize\":\"yxwjezb\",\"trainingBatchSize\":\"ployuekdcpvu\",\"validationBatchSize\":\"rsvjmnsvujnjktv\",\"warmupCosineLRCycles\":\"efcjisepkdbxot\",\"warmupCosineLRWarmupEpochs\":\"jampqoclannm\",\"weightDecay\":\"nlsuqbwzstr\"}],\"limitSettings\":{\"maxTrials\":803234002,\"timeout\":\"PT72H6M3S\",\"maxConcurrentTrials\":1698507772},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":2016687082,\"delayEvaluation\":336030670}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"nfhoksmmcul\",\"mode\":\"Download\",\"description\":\"cru\"},\"validationDataSize\":67.1284830438322,\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"lsgaojbtqpq\",\"mode\":\"ReadWriteMount\",\"description\":\"tpzp\"},\"targetColumnName\":\"zflmcdsgxcelujis\"}") + "{\"taskType\":\"ImageClassification\",\"modelSettings\":{\"trainingCropSize\":1898386376,\"validationCropSize\":1218786306,\"validationResizeSize\":1740720930,\"weightedLoss\":1353171698,\"advancedSettings\":\"fijzz\",\"amsGradient\":false,\"augmentations\":\"jolb\",\"beta1\":99.40958988040452,\"beta2\":77.52682530681653,\"checkpointFrequency\":106122261,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"ReadOnlyMount\",\"uri\":\"e\",\"description\":\"qd\"},\"checkpointRunId\":\"swyiljpibkgxyxy\",\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":337492018,\"earlyStoppingPatience\":1004984088,\"enableOnnxNormalization\":false,\"evaluationFrequency\":2103168783,\"gradientAccumulationStep\":1796482206,\"layersToFreeze\":1652545485,\"learningRate\":50.679159766974145,\"learningRateScheduler\":\"None\",\"modelName\":\"ycmmoxfablqgpwb\",\"momentum\":8.89629142838604,\"nesterov\":false,\"numberOfEpochs\":1124622250,\"numberOfWorkers\":1108321832,\"optimizer\":\"Adamw\",\"randomSeed\":1353000077,\"stepLRGamma\":22.213913730261215,\"stepLRStepSize\":704635291,\"trainingBatchSize\":1334620954,\"validationBatchSize\":2077426950,\"warmupCosineLRCycles\":19.622476579581473,\"warmupCosineLRWarmupEpochs\":259876686,\"weightDecay\":64.58852241705735},\"searchSpace\":[{\"trainingCropSize\":\"qvumspbfsfeqbbe\",\"validationCropSize\":\"cuq\",\"validationResizeSize\":\"yyxmzrmtmvwituw\",\"weightedLoss\":\"yjshcyb\",\"amsGradient\":\"upp\",\"augmentations\":\"prcmvouujxdiik\",\"beta1\":\"xrezsvavlrxi\",\"beta2\":\"moywlu\",\"distributed\":\"ip\",\"earlyStopping\":\"ybszfncnpatpf\",\"earlyStoppingDelay\":\"aebwfwhxorpwa\",\"earlyStoppingPatience\":\"zwuge\",\"enableOnnxNormalization\":\"jfccylhtrht\",\"evaluationFrequency\":\"azjpwexcdrzpro\",\"gradientAccumulationStep\":\"zxezmnr\",\"layersToFreeze\":\"gpjeuxsphlokfp\",\"learningRate\":\"jpdvzvfbhwbdquf\",\"learningRateScheduler\":\"gnrglaqrwyamb\",\"modelName\":\"afebzxfkjq\",\"momentum\":\"ibhlenntrv\",\"nesterov\":\"psabdu\",\"numberOfEpochs\":\"zmlghny\",\"numberOfWorkers\":\"lpyeu\",\"optimizer\":\"p\",\"randomSeed\":\"ixqbolxvhhyqqeg\",\"stepLRGamma\":\"xgrzn\",\"stepLRStepSize\":\"inmtsdixchwkibm\",\"trainingBatchSize\":\"ymncjc\",\"validationBatchSize\":\"airwcqzoofj\",\"warmupCosineLRCycles\":\"jsvepfbhtleberp\",\"warmupCosineLRWarmupEpochs\":\"jeknfqnw\",\"weightDecay\":\"qxowkdn\"},{\"trainingCropSize\":\"xgkrh\",\"validationCropSize\":\"ehycpn\",\"validationResizeSize\":\"awonoehrguqlhfw\",\"weightedLoss\":\"bjzm\",\"amsGradient\":\"rguyfa\",\"augmentations\":\"kocbyg\",\"beta1\":\"hrmxkbcjwwd\",\"beta2\":\"mrawppkeboozfl\",\"distributed\":\"cagaedaoiqc\",\"earlyStopping\":\"gdtwgabd\",\"earlyStoppingDelay\":\"kuz\",\"earlyStoppingPatience\":\"jecooyvhtu\",\"enableOnnxNormalization\":\"pelniibn\",\"evaluationFrequency\":\"agdvcdqhftz\",\"gradientAccumulationStep\":\"yfaofdf\",\"layersToFreeze\":\"tncwmhjobzrfpr\",\"learningRate\":\"dc\",\"learningRateScheduler\":\"yftcvbzwgwhg\",\"modelName\":\"soauoorssatfyb\",\"momentum\":\"ufdmxuq\",\"nesterov\":\"qna\",\"numberOfEpochs\":\"tuxvzfqayopbt\",\"numberOfWorkers\":\"xhgvbhxmndztgsq\",\"optimizer\":\"yqmarxneib\",\"randomSeed\":\"brhbjdqknhqn\",\"stepLRGamma\":\"tpuwnnohmmzngocf\",\"stepLRStepSize\":\"uypwyiulaynos\",\"trainingBatchSize\":\"kfhaxttpfsmwgsgh\",\"validationBatchSize\":\"cum\",\"warmupCosineLRCycles\":\"dau\",\"warmupCosineLRWarmupEpochs\":\"llfeothx\",\"weightDecay\":\"rigrjdljlkq\"}],\"limitSettings\":{\"maxConcurrentTrials\":2031533338,\"maxTrials\":1084342491,\"timeout\":\"PT74H55M59S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":197922725,\"evaluationInterval\":450518329},\"samplingAlgorithm\":\"Random\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"uul\",\"description\":\"l\"},\"validationDataSize\":36.562637395382524,\"primaryMetric\":\"PrecisionScoreWeighted\",\"logVerbosity\":\"Critical\",\"targetColumnName\":\"ksgfyyskyekg\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"czvfcc\",\"description\":\"rtwletyves\"}}") .toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("tpzp", model.trainingData().description()); - Assertions.assertEquals("lsgaojbtqpq", model.trainingData().uri()); + Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); + Assertions.assertEquals("ksgfyyskyekg", model.targetColumnName()); + Assertions.assertEquals("rtwletyves", model.trainingData().description()); Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zflmcdsgxcelujis", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("uarlcjiwgsxfaioc", model.modelSettings().advancedSettings()); - Assertions.assertEquals("gujjgn", model.modelSettings().augmentations()); - Assertions.assertEquals(54.415714F, model.modelSettings().beta1()); - Assertions.assertEquals(11.673647F, model.modelSettings().beta2()); - Assertions.assertEquals(1680002171, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("cbpaefzqsym", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("mfucrtfod", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("enjc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1307803742, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(532002430, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1547790235, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(2075191599, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1027792262, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(20.873022F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("udxdyyrudmahswt", model.modelSettings().modelName()); - Assertions.assertEquals(75.429596F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1978635992, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1173715021, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1829590179, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.33512F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(230541163, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1518427810, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1851126067, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(98.75179F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(453414511, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(4.1702747F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1833679290, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(381440577, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1189124637, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2517837, model.modelSettings().weightedLoss()); - Assertions.assertEquals("arpfctwrap", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("dojq", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("zesi", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ysnjqyowaadc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("azab", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("dtsewkaupwhlzyc", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("emgjlm", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("dorsirxxhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qakofajf", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("prfvmkinwteyrqsh", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("bcejopylbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("prrw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("pimtc", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("fx", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ytzfsl", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("zhqikm", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("bliqemcdiiiskl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("nxx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("jxvtrkfkgenjqnnp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("kosnyxigfoujjc", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("dqmrlhnzkwopsw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("inxupr", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxwjezb", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ployuekdcpvu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rsvjmnsvujnjktv", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("efcjisepkdbxot", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("jampqoclannm", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("nlsuqbwzstr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("anx", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("muvardlmzjot", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("rmuhcuhtuzlx", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yo", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(803234002, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT72H6M3S"), model.limitSettings().timeout()); - Assertions.assertEquals(1698507772, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(2016687082, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(336030670, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("cru", model.validationData().description()); - Assertions.assertEquals("nfhoksmmcul", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(67.1284830438322D, model.validationDataSize()); + Assertions.assertEquals("czvfcc", model.trainingData().uri()); + Assertions.assertEquals("fijzz", model.modelSettings().advancedSettings()); + Assertions.assertFalse(model.modelSettings().amsGradient()); + Assertions.assertEquals("jolb", model.modelSettings().augmentations()); + Assertions.assertEquals(99.40958988040452D, model.modelSettings().beta1()); + Assertions.assertEquals(77.52682530681653D, model.modelSettings().beta2()); + Assertions.assertEquals(106122261, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("qd", model.modelSettings().checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.modelSettings().checkpointModel().mode()); + Assertions.assertEquals("e", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("swyiljpibkgxyxy", model.modelSettings().checkpointRunId()); + Assertions.assertFalse(model.modelSettings().distributed()); + Assertions.assertTrue(model.modelSettings().earlyStopping()); + Assertions.assertEquals(337492018, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(1004984088, model.modelSettings().earlyStoppingPatience()); + Assertions.assertFalse(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(2103168783, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(1796482206, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(1652545485, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(50.679159766974145D, model.modelSettings().learningRate()); + Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); + Assertions.assertEquals("ycmmoxfablqgpwb", model.modelSettings().modelName()); + Assertions.assertEquals(8.89629142838604D, model.modelSettings().momentum()); + Assertions.assertFalse(model.modelSettings().nesterov()); + Assertions.assertEquals(1124622250, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(1108321832, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); + Assertions.assertEquals(1353000077, model.modelSettings().randomSeed()); + Assertions.assertEquals(22.213913730261215D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(704635291, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(1334620954, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(2077426950, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(19.622476579581473D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(259876686, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(64.58852241705735D, model.modelSettings().weightDecay()); + Assertions.assertEquals(1898386376, model.modelSettings().trainingCropSize()); + Assertions.assertEquals(1218786306, model.modelSettings().validationCropSize()); + Assertions.assertEquals(1740720930, model.modelSettings().validationResizeSize()); + Assertions.assertEquals(1353171698, model.modelSettings().weightedLoss()); + Assertions.assertEquals("upp", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("prcmvouujxdiik", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("xrezsvavlrxi", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("moywlu", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("ip", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("ybszfncnpatpf", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("aebwfwhxorpwa", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("zwuge", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("jfccylhtrht", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("azjpwexcdrzpro", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("zxezmnr", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("gpjeuxsphlokfp", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("jpdvzvfbhwbdquf", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("gnrglaqrwyamb", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("afebzxfkjq", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("ibhlenntrv", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("psabdu", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("zmlghny", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("lpyeu", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("p", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("ixqbolxvhhyqqeg", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("xgrzn", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("inmtsdixchwkibm", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("ymncjc", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("airwcqzoofj", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("jsvepfbhtleberp", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("jeknfqnw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("qxowkdn", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("qvumspbfsfeqbbe", model.searchSpace().get(0).trainingCropSize()); + Assertions.assertEquals("cuq", model.searchSpace().get(0).validationCropSize()); + Assertions.assertEquals("yyxmzrmtmvwituw", model.searchSpace().get(0).validationResizeSize()); + Assertions.assertEquals("yjshcyb", model.searchSpace().get(0).weightedLoss()); + Assertions.assertEquals(2031533338, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(1084342491, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT74H55M59S"), model.limitSettings().timeout()); + Assertions.assertEquals(197922725, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(450518329, model.sweepSettings().earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); + Assertions.assertEquals("l", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); + Assertions.assertEquals("uul", model.validationData().uri()); + Assertions.assertEquals(36.562637395382524D, model.validationDataSize()); + Assertions.assertEquals(ClassificationPrimaryMetrics.PRECISION_SCORE_WEIGHTED, model.primaryMetric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageClassification model - = new ImageClassification().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("tpzp") - .withUri("lsgaojbtqpq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withTargetColumnName("zflmcdsgxcelujis") - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("uarlcjiwgsxfaioc") - .withAugmentations("gujjgn") - .withBeta1(54.415714F) - .withBeta2(11.673647F) - .withCheckpointFrequency(1680002171) - .withCheckpointRunId("cbpaefzqsym") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("mfucrtfod") - .withUri("enjc") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1307803742) - .withEarlyStoppingPatience(532002430) - .withEvaluationFrequency(1547790235) - .withEnableOnnxNormalization(false) - .withGradientAccumulationStep(2075191599) - .withLayersToFreeze(1027792262) - .withLearningRate(20.873022F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("udxdyyrudmahswt") - .withMomentum(75.429596F) - .withNesterov(false) - .withNumberOfEpochs(1978635992) - .withNumberOfWorkers(1173715021) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1829590179) - .withStepLRGamma(37.33512F) - .withStepLRStepSize(230541163) - .withTrainingBatchSize(1518427810) - .withValidationBatchSize(1851126067) - .withWarmupCosineLRCycles(98.75179F) - .withWarmupCosineLRWarmupEpochs(453414511) - .withWeightDecay(4.1702747F) - .withTrainingCropSize(1833679290) - .withValidationCropSize(381440577) - .withValidationResizeSize(1189124637) - .withWeightedLoss(2517837)) - .withSearchSpace( - Arrays.asList(new ImageModelDistributionSettingsClassification().withAmsGradient("arpfctwrap") - .withAugmentations("dojq") - .withBeta1("zesi") - .withBeta2("ysnjqyowaadc") - .withDistributed("azab") - .withEarlyStopping("dtsewkaupwhlzyc") - .withEarlyStoppingDelay("emgjlm") - .withEarlyStoppingPatience("dorsirxxhy") - .withEvaluationFrequency("qakofajf") - .withEnableOnnxNormalization("prfvmkinwteyrqsh") - .withGradientAccumulationStep("bcejopylbl") - .withLayersToFreeze("prrw") - .withLearningRate("pimtc") - .withLearningRateScheduler("fx") - .withModelName("ytzfsl") - .withMomentum("zhqikm") - .withNesterov("bliqemcdiiiskl") - .withNumberOfEpochs("nxx") - .withNumberOfWorkers("jxvtrkfkgenjqnnp") - .withOptimizer("kosnyxigfoujjc") - .withRandomSeed("dqmrlhnzkwopsw") - .withStepLRGamma("inxupr") - .withStepLRStepSize("yxwjezb") - .withTrainingBatchSize("ployuekdcpvu") - .withValidationBatchSize("rsvjmnsvujnjktv") - .withWarmupCosineLRCycles("efcjisepkdbxot") - .withWarmupCosineLRWarmupEpochs("jampqoclannm") - .withWeightDecay("nlsuqbwzstr") - .withTrainingCropSize("anx") - .withValidationCropSize("muvardlmzjot") - .withValidationResizeSize("rmuhcuhtuzlx") - .withWeightedLoss("yo"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(803234002) - .withTimeout(Duration.parse("PT72H6M3S")) - .withMaxConcurrentTrials(1698507772)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(2016687082) - .withDelayEvaluation(336030670))) - .withValidationData(new MLTableJobInput().withDescription("cru") - .withUri("nfhoksmmcul") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(67.1284830438322D); + ImageClassification model = new ImageClassification().withLogVerbosity(LogVerbosity.CRITICAL) + .withTargetColumnName("ksgfyyskyekg") + .withTrainingData(new MLTableJobInput().withDescription("rtwletyves") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("czvfcc")) + .withModelSettings(new ImageModelSettingsClassification().withAdvancedSettings("fijzz") + .withAmsGradient(false) + .withAugmentations("jolb") + .withBeta1(99.40958988040452D) + .withBeta2(77.52682530681653D) + .withCheckpointFrequency(106122261) + .withCheckpointModel(new MLFlowModelJobInput().withDescription("qd") + .withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("e")) + .withCheckpointRunId("swyiljpibkgxyxy") + .withDistributed(false) + .withEarlyStopping(true) + .withEarlyStoppingDelay(337492018) + .withEarlyStoppingPatience(1004984088) + .withEnableOnnxNormalization(false) + .withEvaluationFrequency(2103168783) + .withGradientAccumulationStep(1796482206) + .withLayersToFreeze(1652545485) + .withLearningRate(50.679159766974145D) + .withLearningRateScheduler(LearningRateScheduler.NONE) + .withModelName("ycmmoxfablqgpwb") + .withMomentum(8.89629142838604D) + .withNesterov(false) + .withNumberOfEpochs(1124622250) + .withNumberOfWorkers(1108321832) + .withOptimizer(StochasticOptimizer.ADAMW) + .withRandomSeed(1353000077) + .withStepLRGamma(22.213913730261215D) + .withStepLRStepSize(704635291) + .withTrainingBatchSize(1334620954) + .withValidationBatchSize(2077426950) + .withWarmupCosineLRCycles(19.622476579581473D) + .withWarmupCosineLRWarmupEpochs(259876686) + .withWeightDecay(64.58852241705735D) + .withTrainingCropSize(1898386376) + .withValidationCropSize(1218786306) + .withValidationResizeSize(1740720930) + .withWeightedLoss(1353171698)) + .withSearchSpace(Arrays.asList( + new ImageModelDistributionSettingsClassification().withAmsGradient("upp") + .withAugmentations("prcmvouujxdiik") + .withBeta1("xrezsvavlrxi") + .withBeta2("moywlu") + .withDistributed("ip") + .withEarlyStopping("ybszfncnpatpf") + .withEarlyStoppingDelay("aebwfwhxorpwa") + .withEarlyStoppingPatience("zwuge") + .withEnableOnnxNormalization("jfccylhtrht") + .withEvaluationFrequency("azjpwexcdrzpro") + .withGradientAccumulationStep("zxezmnr") + .withLayersToFreeze("gpjeuxsphlokfp") + .withLearningRate("jpdvzvfbhwbdquf") + .withLearningRateScheduler("gnrglaqrwyamb") + .withModelName("afebzxfkjq") + .withMomentum("ibhlenntrv") + .withNesterov("psabdu") + .withNumberOfEpochs("zmlghny") + .withNumberOfWorkers("lpyeu") + .withOptimizer("p") + .withRandomSeed("ixqbolxvhhyqqeg") + .withStepLRGamma("xgrzn") + .withStepLRStepSize("inmtsdixchwkibm") + .withTrainingBatchSize("ymncjc") + .withValidationBatchSize("airwcqzoofj") + .withWarmupCosineLRCycles("jsvepfbhtleberp") + .withWarmupCosineLRWarmupEpochs("jeknfqnw") + .withWeightDecay("qxowkdn") + .withTrainingCropSize("qvumspbfsfeqbbe") + .withValidationCropSize("cuq") + .withValidationResizeSize("yyxmzrmtmvwituw") + .withWeightedLoss("yjshcyb"), + new ImageModelDistributionSettingsClassification().withAmsGradient("rguyfa") + .withAugmentations("kocbyg") + .withBeta1("hrmxkbcjwwd") + .withBeta2("mrawppkeboozfl") + .withDistributed("cagaedaoiqc") + .withEarlyStopping("gdtwgabd") + .withEarlyStoppingDelay("kuz") + .withEarlyStoppingPatience("jecooyvhtu") + .withEnableOnnxNormalization("pelniibn") + .withEvaluationFrequency("agdvcdqhftz") + .withGradientAccumulationStep("yfaofdf") + .withLayersToFreeze("tncwmhjobzrfpr") + .withLearningRate("dc") + .withLearningRateScheduler("yftcvbzwgwhg") + .withModelName("soauoorssatfyb") + .withMomentum("ufdmxuq") + .withNesterov("qna") + .withNumberOfEpochs("tuxvzfqayopbt") + .withNumberOfWorkers("xhgvbhxmndztgsq") + .withOptimizer("yqmarxneib") + .withRandomSeed("brhbjdqknhqn") + .withStepLRGamma("tpuwnnohmmzngocf") + .withStepLRStepSize("uypwyiulaynos") + .withTrainingBatchSize("kfhaxttpfsmwgsgh") + .withValidationBatchSize("cum") + .withWarmupCosineLRCycles("dau") + .withWarmupCosineLRWarmupEpochs("llfeothx") + .withWeightDecay("rigrjdljlkq") + .withTrainingCropSize("xgkrh") + .withValidationCropSize("ehycpn") + .withValidationResizeSize("awonoehrguqlhfw") + .withWeightedLoss("bjzm"))) + .withLimitSettings(new ImageLimitSettings().withMaxConcurrentTrials(2031533338) + .withMaxTrials(1084342491) + .withTimeout(Duration.parse("PT74H55M59S"))) + .withSweepSettings(new ImageSweepSettings() + .withEarlyTermination( + new EarlyTerminationPolicy().withDelayEvaluation(197922725).withEvaluationInterval(450518329)) + .withSamplingAlgorithm(SamplingAlgorithmType.RANDOM)) + .withValidationData( + new MLTableJobInput().withDescription("l").withMode(InputDeliveryMode.DIRECT).withUri("uul")) + .withValidationDataSize(36.562637395382524D) + .withPrimaryMetric(ClassificationPrimaryMetrics.PRECISION_SCORE_WEIGHTED); model = BinaryData.fromObject(model).toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("tpzp", model.trainingData().description()); - Assertions.assertEquals("lsgaojbtqpq", model.trainingData().uri()); + Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); + Assertions.assertEquals("ksgfyyskyekg", model.targetColumnName()); + Assertions.assertEquals("rtwletyves", model.trainingData().description()); Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zflmcdsgxcelujis", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("uarlcjiwgsxfaioc", model.modelSettings().advancedSettings()); - Assertions.assertEquals("gujjgn", model.modelSettings().augmentations()); - Assertions.assertEquals(54.415714F, model.modelSettings().beta1()); - Assertions.assertEquals(11.673647F, model.modelSettings().beta2()); - Assertions.assertEquals(1680002171, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("cbpaefzqsym", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("mfucrtfod", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("enjc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1307803742, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(532002430, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1547790235, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(2075191599, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1027792262, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(20.873022F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("udxdyyrudmahswt", model.modelSettings().modelName()); - Assertions.assertEquals(75.429596F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1978635992, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1173715021, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1829590179, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.33512F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(230541163, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1518427810, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1851126067, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(98.75179F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(453414511, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(4.1702747F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1833679290, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(381440577, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1189124637, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2517837, model.modelSettings().weightedLoss()); - Assertions.assertEquals("arpfctwrap", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("dojq", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("zesi", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ysnjqyowaadc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("azab", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("dtsewkaupwhlzyc", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("emgjlm", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("dorsirxxhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qakofajf", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("prfvmkinwteyrqsh", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("bcejopylbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("prrw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("pimtc", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("fx", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ytzfsl", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("zhqikm", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("bliqemcdiiiskl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("nxx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("jxvtrkfkgenjqnnp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("kosnyxigfoujjc", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("dqmrlhnzkwopsw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("inxupr", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxwjezb", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ployuekdcpvu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rsvjmnsvujnjktv", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("efcjisepkdbxot", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("jampqoclannm", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("nlsuqbwzstr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("anx", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("muvardlmzjot", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("rmuhcuhtuzlx", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yo", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(803234002, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT72H6M3S"), model.limitSettings().timeout()); - Assertions.assertEquals(1698507772, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(2016687082, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(336030670, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("cru", model.validationData().description()); - Assertions.assertEquals("nfhoksmmcul", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(67.1284830438322D, model.validationDataSize()); + Assertions.assertEquals("czvfcc", model.trainingData().uri()); + Assertions.assertEquals("fijzz", model.modelSettings().advancedSettings()); + Assertions.assertFalse(model.modelSettings().amsGradient()); + Assertions.assertEquals("jolb", model.modelSettings().augmentations()); + Assertions.assertEquals(99.40958988040452D, model.modelSettings().beta1()); + Assertions.assertEquals(77.52682530681653D, model.modelSettings().beta2()); + Assertions.assertEquals(106122261, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("qd", model.modelSettings().checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.modelSettings().checkpointModel().mode()); + Assertions.assertEquals("e", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("swyiljpibkgxyxy", model.modelSettings().checkpointRunId()); + Assertions.assertFalse(model.modelSettings().distributed()); + Assertions.assertTrue(model.modelSettings().earlyStopping()); + Assertions.assertEquals(337492018, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(1004984088, model.modelSettings().earlyStoppingPatience()); + Assertions.assertFalse(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(2103168783, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(1796482206, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(1652545485, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(50.679159766974145D, model.modelSettings().learningRate()); + Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); + Assertions.assertEquals("ycmmoxfablqgpwb", model.modelSettings().modelName()); + Assertions.assertEquals(8.89629142838604D, model.modelSettings().momentum()); + Assertions.assertFalse(model.modelSettings().nesterov()); + Assertions.assertEquals(1124622250, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(1108321832, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); + Assertions.assertEquals(1353000077, model.modelSettings().randomSeed()); + Assertions.assertEquals(22.213913730261215D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(704635291, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(1334620954, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(2077426950, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(19.622476579581473D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(259876686, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(64.58852241705735D, model.modelSettings().weightDecay()); + Assertions.assertEquals(1898386376, model.modelSettings().trainingCropSize()); + Assertions.assertEquals(1218786306, model.modelSettings().validationCropSize()); + Assertions.assertEquals(1740720930, model.modelSettings().validationResizeSize()); + Assertions.assertEquals(1353171698, model.modelSettings().weightedLoss()); + Assertions.assertEquals("upp", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("prcmvouujxdiik", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("xrezsvavlrxi", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("moywlu", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("ip", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("ybszfncnpatpf", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("aebwfwhxorpwa", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("zwuge", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("jfccylhtrht", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("azjpwexcdrzpro", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("zxezmnr", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("gpjeuxsphlokfp", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("jpdvzvfbhwbdquf", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("gnrglaqrwyamb", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("afebzxfkjq", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("ibhlenntrv", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("psabdu", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("zmlghny", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("lpyeu", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("p", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("ixqbolxvhhyqqeg", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("xgrzn", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("inmtsdixchwkibm", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("ymncjc", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("airwcqzoofj", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("jsvepfbhtleberp", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("jeknfqnw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("qxowkdn", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("qvumspbfsfeqbbe", model.searchSpace().get(0).trainingCropSize()); + Assertions.assertEquals("cuq", model.searchSpace().get(0).validationCropSize()); + Assertions.assertEquals("yyxmzrmtmvwituw", model.searchSpace().get(0).validationResizeSize()); + Assertions.assertEquals("yjshcyb", model.searchSpace().get(0).weightedLoss()); + Assertions.assertEquals(2031533338, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(1084342491, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT74H55M59S"), model.limitSettings().timeout()); + Assertions.assertEquals(197922725, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(450518329, model.sweepSettings().earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); + Assertions.assertEquals("l", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); + Assertions.assertEquals("uul", model.validationData().uri()); + Assertions.assertEquals(36.562637395382524D, model.validationDataSize()); + Assertions.assertEquals(ClassificationPrimaryMetrics.PRECISION_SCORE_WEIGHTED, model.primaryMetric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageDetailsTests.java new file mode 100644 index 000000000000..7c1edf3330db --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageDetailsTests.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ImageDetails; +import com.azure.resourcemanager.machinelearning.models.ImageInfo; +import com.azure.resourcemanager.machinelearning.models.PackageDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ImageDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImageDetails model = BinaryData.fromString( + "{\"exists\":true,\"image\":{\"digest\":\"ieholewjwi\",\"hostname\":\"bwefqsfapaqtfer\",\"repository\":\"wexjkmfxapjwogq\",\"tag\":\"o\"},\"vulnerabilityFindings\":{\"assetId\":\"dcdab\",\"criticalFindingsCount\":1883762381,\"data\":[{\"cve\":\"awbzasqb\",\"cveUrl\":\"ljgkyex\",\"dueDate\":\"2021-08-06T23:28:06Z\",\"id\":\"yaipidsda\",\"packageDetails\":[{\"installPath\":\"ijjumfq\",\"installedVersion\":\"z\",\"name\":\"qnmcjngzqdqx\",\"patchedVersion\":\"jw\"}],\"patchable\":false,\"providerId\":\"usfzsvtuikzha\",\"publishDate\":\"2021-04-16T04:30:48Z\",\"risk\":\"MEDIUM\",\"solution\":\"hm\",\"title\":\"qryxyn\",\"vendorId\":\"zrdpsovwxznptgoe\",\"vendorUrl\":\"bbabp\"},{\"cve\":\"vf\",\"cveUrl\":\"kvntjlrigjkskyri\",\"dueDate\":\"2020-12-31T15:34:24Z\",\"id\":\"idsxwaabzmifry\",\"packageDetails\":[{\"installPath\":\"maxriz\",\"installedVersion\":\"obgop\",\"name\":\"hsln\",\"patchedVersion\":\"xieixynllxec\"},{\"installPath\":\"rojphslhcawjutif\",\"installedVersion\":\"fmvigorqjbttzh\",\"name\":\"glka\",\"patchedVersion\":\"onqjujeickpzvcpo\"},{\"installPath\":\"xelnwc\",\"installedVersion\":\"yjede\",\"name\":\"mlfmkqs\",\"patchedVersion\":\"zuawxtzxpuamwa\"}],\"patchable\":true,\"providerId\":\"vxcushsphaivmx\",\"publishDate\":\"2021-09-23T16:54:34Z\",\"risk\":\"HIGH\",\"solution\":\"gsgzwywakoihk\",\"title\":\"mjblmljhlny\",\"vendorId\":\"otqyry\",\"vendorUrl\":\"cbm\"},{\"cve\":\"vxmvw\",\"cveUrl\":\"tayx\",\"dueDate\":\"2021-06-26T17:58:31Z\",\"id\":\"peujlzqn\",\"packageDetails\":[{\"installPath\":\"ql\",\"installedVersion\":\"zoibgsxg\",\"name\":\"fyq\",\"patchedVersion\":\"mpqoxw\"},{\"installPath\":\"fdbxiqxeiiqbim\",\"installedVersion\":\"mwwinhehfqpofv\",\"name\":\"cblembnkbwv\",\"patchedVersion\":\"xk\"},{\"installPath\":\"vqihebwtswbzuwf\",\"installedVersion\":\"urageg\",\"name\":\"vcjfelisdjubggb\",\"patchedVersion\":\"gkxkbsazgakg\"},{\"installPath\":\"yrcmjdmspofap\",\"installedVersion\":\"hryl\",\"name\":\"ofrzgb\",\"patchedVersion\":\"edm\"}],\"patchable\":true,\"providerId\":\"nlvxbcuii\",\"publishDate\":\"2021-09-26T02:13:13Z\",\"risk\":\"LOW\",\"solution\":\"ansnvp\",\"title\":\"bmikost\",\"vendorId\":\"bkiw\",\"vendorUrl\":\"qnyophzfyls\"}],\"generatedTime\":\"2021-10-02T14:02:16Z\",\"highFindingsCount\":2027194811,\"lastScanDate\":\"2021-04-04T12:31:03Z\",\"scanner\":\"nezzcezelfwyfwlw\",\"source\":\"wetnpsihc\",\"totalFindingsCount\":45656288}}") + .toObject(ImageDetails.class); + Assertions.assertTrue(model.exists()); + Assertions.assertEquals("ieholewjwi", model.image().digest()); + Assertions.assertEquals("bwefqsfapaqtfer", model.image().hostname()); + Assertions.assertEquals("wexjkmfxapjwogq", model.image().repository()); + Assertions.assertEquals("o", model.image().tag()); + Assertions.assertEquals("dcdab", model.vulnerabilityFindings().assetId()); + Assertions.assertEquals("awbzasqb", model.vulnerabilityFindings().data().get(0).cve()); + Assertions.assertEquals("ljgkyex", model.vulnerabilityFindings().data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T23:28:06Z"), + model.vulnerabilityFindings().data().get(0).dueDate()); + Assertions.assertEquals("ijjumfq", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).installPath()); + Assertions.assertEquals("z", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).installedVersion()); + Assertions.assertEquals("qnmcjngzqdqx", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).name()); + Assertions.assertEquals("jw", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).patchedVersion()); + Assertions.assertFalse(model.vulnerabilityFindings().data().get(0).patchable()); + Assertions.assertEquals("usfzsvtuikzha", model.vulnerabilityFindings().data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T04:30:48Z"), + model.vulnerabilityFindings().data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.MEDIUM, model.vulnerabilityFindings().data().get(0).risk()); + Assertions.assertEquals("hm", model.vulnerabilityFindings().data().get(0).solution()); + Assertions.assertEquals("qryxyn", model.vulnerabilityFindings().data().get(0).title()); + Assertions.assertEquals("zrdpsovwxznptgoe", model.vulnerabilityFindings().data().get(0).vendorId()); + Assertions.assertEquals("bbabp", model.vulnerabilityFindings().data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T14:02:16Z"), + model.vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T12:31:03Z"), + model.vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("nezzcezelfwyfwlw", model.vulnerabilityFindings().scanner()); + Assertions.assertEquals("wetnpsihc", model.vulnerabilityFindings().source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImageDetails model = new ImageDetails().withExists(true) + .withImage(new ImageInfo().withDigest("ieholewjwi") + .withHostname("bwefqsfapaqtfer") + .withRepository("wexjkmfxapjwogq") + .withTag("o")) + .withVulnerabilityFindings(new VulnerabilityFindings().withAssetId("dcdab") + .withData(Arrays.asList( + new VulnerabilityDetails().withCve("awbzasqb") + .withCveUrl("ljgkyex") + .withDueDate(OffsetDateTime.parse("2021-08-06T23:28:06Z")) + .withPackageDetails(Arrays.asList(new PackageDetails().withInstallPath("ijjumfq") + .withInstalledVersion("z") + .withName("qnmcjngzqdqx") + .withPatchedVersion("jw"))) + .withPatchable(false) + .withProviderId("usfzsvtuikzha") + .withPublishDate(OffsetDateTime.parse("2021-04-16T04:30:48Z")) + .withRisk(VulnerabilityRisk.MEDIUM) + .withSolution("hm") + .withTitle("qryxyn") + .withVendorId("zrdpsovwxznptgoe") + .withVendorUrl("bbabp"), + new VulnerabilityDetails().withCve("vf") + .withCveUrl("kvntjlrigjkskyri") + .withDueDate(OffsetDateTime.parse("2020-12-31T15:34:24Z")) + .withPackageDetails(Arrays.asList( + new PackageDetails().withInstallPath("maxriz") + .withInstalledVersion("obgop") + .withName("hsln") + .withPatchedVersion("xieixynllxec"), + new PackageDetails().withInstallPath("rojphslhcawjutif") + .withInstalledVersion("fmvigorqjbttzh") + .withName("glka") + .withPatchedVersion("onqjujeickpzvcpo"), + new PackageDetails().withInstallPath("xelnwc") + .withInstalledVersion("yjede") + .withName("mlfmkqs") + .withPatchedVersion("zuawxtzxpuamwa"))) + .withPatchable(true) + .withProviderId("vxcushsphaivmx") + .withPublishDate(OffsetDateTime.parse("2021-09-23T16:54:34Z")) + .withRisk(VulnerabilityRisk.HIGH) + .withSolution("gsgzwywakoihk") + .withTitle("mjblmljhlny") + .withVendorId("otqyry") + .withVendorUrl("cbm"), + new VulnerabilityDetails().withCve("vxmvw") + .withCveUrl("tayx") + .withDueDate(OffsetDateTime.parse("2021-06-26T17:58:31Z")) + .withPackageDetails(Arrays.asList( + new PackageDetails().withInstallPath("ql") + .withInstalledVersion("zoibgsxg") + .withName("fyq") + .withPatchedVersion("mpqoxw"), + new PackageDetails().withInstallPath("fdbxiqxeiiqbim") + .withInstalledVersion("mwwinhehfqpofv") + .withName("cblembnkbwv") + .withPatchedVersion("xk"), + new PackageDetails().withInstallPath("vqihebwtswbzuwf") + .withInstalledVersion("urageg") + .withName("vcjfelisdjubggb") + .withPatchedVersion("gkxkbsazgakg"), + new PackageDetails().withInstallPath("yrcmjdmspofap") + .withInstalledVersion("hryl") + .withName("ofrzgb") + .withPatchedVersion("edm"))) + .withPatchable(true) + .withProviderId("nlvxbcuii") + .withPublishDate(OffsetDateTime.parse("2021-09-26T02:13:13Z")) + .withRisk(VulnerabilityRisk.LOW) + .withSolution("ansnvp") + .withTitle("bmikost") + .withVendorId("bkiw") + .withVendorUrl("qnyophzfyls"))) + .withGeneratedTime(OffsetDateTime.parse("2021-10-02T14:02:16Z")) + .withLastScanDate(OffsetDateTime.parse("2021-04-04T12:31:03Z")) + .withScanner("nezzcezelfwyfwlw") + .withSource("wetnpsihc")); + model = BinaryData.fromObject(model).toObject(ImageDetails.class); + Assertions.assertTrue(model.exists()); + Assertions.assertEquals("ieholewjwi", model.image().digest()); + Assertions.assertEquals("bwefqsfapaqtfer", model.image().hostname()); + Assertions.assertEquals("wexjkmfxapjwogq", model.image().repository()); + Assertions.assertEquals("o", model.image().tag()); + Assertions.assertEquals("dcdab", model.vulnerabilityFindings().assetId()); + Assertions.assertEquals("awbzasqb", model.vulnerabilityFindings().data().get(0).cve()); + Assertions.assertEquals("ljgkyex", model.vulnerabilityFindings().data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-08-06T23:28:06Z"), + model.vulnerabilityFindings().data().get(0).dueDate()); + Assertions.assertEquals("ijjumfq", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).installPath()); + Assertions.assertEquals("z", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).installedVersion()); + Assertions.assertEquals("qnmcjngzqdqx", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).name()); + Assertions.assertEquals("jw", + model.vulnerabilityFindings().data().get(0).packageDetails().get(0).patchedVersion()); + Assertions.assertFalse(model.vulnerabilityFindings().data().get(0).patchable()); + Assertions.assertEquals("usfzsvtuikzha", model.vulnerabilityFindings().data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-16T04:30:48Z"), + model.vulnerabilityFindings().data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.MEDIUM, model.vulnerabilityFindings().data().get(0).risk()); + Assertions.assertEquals("hm", model.vulnerabilityFindings().data().get(0).solution()); + Assertions.assertEquals("qryxyn", model.vulnerabilityFindings().data().get(0).title()); + Assertions.assertEquals("zrdpsovwxznptgoe", model.vulnerabilityFindings().data().get(0).vendorId()); + Assertions.assertEquals("bbabp", model.vulnerabilityFindings().data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-02T14:02:16Z"), + model.vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T12:31:03Z"), + model.vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("nezzcezelfwyfwlw", model.vulnerabilityFindings().scanner()); + Assertions.assertEquals("wetnpsihc", model.vulnerabilityFindings().source()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInfoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInfoTests.java new file mode 100644 index 000000000000..205acf22f7c0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInfoTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ImageInfo; +import org.junit.jupiter.api.Assertions; + +public final class ImageInfoTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ImageInfo model + = BinaryData.fromString("{\"digest\":\"va\",\"hostname\":\"pt\",\"repository\":\"qqwzt\",\"tag\":\"w\"}") + .toObject(ImageInfo.class); + Assertions.assertEquals("va", model.digest()); + Assertions.assertEquals("pt", model.hostname()); + Assertions.assertEquals("qqwzt", model.repository()); + Assertions.assertEquals("w", model.tag()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ImageInfo model = new ImageInfo().withDigest("va").withHostname("pt").withRepository("qqwzt").withTag("w"); + model = BinaryData.fromObject(model).toObject(ImageInfo.class); + Assertions.assertEquals("va", model.digest()); + Assertions.assertEquals("pt", model.hostname()); + Assertions.assertEquals("qqwzt", model.repository()); + Assertions.assertEquals("w", model.tag()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java index fbe5cb2279dc..e433ed42290a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -29,366 +29,449 @@ public final class ImageInstanceSegmentationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageInstanceSegmentation model = BinaryData.fromString( - "{\"taskType\":\"ImageInstanceSegmentation\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":1534306057,\"boxScoreThreshold\":27.125877,\"imageSize\":509776627,\"maxSize\":1800994072,\"minSize\":1064698713,\"modelSize\":\"Small\",\"multiScale\":false,\"nmsIouThreshold\":73.876884,\"tileGridSize\":\"b\",\"tileOverlapRatio\":98.34619,\"tilePredictionsNmsThreshold\":49.36939,\"validationIouThreshold\":23.7808,\"validationMetricType\":\"None\",\"amsGradient\":false,\"advancedSettings\":\"qddlggbq\",\"augmentations\":\"lgzubak\",\"beta1\":52.478916,\"beta2\":73.25457,\"checkpointFrequency\":44605172,\"checkpointRunId\":\"fnsffetpkmixwew\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"s\",\"mode\":\"Download\",\"description\":\"epnqvxgvohdb\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":469971245,\"earlyStoppingPatience\":1372482998,\"evaluationFrequency\":234642424,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1882721834,\"layersToFreeze\":342131546,\"learningRate\":8.727491,\"learningRateScheduler\":\"Step\",\"modelName\":\"xqhpjhuboh\",\"momentum\":40.88772,\"nesterov\":false,\"numberOfEpochs\":1117928548,\"numberOfWorkers\":568762031,\"optimizer\":\"Sgd\",\"randomSeed\":32020513,\"stepLRGamma\":86.87302,\"stepLRStepSize\":173984136,\"trainingBatchSize\":212469610,\"validationBatchSize\":775443642,\"warmupCosineLRCycles\":4.8310876,\"warmupCosineLRWarmupEpochs\":1009329595,\"weightDecay\":38.67607},\"searchSpace\":[{\"boxDetectionsPerImage\":\"amqx\",\"boxScoreThreshold\":\"ssanybzzg\",\"imageSize\":\"dfeumyjsvcdh\",\"maxSize\":\"wkhookj\",\"minSize\":\"zxezriwgo\",\"modelSize\":\"apcqksaaapxjh\",\"multiScale\":\"tibenwsd\",\"nmsIouThreshold\":\"vdaahlfrcqklpmvz\",\"tileGridSize\":\"reszyaqgom\",\"tileOverlapRatio\":\"mfggeokfekc\",\"tilePredictionsNmsThreshold\":\"lwkyeahhh\",\"validationIouThreshold\":\"pulnrfcqufmcihp\",\"validationMetricType\":\"owrer\",\"amsGradient\":\"xptch\",\"augmentations\":\"yqqidqimlgbbfjm\",\"beta1\":\"jvxlhmpmh\",\"beta2\":\"t\",\"distributed\":\"phqeofy\",\"earlyStopping\":\"snlow\",\"earlyStoppingDelay\":\"mcqixuanccqvjf\",\"earlyStoppingPatience\":\"fqpmquxpj\",\"evaluationFrequency\":\"faar\",\"enableOnnxNormalization\":\"ci\",\"gradientAccumulationStep\":\"mufzgugrbl\",\"layersToFreeze\":\"l\",\"learningRate\":\"ssnqe\",\"learningRateScheduler\":\"otbptg\",\"modelName\":\"manxx\",\"momentum\":\"qfmdqecvtam\",\"nesterov\":\"zmnobfeww\",\"numberOfEpochs\":\"ibxovu\",\"numberOfWorkers\":\"qjrkbln\",\"optimizer\":\"clwgycv\",\"randomSeed\":\"nzjcyqqzhembtbw\",\"stepLRGamma\":\"lbadp\",\"stepLRStepSize\":\"jdleajvmvvlooubs\",\"trainingBatchSize\":\"ipjeo\",\"validationBatchSize\":\"kgocj\",\"warmupCosineLRCycles\":\"lupfazus\",\"warmupCosineLRWarmupEpochs\":\"dhuslgdwz\",\"weightDecay\":\"dqyxajclgr\"},{\"boxDetectionsPerImage\":\"vqcwyzoqzk\",\"boxScoreThreshold\":\"cwwsj\",\"imageSize\":\"iixepbntqqwwgfgs\",\"maxSize\":\"ilefej\",\"minSize\":\"wrznequ\",\"modelSize\":\"nttwk\",\"multiScale\":\"ajksbs\",\"nmsIouThreshold\":\"gjmqjhgcydijnmcv\",\"tileGridSize\":\"ssfcriqxzixtd\",\"tileOverlapRatio\":\"wmvcdkucpxpyafrw\",\"tilePredictionsNmsThreshold\":\"orogeuv\",\"validationIouThreshold\":\"rspnrsjsem\",\"validationMetricType\":\"ofrsnq\",\"amsGradient\":\"jp\",\"augmentations\":\"exutike\",\"beta1\":\"m\",\"beta2\":\"rpub\",\"distributed\":\"dhvos\",\"earlyStopping\":\"zscueza\",\"earlyStoppingDelay\":\"vdfwgqjhewcffrx\",\"earlyStoppingPatience\":\"ezkhzp\",\"evaluationFrequency\":\"qissen\",\"enableOnnxNormalization\":\"rusyzai\",\"gradientAccumulationStep\":\"psjnpck\",\"layersToFreeze\":\"ujyduonbdawsao\",\"learningRate\":\"vvm\",\"learningRateScheduler\":\"kxjarsbbdddw\",\"modelName\":\"qxa\",\"momentum\":\"xqkdyqjvzvcgrds\",\"nesterov\":\"esfkqqxuhv\",\"numberOfEpochs\":\"lbrouszxac\",\"numberOfWorkers\":\"uk\",\"optimizer\":\"goojjfuk\",\"randomSeed\":\"bc\",\"stepLRGamma\":\"nhgbtzvxxvsbc\",\"stepLRStepSize\":\"fkrfnkcni\",\"trainingBatchSize\":\"swxmfurqm\",\"validationBatchSize\":\"wwp\",\"warmupCosineLRCycles\":\"um\",\"warmupCosineLRWarmupEpochs\":\"ahbqsvnkxm\",\"weightDecay\":\"zuae\"}],\"limitSettings\":{\"maxTrials\":1864326135,\"timeout\":\"PT127H34M59S\",\"maxConcurrentTrials\":645713420},\"sweepSettings\":{\"samplingAlgorithm\":\"Grid\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1109486386,\"delayEvaluation\":682993372}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"zzmiemqyft\",\"mode\":\"EvalDownload\",\"description\":\"sw\"},\"validationDataSize\":7.272261053343065,\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ghpakbqyhlsorn\",\"mode\":\"EvalDownload\",\"description\":\"qagkncjmybn\"},\"targetColumnName\":\"vztnjawrhulemm\"}") + "{\"taskType\":\"ImageInstanceSegmentation\",\"modelSettings\":{\"boxDetectionsPerImage\":1048824603,\"boxScoreThreshold\":0.2884703102192798,\"imageSize\":1257209908,\"maxSize\":1819948805,\"minSize\":678358747,\"modelSize\":\"Medium\",\"multiScale\":true,\"nmsIouThreshold\":53.75663912809028,\"tileGridSize\":\"hddwvmq\",\"tileOverlapRatio\":88.3875406251191,\"tilePredictionsNmsThreshold\":75.86010684965314,\"validationIouThreshold\":72.51763005833334,\"validationMetricType\":\"None\",\"advancedSettings\":\"zxbyp\",\"amsGradient\":true,\"augmentations\":\"aix\",\"beta1\":68.96778772052667,\"beta2\":29.150347392984244,\"checkpointFrequency\":718822712,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"wqikwepwogggic\",\"description\":\"xhtfmcqbsudzpgch\"},\"checkpointRunId\":\"gfqumjdjxhzghgo\",\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1115788732,\"earlyStoppingPatience\":692917453,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1079705023,\"gradientAccumulationStep\":310773327,\"layersToFreeze\":2084268912,\"learningRate\":36.33336121041546,\"learningRateScheduler\":\"None\",\"modelName\":\"u\",\"momentum\":41.29688743508849,\"nesterov\":false,\"numberOfEpochs\":166266985,\"numberOfWorkers\":1582360616,\"optimizer\":\"Sgd\",\"randomSeed\":523175956,\"stepLRGamma\":65.56632967981633,\"stepLRStepSize\":2129348995,\"trainingBatchSize\":2096198255,\"validationBatchSize\":976273842,\"warmupCosineLRCycles\":27.832768944817033,\"warmupCosineLRWarmupEpochs\":1858184868,\"weightDecay\":22.774498846249447},\"searchSpace\":[{\"boxDetectionsPerImage\":\"xga\",\"boxScoreThreshold\":\"dtkwppth\",\"imageSize\":\"dprmimrljdpoqf\",\"maxSize\":\"emhkftbaewht\",\"minSize\":\"loamfmxtllfltym\",\"modelSize\":\"nrrfijhggabqb\",\"multiScale\":\"mkli\",\"nmsIouThreshold\":\"rwdvffhsdpzou\",\"tileGridSize\":\"tqrxqwqnjxrdf\",\"tileOverlapRatio\":\"t\",\"tilePredictionsNmsThreshold\":\"lygtavczcxdfweap\",\"validationIouThreshold\":\"mlx\",\"validationMetricType\":\"jphrasp\",\"amsGradient\":\"leimixlmdbgicehf\",\"augmentations\":\"mdrjuqbpxt\",\"beta1\":\"lj\",\"beta2\":\"znpaxwfqtyyqiprc\",\"distributed\":\"ungbsoljc\",\"earlyStopping\":\"iigz\",\"earlyStoppingDelay\":\"uck\",\"earlyStoppingPatience\":\"dsk\",\"enableOnnxNormalization\":\"tiiqqcqikclsmaln\",\"evaluationFrequency\":\"woykdnonaaxwm\",\"gradientAccumulationStep\":\"ru\",\"layersToFreeze\":\"qcwnynl\",\"learningRate\":\"iqbcbgv\",\"learningRateScheduler\":\"t\",\"modelName\":\"rtoxadhxuvjhxm\",\"momentum\":\"qstjc\",\"nesterov\":\"twmlg\",\"numberOfEpochs\":\"vnpvvd\",\"numberOfWorkers\":\"jnaqyq\",\"optimizer\":\"slz\",\"randomSeed\":\"cdsvmwbitek\",\"stepLRGamma\":\"fobvfiybxqich\",\"stepLRStepSize\":\"bfzdqekiv\",\"trainingBatchSize\":\"p\",\"validationBatchSize\":\"vdizulrqtbh\",\"warmupCosineLRCycles\":\"ezp\",\"warmupCosineLRWarmupEpochs\":\"pryfmxmdutzfkgi\",\"weightDecay\":\"oudccgndjg\"},{\"boxDetectionsPerImage\":\"r\",\"boxScoreThreshold\":\"gqqyeqfcbuulpyuf\",\"imageSize\":\"jfshtujcyo\",\"maxSize\":\"gimwdcsklkqnqv\",\"minSize\":\"xn\",\"modelSize\":\"zmec\",\"multiScale\":\"rzwimbzayspz\",\"nmsIouThreshold\":\"i\",\"tileGridSize\":\"vfph\",\"tileOverlapRatio\":\"zxplgtpvdvatlz\",\"tilePredictionsNmsThreshold\":\"schnzrsbkkzov\",\"validationIouThreshold\":\"dmnfmfws\",\"validationMetricType\":\"fo\",\"amsGradient\":\"worimmovzwdehk\",\"augmentations\":\"vh\",\"beta1\":\"ovanyrva\",\"beta2\":\"tgelgwewikfy\",\"distributed\":\"a\",\"earlyStopping\":\"mymnqoqjumovsf\",\"earlyStoppingDelay\":\"bvzo\",\"earlyStoppingPatience\":\"x\",\"enableOnnxNormalization\":\"m\",\"evaluationFrequency\":\"mcwoxfaxd\",\"gradientAccumulationStep\":\"qi\",\"layersToFreeze\":\"satroia\",\"learningRate\":\"sugmocpcjyc\",\"learningRateScheduler\":\"elrgttwfldsiuo\",\"modelName\":\"nikcedpk\",\"momentum\":\"iwm\",\"nesterov\":\"mqr\",\"numberOfEpochs\":\"zqv\",\"numberOfWorkers\":\"czyayubtgmbxi\",\"optimizer\":\"hragpxmib\",\"randomSeed\":\"nupoyryefqmwovyz\",\"stepLRGamma\":\"lnomfpb\",\"stepLRStepSize\":\"eegvyieztkutnj\",\"trainingBatchSize\":\"l\",\"validationBatchSize\":\"krehyhtmj\",\"warmupCosineLRCycles\":\"uif\",\"warmupCosineLRWarmupEpochs\":\"lxfary\",\"weightDecay\":\"jlgdez\"},{\"boxDetectionsPerImage\":\"qwahoy\",\"boxScoreThreshold\":\"axqvjweiwtczkddn\",\"imageSize\":\"vbooqbmdqrxy\",\"maxSize\":\"ae\",\"minSize\":\"cflwtjdtlr\",\"modelSize\":\"fooy\",\"multiScale\":\"uxdtzcq\",\"nmsIouThreshold\":\"sdudgcoz\",\"tileGridSize\":\"meh\",\"tileOverlapRatio\":\"antolamlbijuxkq\",\"tilePredictionsNmsThreshold\":\"czipvwdtgck\",\"validationIouThreshold\":\"qiqdlratrkwxoau\",\"validationMetricType\":\"suykznhrfgsl\",\"amsGradient\":\"hpryjfzihuioa\",\"augmentations\":\"cpajtfe\",\"beta1\":\"kbdgddkrh\",\"beta2\":\"cxbeuuqutkzwtjww\",\"distributed\":\"zytijcx\",\"earlyStopping\":\"ondegjdydhqkkk\",\"earlyStoppingDelay\":\"uckcatuqbhpow\",\"earlyStoppingPatience\":\"xtpzdlyse\",\"enableOnnxNormalization\":\"toakatprytgrhz\",\"evaluationFrequency\":\"fdpfawrptvcsht\",\"gradientAccumulationStep\":\"tzc\",\"layersToFreeze\":\"bqgdird\",\"learningRate\":\"m\",\"learningRateScheduler\":\"jgcf\",\"modelName\":\"xtbw\",\"momentum\":\"irmu\",\"nesterov\":\"gftt\",\"numberOfEpochs\":\"ofgeoagf\",\"numberOfWorkers\":\"ftnxodwxmdajwiy\",\"optimizer\":\"gsevmdm\",\"randomSeed\":\"nlrstgf\",\"stepLRGamma\":\"ljdncidtjvamy\",\"stepLRStepSize\":\"n\",\"trainingBatchSize\":\"gcdogcvucgy\",\"validationBatchSize\":\"xuwhttn\",\"warmupCosineLRCycles\":\"s\",\"warmupCosineLRWarmupEpochs\":\"mebgszplu\",\"weightDecay\":\"ekpdzzmssg\"},{\"boxDetectionsPerImage\":\"vokyejidbdqzsqun\",\"boxScoreThreshold\":\"wztlvvwsnmrkky\",\"imageSize\":\"repwpwfkcaux\",\"maxSize\":\"avcpfpdofuckclbt\",\"minSize\":\"ue\",\"modelSize\":\"ol\",\"multiScale\":\"ilfngo\",\"nmsIouThreshold\":\"sqeb\",\"tileGridSize\":\"xjxhfxfj\",\"tileOverlapRatio\":\"dkktpmbmxbmbrwgz\",\"tilePredictionsNmsThreshold\":\"ljbkhxsdplau\",\"validationIouThreshold\":\"dmhweqjfyxydgto\",\"validationMetricType\":\"qbvwglgw\",\"amsGradient\":\"vxakglh\",\"augmentations\":\"esrfgamqiydvx\",\"beta1\":\"d\",\"beta2\":\"hgoqgsoyqyxyj\",\"distributed\":\"b\",\"earlyStopping\":\"bispglqjoxtdah\",\"earlyStoppingDelay\":\"aoovtyjzti\",\"earlyStoppingPatience\":\"wjlofzekfsrm\",\"enableOnnxNormalization\":\"klajvcfocz\",\"evaluationFrequency\":\"pejovt\",\"gradientAccumulationStep\":\"xnhwh\",\"layersToFreeze\":\"oyrzaaoe\",\"learningRate\":\"pmjen\",\"learningRateScheduler\":\"eat\",\"modelName\":\"xxcrxoxdjxld\",\"momentum\":\"ryyinz\",\"nesterov\":\"olrndwdb\",\"numberOfEpochs\":\"vzaledoyqxlunk\",\"numberOfWorkers\":\"hmcxqqxmyzkl\",\"optimizer\":\"a\",\"randomSeed\":\"ohrvmz\",\"stepLRGamma\":\"razadivznllaslks\",\"stepLRStepSize\":\"jqjpv\",\"trainingBatchSize\":\"ihxjtgzgtai\",\"validationBatchSize\":\"b\",\"warmupCosineLRCycles\":\"roigbsfsgsaenwld\",\"warmupCosineLRWarmupEpochs\":\"hljqlxsp\",\"weightDecay\":\"jc\"}],\"limitSettings\":{\"maxConcurrentTrials\":153451931,\"maxTrials\":698214399,\"timeout\":\"PT224H14M52S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1788525665,\"evaluationInterval\":162424717},\"samplingAlgorithm\":\"Random\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"gsdaluyckh\",\"description\":\"rbhseuerbgpxebjl\"},\"validationDataSize\":87.50039173567666,\"primaryMetric\":\"MeanAveragePrecision\",\"logVerbosity\":\"Error\",\"targetColumnName\":\"axdtpryjmgt\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"wou\",\"description\":\"yms\"}}") .toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("qagkncjmybn", model.trainingData().description()); - Assertions.assertEquals("ghpakbqyhlsorn", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("vztnjawrhulemm", model.targetColumnName()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("qddlggbq", model.modelSettings().advancedSettings()); - Assertions.assertEquals("lgzubak", model.modelSettings().augmentations()); - Assertions.assertEquals(52.478916F, model.modelSettings().beta1()); - Assertions.assertEquals(73.25457F, model.modelSettings().beta2()); - Assertions.assertEquals(44605172, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("fnsffetpkmixwew", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("epnqvxgvohdb", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("s", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(469971245, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1372482998, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(234642424, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1882721834, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(342131546, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(8.727491F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xqhpjhuboh", model.modelSettings().modelName()); - Assertions.assertEquals(40.88772F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1117928548, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(568762031, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); + Assertions.assertEquals("axdtpryjmgt", model.targetColumnName()); + Assertions.assertEquals("yms", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("wou", model.trainingData().uri()); + Assertions.assertEquals("zxbyp", model.modelSettings().advancedSettings()); + Assertions.assertTrue(model.modelSettings().amsGradient()); + Assertions.assertEquals("aix", model.modelSettings().augmentations()); + Assertions.assertEquals(68.96778772052667D, model.modelSettings().beta1()); + Assertions.assertEquals(29.150347392984244D, model.modelSettings().beta2()); + Assertions.assertEquals(718822712, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("xhtfmcqbsudzpgch", model.modelSettings().checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); + Assertions.assertEquals("wqikwepwogggic", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("gfqumjdjxhzghgo", model.modelSettings().checkpointRunId()); + Assertions.assertTrue(model.modelSettings().distributed()); + Assertions.assertTrue(model.modelSettings().earlyStopping()); + Assertions.assertEquals(1115788732, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(692917453, model.modelSettings().earlyStoppingPatience()); + Assertions.assertTrue(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(1079705023, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(310773327, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(2084268912, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(36.33336121041546D, model.modelSettings().learningRate()); + Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); + Assertions.assertEquals("u", model.modelSettings().modelName()); + Assertions.assertEquals(41.29688743508849D, model.modelSettings().momentum()); + Assertions.assertFalse(model.modelSettings().nesterov()); + Assertions.assertEquals(166266985, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(1582360616, model.modelSettings().numberOfWorkers()); Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); - Assertions.assertEquals(32020513, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.87302F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(173984136, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(212469610, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(775443642, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.8310876F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1009329595, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.67607F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1534306057, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(27.125877F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(509776627, model.modelSettings().imageSize()); - Assertions.assertEquals(1800994072, model.modelSettings().maxSize()); - Assertions.assertEquals(1064698713, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.SMALL, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(73.876884F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("b", model.modelSettings().tileGridSize()); - Assertions.assertEquals(98.34619F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(49.36939F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(23.7808F, model.modelSettings().validationIouThreshold()); + Assertions.assertEquals(523175956, model.modelSettings().randomSeed()); + Assertions.assertEquals(65.56632967981633D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(2129348995, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(2096198255, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(976273842, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(27.832768944817033D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(1858184868, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(22.774498846249447D, model.modelSettings().weightDecay()); + Assertions.assertEquals(1048824603, model.modelSettings().boxDetectionsPerImage()); + Assertions.assertEquals(0.2884703102192798D, model.modelSettings().boxScoreThreshold()); + Assertions.assertEquals(1257209908, model.modelSettings().imageSize()); + Assertions.assertEquals(1819948805, model.modelSettings().maxSize()); + Assertions.assertEquals(678358747, model.modelSettings().minSize()); + Assertions.assertEquals(ModelSize.MEDIUM, model.modelSettings().modelSize()); + Assertions.assertTrue(model.modelSettings().multiScale()); + Assertions.assertEquals(53.75663912809028D, model.modelSettings().nmsIouThreshold()); + Assertions.assertEquals("hddwvmq", model.modelSettings().tileGridSize()); + Assertions.assertEquals(88.3875406251191D, model.modelSettings().tileOverlapRatio()); + Assertions.assertEquals(75.86010684965314D, model.modelSettings().tilePredictionsNmsThreshold()); + Assertions.assertEquals(72.51763005833334D, model.modelSettings().validationIouThreshold()); Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("xptch", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("yqqidqimlgbbfjm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("jvxlhmpmh", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("t", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("phqeofy", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("snlow", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("mcqixuanccqvjf", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("fqpmquxpj", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("faar", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("ci", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mufzgugrbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("l", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("ssnqe", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("otbptg", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("manxx", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qfmdqecvtam", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("zmnobfeww", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ibxovu", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjrkbln", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("clwgycv", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("nzjcyqqzhembtbw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lbadp", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jdleajvmvvlooubs", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ipjeo", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("kgocj", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("lupfazus", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("dhuslgdwz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("dqyxajclgr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("amqx", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("ssanybzzg", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dfeumyjsvcdh", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wkhookj", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("zxezriwgo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("apcqksaaapxjh", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("tibenwsd", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vdaahlfrcqklpmvz", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("reszyaqgom", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("mfggeokfekc", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("lwkyeahhh", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("pulnrfcqufmcihp", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("owrer", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1864326135, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT127H34M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(645713420, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1109486386, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(682993372, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("sw", model.validationData().description()); - Assertions.assertEquals("zzmiemqyft", model.validationData().uri()); + Assertions.assertEquals("leimixlmdbgicehf", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("mdrjuqbpxt", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("lj", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("znpaxwfqtyyqiprc", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("ungbsoljc", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("iigz", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("uck", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("dsk", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("tiiqqcqikclsmaln", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("woykdnonaaxwm", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("ru", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("qcwnynl", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("iqbcbgv", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("t", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("rtoxadhxuvjhxm", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("qstjc", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("twmlg", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("vnpvvd", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("jnaqyq", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("slz", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("cdsvmwbitek", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("fobvfiybxqich", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("bfzdqekiv", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("p", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("vdizulrqtbh", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("ezp", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("pryfmxmdutzfkgi", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("oudccgndjg", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("xga", model.searchSpace().get(0).boxDetectionsPerImage()); + Assertions.assertEquals("dtkwppth", model.searchSpace().get(0).boxScoreThreshold()); + Assertions.assertEquals("dprmimrljdpoqf", model.searchSpace().get(0).imageSize()); + Assertions.assertEquals("emhkftbaewht", model.searchSpace().get(0).maxSize()); + Assertions.assertEquals("loamfmxtllfltym", model.searchSpace().get(0).minSize()); + Assertions.assertEquals("nrrfijhggabqb", model.searchSpace().get(0).modelSize()); + Assertions.assertEquals("mkli", model.searchSpace().get(0).multiScale()); + Assertions.assertEquals("rwdvffhsdpzou", model.searchSpace().get(0).nmsIouThreshold()); + Assertions.assertEquals("tqrxqwqnjxrdf", model.searchSpace().get(0).tileGridSize()); + Assertions.assertEquals("t", model.searchSpace().get(0).tileOverlapRatio()); + Assertions.assertEquals("lygtavczcxdfweap", model.searchSpace().get(0).tilePredictionsNmsThreshold()); + Assertions.assertEquals("mlx", model.searchSpace().get(0).validationIouThreshold()); + Assertions.assertEquals("jphrasp", model.searchSpace().get(0).validationMetricType()); + Assertions.assertEquals(153451931, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(698214399, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT224H14M52S"), model.limitSettings().timeout()); + Assertions.assertEquals(1788525665, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(162424717, model.sweepSettings().earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); + Assertions.assertEquals("rbhseuerbgpxebjl", model.validationData().description()); Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(7.272261053343065D, model.validationDataSize()); + Assertions.assertEquals("gsdaluyckh", model.validationData().uri()); + Assertions.assertEquals(87.50039173567666D, model.validationDataSize()); + Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageInstanceSegmentation model = new ImageInstanceSegmentation().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("qagkncjmybn") - .withUri("ghpakbqyhlsorn") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("vztnjawrhulemm") - .withPrimaryMetric(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("qddlggbq") - .withAugmentations("lgzubak") - .withBeta1(52.478916F) - .withBeta2(73.25457F) - .withCheckpointFrequency(44605172) - .withCheckpointRunId("fnsffetpkmixwew") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("epnqvxgvohdb") - .withUri("s") - .withMode(InputDeliveryMode.DOWNLOAD)) + ImageInstanceSegmentation model = new ImageInstanceSegmentation().withLogVerbosity(LogVerbosity.ERROR) + .withTargetColumnName("axdtpryjmgt") + .withTrainingData(new MLTableJobInput().withDescription("yms") + .withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("wou")) + .withModelSettings(new ImageModelSettingsObjectDetection().withAdvancedSettings("zxbyp") + .withAmsGradient(true) + .withAugmentations("aix") + .withBeta1(68.96778772052667D) + .withBeta2(29.150347392984244D) + .withCheckpointFrequency(718822712) + .withCheckpointModel(new MLFlowModelJobInput().withDescription("xhtfmcqbsudzpgch") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("wqikwepwogggic")) + .withCheckpointRunId("gfqumjdjxhzghgo") .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(469971245) - .withEarlyStoppingPatience(1372482998) - .withEvaluationFrequency(234642424) + .withEarlyStopping(true) + .withEarlyStoppingDelay(1115788732) + .withEarlyStoppingPatience(692917453) .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1882721834) - .withLayersToFreeze(342131546) - .withLearningRate(8.727491F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("xqhpjhuboh") - .withMomentum(40.88772F) + .withEvaluationFrequency(1079705023) + .withGradientAccumulationStep(310773327) + .withLayersToFreeze(2084268912) + .withLearningRate(36.33336121041546D) + .withLearningRateScheduler(LearningRateScheduler.NONE) + .withModelName("u") + .withMomentum(41.29688743508849D) .withNesterov(false) - .withNumberOfEpochs(1117928548) - .withNumberOfWorkers(568762031) + .withNumberOfEpochs(166266985) + .withNumberOfWorkers(1582360616) .withOptimizer(StochasticOptimizer.SGD) - .withRandomSeed(32020513) - .withStepLRGamma(86.87302F) - .withStepLRStepSize(173984136) - .withTrainingBatchSize(212469610) - .withValidationBatchSize(775443642) - .withWarmupCosineLRCycles(4.8310876F) - .withWarmupCosineLRWarmupEpochs(1009329595) - .withWeightDecay(38.67607F) - .withBoxDetectionsPerImage(1534306057) - .withBoxScoreThreshold(27.125877F) - .withImageSize(509776627) - .withMaxSize(1800994072) - .withMinSize(1064698713) - .withModelSize(ModelSize.SMALL) - .withMultiScale(false) - .withNmsIouThreshold(73.876884F) - .withTileGridSize("b") - .withTileOverlapRatio(98.34619F) - .withTilePredictionsNmsThreshold(49.36939F) - .withValidationIouThreshold(23.7808F) + .withRandomSeed(523175956) + .withStepLRGamma(65.56632967981633D) + .withStepLRStepSize(2129348995) + .withTrainingBatchSize(2096198255) + .withValidationBatchSize(976273842) + .withWarmupCosineLRCycles(27.832768944817033D) + .withWarmupCosineLRWarmupEpochs(1858184868) + .withWeightDecay(22.774498846249447D) + .withBoxDetectionsPerImage(1048824603) + .withBoxScoreThreshold(0.2884703102192798D) + .withImageSize(1257209908) + .withMaxSize(1819948805) + .withMinSize(678358747) + .withModelSize(ModelSize.MEDIUM) + .withMultiScale(true) + .withNmsIouThreshold(53.75663912809028D) + .withTileGridSize("hddwvmq") + .withTileOverlapRatio(88.3875406251191D) + .withTilePredictionsNmsThreshold(75.86010684965314D) + .withValidationIouThreshold(72.51763005833334D) .withValidationMetricType(ValidationMetricType.NONE)) .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("xptch") - .withAugmentations("yqqidqimlgbbfjm") - .withBeta1("jvxlhmpmh") - .withBeta2("t") - .withDistributed("phqeofy") - .withEarlyStopping("snlow") - .withEarlyStoppingDelay("mcqixuanccqvjf") - .withEarlyStoppingPatience("fqpmquxpj") - .withEvaluationFrequency("faar") - .withEnableOnnxNormalization("ci") - .withGradientAccumulationStep("mufzgugrbl") - .withLayersToFreeze("l") - .withLearningRate("ssnqe") - .withLearningRateScheduler("otbptg") - .withModelName("manxx") - .withMomentum("qfmdqecvtam") - .withNesterov("zmnobfeww") - .withNumberOfEpochs("ibxovu") - .withNumberOfWorkers("qjrkbln") - .withOptimizer("clwgycv") - .withRandomSeed("nzjcyqqzhembtbw") - .withStepLRGamma("lbadp") - .withStepLRStepSize("jdleajvmvvlooubs") - .withTrainingBatchSize("ipjeo") - .withValidationBatchSize("kgocj") - .withWarmupCosineLRCycles("lupfazus") - .withWarmupCosineLRWarmupEpochs("dhuslgdwz") - .withWeightDecay("dqyxajclgr") - .withBoxDetectionsPerImage("amqx") - .withBoxScoreThreshold("ssanybzzg") - .withImageSize("dfeumyjsvcdh") - .withMaxSize("wkhookj") - .withMinSize("zxezriwgo") - .withModelSize("apcqksaaapxjh") - .withMultiScale("tibenwsd") - .withNmsIouThreshold("vdaahlfrcqklpmvz") - .withTileGridSize("reszyaqgom") - .withTileOverlapRatio("mfggeokfekc") - .withTilePredictionsNmsThreshold("lwkyeahhh") - .withValidationIouThreshold("pulnrfcqufmcihp") - .withValidationMetricType("owrer"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("jp") - .withAugmentations("exutike") - .withBeta1("m") - .withBeta2("rpub") - .withDistributed("dhvos") - .withEarlyStopping("zscueza") - .withEarlyStoppingDelay("vdfwgqjhewcffrx") - .withEarlyStoppingPatience("ezkhzp") - .withEvaluationFrequency("qissen") - .withEnableOnnxNormalization("rusyzai") - .withGradientAccumulationStep("psjnpck") - .withLayersToFreeze("ujyduonbdawsao") - .withLearningRate("vvm") - .withLearningRateScheduler("kxjarsbbdddw") - .withModelName("qxa") - .withMomentum("xqkdyqjvzvcgrds") - .withNesterov("esfkqqxuhv") - .withNumberOfEpochs("lbrouszxac") - .withNumberOfWorkers("uk") - .withOptimizer("goojjfuk") - .withRandomSeed("bc") - .withStepLRGamma("nhgbtzvxxvsbc") - .withStepLRStepSize("fkrfnkcni") - .withTrainingBatchSize("swxmfurqm") - .withValidationBatchSize("wwp") - .withWarmupCosineLRCycles("um") - .withWarmupCosineLRWarmupEpochs("ahbqsvnkxm") - .withWeightDecay("zuae") - .withBoxDetectionsPerImage("vqcwyzoqzk") - .withBoxScoreThreshold("cwwsj") - .withImageSize("iixepbntqqwwgfgs") - .withMaxSize("ilefej") - .withMinSize("wrznequ") - .withModelSize("nttwk") - .withMultiScale("ajksbs") - .withNmsIouThreshold("gjmqjhgcydijnmcv") - .withTileGridSize("ssfcriqxzixtd") - .withTileOverlapRatio("wmvcdkucpxpyafrw") - .withTilePredictionsNmsThreshold("orogeuv") - .withValidationIouThreshold("rspnrsjsem") - .withValidationMetricType("ofrsnq"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1864326135) - .withTimeout(Duration.parse("PT127H34M59S")) - .withMaxConcurrentTrials(645713420)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.GRID) + new ImageModelDistributionSettingsObjectDetection().withAmsGradient("leimixlmdbgicehf") + .withAugmentations("mdrjuqbpxt") + .withBeta1("lj") + .withBeta2("znpaxwfqtyyqiprc") + .withDistributed("ungbsoljc") + .withEarlyStopping("iigz") + .withEarlyStoppingDelay("uck") + .withEarlyStoppingPatience("dsk") + .withEnableOnnxNormalization("tiiqqcqikclsmaln") + .withEvaluationFrequency("woykdnonaaxwm") + .withGradientAccumulationStep("ru") + .withLayersToFreeze("qcwnynl") + .withLearningRate("iqbcbgv") + .withLearningRateScheduler("t") + .withModelName("rtoxadhxuvjhxm") + .withMomentum("qstjc") + .withNesterov("twmlg") + .withNumberOfEpochs("vnpvvd") + .withNumberOfWorkers("jnaqyq") + .withOptimizer("slz") + .withRandomSeed("cdsvmwbitek") + .withStepLRGamma("fobvfiybxqich") + .withStepLRStepSize("bfzdqekiv") + .withTrainingBatchSize("p") + .withValidationBatchSize("vdizulrqtbh") + .withWarmupCosineLRCycles("ezp") + .withWarmupCosineLRWarmupEpochs("pryfmxmdutzfkgi") + .withWeightDecay("oudccgndjg") + .withBoxDetectionsPerImage("xga") + .withBoxScoreThreshold("dtkwppth") + .withImageSize("dprmimrljdpoqf") + .withMaxSize("emhkftbaewht") + .withMinSize("loamfmxtllfltym") + .withModelSize("nrrfijhggabqb") + .withMultiScale("mkli") + .withNmsIouThreshold("rwdvffhsdpzou") + .withTileGridSize("tqrxqwqnjxrdf") + .withTileOverlapRatio("t") + .withTilePredictionsNmsThreshold("lygtavczcxdfweap") + .withValidationIouThreshold("mlx") + .withValidationMetricType("jphrasp"), + new ImageModelDistributionSettingsObjectDetection().withAmsGradient("worimmovzwdehk") + .withAugmentations("vh") + .withBeta1("ovanyrva") + .withBeta2("tgelgwewikfy") + .withDistributed("a") + .withEarlyStopping("mymnqoqjumovsf") + .withEarlyStoppingDelay("bvzo") + .withEarlyStoppingPatience("x") + .withEnableOnnxNormalization("m") + .withEvaluationFrequency("mcwoxfaxd") + .withGradientAccumulationStep("qi") + .withLayersToFreeze("satroia") + .withLearningRate("sugmocpcjyc") + .withLearningRateScheduler("elrgttwfldsiuo") + .withModelName("nikcedpk") + .withMomentum("iwm") + .withNesterov("mqr") + .withNumberOfEpochs("zqv") + .withNumberOfWorkers("czyayubtgmbxi") + .withOptimizer("hragpxmib") + .withRandomSeed("nupoyryefqmwovyz") + .withStepLRGamma("lnomfpb") + .withStepLRStepSize("eegvyieztkutnj") + .withTrainingBatchSize("l") + .withValidationBatchSize("krehyhtmj") + .withWarmupCosineLRCycles("uif") + .withWarmupCosineLRWarmupEpochs("lxfary") + .withWeightDecay("jlgdez") + .withBoxDetectionsPerImage("r") + .withBoxScoreThreshold("gqqyeqfcbuulpyuf") + .withImageSize("jfshtujcyo") + .withMaxSize("gimwdcsklkqnqv") + .withMinSize("xn") + .withModelSize("zmec") + .withMultiScale("rzwimbzayspz") + .withNmsIouThreshold("i") + .withTileGridSize("vfph") + .withTileOverlapRatio("zxplgtpvdvatlz") + .withTilePredictionsNmsThreshold("schnzrsbkkzov") + .withValidationIouThreshold("dmnfmfws") + .withValidationMetricType("fo"), + new ImageModelDistributionSettingsObjectDetection().withAmsGradient("hpryjfzihuioa") + .withAugmentations("cpajtfe") + .withBeta1("kbdgddkrh") + .withBeta2("cxbeuuqutkzwtjww") + .withDistributed("zytijcx") + .withEarlyStopping("ondegjdydhqkkk") + .withEarlyStoppingDelay("uckcatuqbhpow") + .withEarlyStoppingPatience("xtpzdlyse") + .withEnableOnnxNormalization("toakatprytgrhz") + .withEvaluationFrequency("fdpfawrptvcsht") + .withGradientAccumulationStep("tzc") + .withLayersToFreeze("bqgdird") + .withLearningRate("m") + .withLearningRateScheduler("jgcf") + .withModelName("xtbw") + .withMomentum("irmu") + .withNesterov("gftt") + .withNumberOfEpochs("ofgeoagf") + .withNumberOfWorkers("ftnxodwxmdajwiy") + .withOptimizer("gsevmdm") + .withRandomSeed("nlrstgf") + .withStepLRGamma("ljdncidtjvamy") + .withStepLRStepSize("n") + .withTrainingBatchSize("gcdogcvucgy") + .withValidationBatchSize("xuwhttn") + .withWarmupCosineLRCycles("s") + .withWarmupCosineLRWarmupEpochs("mebgszplu") + .withWeightDecay("ekpdzzmssg") + .withBoxDetectionsPerImage("qwahoy") + .withBoxScoreThreshold("axqvjweiwtczkddn") + .withImageSize("vbooqbmdqrxy") + .withMaxSize("ae") + .withMinSize("cflwtjdtlr") + .withModelSize("fooy") + .withMultiScale("uxdtzcq") + .withNmsIouThreshold("sdudgcoz") + .withTileGridSize("meh") + .withTileOverlapRatio("antolamlbijuxkq") + .withTilePredictionsNmsThreshold("czipvwdtgck") + .withValidationIouThreshold("qiqdlratrkwxoau") + .withValidationMetricType("suykznhrfgsl"), + new ImageModelDistributionSettingsObjectDetection().withAmsGradient("vxakglh") + .withAugmentations("esrfgamqiydvx") + .withBeta1("d") + .withBeta2("hgoqgsoyqyxyj") + .withDistributed("b") + .withEarlyStopping("bispglqjoxtdah") + .withEarlyStoppingDelay("aoovtyjzti") + .withEarlyStoppingPatience("wjlofzekfsrm") + .withEnableOnnxNormalization("klajvcfocz") + .withEvaluationFrequency("pejovt") + .withGradientAccumulationStep("xnhwh") + .withLayersToFreeze("oyrzaaoe") + .withLearningRate("pmjen") + .withLearningRateScheduler("eat") + .withModelName("xxcrxoxdjxld") + .withMomentum("ryyinz") + .withNesterov("olrndwdb") + .withNumberOfEpochs("vzaledoyqxlunk") + .withNumberOfWorkers("hmcxqqxmyzkl") + .withOptimizer("a") + .withRandomSeed("ohrvmz") + .withStepLRGamma("razadivznllaslks") + .withStepLRStepSize("jqjpv") + .withTrainingBatchSize("ihxjtgzgtai") + .withValidationBatchSize("b") + .withWarmupCosineLRCycles("roigbsfsgsaenwld") + .withWarmupCosineLRWarmupEpochs("hljqlxsp") + .withWeightDecay("jc") + .withBoxDetectionsPerImage("vokyejidbdqzsqun") + .withBoxScoreThreshold("wztlvvwsnmrkky") + .withImageSize("repwpwfkcaux") + .withMaxSize("avcpfpdofuckclbt") + .withMinSize("ue") + .withModelSize("ol") + .withMultiScale("ilfngo") + .withNmsIouThreshold("sqeb") + .withTileGridSize("xjxhfxfj") + .withTileOverlapRatio("dkktpmbmxbmbrwgz") + .withTilePredictionsNmsThreshold("ljbkhxsdplau") + .withValidationIouThreshold("dmhweqjfyxydgto") + .withValidationMetricType("qbvwglgw"))) + .withLimitSettings(new ImageLimitSettings().withMaxConcurrentTrials(153451931) + .withMaxTrials(698214399) + .withTimeout(Duration.parse("PT224H14M52S"))) + .withSweepSettings(new ImageSweepSettings() .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1109486386).withDelayEvaluation(682993372))) - .withValidationData(new MLTableJobInput().withDescription("sw") - .withUri("zzmiemqyft") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withValidationDataSize(7.272261053343065D); + new EarlyTerminationPolicy().withDelayEvaluation(1788525665).withEvaluationInterval(162424717)) + .withSamplingAlgorithm(SamplingAlgorithmType.RANDOM)) + .withValidationData(new MLTableJobInput().withDescription("rbhseuerbgpxebjl") + .withMode(InputDeliveryMode.EVAL_DOWNLOAD) + .withUri("gsdaluyckh")) + .withValidationDataSize(87.50039173567666D) + .withPrimaryMetric(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION); model = BinaryData.fromObject(model).toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("qagkncjmybn", model.trainingData().description()); - Assertions.assertEquals("ghpakbqyhlsorn", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("vztnjawrhulemm", model.targetColumnName()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("qddlggbq", model.modelSettings().advancedSettings()); - Assertions.assertEquals("lgzubak", model.modelSettings().augmentations()); - Assertions.assertEquals(52.478916F, model.modelSettings().beta1()); - Assertions.assertEquals(73.25457F, model.modelSettings().beta2()); - Assertions.assertEquals(44605172, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("fnsffetpkmixwew", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("epnqvxgvohdb", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("s", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(469971245, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1372482998, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(234642424, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1882721834, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(342131546, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(8.727491F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xqhpjhuboh", model.modelSettings().modelName()); - Assertions.assertEquals(40.88772F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1117928548, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(568762031, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); + Assertions.assertEquals("axdtpryjmgt", model.targetColumnName()); + Assertions.assertEquals("yms", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("wou", model.trainingData().uri()); + Assertions.assertEquals("zxbyp", model.modelSettings().advancedSettings()); + Assertions.assertTrue(model.modelSettings().amsGradient()); + Assertions.assertEquals("aix", model.modelSettings().augmentations()); + Assertions.assertEquals(68.96778772052667D, model.modelSettings().beta1()); + Assertions.assertEquals(29.150347392984244D, model.modelSettings().beta2()); + Assertions.assertEquals(718822712, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("xhtfmcqbsudzpgch", model.modelSettings().checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); + Assertions.assertEquals("wqikwepwogggic", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("gfqumjdjxhzghgo", model.modelSettings().checkpointRunId()); + Assertions.assertTrue(model.modelSettings().distributed()); + Assertions.assertTrue(model.modelSettings().earlyStopping()); + Assertions.assertEquals(1115788732, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(692917453, model.modelSettings().earlyStoppingPatience()); + Assertions.assertTrue(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(1079705023, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(310773327, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(2084268912, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(36.33336121041546D, model.modelSettings().learningRate()); + Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); + Assertions.assertEquals("u", model.modelSettings().modelName()); + Assertions.assertEquals(41.29688743508849D, model.modelSettings().momentum()); + Assertions.assertFalse(model.modelSettings().nesterov()); + Assertions.assertEquals(166266985, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(1582360616, model.modelSettings().numberOfWorkers()); Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); - Assertions.assertEquals(32020513, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.87302F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(173984136, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(212469610, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(775443642, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.8310876F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1009329595, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.67607F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1534306057, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(27.125877F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(509776627, model.modelSettings().imageSize()); - Assertions.assertEquals(1800994072, model.modelSettings().maxSize()); - Assertions.assertEquals(1064698713, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.SMALL, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(73.876884F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("b", model.modelSettings().tileGridSize()); - Assertions.assertEquals(98.34619F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(49.36939F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(23.7808F, model.modelSettings().validationIouThreshold()); + Assertions.assertEquals(523175956, model.modelSettings().randomSeed()); + Assertions.assertEquals(65.56632967981633D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(2129348995, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(2096198255, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(976273842, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(27.832768944817033D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(1858184868, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(22.774498846249447D, model.modelSettings().weightDecay()); + Assertions.assertEquals(1048824603, model.modelSettings().boxDetectionsPerImage()); + Assertions.assertEquals(0.2884703102192798D, model.modelSettings().boxScoreThreshold()); + Assertions.assertEquals(1257209908, model.modelSettings().imageSize()); + Assertions.assertEquals(1819948805, model.modelSettings().maxSize()); + Assertions.assertEquals(678358747, model.modelSettings().minSize()); + Assertions.assertEquals(ModelSize.MEDIUM, model.modelSettings().modelSize()); + Assertions.assertTrue(model.modelSettings().multiScale()); + Assertions.assertEquals(53.75663912809028D, model.modelSettings().nmsIouThreshold()); + Assertions.assertEquals("hddwvmq", model.modelSettings().tileGridSize()); + Assertions.assertEquals(88.3875406251191D, model.modelSettings().tileOverlapRatio()); + Assertions.assertEquals(75.86010684965314D, model.modelSettings().tilePredictionsNmsThreshold()); + Assertions.assertEquals(72.51763005833334D, model.modelSettings().validationIouThreshold()); Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("xptch", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("yqqidqimlgbbfjm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("jvxlhmpmh", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("t", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("phqeofy", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("snlow", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("mcqixuanccqvjf", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("fqpmquxpj", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("faar", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("ci", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mufzgugrbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("l", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("ssnqe", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("otbptg", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("manxx", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qfmdqecvtam", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("zmnobfeww", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ibxovu", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjrkbln", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("clwgycv", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("nzjcyqqzhembtbw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lbadp", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jdleajvmvvlooubs", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ipjeo", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("kgocj", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("lupfazus", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("dhuslgdwz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("dqyxajclgr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("amqx", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("ssanybzzg", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dfeumyjsvcdh", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wkhookj", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("zxezriwgo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("apcqksaaapxjh", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("tibenwsd", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vdaahlfrcqklpmvz", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("reszyaqgom", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("mfggeokfekc", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("lwkyeahhh", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("pulnrfcqufmcihp", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("owrer", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1864326135, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT127H34M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(645713420, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1109486386, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(682993372, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("sw", model.validationData().description()); - Assertions.assertEquals("zzmiemqyft", model.validationData().uri()); + Assertions.assertEquals("leimixlmdbgicehf", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("mdrjuqbpxt", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("lj", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("znpaxwfqtyyqiprc", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("ungbsoljc", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("iigz", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("uck", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("dsk", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("tiiqqcqikclsmaln", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("woykdnonaaxwm", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("ru", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("qcwnynl", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("iqbcbgv", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("t", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("rtoxadhxuvjhxm", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("qstjc", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("twmlg", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("vnpvvd", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("jnaqyq", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("slz", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("cdsvmwbitek", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("fobvfiybxqich", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("bfzdqekiv", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("p", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("vdizulrqtbh", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("ezp", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("pryfmxmdutzfkgi", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("oudccgndjg", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("xga", model.searchSpace().get(0).boxDetectionsPerImage()); + Assertions.assertEquals("dtkwppth", model.searchSpace().get(0).boxScoreThreshold()); + Assertions.assertEquals("dprmimrljdpoqf", model.searchSpace().get(0).imageSize()); + Assertions.assertEquals("emhkftbaewht", model.searchSpace().get(0).maxSize()); + Assertions.assertEquals("loamfmxtllfltym", model.searchSpace().get(0).minSize()); + Assertions.assertEquals("nrrfijhggabqb", model.searchSpace().get(0).modelSize()); + Assertions.assertEquals("mkli", model.searchSpace().get(0).multiScale()); + Assertions.assertEquals("rwdvffhsdpzou", model.searchSpace().get(0).nmsIouThreshold()); + Assertions.assertEquals("tqrxqwqnjxrdf", model.searchSpace().get(0).tileGridSize()); + Assertions.assertEquals("t", model.searchSpace().get(0).tileOverlapRatio()); + Assertions.assertEquals("lygtavczcxdfweap", model.searchSpace().get(0).tilePredictionsNmsThreshold()); + Assertions.assertEquals("mlx", model.searchSpace().get(0).validationIouThreshold()); + Assertions.assertEquals("jphrasp", model.searchSpace().get(0).validationMetricType()); + Assertions.assertEquals(153451931, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(698214399, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT224H14M52S"), model.limitSettings().timeout()); + Assertions.assertEquals(1788525665, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(162424717, model.sweepSettings().earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); + Assertions.assertEquals("rbhseuerbgpxebjl", model.validationData().description()); Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(7.272261053343065D, model.validationDataSize()); + Assertions.assertEquals("gsdaluyckh", model.validationData().uri()); + Assertions.assertEquals(87.50039173567666D, model.validationDataSize()); + Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java index 93834ce195f4..41faa2e350fd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class ImageLimitSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageLimitSettings model = BinaryData - .fromString("{\"maxTrials\":1226753892,\"timeout\":\"PT148H19M11S\",\"maxConcurrentTrials\":1388239886}") + .fromString("{\"maxConcurrentTrials\":1645316445,\"maxTrials\":571616299,\"timeout\":\"PT74H29M13S\"}") .toObject(ImageLimitSettings.class); - Assertions.assertEquals(1226753892, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT148H19M11S"), model.timeout()); - Assertions.assertEquals(1388239886, model.maxConcurrentTrials()); + Assertions.assertEquals(1645316445, model.maxConcurrentTrials()); + Assertions.assertEquals(571616299, model.maxTrials()); + Assertions.assertEquals(Duration.parse("PT74H29M13S"), model.timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageLimitSettings model = new ImageLimitSettings().withMaxTrials(1226753892) - .withTimeout(Duration.parse("PT148H19M11S")) - .withMaxConcurrentTrials(1388239886); + ImageLimitSettings model = new ImageLimitSettings().withMaxConcurrentTrials(1645316445) + .withMaxTrials(571616299) + .withTimeout(Duration.parse("PT74H29M13S")); model = BinaryData.fromObject(model).toObject(ImageLimitSettings.class); - Assertions.assertEquals(1226753892, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT148H19M11S"), model.timeout()); - Assertions.assertEquals(1388239886, model.maxConcurrentTrials()); + Assertions.assertEquals(1645316445, model.maxConcurrentTrials()); + Assertions.assertEquals(571616299, model.maxTrials()); + Assertions.assertEquals(Duration.parse("PT74H29M13S"), model.timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.java deleted file mode 100644 index b9ad759562c4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageMetadata; -import org.junit.jupiter.api.Assertions; - -public final class ImageMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageMetadata model = BinaryData.fromString( - "{\"currentImageVersion\":\"alahovuuwxhm\",\"latestImageVersion\":\"jnhj\",\"isLatestOsImageVersion\":false}") - .toObject(ImageMetadata.class); - Assertions.assertEquals("alahovuuwxhm", model.currentImageVersion()); - Assertions.assertEquals("jnhj", model.latestImageVersion()); - Assertions.assertEquals(false, model.isLatestOsImageVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageMetadata model = new ImageMetadata().withCurrentImageVersion("alahovuuwxhm") - .withLatestImageVersion("jnhj") - .withIsLatestOsImageVersion(false); - model = BinaryData.fromObject(model).toObject(ImageMetadata.class); - Assertions.assertEquals("alahovuuwxhm", model.currentImageVersion()); - Assertions.assertEquals("jnhj", model.latestImageVersion()); - Assertions.assertEquals(false, model.isLatestOsImageVersion()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java index e09043459cf1..4ce4cbc920cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,109 +12,109 @@ public final class ImageModelDistributionSettingsClassificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageModelDistributionSettingsClassification model = BinaryData.fromString( - "{\"trainingCropSize\":\"xmmqmt\",\"validationCropSize\":\"ky\",\"validationResizeSize\":\"exwdonbexf\",\"weightedLoss\":\"daubheeggzgr\",\"amsGradient\":\"tlfozuumrtgjqgac\",\"augmentations\":\"tnsyxzxjm\",\"beta1\":\"nb\",\"beta2\":\"azofm\",\"distributed\":\"vtemaspmanydscdk\",\"earlyStopping\":\"dpwjcbhaahntof\",\"earlyStoppingDelay\":\"fh\",\"earlyStoppingPatience\":\"ixo\",\"evaluationFrequency\":\"kzdfiv\",\"enableOnnxNormalization\":\"jybsrwz\",\"gradientAccumulationStep\":\"rgt\",\"layersToFreeze\":\"hmfppinmgi\",\"learningRate\":\"smkw\",\"learningRateScheduler\":\"gfragjhxerxlobkd\",\"modelName\":\"qhvmmniiqy\",\"momentum\":\"lhjnskbggicnqwl\",\"nesterov\":\"m\",\"numberOfEpochs\":\"blxk\",\"numberOfWorkers\":\"qgvxrktjcjigcw\",\"optimizer\":\"panbqxasevc\",\"randomSeed\":\"fp\",\"stepLRGamma\":\"edyybruholaemwcg\",\"stepLRStepSize\":\"mrimaabsqql\",\"trainingBatchSize\":\"b\",\"validationBatchSize\":\"ow\",\"warmupCosineLRCycles\":\"hdkmbjsmihrijezb\",\"warmupCosineLRWarmupEpochs\":\"jwfcz\",\"weightDecay\":\"kvb\"}") + "{\"trainingCropSize\":\"opvkvtwfves\",\"validationCropSize\":\"pbokhmmlcdyar\",\"validationResizeSize\":\"g\",\"weightedLoss\":\"fwblqhxka\",\"amsGradient\":\"colmugp\",\"augmentations\":\"aosd\",\"beta1\":\"uwzxeygzvtyevjhu\",\"beta2\":\"obguqisqsqk\",\"distributed\":\"mioyjpn\",\"earlyStopping\":\"viqcpszp\",\"earlyStoppingDelay\":\"vqdvrdmvxyrxdhg\",\"earlyStoppingPatience\":\"oj\",\"enableOnnxNormalization\":\"aotcgbzxmbtp\",\"evaluationFrequency\":\"foioyidoxzn\",\"gradientAccumulationStep\":\"vdtmuuvd\",\"layersToFreeze\":\"sxmrszbknimxlp\",\"learningRate\":\"rxrzutylcur\",\"learningRateScheduler\":\"q\",\"modelName\":\"b\",\"momentum\":\"aehtd\",\"nesterov\":\"mbnvynfaooeacted\",\"numberOfEpochs\":\"lsk\",\"numberOfWorkers\":\"ddida\",\"optimizer\":\"llrqmtlpbyxro\",\"randomSeed\":\"uyqyp\",\"stepLRGamma\":\"mnoiicsudy\",\"stepLRStepSize\":\"rjjtalxrdsjrho\",\"trainingBatchSize\":\"qwgusxxhdo\",\"validationBatchSize\":\"jwyblvtbdmvsb\",\"warmupCosineLRCycles\":\"daelqpv\",\"warmupCosineLRWarmupEpochs\":\"mkwjfbotl\",\"weightDecay\":\"gdusxurs\"}") .toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("tlfozuumrtgjqgac", model.amsGradient()); - Assertions.assertEquals("tnsyxzxjm", model.augmentations()); - Assertions.assertEquals("nb", model.beta1()); - Assertions.assertEquals("azofm", model.beta2()); - Assertions.assertEquals("vtemaspmanydscdk", model.distributed()); - Assertions.assertEquals("dpwjcbhaahntof", model.earlyStopping()); - Assertions.assertEquals("fh", model.earlyStoppingDelay()); - Assertions.assertEquals("ixo", model.earlyStoppingPatience()); - Assertions.assertEquals("kzdfiv", model.evaluationFrequency()); - Assertions.assertEquals("jybsrwz", model.enableOnnxNormalization()); - Assertions.assertEquals("rgt", model.gradientAccumulationStep()); - Assertions.assertEquals("hmfppinmgi", model.layersToFreeze()); - Assertions.assertEquals("smkw", model.learningRate()); - Assertions.assertEquals("gfragjhxerxlobkd", model.learningRateScheduler()); - Assertions.assertEquals("qhvmmniiqy", model.modelName()); - Assertions.assertEquals("lhjnskbggicnqwl", model.momentum()); - Assertions.assertEquals("m", model.nesterov()); - Assertions.assertEquals("blxk", model.numberOfEpochs()); - Assertions.assertEquals("qgvxrktjcjigcw", model.numberOfWorkers()); - Assertions.assertEquals("panbqxasevc", model.optimizer()); - Assertions.assertEquals("fp", model.randomSeed()); - Assertions.assertEquals("edyybruholaemwcg", model.stepLRGamma()); - Assertions.assertEquals("mrimaabsqql", model.stepLRStepSize()); - Assertions.assertEquals("b", model.trainingBatchSize()); - Assertions.assertEquals("ow", model.validationBatchSize()); - Assertions.assertEquals("hdkmbjsmihrijezb", model.warmupCosineLRCycles()); - Assertions.assertEquals("jwfcz", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kvb", model.weightDecay()); - Assertions.assertEquals("xmmqmt", model.trainingCropSize()); - Assertions.assertEquals("ky", model.validationCropSize()); - Assertions.assertEquals("exwdonbexf", model.validationResizeSize()); - Assertions.assertEquals("daubheeggzgr", model.weightedLoss()); + Assertions.assertEquals("colmugp", model.amsGradient()); + Assertions.assertEquals("aosd", model.augmentations()); + Assertions.assertEquals("uwzxeygzvtyevjhu", model.beta1()); + Assertions.assertEquals("obguqisqsqk", model.beta2()); + Assertions.assertEquals("mioyjpn", model.distributed()); + Assertions.assertEquals("viqcpszp", model.earlyStopping()); + Assertions.assertEquals("vqdvrdmvxyrxdhg", model.earlyStoppingDelay()); + Assertions.assertEquals("oj", model.earlyStoppingPatience()); + Assertions.assertEquals("aotcgbzxmbtp", model.enableOnnxNormalization()); + Assertions.assertEquals("foioyidoxzn", model.evaluationFrequency()); + Assertions.assertEquals("vdtmuuvd", model.gradientAccumulationStep()); + Assertions.assertEquals("sxmrszbknimxlp", model.layersToFreeze()); + Assertions.assertEquals("rxrzutylcur", model.learningRate()); + Assertions.assertEquals("q", model.learningRateScheduler()); + Assertions.assertEquals("b", model.modelName()); + Assertions.assertEquals("aehtd", model.momentum()); + Assertions.assertEquals("mbnvynfaooeacted", model.nesterov()); + Assertions.assertEquals("lsk", model.numberOfEpochs()); + Assertions.assertEquals("ddida", model.numberOfWorkers()); + Assertions.assertEquals("llrqmtlpbyxro", model.optimizer()); + Assertions.assertEquals("uyqyp", model.randomSeed()); + Assertions.assertEquals("mnoiicsudy", model.stepLRGamma()); + Assertions.assertEquals("rjjtalxrdsjrho", model.stepLRStepSize()); + Assertions.assertEquals("qwgusxxhdo", model.trainingBatchSize()); + Assertions.assertEquals("jwyblvtbdmvsb", model.validationBatchSize()); + Assertions.assertEquals("daelqpv", model.warmupCosineLRCycles()); + Assertions.assertEquals("mkwjfbotl", model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("gdusxurs", model.weightDecay()); + Assertions.assertEquals("opvkvtwfves", model.trainingCropSize()); + Assertions.assertEquals("pbokhmmlcdyar", model.validationCropSize()); + Assertions.assertEquals("g", model.validationResizeSize()); + Assertions.assertEquals("fwblqhxka", model.weightedLoss()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ImageModelDistributionSettingsClassification model - = new ImageModelDistributionSettingsClassification().withAmsGradient("tlfozuumrtgjqgac") - .withAugmentations("tnsyxzxjm") - .withBeta1("nb") - .withBeta2("azofm") - .withDistributed("vtemaspmanydscdk") - .withEarlyStopping("dpwjcbhaahntof") - .withEarlyStoppingDelay("fh") - .withEarlyStoppingPatience("ixo") - .withEvaluationFrequency("kzdfiv") - .withEnableOnnxNormalization("jybsrwz") - .withGradientAccumulationStep("rgt") - .withLayersToFreeze("hmfppinmgi") - .withLearningRate("smkw") - .withLearningRateScheduler("gfragjhxerxlobkd") - .withModelName("qhvmmniiqy") - .withMomentum("lhjnskbggicnqwl") - .withNesterov("m") - .withNumberOfEpochs("blxk") - .withNumberOfWorkers("qgvxrktjcjigcw") - .withOptimizer("panbqxasevc") - .withRandomSeed("fp") - .withStepLRGamma("edyybruholaemwcg") - .withStepLRStepSize("mrimaabsqql") - .withTrainingBatchSize("b") - .withValidationBatchSize("ow") - .withWarmupCosineLRCycles("hdkmbjsmihrijezb") - .withWarmupCosineLRWarmupEpochs("jwfcz") - .withWeightDecay("kvb") - .withTrainingCropSize("xmmqmt") - .withValidationCropSize("ky") - .withValidationResizeSize("exwdonbexf") - .withWeightedLoss("daubheeggzgr"); + = new ImageModelDistributionSettingsClassification().withAmsGradient("colmugp") + .withAugmentations("aosd") + .withBeta1("uwzxeygzvtyevjhu") + .withBeta2("obguqisqsqk") + .withDistributed("mioyjpn") + .withEarlyStopping("viqcpszp") + .withEarlyStoppingDelay("vqdvrdmvxyrxdhg") + .withEarlyStoppingPatience("oj") + .withEnableOnnxNormalization("aotcgbzxmbtp") + .withEvaluationFrequency("foioyidoxzn") + .withGradientAccumulationStep("vdtmuuvd") + .withLayersToFreeze("sxmrszbknimxlp") + .withLearningRate("rxrzutylcur") + .withLearningRateScheduler("q") + .withModelName("b") + .withMomentum("aehtd") + .withNesterov("mbnvynfaooeacted") + .withNumberOfEpochs("lsk") + .withNumberOfWorkers("ddida") + .withOptimizer("llrqmtlpbyxro") + .withRandomSeed("uyqyp") + .withStepLRGamma("mnoiicsudy") + .withStepLRStepSize("rjjtalxrdsjrho") + .withTrainingBatchSize("qwgusxxhdo") + .withValidationBatchSize("jwyblvtbdmvsb") + .withWarmupCosineLRCycles("daelqpv") + .withWarmupCosineLRWarmupEpochs("mkwjfbotl") + .withWeightDecay("gdusxurs") + .withTrainingCropSize("opvkvtwfves") + .withValidationCropSize("pbokhmmlcdyar") + .withValidationResizeSize("g") + .withWeightedLoss("fwblqhxka"); model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("tlfozuumrtgjqgac", model.amsGradient()); - Assertions.assertEquals("tnsyxzxjm", model.augmentations()); - Assertions.assertEquals("nb", model.beta1()); - Assertions.assertEquals("azofm", model.beta2()); - Assertions.assertEquals("vtemaspmanydscdk", model.distributed()); - Assertions.assertEquals("dpwjcbhaahntof", model.earlyStopping()); - Assertions.assertEquals("fh", model.earlyStoppingDelay()); - Assertions.assertEquals("ixo", model.earlyStoppingPatience()); - Assertions.assertEquals("kzdfiv", model.evaluationFrequency()); - Assertions.assertEquals("jybsrwz", model.enableOnnxNormalization()); - Assertions.assertEquals("rgt", model.gradientAccumulationStep()); - Assertions.assertEquals("hmfppinmgi", model.layersToFreeze()); - Assertions.assertEquals("smkw", model.learningRate()); - Assertions.assertEquals("gfragjhxerxlobkd", model.learningRateScheduler()); - Assertions.assertEquals("qhvmmniiqy", model.modelName()); - Assertions.assertEquals("lhjnskbggicnqwl", model.momentum()); - Assertions.assertEquals("m", model.nesterov()); - Assertions.assertEquals("blxk", model.numberOfEpochs()); - Assertions.assertEquals("qgvxrktjcjigcw", model.numberOfWorkers()); - Assertions.assertEquals("panbqxasevc", model.optimizer()); - Assertions.assertEquals("fp", model.randomSeed()); - Assertions.assertEquals("edyybruholaemwcg", model.stepLRGamma()); - Assertions.assertEquals("mrimaabsqql", model.stepLRStepSize()); - Assertions.assertEquals("b", model.trainingBatchSize()); - Assertions.assertEquals("ow", model.validationBatchSize()); - Assertions.assertEquals("hdkmbjsmihrijezb", model.warmupCosineLRCycles()); - Assertions.assertEquals("jwfcz", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kvb", model.weightDecay()); - Assertions.assertEquals("xmmqmt", model.trainingCropSize()); - Assertions.assertEquals("ky", model.validationCropSize()); - Assertions.assertEquals("exwdonbexf", model.validationResizeSize()); - Assertions.assertEquals("daubheeggzgr", model.weightedLoss()); + Assertions.assertEquals("colmugp", model.amsGradient()); + Assertions.assertEquals("aosd", model.augmentations()); + Assertions.assertEquals("uwzxeygzvtyevjhu", model.beta1()); + Assertions.assertEquals("obguqisqsqk", model.beta2()); + Assertions.assertEquals("mioyjpn", model.distributed()); + Assertions.assertEquals("viqcpszp", model.earlyStopping()); + Assertions.assertEquals("vqdvrdmvxyrxdhg", model.earlyStoppingDelay()); + Assertions.assertEquals("oj", model.earlyStoppingPatience()); + Assertions.assertEquals("aotcgbzxmbtp", model.enableOnnxNormalization()); + Assertions.assertEquals("foioyidoxzn", model.evaluationFrequency()); + Assertions.assertEquals("vdtmuuvd", model.gradientAccumulationStep()); + Assertions.assertEquals("sxmrszbknimxlp", model.layersToFreeze()); + Assertions.assertEquals("rxrzutylcur", model.learningRate()); + Assertions.assertEquals("q", model.learningRateScheduler()); + Assertions.assertEquals("b", model.modelName()); + Assertions.assertEquals("aehtd", model.momentum()); + Assertions.assertEquals("mbnvynfaooeacted", model.nesterov()); + Assertions.assertEquals("lsk", model.numberOfEpochs()); + Assertions.assertEquals("ddida", model.numberOfWorkers()); + Assertions.assertEquals("llrqmtlpbyxro", model.optimizer()); + Assertions.assertEquals("uyqyp", model.randomSeed()); + Assertions.assertEquals("mnoiicsudy", model.stepLRGamma()); + Assertions.assertEquals("rjjtalxrdsjrho", model.stepLRStepSize()); + Assertions.assertEquals("qwgusxxhdo", model.trainingBatchSize()); + Assertions.assertEquals("jwyblvtbdmvsb", model.validationBatchSize()); + Assertions.assertEquals("daelqpv", model.warmupCosineLRCycles()); + Assertions.assertEquals("mkwjfbotl", model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("gdusxurs", model.weightDecay()); + Assertions.assertEquals("opvkvtwfves", model.trainingCropSize()); + Assertions.assertEquals("pbokhmmlcdyar", model.validationCropSize()); + Assertions.assertEquals("g", model.validationResizeSize()); + Assertions.assertEquals("fwblqhxka", model.weightedLoss()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java index 6ade9f3cb8cb..20c161de4a44 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,136 +12,136 @@ public final class ImageModelDistributionSettingsObjectDetectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageModelDistributionSettingsObjectDetection model = BinaryData.fromString( - "{\"boxDetectionsPerImage\":\"wkkfzzetl\",\"boxScoreThreshold\":\"dyxzlvwywjvr\",\"imageSize\":\"qpwwlzpddarc\",\"maxSize\":\"dwhslxebaj\",\"minSize\":\"knmstbdoprwkamp\",\"modelSize\":\"wpbldz\",\"multiScale\":\"udrcycm\",\"nmsIouThreshold\":\"uzymhlhihqknlv\",\"tileGridSize\":\"n\",\"tileOverlapRatio\":\"kopaiildcp\",\"tilePredictionsNmsThreshold\":\"khquxsy\",\"validationIouThreshold\":\"fpgvedrobujnjgyb\",\"validationMetricType\":\"mqx\",\"amsGradient\":\"idullnjgcpskg\",\"augmentations\":\"nytslgsazuqznghx\",\"beta1\":\"yqz\",\"beta2\":\"dkpvnrvzw\",\"distributed\":\"fxsfybntmveho\",\"earlyStopping\":\"lyuvbgtzqzqwe\",\"earlyStoppingDelay\":\"dybnairvhpqsvb\",\"earlyStoppingPatience\":\"ogeatrcnqnvn\",\"evaluationFrequency\":\"rfcs\",\"enableOnnxNormalization\":\"jnkoiz\",\"gradientAccumulationStep\":\"sqbibaa\",\"layersToFreeze\":\"icovj\",\"learningRate\":\"vwrmjx\",\"learningRateScheduler\":\"uod\",\"modelName\":\"czbassqfyylwpp\",\"momentum\":\"gkbzbloas\",\"nesterov\":\"xhqvovdpmht\",\"numberOfEpochs\":\"vsqjs\",\"numberOfWorkers\":\"jnqtaqg\",\"optimizer\":\"bfkceincnrecj\",\"randomSeed\":\"ywevsfgdrmnszdo\",\"stepLRGamma\":\"j\",\"stepLRStepSize\":\"svz\",\"trainingBatchSize\":\"xtcwgh\",\"validationBatchSize\":\"aevhgsulwvg\",\"warmupCosineLRCycles\":\"ufigvfjjuzki\",\"warmupCosineLRWarmupEpochs\":\"ciwuhyzekypy\",\"weightDecay\":\"ljlbzdlby\"}") + "{\"boxDetectionsPerImage\":\"b\",\"boxScoreThreshold\":\"opdweoft\",\"imageSize\":\"rwaigsioctqkmv\",\"maxSize\":\"nx\",\"minSize\":\"fffhtjnwos\",\"modelSize\":\"fjxtvlxxzqfc\",\"multiScale\":\"riomxeezwyhj\",\"nmsIouThreshold\":\"jiqegmxdbs\",\"tileGridSize\":\"cwhpy\",\"tileOverlapRatio\":\"kgdet\",\"tilePredictionsNmsThreshold\":\"wcanzbjekwuyckyv\",\"validationIouThreshold\":\"nsm\",\"validationMetricType\":\"fiwjbctvbp\",\"amsGradient\":\"jqjtotd\",\"augmentations\":\"osc\",\"beta1\":\"hwuusiecktybh\",\"beta2\":\"xidhhxomil\",\"distributed\":\"xj\",\"earlyStopping\":\"ugxwjwilmqrslaat\",\"earlyStoppingDelay\":\"twujjzgx\",\"earlyStoppingPatience\":\"qwlxrhg\",\"enableOnnxNormalization\":\"hvtqqykbkk\",\"evaluationFrequency\":\"ozejo\",\"gradientAccumulationStep\":\"korvvm\",\"layersToFreeze\":\"cof\",\"learningRate\":\"h\",\"learningRateScheduler\":\"snosnqliwkmzojf\",\"modelName\":\"yalhtgm\",\"momentum\":\"azg\",\"nesterov\":\"bhrpgiqsttc\",\"numberOfEpochs\":\"rcmmaixpqj\",\"numberOfWorkers\":\"ifhb\",\"optimizer\":\"ldtt\",\"randomSeed\":\"qclnaihtg\",\"stepLRGamma\":\"qikvllrhtpm\",\"stepLRStepSize\":\"xkoi\",\"trainingBatchSize\":\"trawrqkza\",\"validationBatchSize\":\"unmpaklwzl\",\"warmupCosineLRCycles\":\"epr\",\"warmupCosineLRWarmupEpochs\":\"jzltkaszfjs\",\"weightDecay\":\"cbduxapgrcqebmvr\"}") .toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("idullnjgcpskg", model.amsGradient()); - Assertions.assertEquals("nytslgsazuqznghx", model.augmentations()); - Assertions.assertEquals("yqz", model.beta1()); - Assertions.assertEquals("dkpvnrvzw", model.beta2()); - Assertions.assertEquals("fxsfybntmveho", model.distributed()); - Assertions.assertEquals("lyuvbgtzqzqwe", model.earlyStopping()); - Assertions.assertEquals("dybnairvhpqsvb", model.earlyStoppingDelay()); - Assertions.assertEquals("ogeatrcnqnvn", model.earlyStoppingPatience()); - Assertions.assertEquals("rfcs", model.evaluationFrequency()); - Assertions.assertEquals("jnkoiz", model.enableOnnxNormalization()); - Assertions.assertEquals("sqbibaa", model.gradientAccumulationStep()); - Assertions.assertEquals("icovj", model.layersToFreeze()); - Assertions.assertEquals("vwrmjx", model.learningRate()); - Assertions.assertEquals("uod", model.learningRateScheduler()); - Assertions.assertEquals("czbassqfyylwpp", model.modelName()); - Assertions.assertEquals("gkbzbloas", model.momentum()); - Assertions.assertEquals("xhqvovdpmht", model.nesterov()); - Assertions.assertEquals("vsqjs", model.numberOfEpochs()); - Assertions.assertEquals("jnqtaqg", model.numberOfWorkers()); - Assertions.assertEquals("bfkceincnrecj", model.optimizer()); - Assertions.assertEquals("ywevsfgdrmnszdo", model.randomSeed()); - Assertions.assertEquals("j", model.stepLRGamma()); - Assertions.assertEquals("svz", model.stepLRStepSize()); - Assertions.assertEquals("xtcwgh", model.trainingBatchSize()); - Assertions.assertEquals("aevhgsulwvg", model.validationBatchSize()); - Assertions.assertEquals("ufigvfjjuzki", model.warmupCosineLRCycles()); - Assertions.assertEquals("ciwuhyzekypy", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("ljlbzdlby", model.weightDecay()); - Assertions.assertEquals("wkkfzzetl", model.boxDetectionsPerImage()); - Assertions.assertEquals("dyxzlvwywjvr", model.boxScoreThreshold()); - Assertions.assertEquals("qpwwlzpddarc", model.imageSize()); - Assertions.assertEquals("dwhslxebaj", model.maxSize()); - Assertions.assertEquals("knmstbdoprwkamp", model.minSize()); - Assertions.assertEquals("wpbldz", model.modelSize()); - Assertions.assertEquals("udrcycm", model.multiScale()); - Assertions.assertEquals("uzymhlhihqknlv", model.nmsIouThreshold()); - Assertions.assertEquals("n", model.tileGridSize()); - Assertions.assertEquals("kopaiildcp", model.tileOverlapRatio()); - Assertions.assertEquals("khquxsy", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("fpgvedrobujnjgyb", model.validationIouThreshold()); - Assertions.assertEquals("mqx", model.validationMetricType()); + Assertions.assertEquals("jqjtotd", model.amsGradient()); + Assertions.assertEquals("osc", model.augmentations()); + Assertions.assertEquals("hwuusiecktybh", model.beta1()); + Assertions.assertEquals("xidhhxomil", model.beta2()); + Assertions.assertEquals("xj", model.distributed()); + Assertions.assertEquals("ugxwjwilmqrslaat", model.earlyStopping()); + Assertions.assertEquals("twujjzgx", model.earlyStoppingDelay()); + Assertions.assertEquals("qwlxrhg", model.earlyStoppingPatience()); + Assertions.assertEquals("hvtqqykbkk", model.enableOnnxNormalization()); + Assertions.assertEquals("ozejo", model.evaluationFrequency()); + Assertions.assertEquals("korvvm", model.gradientAccumulationStep()); + Assertions.assertEquals("cof", model.layersToFreeze()); + Assertions.assertEquals("h", model.learningRate()); + Assertions.assertEquals("snosnqliwkmzojf", model.learningRateScheduler()); + Assertions.assertEquals("yalhtgm", model.modelName()); + Assertions.assertEquals("azg", model.momentum()); + Assertions.assertEquals("bhrpgiqsttc", model.nesterov()); + Assertions.assertEquals("rcmmaixpqj", model.numberOfEpochs()); + Assertions.assertEquals("ifhb", model.numberOfWorkers()); + Assertions.assertEquals("ldtt", model.optimizer()); + Assertions.assertEquals("qclnaihtg", model.randomSeed()); + Assertions.assertEquals("qikvllrhtpm", model.stepLRGamma()); + Assertions.assertEquals("xkoi", model.stepLRStepSize()); + Assertions.assertEquals("trawrqkza", model.trainingBatchSize()); + Assertions.assertEquals("unmpaklwzl", model.validationBatchSize()); + Assertions.assertEquals("epr", model.warmupCosineLRCycles()); + Assertions.assertEquals("jzltkaszfjs", model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("cbduxapgrcqebmvr", model.weightDecay()); + Assertions.assertEquals("b", model.boxDetectionsPerImage()); + Assertions.assertEquals("opdweoft", model.boxScoreThreshold()); + Assertions.assertEquals("rwaigsioctqkmv", model.imageSize()); + Assertions.assertEquals("nx", model.maxSize()); + Assertions.assertEquals("fffhtjnwos", model.minSize()); + Assertions.assertEquals("fjxtvlxxzqfc", model.modelSize()); + Assertions.assertEquals("riomxeezwyhj", model.multiScale()); + Assertions.assertEquals("jiqegmxdbs", model.nmsIouThreshold()); + Assertions.assertEquals("cwhpy", model.tileGridSize()); + Assertions.assertEquals("kgdet", model.tileOverlapRatio()); + Assertions.assertEquals("wcanzbjekwuyckyv", model.tilePredictionsNmsThreshold()); + Assertions.assertEquals("nsm", model.validationIouThreshold()); + Assertions.assertEquals("fiwjbctvbp", model.validationMetricType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ImageModelDistributionSettingsObjectDetection model - = new ImageModelDistributionSettingsObjectDetection().withAmsGradient("idullnjgcpskg") - .withAugmentations("nytslgsazuqznghx") - .withBeta1("yqz") - .withBeta2("dkpvnrvzw") - .withDistributed("fxsfybntmveho") - .withEarlyStopping("lyuvbgtzqzqwe") - .withEarlyStoppingDelay("dybnairvhpqsvb") - .withEarlyStoppingPatience("ogeatrcnqnvn") - .withEvaluationFrequency("rfcs") - .withEnableOnnxNormalization("jnkoiz") - .withGradientAccumulationStep("sqbibaa") - .withLayersToFreeze("icovj") - .withLearningRate("vwrmjx") - .withLearningRateScheduler("uod") - .withModelName("czbassqfyylwpp") - .withMomentum("gkbzbloas") - .withNesterov("xhqvovdpmht") - .withNumberOfEpochs("vsqjs") - .withNumberOfWorkers("jnqtaqg") - .withOptimizer("bfkceincnrecj") - .withRandomSeed("ywevsfgdrmnszdo") - .withStepLRGamma("j") - .withStepLRStepSize("svz") - .withTrainingBatchSize("xtcwgh") - .withValidationBatchSize("aevhgsulwvg") - .withWarmupCosineLRCycles("ufigvfjjuzki") - .withWarmupCosineLRWarmupEpochs("ciwuhyzekypy") - .withWeightDecay("ljlbzdlby") - .withBoxDetectionsPerImage("wkkfzzetl") - .withBoxScoreThreshold("dyxzlvwywjvr") - .withImageSize("qpwwlzpddarc") - .withMaxSize("dwhslxebaj") - .withMinSize("knmstbdoprwkamp") - .withModelSize("wpbldz") - .withMultiScale("udrcycm") - .withNmsIouThreshold("uzymhlhihqknlv") - .withTileGridSize("n") - .withTileOverlapRatio("kopaiildcp") - .withTilePredictionsNmsThreshold("khquxsy") - .withValidationIouThreshold("fpgvedrobujnjgyb") - .withValidationMetricType("mqx"); + = new ImageModelDistributionSettingsObjectDetection().withAmsGradient("jqjtotd") + .withAugmentations("osc") + .withBeta1("hwuusiecktybh") + .withBeta2("xidhhxomil") + .withDistributed("xj") + .withEarlyStopping("ugxwjwilmqrslaat") + .withEarlyStoppingDelay("twujjzgx") + .withEarlyStoppingPatience("qwlxrhg") + .withEnableOnnxNormalization("hvtqqykbkk") + .withEvaluationFrequency("ozejo") + .withGradientAccumulationStep("korvvm") + .withLayersToFreeze("cof") + .withLearningRate("h") + .withLearningRateScheduler("snosnqliwkmzojf") + .withModelName("yalhtgm") + .withMomentum("azg") + .withNesterov("bhrpgiqsttc") + .withNumberOfEpochs("rcmmaixpqj") + .withNumberOfWorkers("ifhb") + .withOptimizer("ldtt") + .withRandomSeed("qclnaihtg") + .withStepLRGamma("qikvllrhtpm") + .withStepLRStepSize("xkoi") + .withTrainingBatchSize("trawrqkza") + .withValidationBatchSize("unmpaklwzl") + .withWarmupCosineLRCycles("epr") + .withWarmupCosineLRWarmupEpochs("jzltkaszfjs") + .withWeightDecay("cbduxapgrcqebmvr") + .withBoxDetectionsPerImage("b") + .withBoxScoreThreshold("opdweoft") + .withImageSize("rwaigsioctqkmv") + .withMaxSize("nx") + .withMinSize("fffhtjnwos") + .withModelSize("fjxtvlxxzqfc") + .withMultiScale("riomxeezwyhj") + .withNmsIouThreshold("jiqegmxdbs") + .withTileGridSize("cwhpy") + .withTileOverlapRatio("kgdet") + .withTilePredictionsNmsThreshold("wcanzbjekwuyckyv") + .withValidationIouThreshold("nsm") + .withValidationMetricType("fiwjbctvbp"); model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("idullnjgcpskg", model.amsGradient()); - Assertions.assertEquals("nytslgsazuqznghx", model.augmentations()); - Assertions.assertEquals("yqz", model.beta1()); - Assertions.assertEquals("dkpvnrvzw", model.beta2()); - Assertions.assertEquals("fxsfybntmveho", model.distributed()); - Assertions.assertEquals("lyuvbgtzqzqwe", model.earlyStopping()); - Assertions.assertEquals("dybnairvhpqsvb", model.earlyStoppingDelay()); - Assertions.assertEquals("ogeatrcnqnvn", model.earlyStoppingPatience()); - Assertions.assertEquals("rfcs", model.evaluationFrequency()); - Assertions.assertEquals("jnkoiz", model.enableOnnxNormalization()); - Assertions.assertEquals("sqbibaa", model.gradientAccumulationStep()); - Assertions.assertEquals("icovj", model.layersToFreeze()); - Assertions.assertEquals("vwrmjx", model.learningRate()); - Assertions.assertEquals("uod", model.learningRateScheduler()); - Assertions.assertEquals("czbassqfyylwpp", model.modelName()); - Assertions.assertEquals("gkbzbloas", model.momentum()); - Assertions.assertEquals("xhqvovdpmht", model.nesterov()); - Assertions.assertEquals("vsqjs", model.numberOfEpochs()); - Assertions.assertEquals("jnqtaqg", model.numberOfWorkers()); - Assertions.assertEquals("bfkceincnrecj", model.optimizer()); - Assertions.assertEquals("ywevsfgdrmnszdo", model.randomSeed()); - Assertions.assertEquals("j", model.stepLRGamma()); - Assertions.assertEquals("svz", model.stepLRStepSize()); - Assertions.assertEquals("xtcwgh", model.trainingBatchSize()); - Assertions.assertEquals("aevhgsulwvg", model.validationBatchSize()); - Assertions.assertEquals("ufigvfjjuzki", model.warmupCosineLRCycles()); - Assertions.assertEquals("ciwuhyzekypy", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("ljlbzdlby", model.weightDecay()); - Assertions.assertEquals("wkkfzzetl", model.boxDetectionsPerImage()); - Assertions.assertEquals("dyxzlvwywjvr", model.boxScoreThreshold()); - Assertions.assertEquals("qpwwlzpddarc", model.imageSize()); - Assertions.assertEquals("dwhslxebaj", model.maxSize()); - Assertions.assertEquals("knmstbdoprwkamp", model.minSize()); - Assertions.assertEquals("wpbldz", model.modelSize()); - Assertions.assertEquals("udrcycm", model.multiScale()); - Assertions.assertEquals("uzymhlhihqknlv", model.nmsIouThreshold()); - Assertions.assertEquals("n", model.tileGridSize()); - Assertions.assertEquals("kopaiildcp", model.tileOverlapRatio()); - Assertions.assertEquals("khquxsy", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("fpgvedrobujnjgyb", model.validationIouThreshold()); - Assertions.assertEquals("mqx", model.validationMetricType()); + Assertions.assertEquals("jqjtotd", model.amsGradient()); + Assertions.assertEquals("osc", model.augmentations()); + Assertions.assertEquals("hwuusiecktybh", model.beta1()); + Assertions.assertEquals("xidhhxomil", model.beta2()); + Assertions.assertEquals("xj", model.distributed()); + Assertions.assertEquals("ugxwjwilmqrslaat", model.earlyStopping()); + Assertions.assertEquals("twujjzgx", model.earlyStoppingDelay()); + Assertions.assertEquals("qwlxrhg", model.earlyStoppingPatience()); + Assertions.assertEquals("hvtqqykbkk", model.enableOnnxNormalization()); + Assertions.assertEquals("ozejo", model.evaluationFrequency()); + Assertions.assertEquals("korvvm", model.gradientAccumulationStep()); + Assertions.assertEquals("cof", model.layersToFreeze()); + Assertions.assertEquals("h", model.learningRate()); + Assertions.assertEquals("snosnqliwkmzojf", model.learningRateScheduler()); + Assertions.assertEquals("yalhtgm", model.modelName()); + Assertions.assertEquals("azg", model.momentum()); + Assertions.assertEquals("bhrpgiqsttc", model.nesterov()); + Assertions.assertEquals("rcmmaixpqj", model.numberOfEpochs()); + Assertions.assertEquals("ifhb", model.numberOfWorkers()); + Assertions.assertEquals("ldtt", model.optimizer()); + Assertions.assertEquals("qclnaihtg", model.randomSeed()); + Assertions.assertEquals("qikvllrhtpm", model.stepLRGamma()); + Assertions.assertEquals("xkoi", model.stepLRStepSize()); + Assertions.assertEquals("trawrqkza", model.trainingBatchSize()); + Assertions.assertEquals("unmpaklwzl", model.validationBatchSize()); + Assertions.assertEquals("epr", model.warmupCosineLRCycles()); + Assertions.assertEquals("jzltkaszfjs", model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("cbduxapgrcqebmvr", model.weightDecay()); + Assertions.assertEquals("b", model.boxDetectionsPerImage()); + Assertions.assertEquals("opdweoft", model.boxScoreThreshold()); + Assertions.assertEquals("rwaigsioctqkmv", model.imageSize()); + Assertions.assertEquals("nx", model.maxSize()); + Assertions.assertEquals("fffhtjnwos", model.minSize()); + Assertions.assertEquals("fjxtvlxxzqfc", model.modelSize()); + Assertions.assertEquals("riomxeezwyhj", model.multiScale()); + Assertions.assertEquals("jiqegmxdbs", model.nmsIouThreshold()); + Assertions.assertEquals("cwhpy", model.tileGridSize()); + Assertions.assertEquals("kgdet", model.tileOverlapRatio()); + Assertions.assertEquals("wcanzbjekwuyckyv", model.tilePredictionsNmsThreshold()); + Assertions.assertEquals("nsm", model.validationIouThreshold()); + Assertions.assertEquals("fiwjbctvbp", model.validationMetricType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java index 657137ce3ad8..b17905b0176e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,96 +12,96 @@ public final class ImageModelDistributionSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageModelDistributionSettings model = BinaryData.fromString( - "{\"amsGradient\":\"kbsvbwy\",\"augmentations\":\"ygnbknhjgclxaxwc\",\"beta1\":\"asp\",\"beta2\":\"zkucszghdoaqipmn\",\"distributed\":\"lfrsbzrnmuv\",\"earlyStopping\":\"pu\",\"earlyStoppingDelay\":\"ddtbfmekjcnginxd\",\"earlyStoppingPatience\":\"aoy\",\"evaluationFrequency\":\"fvgyxzmxynofxl\",\"enableOnnxNormalization\":\"xoqxtdnzujsj\",\"gradientAccumulationStep\":\"krpskcjhmm\",\"layersToFreeze\":\"bnivdqtkykp\",\"learningRate\":\"nlsfgnyscac\",\"learningRateScheduler\":\"tbzetxyg\",\"modelName\":\"iceecvjwy\",\"momentum\":\"eoxmpzzw\",\"nesterov\":\"drdvha\",\"numberOfEpochs\":\"kx\",\"numberOfWorkers\":\"vz\",\"optimizer\":\"xmbrygmwibiosiq\",\"randomSeed\":\"kqfdqwdrtx\",\"stepLRGamma\":\"daglmrcok\",\"stepLRStepSize\":\"ert\",\"trainingBatchSize\":\"unzsiywhubym\",\"validationBatchSize\":\"opikzebqnnfywtkq\",\"warmupCosineLRCycles\":\"sdlkhcz\",\"warmupCosineLRWarmupEpochs\":\"pmgfjculojhhylx\",\"weightDecay\":\"vfiyymot\"}") + "{\"amsGradient\":\"v\",\"augmentations\":\"cjkcoqwczsyiqri\",\"beta1\":\"wihvaangqtnh\",\"beta2\":\"fdmfdvbbaexxjfwt\",\"distributed\":\"fkkauigvmua\",\"earlyStopping\":\"czfedyuep\",\"earlyStoppingDelay\":\"pl\",\"earlyStoppingPatience\":\"dajjvywe\",\"enableOnnxNormalization\":\"fkumcfjxoky\",\"evaluationFrequency\":\"syasvfnkwmygjjek\",\"gradientAccumulationStep\":\"nfdrugjqyck\",\"layersToFreeze\":\"xkrdtul\",\"learningRate\":\"cjdk\",\"learningRateScheduler\":\"tcsubmzoo\",\"modelName\":\"vo\",\"momentum\":\"hkxfpwhdyslbklgl\",\"nesterov\":\"nkkw\",\"numberOfEpochs\":\"qshwyqxridt\",\"numberOfWorkers\":\"saqjmkgx\",\"optimizer\":\"queu\",\"randomSeed\":\"lztpziizevjykof\",\"stepLRGamma\":\"zefkhkqtwqlepjj\",\"stepLRStepSize\":\"c\",\"trainingBatchSize\":\"fwzcntogffjwaj\",\"validationBatchSize\":\"tw\",\"warmupCosineLRCycles\":\"aqkifmxawostfz\",\"warmupCosineLRWarmupEpochs\":\"hrkmjqncfv\",\"weightDecay\":\"cnhemvwfnq\"}") .toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("kbsvbwy", model.amsGradient()); - Assertions.assertEquals("ygnbknhjgclxaxwc", model.augmentations()); - Assertions.assertEquals("asp", model.beta1()); - Assertions.assertEquals("zkucszghdoaqipmn", model.beta2()); - Assertions.assertEquals("lfrsbzrnmuv", model.distributed()); - Assertions.assertEquals("pu", model.earlyStopping()); - Assertions.assertEquals("ddtbfmekjcnginxd", model.earlyStoppingDelay()); - Assertions.assertEquals("aoy", model.earlyStoppingPatience()); - Assertions.assertEquals("fvgyxzmxynofxl", model.evaluationFrequency()); - Assertions.assertEquals("xoqxtdnzujsj", model.enableOnnxNormalization()); - Assertions.assertEquals("krpskcjhmm", model.gradientAccumulationStep()); - Assertions.assertEquals("bnivdqtkykp", model.layersToFreeze()); - Assertions.assertEquals("nlsfgnyscac", model.learningRate()); - Assertions.assertEquals("tbzetxyg", model.learningRateScheduler()); - Assertions.assertEquals("iceecvjwy", model.modelName()); - Assertions.assertEquals("eoxmpzzw", model.momentum()); - Assertions.assertEquals("drdvha", model.nesterov()); - Assertions.assertEquals("kx", model.numberOfEpochs()); - Assertions.assertEquals("vz", model.numberOfWorkers()); - Assertions.assertEquals("xmbrygmwibiosiq", model.optimizer()); - Assertions.assertEquals("kqfdqwdrtx", model.randomSeed()); - Assertions.assertEquals("daglmrcok", model.stepLRGamma()); - Assertions.assertEquals("ert", model.stepLRStepSize()); - Assertions.assertEquals("unzsiywhubym", model.trainingBatchSize()); - Assertions.assertEquals("opikzebqnnfywtkq", model.validationBatchSize()); - Assertions.assertEquals("sdlkhcz", model.warmupCosineLRCycles()); - Assertions.assertEquals("pmgfjculojhhylx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("vfiyymot", model.weightDecay()); + Assertions.assertEquals("v", model.amsGradient()); + Assertions.assertEquals("cjkcoqwczsyiqri", model.augmentations()); + Assertions.assertEquals("wihvaangqtnh", model.beta1()); + Assertions.assertEquals("fdmfdvbbaexxjfwt", model.beta2()); + Assertions.assertEquals("fkkauigvmua", model.distributed()); + Assertions.assertEquals("czfedyuep", model.earlyStopping()); + Assertions.assertEquals("pl", model.earlyStoppingDelay()); + Assertions.assertEquals("dajjvywe", model.earlyStoppingPatience()); + Assertions.assertEquals("fkumcfjxoky", model.enableOnnxNormalization()); + Assertions.assertEquals("syasvfnkwmygjjek", model.evaluationFrequency()); + Assertions.assertEquals("nfdrugjqyck", model.gradientAccumulationStep()); + Assertions.assertEquals("xkrdtul", model.layersToFreeze()); + Assertions.assertEquals("cjdk", model.learningRate()); + Assertions.assertEquals("tcsubmzoo", model.learningRateScheduler()); + Assertions.assertEquals("vo", model.modelName()); + Assertions.assertEquals("hkxfpwhdyslbklgl", model.momentum()); + Assertions.assertEquals("nkkw", model.nesterov()); + Assertions.assertEquals("qshwyqxridt", model.numberOfEpochs()); + Assertions.assertEquals("saqjmkgx", model.numberOfWorkers()); + Assertions.assertEquals("queu", model.optimizer()); + Assertions.assertEquals("lztpziizevjykof", model.randomSeed()); + Assertions.assertEquals("zefkhkqtwqlepjj", model.stepLRGamma()); + Assertions.assertEquals("c", model.stepLRStepSize()); + Assertions.assertEquals("fwzcntogffjwaj", model.trainingBatchSize()); + Assertions.assertEquals("tw", model.validationBatchSize()); + Assertions.assertEquals("aqkifmxawostfz", model.warmupCosineLRCycles()); + Assertions.assertEquals("hrkmjqncfv", model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("cnhemvwfnq", model.weightDecay()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageModelDistributionSettings model = new ImageModelDistributionSettings().withAmsGradient("kbsvbwy") - .withAugmentations("ygnbknhjgclxaxwc") - .withBeta1("asp") - .withBeta2("zkucszghdoaqipmn") - .withDistributed("lfrsbzrnmuv") - .withEarlyStopping("pu") - .withEarlyStoppingDelay("ddtbfmekjcnginxd") - .withEarlyStoppingPatience("aoy") - .withEvaluationFrequency("fvgyxzmxynofxl") - .withEnableOnnxNormalization("xoqxtdnzujsj") - .withGradientAccumulationStep("krpskcjhmm") - .withLayersToFreeze("bnivdqtkykp") - .withLearningRate("nlsfgnyscac") - .withLearningRateScheduler("tbzetxyg") - .withModelName("iceecvjwy") - .withMomentum("eoxmpzzw") - .withNesterov("drdvha") - .withNumberOfEpochs("kx") - .withNumberOfWorkers("vz") - .withOptimizer("xmbrygmwibiosiq") - .withRandomSeed("kqfdqwdrtx") - .withStepLRGamma("daglmrcok") - .withStepLRStepSize("ert") - .withTrainingBatchSize("unzsiywhubym") - .withValidationBatchSize("opikzebqnnfywtkq") - .withWarmupCosineLRCycles("sdlkhcz") - .withWarmupCosineLRWarmupEpochs("pmgfjculojhhylx") - .withWeightDecay("vfiyymot"); + ImageModelDistributionSettings model = new ImageModelDistributionSettings().withAmsGradient("v") + .withAugmentations("cjkcoqwczsyiqri") + .withBeta1("wihvaangqtnh") + .withBeta2("fdmfdvbbaexxjfwt") + .withDistributed("fkkauigvmua") + .withEarlyStopping("czfedyuep") + .withEarlyStoppingDelay("pl") + .withEarlyStoppingPatience("dajjvywe") + .withEnableOnnxNormalization("fkumcfjxoky") + .withEvaluationFrequency("syasvfnkwmygjjek") + .withGradientAccumulationStep("nfdrugjqyck") + .withLayersToFreeze("xkrdtul") + .withLearningRate("cjdk") + .withLearningRateScheduler("tcsubmzoo") + .withModelName("vo") + .withMomentum("hkxfpwhdyslbklgl") + .withNesterov("nkkw") + .withNumberOfEpochs("qshwyqxridt") + .withNumberOfWorkers("saqjmkgx") + .withOptimizer("queu") + .withRandomSeed("lztpziizevjykof") + .withStepLRGamma("zefkhkqtwqlepjj") + .withStepLRStepSize("c") + .withTrainingBatchSize("fwzcntogffjwaj") + .withValidationBatchSize("tw") + .withWarmupCosineLRCycles("aqkifmxawostfz") + .withWarmupCosineLRWarmupEpochs("hrkmjqncfv") + .withWeightDecay("cnhemvwfnq"); model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("kbsvbwy", model.amsGradient()); - Assertions.assertEquals("ygnbknhjgclxaxwc", model.augmentations()); - Assertions.assertEquals("asp", model.beta1()); - Assertions.assertEquals("zkucszghdoaqipmn", model.beta2()); - Assertions.assertEquals("lfrsbzrnmuv", model.distributed()); - Assertions.assertEquals("pu", model.earlyStopping()); - Assertions.assertEquals("ddtbfmekjcnginxd", model.earlyStoppingDelay()); - Assertions.assertEquals("aoy", model.earlyStoppingPatience()); - Assertions.assertEquals("fvgyxzmxynofxl", model.evaluationFrequency()); - Assertions.assertEquals("xoqxtdnzujsj", model.enableOnnxNormalization()); - Assertions.assertEquals("krpskcjhmm", model.gradientAccumulationStep()); - Assertions.assertEquals("bnivdqtkykp", model.layersToFreeze()); - Assertions.assertEquals("nlsfgnyscac", model.learningRate()); - Assertions.assertEquals("tbzetxyg", model.learningRateScheduler()); - Assertions.assertEquals("iceecvjwy", model.modelName()); - Assertions.assertEquals("eoxmpzzw", model.momentum()); - Assertions.assertEquals("drdvha", model.nesterov()); - Assertions.assertEquals("kx", model.numberOfEpochs()); - Assertions.assertEquals("vz", model.numberOfWorkers()); - Assertions.assertEquals("xmbrygmwibiosiq", model.optimizer()); - Assertions.assertEquals("kqfdqwdrtx", model.randomSeed()); - Assertions.assertEquals("daglmrcok", model.stepLRGamma()); - Assertions.assertEquals("ert", model.stepLRStepSize()); - Assertions.assertEquals("unzsiywhubym", model.trainingBatchSize()); - Assertions.assertEquals("opikzebqnnfywtkq", model.validationBatchSize()); - Assertions.assertEquals("sdlkhcz", model.warmupCosineLRCycles()); - Assertions.assertEquals("pmgfjculojhhylx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("vfiyymot", model.weightDecay()); + Assertions.assertEquals("v", model.amsGradient()); + Assertions.assertEquals("cjkcoqwczsyiqri", model.augmentations()); + Assertions.assertEquals("wihvaangqtnh", model.beta1()); + Assertions.assertEquals("fdmfdvbbaexxjfwt", model.beta2()); + Assertions.assertEquals("fkkauigvmua", model.distributed()); + Assertions.assertEquals("czfedyuep", model.earlyStopping()); + Assertions.assertEquals("pl", model.earlyStoppingDelay()); + Assertions.assertEquals("dajjvywe", model.earlyStoppingPatience()); + Assertions.assertEquals("fkumcfjxoky", model.enableOnnxNormalization()); + Assertions.assertEquals("syasvfnkwmygjjek", model.evaluationFrequency()); + Assertions.assertEquals("nfdrugjqyck", model.gradientAccumulationStep()); + Assertions.assertEquals("xkrdtul", model.layersToFreeze()); + Assertions.assertEquals("cjdk", model.learningRate()); + Assertions.assertEquals("tcsubmzoo", model.learningRateScheduler()); + Assertions.assertEquals("vo", model.modelName()); + Assertions.assertEquals("hkxfpwhdyslbklgl", model.momentum()); + Assertions.assertEquals("nkkw", model.nesterov()); + Assertions.assertEquals("qshwyqxridt", model.numberOfEpochs()); + Assertions.assertEquals("saqjmkgx", model.numberOfWorkers()); + Assertions.assertEquals("queu", model.optimizer()); + Assertions.assertEquals("lztpziizevjykof", model.randomSeed()); + Assertions.assertEquals("zefkhkqtwqlepjj", model.stepLRGamma()); + Assertions.assertEquals("c", model.stepLRStepSize()); + Assertions.assertEquals("fwzcntogffjwaj", model.trainingBatchSize()); + Assertions.assertEquals("tw", model.validationBatchSize()); + Assertions.assertEquals("aqkifmxawostfz", model.warmupCosineLRCycles()); + Assertions.assertEquals("hrkmjqncfv", model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("cnhemvwfnq", model.weightDecay()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java index 884e95b21684..4b33db915366 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,126 +16,126 @@ public final class ImageModelSettingsClassificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageModelSettingsClassification model = BinaryData.fromString( - "{\"trainingCropSize\":2019850919,\"validationCropSize\":1207062922,\"validationResizeSize\":284324942,\"weightedLoss\":1254415877,\"amsGradient\":true,\"advancedSettings\":\"vscbgngcrusxhir\",\"augmentations\":\"gcvsvkkjbjolpy\",\"beta1\":58.230556,\"beta2\":50.90398,\"checkpointFrequency\":901298308,\"checkpointRunId\":\"advhmli\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"igowxxbhtpsyioqe\",\"mode\":\"ReadOnlyMount\",\"description\":\"qszz\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":958652184,\"earlyStoppingPatience\":1740509933,\"evaluationFrequency\":1046556371,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":321986139,\"layersToFreeze\":1384834321,\"learningRate\":89.54964,\"learningRateScheduler\":\"Step\",\"modelName\":\"ompnbnfgyweojbep\",\"momentum\":27.62385,\"nesterov\":true,\"numberOfEpochs\":810296596,\"numberOfWorkers\":1614250259,\"optimizer\":\"None\",\"randomSeed\":1918105896,\"stepLRGamma\":55.955624,\"stepLRStepSize\":1172060548,\"trainingBatchSize\":2093190507,\"validationBatchSize\":1129435958,\"warmupCosineLRCycles\":27.577805,\"warmupCosineLRWarmupEpochs\":1232186738,\"weightDecay\":96.705475}") + "{\"trainingCropSize\":697669059,\"validationCropSize\":2048673691,\"validationResizeSize\":295924051,\"weightedLoss\":2036195163,\"advancedSettings\":\"nctaczcn\",\"amsGradient\":false,\"augmentations\":\"b\",\"beta1\":72.47062325506005,\"beta2\":48.13489191692173,\"checkpointFrequency\":1883902255,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"rtiklsmnihqlco\",\"description\":\"syi\"},\"checkpointRunId\":\"hyxwbgbud\",\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1157893423,\"earlyStoppingPatience\":442973629,\"enableOnnxNormalization\":false,\"evaluationFrequency\":1698710995,\"gradientAccumulationStep\":72667154,\"layersToFreeze\":1576525317,\"learningRate\":65.95285623086339,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"ucosawrdt\",\"momentum\":72.08406346584366,\"nesterov\":false,\"numberOfEpochs\":223590127,\"numberOfWorkers\":1633927568,\"optimizer\":\"Adam\",\"randomSeed\":1112397483,\"stepLRGamma\":25.686378057224026,\"stepLRStepSize\":271809891,\"trainingBatchSize\":449092721,\"validationBatchSize\":1296621349,\"warmupCosineLRCycles\":69.80917869473988,\"warmupCosineLRWarmupEpochs\":1964648467,\"weightDecay\":59.9782886068074}") .toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("vscbgngcrusxhir", model.advancedSettings()); - Assertions.assertEquals("gcvsvkkjbjolpy", model.augmentations()); - Assertions.assertEquals(58.230556F, model.beta1()); - Assertions.assertEquals(50.90398F, model.beta2()); - Assertions.assertEquals(901298308, model.checkpointFrequency()); - Assertions.assertEquals("advhmli", model.checkpointRunId()); - Assertions.assertEquals("qszz", model.checkpointModel().description()); - Assertions.assertEquals("igowxxbhtpsyioqe", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(958652184, model.earlyStoppingDelay()); - Assertions.assertEquals(1740509933, model.earlyStoppingPatience()); - Assertions.assertEquals(1046556371, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(321986139, model.gradientAccumulationStep()); - Assertions.assertEquals(1384834321, model.layersToFreeze()); - Assertions.assertEquals(89.54964F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.learningRateScheduler()); - Assertions.assertEquals("ompnbnfgyweojbep", model.modelName()); - Assertions.assertEquals(27.62385F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(810296596, model.numberOfEpochs()); - Assertions.assertEquals(1614250259, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1918105896, model.randomSeed()); - Assertions.assertEquals(55.955624F, model.stepLRGamma()); - Assertions.assertEquals(1172060548, model.stepLRStepSize()); - Assertions.assertEquals(2093190507, model.trainingBatchSize()); - Assertions.assertEquals(1129435958, model.validationBatchSize()); - Assertions.assertEquals(27.577805F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1232186738, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(96.705475F, model.weightDecay()); - Assertions.assertEquals(2019850919, model.trainingCropSize()); - Assertions.assertEquals(1207062922, model.validationCropSize()); - Assertions.assertEquals(284324942, model.validationResizeSize()); - Assertions.assertEquals(1254415877, model.weightedLoss()); + Assertions.assertEquals("nctaczcn", model.advancedSettings()); + Assertions.assertFalse(model.amsGradient()); + Assertions.assertEquals("b", model.augmentations()); + Assertions.assertEquals(72.47062325506005D, model.beta1()); + Assertions.assertEquals(48.13489191692173D, model.beta2()); + Assertions.assertEquals(1883902255, model.checkpointFrequency()); + Assertions.assertEquals("syi", model.checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); + Assertions.assertEquals("rtiklsmnihqlco", model.checkpointModel().uri()); + Assertions.assertEquals("hyxwbgbud", model.checkpointRunId()); + Assertions.assertFalse(model.distributed()); + Assertions.assertTrue(model.earlyStopping()); + Assertions.assertEquals(1157893423, model.earlyStoppingDelay()); + Assertions.assertEquals(442973629, model.earlyStoppingPatience()); + Assertions.assertFalse(model.enableOnnxNormalization()); + Assertions.assertEquals(1698710995, model.evaluationFrequency()); + Assertions.assertEquals(72667154, model.gradientAccumulationStep()); + Assertions.assertEquals(1576525317, model.layersToFreeze()); + Assertions.assertEquals(65.95285623086339D, model.learningRate()); + Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); + Assertions.assertEquals("ucosawrdt", model.modelName()); + Assertions.assertEquals(72.08406346584366D, model.momentum()); + Assertions.assertFalse(model.nesterov()); + Assertions.assertEquals(223590127, model.numberOfEpochs()); + Assertions.assertEquals(1633927568, model.numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.ADAM, model.optimizer()); + Assertions.assertEquals(1112397483, model.randomSeed()); + Assertions.assertEquals(25.686378057224026D, model.stepLRGamma()); + Assertions.assertEquals(271809891, model.stepLRStepSize()); + Assertions.assertEquals(449092721, model.trainingBatchSize()); + Assertions.assertEquals(1296621349, model.validationBatchSize()); + Assertions.assertEquals(69.80917869473988D, model.warmupCosineLRCycles()); + Assertions.assertEquals(1964648467, model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(59.9782886068074D, model.weightDecay()); + Assertions.assertEquals(697669059, model.trainingCropSize()); + Assertions.assertEquals(2048673691, model.validationCropSize()); + Assertions.assertEquals(295924051, model.validationResizeSize()); + Assertions.assertEquals(2036195163, model.weightedLoss()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageModelSettingsClassification model = new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("vscbgngcrusxhir") - .withAugmentations("gcvsvkkjbjolpy") - .withBeta1(58.230556F) - .withBeta2(50.90398F) - .withCheckpointFrequency(901298308) - .withCheckpointRunId("advhmli") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("qszz") - .withUri("igowxxbhtpsyioqe") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(958652184) - .withEarlyStoppingPatience(1740509933) - .withEvaluationFrequency(1046556371) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(321986139) - .withLayersToFreeze(1384834321) - .withLearningRate(89.54964F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("ompnbnfgyweojbep") - .withMomentum(27.62385F) - .withNesterov(true) - .withNumberOfEpochs(810296596) - .withNumberOfWorkers(1614250259) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1918105896) - .withStepLRGamma(55.955624F) - .withStepLRStepSize(1172060548) - .withTrainingBatchSize(2093190507) - .withValidationBatchSize(1129435958) - .withWarmupCosineLRCycles(27.577805F) - .withWarmupCosineLRWarmupEpochs(1232186738) - .withWeightDecay(96.705475F) - .withTrainingCropSize(2019850919) - .withValidationCropSize(1207062922) - .withValidationResizeSize(284324942) - .withWeightedLoss(1254415877); + ImageModelSettingsClassification model = new ImageModelSettingsClassification().withAdvancedSettings("nctaczcn") + .withAmsGradient(false) + .withAugmentations("b") + .withBeta1(72.47062325506005D) + .withBeta2(48.13489191692173D) + .withCheckpointFrequency(1883902255) + .withCheckpointModel(new MLFlowModelJobInput().withDescription("syi") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("rtiklsmnihqlco")) + .withCheckpointRunId("hyxwbgbud") + .withDistributed(false) + .withEarlyStopping(true) + .withEarlyStoppingDelay(1157893423) + .withEarlyStoppingPatience(442973629) + .withEnableOnnxNormalization(false) + .withEvaluationFrequency(1698710995) + .withGradientAccumulationStep(72667154) + .withLayersToFreeze(1576525317) + .withLearningRate(65.95285623086339D) + .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) + .withModelName("ucosawrdt") + .withMomentum(72.08406346584366D) + .withNesterov(false) + .withNumberOfEpochs(223590127) + .withNumberOfWorkers(1633927568) + .withOptimizer(StochasticOptimizer.ADAM) + .withRandomSeed(1112397483) + .withStepLRGamma(25.686378057224026D) + .withStepLRStepSize(271809891) + .withTrainingBatchSize(449092721) + .withValidationBatchSize(1296621349) + .withWarmupCosineLRCycles(69.80917869473988D) + .withWarmupCosineLRWarmupEpochs(1964648467) + .withWeightDecay(59.9782886068074D) + .withTrainingCropSize(697669059) + .withValidationCropSize(2048673691) + .withValidationResizeSize(295924051) + .withWeightedLoss(2036195163); model = BinaryData.fromObject(model).toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("vscbgngcrusxhir", model.advancedSettings()); - Assertions.assertEquals("gcvsvkkjbjolpy", model.augmentations()); - Assertions.assertEquals(58.230556F, model.beta1()); - Assertions.assertEquals(50.90398F, model.beta2()); - Assertions.assertEquals(901298308, model.checkpointFrequency()); - Assertions.assertEquals("advhmli", model.checkpointRunId()); - Assertions.assertEquals("qszz", model.checkpointModel().description()); - Assertions.assertEquals("igowxxbhtpsyioqe", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(958652184, model.earlyStoppingDelay()); - Assertions.assertEquals(1740509933, model.earlyStoppingPatience()); - Assertions.assertEquals(1046556371, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(321986139, model.gradientAccumulationStep()); - Assertions.assertEquals(1384834321, model.layersToFreeze()); - Assertions.assertEquals(89.54964F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.learningRateScheduler()); - Assertions.assertEquals("ompnbnfgyweojbep", model.modelName()); - Assertions.assertEquals(27.62385F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(810296596, model.numberOfEpochs()); - Assertions.assertEquals(1614250259, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1918105896, model.randomSeed()); - Assertions.assertEquals(55.955624F, model.stepLRGamma()); - Assertions.assertEquals(1172060548, model.stepLRStepSize()); - Assertions.assertEquals(2093190507, model.trainingBatchSize()); - Assertions.assertEquals(1129435958, model.validationBatchSize()); - Assertions.assertEquals(27.577805F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1232186738, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(96.705475F, model.weightDecay()); - Assertions.assertEquals(2019850919, model.trainingCropSize()); - Assertions.assertEquals(1207062922, model.validationCropSize()); - Assertions.assertEquals(284324942, model.validationResizeSize()); - Assertions.assertEquals(1254415877, model.weightedLoss()); + Assertions.assertEquals("nctaczcn", model.advancedSettings()); + Assertions.assertFalse(model.amsGradient()); + Assertions.assertEquals("b", model.augmentations()); + Assertions.assertEquals(72.47062325506005D, model.beta1()); + Assertions.assertEquals(48.13489191692173D, model.beta2()); + Assertions.assertEquals(1883902255, model.checkpointFrequency()); + Assertions.assertEquals("syi", model.checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); + Assertions.assertEquals("rtiklsmnihqlco", model.checkpointModel().uri()); + Assertions.assertEquals("hyxwbgbud", model.checkpointRunId()); + Assertions.assertFalse(model.distributed()); + Assertions.assertTrue(model.earlyStopping()); + Assertions.assertEquals(1157893423, model.earlyStoppingDelay()); + Assertions.assertEquals(442973629, model.earlyStoppingPatience()); + Assertions.assertFalse(model.enableOnnxNormalization()); + Assertions.assertEquals(1698710995, model.evaluationFrequency()); + Assertions.assertEquals(72667154, model.gradientAccumulationStep()); + Assertions.assertEquals(1576525317, model.layersToFreeze()); + Assertions.assertEquals(65.95285623086339D, model.learningRate()); + Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); + Assertions.assertEquals("ucosawrdt", model.modelName()); + Assertions.assertEquals(72.08406346584366D, model.momentum()); + Assertions.assertFalse(model.nesterov()); + Assertions.assertEquals(223590127, model.numberOfEpochs()); + Assertions.assertEquals(1633927568, model.numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.ADAM, model.optimizer()); + Assertions.assertEquals(1112397483, model.randomSeed()); + Assertions.assertEquals(25.686378057224026D, model.stepLRGamma()); + Assertions.assertEquals(271809891, model.stepLRStepSize()); + Assertions.assertEquals(449092721, model.trainingBatchSize()); + Assertions.assertEquals(1296621349, model.validationBatchSize()); + Assertions.assertEquals(69.80917869473988D, model.warmupCosineLRCycles()); + Assertions.assertEquals(1964648467, model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(59.9782886068074D, model.weightDecay()); + Assertions.assertEquals(697669059, model.trainingCropSize()); + Assertions.assertEquals(2048673691, model.validationCropSize()); + Assertions.assertEquals(295924051, model.validationResizeSize()); + Assertions.assertEquals(2036195163, model.weightedLoss()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java index c0ebd36aa184..cb7f0cb36324 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,153 +18,154 @@ public final class ImageModelSettingsObjectDetectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageModelSettingsObjectDetection model = BinaryData.fromString( - "{\"boxDetectionsPerImage\":838831750,\"boxScoreThreshold\":1.4475048,\"imageSize\":1865047625,\"maxSize\":1873973420,\"minSize\":314456492,\"modelSize\":\"Medium\",\"multiScale\":false,\"nmsIouThreshold\":73.60141,\"tileGridSize\":\"ae\",\"tileOverlapRatio\":38.204247,\"tilePredictionsNmsThreshold\":50.140213,\"validationIouThreshold\":76.77868,\"validationMetricType\":\"Voc\",\"amsGradient\":false,\"advancedSettings\":\"iurni\",\"augmentations\":\"pdyttqmiu\",\"beta1\":79.63432,\"beta2\":48.798817,\"checkpointFrequency\":1957117329,\"checkpointRunId\":\"mhhtuq\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"xynof\",\"mode\":\"EvalMount\",\"description\":\"fixngxeb\"},\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1452325370,\"earlyStoppingPatience\":312132877,\"evaluationFrequency\":216348432,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":2915542,\"layersToFreeze\":1485527211,\"learningRate\":7.0822835,\"learningRateScheduler\":\"None\",\"modelName\":\"jlbsmndafbncuyj\",\"momentum\":57.50032,\"nesterov\":true,\"numberOfEpochs\":529757711,\"numberOfWorkers\":1143101731,\"optimizer\":\"None\",\"randomSeed\":1522797644,\"stepLRGamma\":73.525085,\"stepLRStepSize\":2081472947,\"trainingBatchSize\":1138618692,\"validationBatchSize\":917946265,\"warmupCosineLRCycles\":66.47967,\"warmupCosineLRWarmupEpochs\":1182072687,\"weightDecay\":30.044836}") + "{\"boxDetectionsPerImage\":2084465727,\"boxScoreThreshold\":8.516768052889168,\"imageSize\":1062595906,\"maxSize\":982854972,\"minSize\":921313773,\"modelSize\":\"Medium\",\"multiScale\":true,\"nmsIouThreshold\":41.91918054813249,\"tileGridSize\":\"ctwjwdsdlzm\",\"tileOverlapRatio\":95.9358885129421,\"tilePredictionsNmsThreshold\":6.725203493470023,\"validationIouThreshold\":31.00904857465978,\"validationMetricType\":\"Coco\",\"advancedSettings\":\"howgomvvhxo\",\"amsGradient\":false,\"augmentations\":\"apnpxraqawbmp\",\"beta1\":18.144981522713678,\"beta2\":26.01727525194093,\"checkpointFrequency\":1732921110,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Direct\",\"uri\":\"ujexayglxrk\",\"description\":\"nmzpas\"},\"checkpointRunId\":\"vxjfiuofpieidzlv\",\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1065564623,\"earlyStoppingPatience\":126379166,\"enableOnnxNormalization\":true,\"evaluationFrequency\":942927489,\"gradientAccumulationStep\":1099737336,\"layersToFreeze\":1270791175,\"learningRate\":89.01452900607406,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"millxgjs\",\"momentum\":70.24965275674056,\"nesterov\":true,\"numberOfEpochs\":419155521,\"numberOfWorkers\":1244500728,\"optimizer\":\"Sgd\",\"randomSeed\":1036837095,\"stepLRGamma\":32.18543702738046,\"stepLRStepSize\":1281723088,\"trainingBatchSize\":375428992,\"validationBatchSize\":709979842,\"warmupCosineLRCycles\":31.67890813397204,\"warmupCosineLRWarmupEpochs\":1318748653,\"weightDecay\":98.74404758911166}") .toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("iurni", model.advancedSettings()); - Assertions.assertEquals("pdyttqmiu", model.augmentations()); - Assertions.assertEquals(79.63432F, model.beta1()); - Assertions.assertEquals(48.798817F, model.beta2()); - Assertions.assertEquals(1957117329, model.checkpointFrequency()); - Assertions.assertEquals("mhhtuq", model.checkpointRunId()); - Assertions.assertEquals("fixngxeb", model.checkpointModel().description()); - Assertions.assertEquals("xynof", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1452325370, model.earlyStoppingDelay()); - Assertions.assertEquals(312132877, model.earlyStoppingPatience()); - Assertions.assertEquals(216348432, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(2915542, model.gradientAccumulationStep()); - Assertions.assertEquals(1485527211, model.layersToFreeze()); - Assertions.assertEquals(7.0822835F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("jlbsmndafbncuyj", model.modelName()); - Assertions.assertEquals(57.50032F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(529757711, model.numberOfEpochs()); - Assertions.assertEquals(1143101731, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1522797644, model.randomSeed()); - Assertions.assertEquals(73.525085F, model.stepLRGamma()); - Assertions.assertEquals(2081472947, model.stepLRStepSize()); - Assertions.assertEquals(1138618692, model.trainingBatchSize()); - Assertions.assertEquals(917946265, model.validationBatchSize()); - Assertions.assertEquals(66.47967F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1182072687, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(30.044836F, model.weightDecay()); - Assertions.assertEquals(838831750, model.boxDetectionsPerImage()); - Assertions.assertEquals(1.4475048F, model.boxScoreThreshold()); - Assertions.assertEquals(1865047625, model.imageSize()); - Assertions.assertEquals(1873973420, model.maxSize()); - Assertions.assertEquals(314456492, model.minSize()); + Assertions.assertEquals("howgomvvhxo", model.advancedSettings()); + Assertions.assertFalse(model.amsGradient()); + Assertions.assertEquals("apnpxraqawbmp", model.augmentations()); + Assertions.assertEquals(18.144981522713678D, model.beta1()); + Assertions.assertEquals(26.01727525194093D, model.beta2()); + Assertions.assertEquals(1732921110, model.checkpointFrequency()); + Assertions.assertEquals("nmzpas", model.checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.checkpointModel().mode()); + Assertions.assertEquals("ujexayglxrk", model.checkpointModel().uri()); + Assertions.assertEquals("vxjfiuofpieidzlv", model.checkpointRunId()); + Assertions.assertFalse(model.distributed()); + Assertions.assertTrue(model.earlyStopping()); + Assertions.assertEquals(1065564623, model.earlyStoppingDelay()); + Assertions.assertEquals(126379166, model.earlyStoppingPatience()); + Assertions.assertTrue(model.enableOnnxNormalization()); + Assertions.assertEquals(942927489, model.evaluationFrequency()); + Assertions.assertEquals(1099737336, model.gradientAccumulationStep()); + Assertions.assertEquals(1270791175, model.layersToFreeze()); + Assertions.assertEquals(89.01452900607406D, model.learningRate()); + Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); + Assertions.assertEquals("millxgjs", model.modelName()); + Assertions.assertEquals(70.24965275674056D, model.momentum()); + Assertions.assertTrue(model.nesterov()); + Assertions.assertEquals(419155521, model.numberOfEpochs()); + Assertions.assertEquals(1244500728, model.numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); + Assertions.assertEquals(1036837095, model.randomSeed()); + Assertions.assertEquals(32.18543702738046D, model.stepLRGamma()); + Assertions.assertEquals(1281723088, model.stepLRStepSize()); + Assertions.assertEquals(375428992, model.trainingBatchSize()); + Assertions.assertEquals(709979842, model.validationBatchSize()); + Assertions.assertEquals(31.67890813397204D, model.warmupCosineLRCycles()); + Assertions.assertEquals(1318748653, model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(98.74404758911166D, model.weightDecay()); + Assertions.assertEquals(2084465727, model.boxDetectionsPerImage()); + Assertions.assertEquals(8.516768052889168D, model.boxScoreThreshold()); + Assertions.assertEquals(1062595906, model.imageSize()); + Assertions.assertEquals(982854972, model.maxSize()); + Assertions.assertEquals(921313773, model.minSize()); Assertions.assertEquals(ModelSize.MEDIUM, model.modelSize()); - Assertions.assertEquals(false, model.multiScale()); - Assertions.assertEquals(73.60141F, model.nmsIouThreshold()); - Assertions.assertEquals("ae", model.tileGridSize()); - Assertions.assertEquals(38.204247F, model.tileOverlapRatio()); - Assertions.assertEquals(50.140213F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(76.77868F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.validationMetricType()); + Assertions.assertTrue(model.multiScale()); + Assertions.assertEquals(41.91918054813249D, model.nmsIouThreshold()); + Assertions.assertEquals("ctwjwdsdlzm", model.tileGridSize()); + Assertions.assertEquals(95.9358885129421D, model.tileOverlapRatio()); + Assertions.assertEquals(6.725203493470023D, model.tilePredictionsNmsThreshold()); + Assertions.assertEquals(31.00904857465978D, model.validationIouThreshold()); + Assertions.assertEquals(ValidationMetricType.COCO, model.validationMetricType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageModelSettingsObjectDetection model = new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("iurni") - .withAugmentations("pdyttqmiu") - .withBeta1(79.63432F) - .withBeta2(48.798817F) - .withCheckpointFrequency(1957117329) - .withCheckpointRunId("mhhtuq") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("fixngxeb") - .withUri("xynof") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withDistributed(true) + ImageModelSettingsObjectDetection model = new ImageModelSettingsObjectDetection() + .withAdvancedSettings("howgomvvhxo") + .withAmsGradient(false) + .withAugmentations("apnpxraqawbmp") + .withBeta1(18.144981522713678D) + .withBeta2(26.01727525194093D) + .withCheckpointFrequency(1732921110) + .withCheckpointModel(new MLFlowModelJobInput().withDescription("nmzpas") + .withMode(InputDeliveryMode.DIRECT) + .withUri("ujexayglxrk")) + .withCheckpointRunId("vxjfiuofpieidzlv") + .withDistributed(false) .withEarlyStopping(true) - .withEarlyStoppingDelay(1452325370) - .withEarlyStoppingPatience(312132877) - .withEvaluationFrequency(216348432) + .withEarlyStoppingDelay(1065564623) + .withEarlyStoppingPatience(126379166) .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(2915542) - .withLayersToFreeze(1485527211) - .withLearningRate(7.0822835F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("jlbsmndafbncuyj") - .withMomentum(57.50032F) + .withEvaluationFrequency(942927489) + .withGradientAccumulationStep(1099737336) + .withLayersToFreeze(1270791175) + .withLearningRate(89.01452900607406D) + .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) + .withModelName("millxgjs") + .withMomentum(70.24965275674056D) .withNesterov(true) - .withNumberOfEpochs(529757711) - .withNumberOfWorkers(1143101731) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1522797644) - .withStepLRGamma(73.525085F) - .withStepLRStepSize(2081472947) - .withTrainingBatchSize(1138618692) - .withValidationBatchSize(917946265) - .withWarmupCosineLRCycles(66.47967F) - .withWarmupCosineLRWarmupEpochs(1182072687) - .withWeightDecay(30.044836F) - .withBoxDetectionsPerImage(838831750) - .withBoxScoreThreshold(1.4475048F) - .withImageSize(1865047625) - .withMaxSize(1873973420) - .withMinSize(314456492) + .withNumberOfEpochs(419155521) + .withNumberOfWorkers(1244500728) + .withOptimizer(StochasticOptimizer.SGD) + .withRandomSeed(1036837095) + .withStepLRGamma(32.18543702738046D) + .withStepLRStepSize(1281723088) + .withTrainingBatchSize(375428992) + .withValidationBatchSize(709979842) + .withWarmupCosineLRCycles(31.67890813397204D) + .withWarmupCosineLRWarmupEpochs(1318748653) + .withWeightDecay(98.74404758911166D) + .withBoxDetectionsPerImage(2084465727) + .withBoxScoreThreshold(8.516768052889168D) + .withImageSize(1062595906) + .withMaxSize(982854972) + .withMinSize(921313773) .withModelSize(ModelSize.MEDIUM) - .withMultiScale(false) - .withNmsIouThreshold(73.60141F) - .withTileGridSize("ae") - .withTileOverlapRatio(38.204247F) - .withTilePredictionsNmsThreshold(50.140213F) - .withValidationIouThreshold(76.77868F) - .withValidationMetricType(ValidationMetricType.VOC); + .withMultiScale(true) + .withNmsIouThreshold(41.91918054813249D) + .withTileGridSize("ctwjwdsdlzm") + .withTileOverlapRatio(95.9358885129421D) + .withTilePredictionsNmsThreshold(6.725203493470023D) + .withValidationIouThreshold(31.00904857465978D) + .withValidationMetricType(ValidationMetricType.COCO); model = BinaryData.fromObject(model).toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("iurni", model.advancedSettings()); - Assertions.assertEquals("pdyttqmiu", model.augmentations()); - Assertions.assertEquals(79.63432F, model.beta1()); - Assertions.assertEquals(48.798817F, model.beta2()); - Assertions.assertEquals(1957117329, model.checkpointFrequency()); - Assertions.assertEquals("mhhtuq", model.checkpointRunId()); - Assertions.assertEquals("fixngxeb", model.checkpointModel().description()); - Assertions.assertEquals("xynof", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1452325370, model.earlyStoppingDelay()); - Assertions.assertEquals(312132877, model.earlyStoppingPatience()); - Assertions.assertEquals(216348432, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(2915542, model.gradientAccumulationStep()); - Assertions.assertEquals(1485527211, model.layersToFreeze()); - Assertions.assertEquals(7.0822835F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("jlbsmndafbncuyj", model.modelName()); - Assertions.assertEquals(57.50032F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(529757711, model.numberOfEpochs()); - Assertions.assertEquals(1143101731, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1522797644, model.randomSeed()); - Assertions.assertEquals(73.525085F, model.stepLRGamma()); - Assertions.assertEquals(2081472947, model.stepLRStepSize()); - Assertions.assertEquals(1138618692, model.trainingBatchSize()); - Assertions.assertEquals(917946265, model.validationBatchSize()); - Assertions.assertEquals(66.47967F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1182072687, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(30.044836F, model.weightDecay()); - Assertions.assertEquals(838831750, model.boxDetectionsPerImage()); - Assertions.assertEquals(1.4475048F, model.boxScoreThreshold()); - Assertions.assertEquals(1865047625, model.imageSize()); - Assertions.assertEquals(1873973420, model.maxSize()); - Assertions.assertEquals(314456492, model.minSize()); + Assertions.assertEquals("howgomvvhxo", model.advancedSettings()); + Assertions.assertFalse(model.amsGradient()); + Assertions.assertEquals("apnpxraqawbmp", model.augmentations()); + Assertions.assertEquals(18.144981522713678D, model.beta1()); + Assertions.assertEquals(26.01727525194093D, model.beta2()); + Assertions.assertEquals(1732921110, model.checkpointFrequency()); + Assertions.assertEquals("nmzpas", model.checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.checkpointModel().mode()); + Assertions.assertEquals("ujexayglxrk", model.checkpointModel().uri()); + Assertions.assertEquals("vxjfiuofpieidzlv", model.checkpointRunId()); + Assertions.assertFalse(model.distributed()); + Assertions.assertTrue(model.earlyStopping()); + Assertions.assertEquals(1065564623, model.earlyStoppingDelay()); + Assertions.assertEquals(126379166, model.earlyStoppingPatience()); + Assertions.assertTrue(model.enableOnnxNormalization()); + Assertions.assertEquals(942927489, model.evaluationFrequency()); + Assertions.assertEquals(1099737336, model.gradientAccumulationStep()); + Assertions.assertEquals(1270791175, model.layersToFreeze()); + Assertions.assertEquals(89.01452900607406D, model.learningRate()); + Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); + Assertions.assertEquals("millxgjs", model.modelName()); + Assertions.assertEquals(70.24965275674056D, model.momentum()); + Assertions.assertTrue(model.nesterov()); + Assertions.assertEquals(419155521, model.numberOfEpochs()); + Assertions.assertEquals(1244500728, model.numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); + Assertions.assertEquals(1036837095, model.randomSeed()); + Assertions.assertEquals(32.18543702738046D, model.stepLRGamma()); + Assertions.assertEquals(1281723088, model.stepLRStepSize()); + Assertions.assertEquals(375428992, model.trainingBatchSize()); + Assertions.assertEquals(709979842, model.validationBatchSize()); + Assertions.assertEquals(31.67890813397204D, model.warmupCosineLRCycles()); + Assertions.assertEquals(1318748653, model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(98.74404758911166D, model.weightDecay()); + Assertions.assertEquals(2084465727, model.boxDetectionsPerImage()); + Assertions.assertEquals(8.516768052889168D, model.boxScoreThreshold()); + Assertions.assertEquals(1062595906, model.imageSize()); + Assertions.assertEquals(982854972, model.maxSize()); + Assertions.assertEquals(921313773, model.minSize()); Assertions.assertEquals(ModelSize.MEDIUM, model.modelSize()); - Assertions.assertEquals(false, model.multiScale()); - Assertions.assertEquals(73.60141F, model.nmsIouThreshold()); - Assertions.assertEquals("ae", model.tileGridSize()); - Assertions.assertEquals(38.204247F, model.tileOverlapRatio()); - Assertions.assertEquals(50.140213F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(76.77868F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.validationMetricType()); + Assertions.assertTrue(model.multiScale()); + Assertions.assertEquals(41.91918054813249D, model.nmsIouThreshold()); + Assertions.assertEquals("ctwjwdsdlzm", model.tileGridSize()); + Assertions.assertEquals(95.9358885129421D, model.tileOverlapRatio()); + Assertions.assertEquals(6.725203493470023D, model.tilePredictionsNmsThreshold()); + Assertions.assertEquals(31.00904857465978D, model.validationIouThreshold()); + Assertions.assertEquals(ValidationMetricType.COCO, model.validationMetricType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java index d3ac029e49d1..c4c4deb6b4c3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,114 +16,114 @@ public final class ImageModelSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageModelSettings model = BinaryData.fromString( - "{\"amsGradient\":false,\"advancedSettings\":\"bjepzwhj\",\"augmentations\":\"fdgbggcjxzhbl\",\"beta1\":22.508585,\"beta2\":51.947952,\"checkpointFrequency\":1855309521,\"checkpointRunId\":\"ym\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"bhdosmbngkql\",\"mode\":\"ReadWriteMount\",\"description\":\"uvxdmxexatmd\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":307725158,\"earlyStoppingPatience\":1605028001,\"evaluationFrequency\":696774738,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1911706738,\"layersToFreeze\":10967468,\"learningRate\":8.704895,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"kzsoxz\",\"momentum\":17.274517,\"nesterov\":false,\"numberOfEpochs\":401465476,\"numberOfWorkers\":381354685,\"optimizer\":\"Sgd\",\"randomSeed\":1477736921,\"stepLRGamma\":48.98826,\"stepLRStepSize\":960769540,\"trainingBatchSize\":556171799,\"validationBatchSize\":2147008649,\"warmupCosineLRCycles\":63.310665,\"warmupCosineLRWarmupEpochs\":218469091,\"weightDecay\":33.301514}") + "{\"advancedSettings\":\"dueurgmcdcpkshl\",\"amsGradient\":true,\"augmentations\":\"mhzic\",\"beta1\":98.11662140088313,\"beta2\":95.52676968767105,\"checkpointFrequency\":199784469,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"ukib\",\"description\":\"glhphzwx\"},\"checkpointRunId\":\"ejp\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":522573363,\"earlyStoppingPatience\":2141574215,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1856345238,\"gradientAccumulationStep\":1801574011,\"layersToFreeze\":1292384101,\"learningRate\":11.496448359405775,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"gffklvqzr\",\"momentum\":84.751713103338,\"nesterov\":false,\"numberOfEpochs\":1562383997,\"numberOfWorkers\":101692439,\"optimizer\":\"None\",\"randomSeed\":1191515651,\"stepLRGamma\":33.75090860342631,\"stepLRStepSize\":2060856170,\"trainingBatchSize\":1222174556,\"validationBatchSize\":92638660,\"warmupCosineLRCycles\":20.29283124486253,\"warmupCosineLRWarmupEpochs\":535353178,\"weightDecay\":65.68239384613865}") .toObject(ImageModelSettings.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("bjepzwhj", model.advancedSettings()); - Assertions.assertEquals("fdgbggcjxzhbl", model.augmentations()); - Assertions.assertEquals(22.508585F, model.beta1()); - Assertions.assertEquals(51.947952F, model.beta2()); - Assertions.assertEquals(1855309521, model.checkpointFrequency()); - Assertions.assertEquals("ym", model.checkpointRunId()); - Assertions.assertEquals("uvxdmxexatmd", model.checkpointModel().description()); - Assertions.assertEquals("bhdosmbngkql", model.checkpointModel().uri()); + Assertions.assertEquals("dueurgmcdcpkshl", model.advancedSettings()); + Assertions.assertTrue(model.amsGradient()); + Assertions.assertEquals("mhzic", model.augmentations()); + Assertions.assertEquals(98.11662140088313D, model.beta1()); + Assertions.assertEquals(95.52676968767105D, model.beta2()); + Assertions.assertEquals(199784469, model.checkpointFrequency()); + Assertions.assertEquals("glhphzwx", model.checkpointModel().description()); Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(307725158, model.earlyStoppingDelay()); - Assertions.assertEquals(1605028001, model.earlyStoppingPatience()); - Assertions.assertEquals(696774738, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1911706738, model.gradientAccumulationStep()); - Assertions.assertEquals(10967468, model.layersToFreeze()); - Assertions.assertEquals(8.704895F, model.learningRate()); + Assertions.assertEquals("ukib", model.checkpointModel().uri()); + Assertions.assertEquals("ejp", model.checkpointRunId()); + Assertions.assertTrue(model.distributed()); + Assertions.assertFalse(model.earlyStopping()); + Assertions.assertEquals(522573363, model.earlyStoppingDelay()); + Assertions.assertEquals(2141574215, model.earlyStoppingPatience()); + Assertions.assertTrue(model.enableOnnxNormalization()); + Assertions.assertEquals(1856345238, model.evaluationFrequency()); + Assertions.assertEquals(1801574011, model.gradientAccumulationStep()); + Assertions.assertEquals(1292384101, model.layersToFreeze()); + Assertions.assertEquals(11.496448359405775D, model.learningRate()); Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("kzsoxz", model.modelName()); - Assertions.assertEquals(17.274517F, model.momentum()); - Assertions.assertEquals(false, model.nesterov()); - Assertions.assertEquals(401465476, model.numberOfEpochs()); - Assertions.assertEquals(381354685, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); - Assertions.assertEquals(1477736921, model.randomSeed()); - Assertions.assertEquals(48.98826F, model.stepLRGamma()); - Assertions.assertEquals(960769540, model.stepLRStepSize()); - Assertions.assertEquals(556171799, model.trainingBatchSize()); - Assertions.assertEquals(2147008649, model.validationBatchSize()); - Assertions.assertEquals(63.310665F, model.warmupCosineLRCycles()); - Assertions.assertEquals(218469091, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(33.301514F, model.weightDecay()); + Assertions.assertEquals("gffklvqzr", model.modelName()); + Assertions.assertEquals(84.751713103338D, model.momentum()); + Assertions.assertFalse(model.nesterov()); + Assertions.assertEquals(1562383997, model.numberOfEpochs()); + Assertions.assertEquals(101692439, model.numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); + Assertions.assertEquals(1191515651, model.randomSeed()); + Assertions.assertEquals(33.75090860342631D, model.stepLRGamma()); + Assertions.assertEquals(2060856170, model.stepLRStepSize()); + Assertions.assertEquals(1222174556, model.trainingBatchSize()); + Assertions.assertEquals(92638660, model.validationBatchSize()); + Assertions.assertEquals(20.29283124486253D, model.warmupCosineLRCycles()); + Assertions.assertEquals(535353178, model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(65.68239384613865D, model.weightDecay()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageModelSettings model = new ImageModelSettings().withAmsGradient(false) - .withAdvancedSettings("bjepzwhj") - .withAugmentations("fdgbggcjxzhbl") - .withBeta1(22.508585F) - .withBeta2(51.947952F) - .withCheckpointFrequency(1855309521) - .withCheckpointRunId("ym") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("uvxdmxexatmd") - .withUri("bhdosmbngkql") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(307725158) - .withEarlyStoppingPatience(1605028001) - .withEvaluationFrequency(696774738) + ImageModelSettings model = new ImageModelSettings().withAdvancedSettings("dueurgmcdcpkshl") + .withAmsGradient(true) + .withAugmentations("mhzic") + .withBeta1(98.11662140088313D) + .withBeta2(95.52676968767105D) + .withCheckpointFrequency(199784469) + .withCheckpointModel(new MLFlowModelJobInput().withDescription("glhphzwx") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("ukib")) + .withCheckpointRunId("ejp") + .withDistributed(true) + .withEarlyStopping(false) + .withEarlyStoppingDelay(522573363) + .withEarlyStoppingPatience(2141574215) .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1911706738) - .withLayersToFreeze(10967468) - .withLearningRate(8.704895F) + .withEvaluationFrequency(1856345238) + .withGradientAccumulationStep(1801574011) + .withLayersToFreeze(1292384101) + .withLearningRate(11.496448359405775D) .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("kzsoxz") - .withMomentum(17.274517F) + .withModelName("gffklvqzr") + .withMomentum(84.751713103338D) .withNesterov(false) - .withNumberOfEpochs(401465476) - .withNumberOfWorkers(381354685) - .withOptimizer(StochasticOptimizer.SGD) - .withRandomSeed(1477736921) - .withStepLRGamma(48.98826F) - .withStepLRStepSize(960769540) - .withTrainingBatchSize(556171799) - .withValidationBatchSize(2147008649) - .withWarmupCosineLRCycles(63.310665F) - .withWarmupCosineLRWarmupEpochs(218469091) - .withWeightDecay(33.301514F); + .withNumberOfEpochs(1562383997) + .withNumberOfWorkers(101692439) + .withOptimizer(StochasticOptimizer.NONE) + .withRandomSeed(1191515651) + .withStepLRGamma(33.75090860342631D) + .withStepLRStepSize(2060856170) + .withTrainingBatchSize(1222174556) + .withValidationBatchSize(92638660) + .withWarmupCosineLRCycles(20.29283124486253D) + .withWarmupCosineLRWarmupEpochs(535353178) + .withWeightDecay(65.68239384613865D); model = BinaryData.fromObject(model).toObject(ImageModelSettings.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("bjepzwhj", model.advancedSettings()); - Assertions.assertEquals("fdgbggcjxzhbl", model.augmentations()); - Assertions.assertEquals(22.508585F, model.beta1()); - Assertions.assertEquals(51.947952F, model.beta2()); - Assertions.assertEquals(1855309521, model.checkpointFrequency()); - Assertions.assertEquals("ym", model.checkpointRunId()); - Assertions.assertEquals("uvxdmxexatmd", model.checkpointModel().description()); - Assertions.assertEquals("bhdosmbngkql", model.checkpointModel().uri()); + Assertions.assertEquals("dueurgmcdcpkshl", model.advancedSettings()); + Assertions.assertTrue(model.amsGradient()); + Assertions.assertEquals("mhzic", model.augmentations()); + Assertions.assertEquals(98.11662140088313D, model.beta1()); + Assertions.assertEquals(95.52676968767105D, model.beta2()); + Assertions.assertEquals(199784469, model.checkpointFrequency()); + Assertions.assertEquals("glhphzwx", model.checkpointModel().description()); Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(307725158, model.earlyStoppingDelay()); - Assertions.assertEquals(1605028001, model.earlyStoppingPatience()); - Assertions.assertEquals(696774738, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1911706738, model.gradientAccumulationStep()); - Assertions.assertEquals(10967468, model.layersToFreeze()); - Assertions.assertEquals(8.704895F, model.learningRate()); + Assertions.assertEquals("ukib", model.checkpointModel().uri()); + Assertions.assertEquals("ejp", model.checkpointRunId()); + Assertions.assertTrue(model.distributed()); + Assertions.assertFalse(model.earlyStopping()); + Assertions.assertEquals(522573363, model.earlyStoppingDelay()); + Assertions.assertEquals(2141574215, model.earlyStoppingPatience()); + Assertions.assertTrue(model.enableOnnxNormalization()); + Assertions.assertEquals(1856345238, model.evaluationFrequency()); + Assertions.assertEquals(1801574011, model.gradientAccumulationStep()); + Assertions.assertEquals(1292384101, model.layersToFreeze()); + Assertions.assertEquals(11.496448359405775D, model.learningRate()); Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("kzsoxz", model.modelName()); - Assertions.assertEquals(17.274517F, model.momentum()); - Assertions.assertEquals(false, model.nesterov()); - Assertions.assertEquals(401465476, model.numberOfEpochs()); - Assertions.assertEquals(381354685, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); - Assertions.assertEquals(1477736921, model.randomSeed()); - Assertions.assertEquals(48.98826F, model.stepLRGamma()); - Assertions.assertEquals(960769540, model.stepLRStepSize()); - Assertions.assertEquals(556171799, model.trainingBatchSize()); - Assertions.assertEquals(2147008649, model.validationBatchSize()); - Assertions.assertEquals(63.310665F, model.warmupCosineLRCycles()); - Assertions.assertEquals(218469091, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(33.301514F, model.weightDecay()); + Assertions.assertEquals("gffklvqzr", model.modelName()); + Assertions.assertEquals(84.751713103338D, model.momentum()); + Assertions.assertFalse(model.nesterov()); + Assertions.assertEquals(1562383997, model.numberOfEpochs()); + Assertions.assertEquals(101692439, model.numberOfWorkers()); + Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); + Assertions.assertEquals(1191515651, model.randomSeed()); + Assertions.assertEquals(33.75090860342631D, model.stepLRGamma()); + Assertions.assertEquals(2060856170, model.stepLRStepSize()); + Assertions.assertEquals(1222174556, model.trainingBatchSize()); + Assertions.assertEquals(92638660, model.validationBatchSize()); + Assertions.assertEquals(20.29283124486253D, model.warmupCosineLRCycles()); + Assertions.assertEquals(535353178, model.warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(65.68239384613865D, model.weightDecay()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java deleted file mode 100644 index 50659c8622c7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageObjectDetectionBase; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageObjectDetectionBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageObjectDetectionBase model = BinaryData.fromString( - "{\"modelSettings\":{\"boxDetectionsPerImage\":1628267631,\"boxScoreThreshold\":29.993313,\"imageSize\":1142675426,\"maxSize\":926269302,\"minSize\":1191635799,\"modelSize\":\"ExtraLarge\",\"multiScale\":false,\"nmsIouThreshold\":32.659657,\"tileGridSize\":\"taxjucltjlxsgce\",\"tileOverlapRatio\":78.93754,\"tilePredictionsNmsThreshold\":16.3262,\"validationIouThreshold\":95.671394,\"validationMetricType\":\"Voc\",\"amsGradient\":false,\"advancedSettings\":\"vfjyzufldif\",\"augmentations\":\"vlutggmaacxauhv\",\"beta1\":26.423735,\"beta2\":35.01808,\"checkpointFrequency\":79908941,\"checkpointRunId\":\"qxtoiyygktsrjyxx\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"wfzbkve\",\"mode\":\"ReadWriteMount\",\"description\":\"xphsowbe\"},\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1870801520,\"earlyStoppingPatience\":1858531947,\"evaluationFrequency\":500672005,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1493541388,\"layersToFreeze\":1056931812,\"learningRate\":71.24121,\"learningRateScheduler\":\"Step\",\"modelName\":\"rafjajvkyxmm\",\"momentum\":42.656822,\"nesterov\":false,\"numberOfEpochs\":1801731269,\"numberOfWorkers\":1139337478,\"optimizer\":\"None\",\"randomSeed\":1799945532,\"stepLRGamma\":31.64695,\"stepLRStepSize\":762243556,\"trainingBatchSize\":250358057,\"validationBatchSize\":403241529,\"warmupCosineLRCycles\":45.694794,\"warmupCosineLRWarmupEpochs\":459919584,\"weightDecay\":87.26493},\"searchSpace\":[{\"boxDetectionsPerImage\":\"yphfxnrpdh\",\"boxScoreThreshold\":\"okyqsfkxfsy\",\"imageSize\":\"ihqbtod\",\"maxSize\":\"yxbvkvwzdmv\",\"minSize\":\"qwcrugyo\",\"modelSize\":\"za\",\"multiScale\":\"jdvvlrhocr\",\"nmsIouThreshold\":\"vxundqzbvbps\",\"tileGridSize\":\"qhxtozfgdkwbkur\",\"tileOverlapRatio\":\"piigf\",\"tilePredictionsNmsThreshold\":\"keutuipjclzjwaq\",\"validationIouThreshold\":\"qydewuwxyllz\",\"validationMetricType\":\"evt\",\"amsGradient\":\"wczochw\",\"augmentations\":\"k\",\"beta1\":\"ynfpkyvnhiysdho\",\"beta2\":\"slhraqkiwlwkff\",\"distributed\":\"qwmwqoguflteat\",\"earlyStopping\":\"gefzj\",\"earlyStoppingDelay\":\"jtqbgysi\",\"earlyStoppingPatience\":\"hnvxwtd\",\"evaluationFrequency\":\"cbjdbtqy\",\"enableOnnxNormalization\":\"xu\",\"gradientAccumulationStep\":\"aujqgbbjv\",\"layersToFreeze\":\"oawh\",\"learningRate\":\"smbcsloygsab\",\"learningRateScheduler\":\"d\",\"modelName\":\"ronsdunr\",\"momentum\":\"vz\",\"nesterov\":\"tqhgz\",\"numberOfEpochs\":\"xtrvfdbqs\",\"numberOfWorkers\":\"qjbvitptpvsffa\",\"optimizer\":\"hpiwrmu\",\"randomSeed\":\"gjw\",\"stepLRGamma\":\"fdwfbwxy\",\"stepLRStepSize\":\"qtmg\",\"trainingBatchSize\":\"pdrmegajr\",\"validationBatchSize\":\"twymzs\",\"warmupCosineLRCycles\":\"qkkge\",\"warmupCosineLRWarmupEpochs\":\"iphgli\",\"weightDecay\":\"qsco\"},{\"boxDetectionsPerImage\":\"kj\",\"boxScoreThreshold\":\"axsqcomji\",\"imageSize\":\"incev\",\"maxSize\":\"kdevpximzii\",\"minSize\":\"eqmduvtvodqxxpqh\",\"modelSize\":\"qibtblmc\",\"multiScale\":\"j\",\"nmsIouThreshold\":\"notdofqvpbqsdqk\",\"tileGridSize\":\"bqsbbmitaf\",\"tileOverlapRatio\":\"zgcxsvqlcquf\",\"tilePredictionsNmsThreshold\":\"amxo\",\"validationIouThreshold\":\"gc\",\"validationMetricType\":\"yutehlkarvtipquk\",\"amsGradient\":\"iknsgo\",\"augmentations\":\"nswhpcek\",\"beta1\":\"vmfnnbbxn\",\"beta2\":\"fkk\",\"distributed\":\"eetxtpwcv\",\"earlyStopping\":\"fwsunjzijaciwmm\",\"earlyStoppingDelay\":\"tqdonbzzs\",\"earlyStoppingPatience\":\"zyviiwsu\",\"evaluationFrequency\":\"zhw\",\"enableOnnxNormalization\":\"uifkzqqhb\",\"gradientAccumulationStep\":\"loilmkfbeo\",\"layersToFreeze\":\"pjpngvyvuo\",\"learningRate\":\"dlpsx\",\"learningRateScheduler\":\"ugfw\",\"modelName\":\"qn\",\"momentum\":\"clo\",\"nesterov\":\"mvswxvjeleif\",\"numberOfEpochs\":\"d\",\"numberOfWorkers\":\"wwulkrybpaevy\",\"optimizer\":\"yjecrqkwakkch\",\"randomSeed\":\"oulborcxuibsdqbd\",\"stepLRGamma\":\"lp\",\"stepLRStepSize\":\"t\",\"trainingBatchSize\":\"wpgweoqhbj\",\"validationBatchSize\":\"qfbleruf\",\"warmupCosineLRCycles\":\"lcshjucihbym\",\"warmupCosineLRWarmupEpochs\":\"vtpnerxvje\",\"weightDecay\":\"ra\"},{\"boxDetectionsPerImage\":\"lhbimyii\",\"boxScoreThreshold\":\"a\",\"imageSize\":\"thtpqgfzdosi\",\"maxSize\":\"d\",\"minSize\":\"vflgzhc\",\"modelSize\":\"gwahcrxo\",\"multiScale\":\"rutvnpccxz\",\"nmsIouThreshold\":\"xpmhzghhhk\",\"tileGridSize\":\"njdtujqzvhnj\",\"tileOverlapRatio\":\"mxnhtm\",\"tilePredictionsNmsThreshold\":\"tqlfxolrwvtl\",\"validationIouThreshold\":\"yfjswequf\",\"validationMetricType\":\"yyopoaytwwgw\",\"amsGradient\":\"b\",\"augmentations\":\"bvufrkwjiemimdtn\",\"beta1\":\"wew\",\"beta2\":\"kreeeddd\",\"distributed\":\"tfquu\",\"earlyStopping\":\"clhsiigeeuw\",\"earlyStoppingDelay\":\"nqyxfedq\",\"earlyStoppingPatience\":\"tdqwynxo\",\"evaluationFrequency\":\"vbzpggpwme\",\"enableOnnxNormalization\":\"bqajejir\",\"gradientAccumulationStep\":\"vrvkgpogplb\",\"layersToFreeze\":\"vlnhx\",\"learningRate\":\"njhina\",\"learningRateScheduler\":\"esbxnepqmjmoplu\",\"modelName\":\"ykkfhsovadkrm\",\"momentum\":\"mwqpdkesjqbzkqm\",\"nesterov\":\"poriwbwggijtspzj\",\"numberOfEpochs\":\"rhikwsbzrhdug\",\"numberOfWorkers\":\"htrgz\",\"optimizer\":\"unjf\",\"randomSeed\":\"jhiycbauseqnczk\",\"stepLRGamma\":\"hvtuwyjsqwzsz\",\"stepLRStepSize\":\"zjg\",\"trainingBatchSize\":\"nkfnyskwwunq\",\"validationBatchSize\":\"za\",\"warmupCosineLRCycles\":\"jmslhi\",\"warmupCosineLRWarmupEpochs\":\"ukvbljpxpr\",\"weightDecay\":\"chyluqa\"},{\"boxDetectionsPerImage\":\"cufjjfxt\",\"boxScoreThreshold\":\"tqdstahhhsa\",\"imageSize\":\"xsri\",\"maxSize\":\"cw\",\"minSize\":\"aesyyefm\",\"modelSize\":\"oqotiiqbgpasrv\",\"multiScale\":\"tistyikjhorlx\",\"nmsIouThreshold\":\"ypk\",\"tileGridSize\":\"nycntr\",\"tileOverlapRatio\":\"xwtdmbqjtsuhqh\",\"tilePredictionsNmsThreshold\":\"xtdyqavfxbqmzxsy\",\"validationIouThreshold\":\"sinpaamihwbghvw\",\"validationMetricType\":\"pbgchcgsfzhb\",\"amsGradient\":\"iys\",\"augmentations\":\"jsdjpg\",\"beta1\":\"ysgwkcfferznzcbi\",\"beta2\":\"veomkhfeqc\",\"distributed\":\"plfpohimgckycjp\",\"earlyStopping\":\"b\",\"earlyStoppingDelay\":\"bznxsuloutnpbm\",\"earlyStoppingPatience\":\"oqohgp\",\"evaluationFrequency\":\"dmwk\",\"enableOnnxNormalization\":\"pfhsldqdza\",\"gradientAccumulationStep\":\"unye\",\"layersToFreeze\":\"yzdsytcikswhcam\",\"learningRate\":\"y\",\"learningRateScheduler\":\"xkcgsfcmvhadr\",\"modelName\":\"atvyrkljqkqws\",\"momentum\":\"tvjkowggxawwdm\",\"nesterov\":\"pnkteiidlbovwb\",\"numberOfEpochs\":\"prgeg\",\"numberOfWorkers\":\"ihkjcnerekyjuls\",\"optimizer\":\"wnqhqlqgpwxtvc\",\"randomSeed\":\"avv\",\"stepLRGamma\":\"xwvegenlrj\",\"stepLRStepSize\":\"mwevguyflnxel\",\"trainingBatchSize\":\"kfzcdetowwezhy\",\"validationBatchSize\":\"di\",\"warmupCosineLRCycles\":\"wqlqacs\",\"warmupCosineLRWarmupEpochs\":\"birtybcelfjn\",\"weightDecay\":\"dnjyhzfax\"}],\"limitSettings\":{\"maxTrials\":2124800129,\"timeout\":\"PT94H33M13S\",\"maxConcurrentTrials\":1476171773},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":334216826,\"delayEvaluation\":297072472}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"xsorchazr\",\"mode\":\"Download\",\"description\":\"yhl\"},\"validationDataSize\":53.57251340621531}") - .toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(2124800129, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT94H33M13S"), model.limitSettings().timeout()); - Assertions.assertEquals(1476171773, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(334216826, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(297072472, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("yhl", model.validationData().description()); - Assertions.assertEquals("xsorchazr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(53.57251340621531D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vfjyzufldif", model.modelSettings().advancedSettings()); - Assertions.assertEquals("vlutggmaacxauhv", model.modelSettings().augmentations()); - Assertions.assertEquals(26.423735F, model.modelSettings().beta1()); - Assertions.assertEquals(35.01808F, model.modelSettings().beta2()); - Assertions.assertEquals(79908941, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qxtoiyygktsrjyxx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("xphsowbe", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("wfzbkve", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1870801520, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1858531947, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(500672005, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1493541388, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1056931812, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(71.24121F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("rafjajvkyxmm", model.modelSettings().modelName()); - Assertions.assertEquals(42.656822F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1801731269, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1139337478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1799945532, model.modelSettings().randomSeed()); - Assertions.assertEquals(31.64695F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(762243556, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(250358057, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(403241529, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(45.694794F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(459919584, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.26493F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1628267631, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(29.993313F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1142675426, model.modelSettings().imageSize()); - Assertions.assertEquals(926269302, model.modelSettings().maxSize()); - Assertions.assertEquals(1191635799, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(32.659657F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("taxjucltjlxsgce", model.modelSettings().tileGridSize()); - Assertions.assertEquals(78.93754F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(16.3262F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(95.671394F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("wczochw", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("k", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ynfpkyvnhiysdho", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("slhraqkiwlwkff", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("qwmwqoguflteat", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("gefzj", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("jtqbgysi", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("hnvxwtd", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("cbjdbtqy", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("xu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("aujqgbbjv", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("oawh", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("smbcsloygsab", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("d", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ronsdunr", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("vz", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("tqhgz", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("xtrvfdbqs", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjbvitptpvsffa", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("hpiwrmu", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("gjw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("fdwfbwxy", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("qtmg", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("pdrmegajr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("twymzs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qkkge", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("iphgli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("qsco", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("yphfxnrpdh", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("okyqsfkxfsy", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("ihqbtod", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("yxbvkvwzdmv", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("qwcrugyo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("za", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("jdvvlrhocr", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vxundqzbvbps", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qhxtozfgdkwbkur", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("piigf", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("keutuipjclzjwaq", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("qydewuwxyllz", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("evt", model.searchSpace().get(0).validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetectionBase model = new ImageObjectDetectionBase() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2124800129) - .withTimeout(Duration.parse("PT94H33M13S")) - .withMaxConcurrentTrials(1476171773)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(334216826).withDelayEvaluation(297072472))) - .withValidationData( - new MLTableJobInput().withDescription("yhl").withUri("xsorchazr").withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(53.57251340621531D) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("vfjyzufldif") - .withAugmentations("vlutggmaacxauhv") - .withBeta1(26.423735F) - .withBeta2(35.01808F) - .withCheckpointFrequency(79908941) - .withCheckpointRunId("qxtoiyygktsrjyxx") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("xphsowbe") - .withUri("wfzbkve") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1870801520) - .withEarlyStoppingPatience(1858531947) - .withEvaluationFrequency(500672005) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1493541388) - .withLayersToFreeze(1056931812) - .withLearningRate(71.24121F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("rafjajvkyxmm") - .withMomentum(42.656822F) - .withNesterov(false) - .withNumberOfEpochs(1801731269) - .withNumberOfWorkers(1139337478) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1799945532) - .withStepLRGamma(31.64695F) - .withStepLRStepSize(762243556) - .withTrainingBatchSize(250358057) - .withValidationBatchSize(403241529) - .withWarmupCosineLRCycles(45.694794F) - .withWarmupCosineLRWarmupEpochs(459919584) - .withWeightDecay(87.26493F) - .withBoxDetectionsPerImage(1628267631) - .withBoxScoreThreshold(29.993313F) - .withImageSize(1142675426) - .withMaxSize(926269302) - .withMinSize(1191635799) - .withModelSize(ModelSize.EXTRA_LARGE) - .withMultiScale(false) - .withNmsIouThreshold(32.659657F) - .withTileGridSize("taxjucltjlxsgce") - .withTileOverlapRatio(78.93754F) - .withTilePredictionsNmsThreshold(16.3262F) - .withValidationIouThreshold(95.671394F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("wczochw") - .withAugmentations("k") - .withBeta1("ynfpkyvnhiysdho") - .withBeta2("slhraqkiwlwkff") - .withDistributed("qwmwqoguflteat") - .withEarlyStopping("gefzj") - .withEarlyStoppingDelay("jtqbgysi") - .withEarlyStoppingPatience("hnvxwtd") - .withEvaluationFrequency("cbjdbtqy") - .withEnableOnnxNormalization("xu") - .withGradientAccumulationStep("aujqgbbjv") - .withLayersToFreeze("oawh") - .withLearningRate("smbcsloygsab") - .withLearningRateScheduler("d") - .withModelName("ronsdunr") - .withMomentum("vz") - .withNesterov("tqhgz") - .withNumberOfEpochs("xtrvfdbqs") - .withNumberOfWorkers("qjbvitptpvsffa") - .withOptimizer("hpiwrmu") - .withRandomSeed("gjw") - .withStepLRGamma("fdwfbwxy") - .withStepLRStepSize("qtmg") - .withTrainingBatchSize("pdrmegajr") - .withValidationBatchSize("twymzs") - .withWarmupCosineLRCycles("qkkge") - .withWarmupCosineLRWarmupEpochs("iphgli") - .withWeightDecay("qsco") - .withBoxDetectionsPerImage("yphfxnrpdh") - .withBoxScoreThreshold("okyqsfkxfsy") - .withImageSize("ihqbtod") - .withMaxSize("yxbvkvwzdmv") - .withMinSize("qwcrugyo") - .withModelSize("za") - .withMultiScale("jdvvlrhocr") - .withNmsIouThreshold("vxundqzbvbps") - .withTileGridSize("qhxtozfgdkwbkur") - .withTileOverlapRatio("piigf") - .withTilePredictionsNmsThreshold("keutuipjclzjwaq") - .withValidationIouThreshold("qydewuwxyllz") - .withValidationMetricType("evt"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("iknsgo") - .withAugmentations("nswhpcek") - .withBeta1("vmfnnbbxn") - .withBeta2("fkk") - .withDistributed("eetxtpwcv") - .withEarlyStopping("fwsunjzijaciwmm") - .withEarlyStoppingDelay("tqdonbzzs") - .withEarlyStoppingPatience("zyviiwsu") - .withEvaluationFrequency("zhw") - .withEnableOnnxNormalization("uifkzqqhb") - .withGradientAccumulationStep("loilmkfbeo") - .withLayersToFreeze("pjpngvyvuo") - .withLearningRate("dlpsx") - .withLearningRateScheduler("ugfw") - .withModelName("qn") - .withMomentum("clo") - .withNesterov("mvswxvjeleif") - .withNumberOfEpochs("d") - .withNumberOfWorkers("wwulkrybpaevy") - .withOptimizer("yjecrqkwakkch") - .withRandomSeed("oulborcxuibsdqbd") - .withStepLRGamma("lp") - .withStepLRStepSize("t") - .withTrainingBatchSize("wpgweoqhbj") - .withValidationBatchSize("qfbleruf") - .withWarmupCosineLRCycles("lcshjucihbym") - .withWarmupCosineLRWarmupEpochs("vtpnerxvje") - .withWeightDecay("ra") - .withBoxDetectionsPerImage("kj") - .withBoxScoreThreshold("axsqcomji") - .withImageSize("incev") - .withMaxSize("kdevpximzii") - .withMinSize("eqmduvtvodqxxpqh") - .withModelSize("qibtblmc") - .withMultiScale("j") - .withNmsIouThreshold("notdofqvpbqsdqk") - .withTileGridSize("bqsbbmitaf") - .withTileOverlapRatio("zgcxsvqlcquf") - .withTilePredictionsNmsThreshold("amxo") - .withValidationIouThreshold("gc") - .withValidationMetricType("yutehlkarvtipquk"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("b") - .withAugmentations("bvufrkwjiemimdtn") - .withBeta1("wew") - .withBeta2("kreeeddd") - .withDistributed("tfquu") - .withEarlyStopping("clhsiigeeuw") - .withEarlyStoppingDelay("nqyxfedq") - .withEarlyStoppingPatience("tdqwynxo") - .withEvaluationFrequency("vbzpggpwme") - .withEnableOnnxNormalization("bqajejir") - .withGradientAccumulationStep("vrvkgpogplb") - .withLayersToFreeze("vlnhx") - .withLearningRate("njhina") - .withLearningRateScheduler("esbxnepqmjmoplu") - .withModelName("ykkfhsovadkrm") - .withMomentum("mwqpdkesjqbzkqm") - .withNesterov("poriwbwggijtspzj") - .withNumberOfEpochs("rhikwsbzrhdug") - .withNumberOfWorkers("htrgz") - .withOptimizer("unjf") - .withRandomSeed("jhiycbauseqnczk") - .withStepLRGamma("hvtuwyjsqwzsz") - .withStepLRStepSize("zjg") - .withTrainingBatchSize("nkfnyskwwunq") - .withValidationBatchSize("za") - .withWarmupCosineLRCycles("jmslhi") - .withWarmupCosineLRWarmupEpochs("ukvbljpxpr") - .withWeightDecay("chyluqa") - .withBoxDetectionsPerImage("lhbimyii") - .withBoxScoreThreshold("a") - .withImageSize("thtpqgfzdosi") - .withMaxSize("d") - .withMinSize("vflgzhc") - .withModelSize("gwahcrxo") - .withMultiScale("rutvnpccxz") - .withNmsIouThreshold("xpmhzghhhk") - .withTileGridSize("njdtujqzvhnj") - .withTileOverlapRatio("mxnhtm") - .withTilePredictionsNmsThreshold("tqlfxolrwvtl") - .withValidationIouThreshold("yfjswequf") - .withValidationMetricType("yyopoaytwwgw"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("iys") - .withAugmentations("jsdjpg") - .withBeta1("ysgwkcfferznzcbi") - .withBeta2("veomkhfeqc") - .withDistributed("plfpohimgckycjp") - .withEarlyStopping("b") - .withEarlyStoppingDelay("bznxsuloutnpbm") - .withEarlyStoppingPatience("oqohgp") - .withEvaluationFrequency("dmwk") - .withEnableOnnxNormalization("pfhsldqdza") - .withGradientAccumulationStep("unye") - .withLayersToFreeze("yzdsytcikswhcam") - .withLearningRate("y") - .withLearningRateScheduler("xkcgsfcmvhadr") - .withModelName("atvyrkljqkqws") - .withMomentum("tvjkowggxawwdm") - .withNesterov("pnkteiidlbovwb") - .withNumberOfEpochs("prgeg") - .withNumberOfWorkers("ihkjcnerekyjuls") - .withOptimizer("wnqhqlqgpwxtvc") - .withRandomSeed("avv") - .withStepLRGamma("xwvegenlrj") - .withStepLRStepSize("mwevguyflnxel") - .withTrainingBatchSize("kfzcdetowwezhy") - .withValidationBatchSize("di") - .withWarmupCosineLRCycles("wqlqacs") - .withWarmupCosineLRWarmupEpochs("birtybcelfjn") - .withWeightDecay("dnjyhzfax") - .withBoxDetectionsPerImage("cufjjfxt") - .withBoxScoreThreshold("tqdstahhhsa") - .withImageSize("xsri") - .withMaxSize("cw") - .withMinSize("aesyyefm") - .withModelSize("oqotiiqbgpasrv") - .withMultiScale("tistyikjhorlx") - .withNmsIouThreshold("ypk") - .withTileGridSize("nycntr") - .withTileOverlapRatio("xwtdmbqjtsuhqh") - .withTilePredictionsNmsThreshold("xtdyqavfxbqmzxsy") - .withValidationIouThreshold("sinpaamihwbghvw") - .withValidationMetricType("pbgchcgsfzhb"))); - model = BinaryData.fromObject(model).toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(2124800129, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT94H33M13S"), model.limitSettings().timeout()); - Assertions.assertEquals(1476171773, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(334216826, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(297072472, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("yhl", model.validationData().description()); - Assertions.assertEquals("xsorchazr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(53.57251340621531D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vfjyzufldif", model.modelSettings().advancedSettings()); - Assertions.assertEquals("vlutggmaacxauhv", model.modelSettings().augmentations()); - Assertions.assertEquals(26.423735F, model.modelSettings().beta1()); - Assertions.assertEquals(35.01808F, model.modelSettings().beta2()); - Assertions.assertEquals(79908941, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qxtoiyygktsrjyxx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("xphsowbe", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("wfzbkve", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1870801520, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1858531947, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(500672005, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1493541388, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1056931812, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(71.24121F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("rafjajvkyxmm", model.modelSettings().modelName()); - Assertions.assertEquals(42.656822F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1801731269, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1139337478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1799945532, model.modelSettings().randomSeed()); - Assertions.assertEquals(31.64695F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(762243556, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(250358057, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(403241529, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(45.694794F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(459919584, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.26493F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1628267631, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(29.993313F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1142675426, model.modelSettings().imageSize()); - Assertions.assertEquals(926269302, model.modelSettings().maxSize()); - Assertions.assertEquals(1191635799, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(32.659657F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("taxjucltjlxsgce", model.modelSettings().tileGridSize()); - Assertions.assertEquals(78.93754F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(16.3262F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(95.671394F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("wczochw", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("k", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ynfpkyvnhiysdho", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("slhraqkiwlwkff", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("qwmwqoguflteat", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("gefzj", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("jtqbgysi", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("hnvxwtd", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("cbjdbtqy", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("xu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("aujqgbbjv", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("oawh", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("smbcsloygsab", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("d", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ronsdunr", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("vz", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("tqhgz", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("xtrvfdbqs", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjbvitptpvsffa", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("hpiwrmu", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("gjw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("fdwfbwxy", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("qtmg", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("pdrmegajr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("twymzs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qkkge", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("iphgli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("qsco", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("yphfxnrpdh", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("okyqsfkxfsy", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("ihqbtod", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("yxbvkvwzdmv", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("qwcrugyo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("za", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("jdvvlrhocr", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vxundqzbvbps", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qhxtozfgdkwbkur", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("piigf", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("keutuipjclzjwaq", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("qydewuwxyllz", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("evt", model.searchSpace().get(0).validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java index 79f5b7f4eca3..2af56b3109ce 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -29,325 +29,367 @@ public final class ImageObjectDetectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageObjectDetection model = BinaryData.fromString( - "{\"taskType\":\"ImageObjectDetection\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":710248775,\"boxScoreThreshold\":35.895603,\"imageSize\":422240348,\"maxSize\":1978252606,\"minSize\":623951562,\"modelSize\":\"ExtraLarge\",\"multiScale\":false,\"nmsIouThreshold\":78.472176,\"tileGridSize\":\"sfhshag\",\"tileOverlapRatio\":60.31503,\"tilePredictionsNmsThreshold\":40.6852,\"validationIouThreshold\":80.38389,\"validationMetricType\":\"Voc\",\"amsGradient\":true,\"advancedSettings\":\"ynpmggqgagen\",\"augmentations\":\"bugihcdvfo\",\"beta1\":78.53713,\"beta2\":79.4358,\"checkpointFrequency\":2145428842,\"checkpointRunId\":\"jzsaxzgkqwvde\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"jnaphifk\",\"mode\":\"EvalDownload\",\"description\":\"p\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":567285474,\"earlyStoppingPatience\":2035748937,\"evaluationFrequency\":1219115371,\"enableOnnxNormalization\":false,\"gradientAccumulationStep\":1955623996,\"layersToFreeze\":38012767,\"learningRate\":98.00021,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"mskhnkkhbyk\",\"momentum\":82.803696,\"nesterov\":true,\"numberOfEpochs\":1727395180,\"numberOfWorkers\":625230069,\"optimizer\":\"Adam\",\"randomSeed\":870078306,\"stepLRGamma\":37.18851,\"stepLRStepSize\":386873853,\"trainingBatchSize\":1358303870,\"validationBatchSize\":312601450,\"warmupCosineLRCycles\":42.782837,\"warmupCosineLRWarmupEpochs\":1409319523,\"weightDecay\":78.56785},\"searchSpace\":[{\"boxDetectionsPerImage\":\"fuzzlapy\",\"boxScoreThreshold\":\"lvzcgulae\",\"imageSize\":\"iauqsuptessjlw\",\"maxSize\":\"atpvbl\",\"minSize\":\"xgxqayga\",\"modelSize\":\"kvc\",\"multiScale\":\"pvlcjbvyez\",\"nmsIouThreshold\":\"jkqonbw\",\"tileGridSize\":\"ieyozvrcwfpucwnb\",\"tileOverlapRatio\":\"qefgzjvbx\",\"tilePredictionsNmsThreshold\":\"bg\",\"validationIouThreshold\":\"rx\",\"validationMetricType\":\"uc\",\"amsGradient\":\"gvkdlhuduk\",\"augmentations\":\"joafm\",\"beta1\":\"exulvoepknarseia\",\"beta2\":\"sqoacb\",\"distributed\":\"dgsapleqfg\",\"earlyStopping\":\"env\",\"earlyStoppingDelay\":\"glvyakeszsuuvul\",\"earlyStoppingPatience\":\"cwgg\",\"evaluationFrequency\":\"xvlqgfbrve\",\"enableOnnxNormalization\":\"c\",\"gradientAccumulationStep\":\"vphirlzbip\",\"layersToFreeze\":\"nnepkwzzzku\",\"learningRate\":\"uwcjomip\",\"learningRateScheduler\":\"kaujttwykoxv\",\"modelName\":\"ofxxdplrelfk\",\"momentum\":\"ahcbtuxlbp\",\"nesterov\":\"hrfjenrazwefiktl\",\"numberOfEpochs\":\"ashtostjixyzseci\",\"numberOfWorkers\":\"zdwjtacfvvtdpcbp\",\"optimizer\":\"omcsaugbrhfiwltk\",\"randomSeed\":\"su\",\"stepLRGamma\":\"ethklxwhcv\",\"stepLRStepSize\":\"yyhgqokjbmsr\",\"trainingBatchSize\":\"xyxxhwr\",\"validationBatchSize\":\"omaqsyilpzzb\",\"warmupCosineLRCycles\":\"nrz\",\"warmupCosineLRWarmupEpochs\":\"sxagysokli\",\"weightDecay\":\"s\"}],\"limitSettings\":{\"maxTrials\":1698205031,\"timeout\":\"PT29H19M17S\",\"maxConcurrentTrials\":716194367},\"sweepSettings\":{\"samplingAlgorithm\":\"Random\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1409785,\"delayEvaluation\":962981411}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"cydyllmxv\",\"mode\":\"Download\",\"description\":\"zsyqagqllcbrvaid\"},\"validationDataSize\":69.76448748367842,\"logVerbosity\":\"Critical\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"rrqwfyybpt\",\"mode\":\"EvalDownload\",\"description\":\"nogykugdla\"},\"targetColumnName\":\"avgthkslge\"}") + "{\"taskType\":\"ImageObjectDetection\",\"modelSettings\":{\"boxDetectionsPerImage\":737508880,\"boxScoreThreshold\":22.056047562842874,\"imageSize\":1609678005,\"maxSize\":2042955583,\"minSize\":1547425574,\"modelSize\":\"ExtraLarge\",\"multiScale\":false,\"nmsIouThreshold\":7.8074372715565605,\"tileGridSize\":\"dfedsb\",\"tileOverlapRatio\":93.45227580067048,\"tilePredictionsNmsThreshold\":92.117998222726,\"validationIouThreshold\":67.32875296372481,\"validationMetricType\":\"CocoVoc\",\"advancedSettings\":\"cqidkltvdhqnufbx\",\"amsGradient\":false,\"augmentations\":\"bntojovfny\",\"beta1\":90.33199262991735,\"beta2\":67.54268988923069,\"checkpointFrequency\":576344420,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"ReadOnlyMount\",\"uri\":\"dhuaorhjk\",\"description\":\"wvumosqircamqprl\"},\"checkpointRunId\":\"rugejcvjkjy\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":578883268,\"earlyStoppingPatience\":1331253492,\"enableOnnxNormalization\":false,\"evaluationFrequency\":340282419,\"gradientAccumulationStep\":205381412,\"layersToFreeze\":703900959,\"learningRate\":88.90730583323922,\"learningRateScheduler\":\"None\",\"modelName\":\"zsizzhra\",\"momentum\":6.228835392523502,\"nesterov\":true,\"numberOfEpochs\":407184360,\"numberOfWorkers\":728379640,\"optimizer\":\"Adam\",\"randomSeed\":323091292,\"stepLRGamma\":29.163712972251034,\"stepLRStepSize\":1913452551,\"trainingBatchSize\":659472474,\"validationBatchSize\":403804723,\"warmupCosineLRCycles\":38.51223304483683,\"warmupCosineLRWarmupEpochs\":262615913,\"weightDecay\":41.60768761575358},\"searchSpace\":[{\"boxDetectionsPerImage\":\"rhnpupkcbkf\",\"boxScoreThreshold\":\"dljqnvt\",\"imageSize\":\"ydsh\",\"maxSize\":\"afyalo\",\"minSize\":\"wz\",\"modelSize\":\"znyufpqzs\",\"multiScale\":\"fgufyjfdkqiy\",\"nmsIouThreshold\":\"djokgwesym\",\"tileGridSize\":\"hrqpfzl\",\"tileOverlapRatio\":\"j\",\"tilePredictionsNmsThreshold\":\"nxlue\",\"validationIouThreshold\":\"jqbbgsimwejlw\",\"validationMetricType\":\"bpjzobdwbcpraswk\",\"amsGradient\":\"ydtnaczkfwfatgaw\",\"augmentations\":\"nskivdwgt\",\"beta1\":\"umecsaaq\",\"beta2\":\"qbdiuycsbskowkr\",\"distributed\":\"zhrbkhtmqo\",\"earlyStopping\":\"uasfgqgucyhfaimq\",\"earlyStoppingDelay\":\"ruozkgyfp\",\"earlyStoppingPatience\":\"e\",\"enableOnnxNormalization\":\"fm\",\"evaluationFrequency\":\"sk\",\"gradientAccumulationStep\":\"xvlzjxplhpevasyn\",\"layersToFreeze\":\"zjyielbqrvv\",\"learningRate\":\"vknmpecqxgiqas\",\"learningRateScheduler\":\"ubnsnstlpwq\",\"modelName\":\"nxjkhtupsvyouw\",\"momentum\":\"iyxfwkztsmsfbevy\",\"nesterov\":\"znfhkqytk\",\"numberOfEpochs\":\"adopgfzdgjfc\",\"numberOfWorkers\":\"rsvloy\",\"optimizer\":\"igqkzjuqwqa\",\"randomSeed\":\"uzxp\",\"stepLRGamma\":\"hyoipnfdbgso\",\"stepLRStepSize\":\"ienezf\",\"trainingBatchSize\":\"ennmf\",\"validationBatchSize\":\"pjnrtekwwnthro\",\"warmupCosineLRCycles\":\"dudsyiurztvktj\",\"warmupCosineLRWarmupEpochs\":\"fecqkoqyouerga\",\"weightDecay\":\"puzxkpyehhfdyldh\"},{\"boxDetectionsPerImage\":\"edzfzqiyuqhtdere\",\"boxScoreThreshold\":\"oka\",\"imageSize\":\"whpjlw\",\"maxSize\":\"edznmxrfomckewv\",\"minSize\":\"ifopxfjjtpdyz\",\"modelSize\":\"txfp\",\"multiScale\":\"fhgnuywezygv\",\"nmsIouThreshold\":\"gaaqw\",\"tileGridSize\":\"gjpytpmpvdnogehl\",\"tileOverlapRatio\":\"b\",\"tilePredictionsNmsThreshold\":\"tbnukkfaxz\",\"validationIouThreshold\":\"bx\",\"validationMetricType\":\"jisskob\",\"amsGradient\":\"clflioe\",\"augmentations\":\"hxessmvrk\",\"beta1\":\"sqeq\",\"beta2\":\"dxmdses\",\"distributed\":\"ujbjppp\",\"earlyStopping\":\"lpdib\",\"earlyStoppingDelay\":\"th\",\"earlyStoppingPatience\":\"at\",\"enableOnnxNormalization\":\"jrnm\",\"evaluationFrequency\":\"zqpl\",\"gradientAccumulationStep\":\"kihonik\",\"layersToFreeze\":\"r\",\"learningRate\":\"ffjilzfbpnt\",\"learningRateScheduler\":\"kensckh\",\"modelName\":\"carmoyfx\",\"momentum\":\"wykuqdnd\",\"nesterov\":\"ykhkg\",\"numberOfEpochs\":\"pvd\",\"numberOfWorkers\":\"fpeerscdxrnr\",\"optimizer\":\"rcufmbgacnrgfdtn\",\"randomSeed\":\"spsanmameubkq\",\"stepLRGamma\":\"mlf\",\"stepLRStepSize\":\"lqcskkqjmxptueip\",\"trainingBatchSize\":\"gkwdr\",\"validationBatchSize\":\"rpahuuonjkkxuk\",\"warmupCosineLRCycles\":\"e\",\"warmupCosineLRWarmupEpochs\":\"vpxjoegcj\",\"weightDecay\":\"lleuidpmtonvhgn\"}],\"limitSettings\":{\"maxConcurrentTrials\":471846739,\"maxTrials\":2010390080,\"timeout\":\"PT209H16M39S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":564003407,\"evaluationInterval\":99445401},\"samplingAlgorithm\":\"Random\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"mkvavucgjiuaiqpm\",\"description\":\"fzhrchx\"},\"validationDataSize\":31.75715389895236,\"primaryMetric\":\"MeanAveragePrecision\",\"logVerbosity\":\"Debug\",\"targetColumnName\":\"lvivj\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"litqdsjipdvi\",\"description\":\"otyxbrii\"}}") .toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("nogykugdla", model.trainingData().description()); - Assertions.assertEquals("rrqwfyybpt", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("avgthkslge", model.targetColumnName()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ynpmggqgagen", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bugihcdvfo", model.modelSettings().augmentations()); - Assertions.assertEquals(78.53713F, model.modelSettings().beta1()); - Assertions.assertEquals(79.4358F, model.modelSettings().beta2()); - Assertions.assertEquals(2145428842, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("jzsaxzgkqwvde", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("p", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("jnaphifk", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(567285474, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(2035748937, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1219115371, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1955623996, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(38012767, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(98.00021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("mskhnkkhbyk", model.modelSettings().modelName()); - Assertions.assertEquals(82.803696F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1727395180, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(625230069, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); + Assertions.assertEquals("lvivj", model.targetColumnName()); + Assertions.assertEquals("otyxbrii", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("litqdsjipdvi", model.trainingData().uri()); + Assertions.assertEquals("cqidkltvdhqnufbx", model.modelSettings().advancedSettings()); + Assertions.assertFalse(model.modelSettings().amsGradient()); + Assertions.assertEquals("bntojovfny", model.modelSettings().augmentations()); + Assertions.assertEquals(90.33199262991735D, model.modelSettings().beta1()); + Assertions.assertEquals(67.54268988923069D, model.modelSettings().beta2()); + Assertions.assertEquals(576344420, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("wvumosqircamqprl", model.modelSettings().checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.modelSettings().checkpointModel().mode()); + Assertions.assertEquals("dhuaorhjk", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("rugejcvjkjy", model.modelSettings().checkpointRunId()); + Assertions.assertTrue(model.modelSettings().distributed()); + Assertions.assertFalse(model.modelSettings().earlyStopping()); + Assertions.assertEquals(578883268, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(1331253492, model.modelSettings().earlyStoppingPatience()); + Assertions.assertFalse(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(340282419, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(205381412, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(703900959, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(88.90730583323922D, model.modelSettings().learningRate()); + Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); + Assertions.assertEquals("zsizzhra", model.modelSettings().modelName()); + Assertions.assertEquals(6.228835392523502D, model.modelSettings().momentum()); + Assertions.assertTrue(model.modelSettings().nesterov()); + Assertions.assertEquals(407184360, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(728379640, model.modelSettings().numberOfWorkers()); Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(870078306, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.18851F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(386873853, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1358303870, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(312601450, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(42.782837F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1409319523, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(78.56785F, model.modelSettings().weightDecay()); - Assertions.assertEquals(710248775, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(35.895603F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(422240348, model.modelSettings().imageSize()); - Assertions.assertEquals(1978252606, model.modelSettings().maxSize()); - Assertions.assertEquals(623951562, model.modelSettings().minSize()); + Assertions.assertEquals(323091292, model.modelSettings().randomSeed()); + Assertions.assertEquals(29.163712972251034D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(1913452551, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(659472474, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(403804723, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(38.51223304483683D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(262615913, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(41.60768761575358D, model.modelSettings().weightDecay()); + Assertions.assertEquals(737508880, model.modelSettings().boxDetectionsPerImage()); + Assertions.assertEquals(22.056047562842874D, model.modelSettings().boxScoreThreshold()); + Assertions.assertEquals(1609678005, model.modelSettings().imageSize()); + Assertions.assertEquals(2042955583, model.modelSettings().maxSize()); + Assertions.assertEquals(1547425574, model.modelSettings().minSize()); Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(78.472176F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sfhshag", model.modelSettings().tileGridSize()); - Assertions.assertEquals(60.31503F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(40.6852F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(80.38389F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("gvkdlhuduk", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("joafm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("exulvoepknarseia", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("sqoacb", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dgsapleqfg", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("env", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("glvyakeszsuuvul", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("cwgg", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("xvlqgfbrve", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("c", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("vphirlzbip", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("nnepkwzzzku", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("uwcjomip", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("kaujttwykoxv", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ofxxdplrelfk", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ahcbtuxlbp", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hrfjenrazwefiktl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ashtostjixyzseci", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("zdwjtacfvvtdpcbp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("omcsaugbrhfiwltk", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("su", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ethklxwhcv", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yyhgqokjbmsr", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xyxxhwr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("omaqsyilpzzb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("nrz", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("sxagysokli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("s", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("fuzzlapy", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("lvzcgulae", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("iauqsuptessjlw", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("atpvbl", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("xgxqayga", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("kvc", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("pvlcjbvyez", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("jkqonbw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("ieyozvrcwfpucwnb", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("qefgzjvbx", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("bg", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("rx", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("uc", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1698205031, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H19M17S"), model.limitSettings().timeout()); - Assertions.assertEquals(716194367, model.limitSettings().maxConcurrentTrials()); + Assertions.assertFalse(model.modelSettings().multiScale()); + Assertions.assertEquals(7.8074372715565605D, model.modelSettings().nmsIouThreshold()); + Assertions.assertEquals("dfedsb", model.modelSettings().tileGridSize()); + Assertions.assertEquals(93.45227580067048D, model.modelSettings().tileOverlapRatio()); + Assertions.assertEquals(92.117998222726D, model.modelSettings().tilePredictionsNmsThreshold()); + Assertions.assertEquals(67.32875296372481D, model.modelSettings().validationIouThreshold()); + Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.modelSettings().validationMetricType()); + Assertions.assertEquals("ydtnaczkfwfatgaw", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("nskivdwgt", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("umecsaaq", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("qbdiuycsbskowkr", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("zhrbkhtmqo", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("uasfgqgucyhfaimq", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("ruozkgyfp", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("e", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("fm", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("sk", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("xvlzjxplhpevasyn", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("zjyielbqrvv", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("vknmpecqxgiqas", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("ubnsnstlpwq", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("nxjkhtupsvyouw", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("iyxfwkztsmsfbevy", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("znfhkqytk", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("adopgfzdgjfc", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("rsvloy", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("igqkzjuqwqa", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("uzxp", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("hyoipnfdbgso", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("ienezf", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("ennmf", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("pjnrtekwwnthro", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("dudsyiurztvktj", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("fecqkoqyouerga", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("puzxkpyehhfdyldh", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("rhnpupkcbkf", model.searchSpace().get(0).boxDetectionsPerImage()); + Assertions.assertEquals("dljqnvt", model.searchSpace().get(0).boxScoreThreshold()); + Assertions.assertEquals("ydsh", model.searchSpace().get(0).imageSize()); + Assertions.assertEquals("afyalo", model.searchSpace().get(0).maxSize()); + Assertions.assertEquals("wz", model.searchSpace().get(0).minSize()); + Assertions.assertEquals("znyufpqzs", model.searchSpace().get(0).modelSize()); + Assertions.assertEquals("fgufyjfdkqiy", model.searchSpace().get(0).multiScale()); + Assertions.assertEquals("djokgwesym", model.searchSpace().get(0).nmsIouThreshold()); + Assertions.assertEquals("hrqpfzl", model.searchSpace().get(0).tileGridSize()); + Assertions.assertEquals("j", model.searchSpace().get(0).tileOverlapRatio()); + Assertions.assertEquals("nxlue", model.searchSpace().get(0).tilePredictionsNmsThreshold()); + Assertions.assertEquals("jqbbgsimwejlw", model.searchSpace().get(0).validationIouThreshold()); + Assertions.assertEquals("bpjzobdwbcpraswk", model.searchSpace().get(0).validationMetricType()); + Assertions.assertEquals(471846739, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(2010390080, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT209H16M39S"), model.limitSettings().timeout()); + Assertions.assertEquals(564003407, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(99445401, model.sweepSettings().earlyTermination().evaluationInterval()); Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1409785, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(962981411, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.validationData().description()); - Assertions.assertEquals("cydyllmxv", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(69.76448748367842D, model.validationDataSize()); + Assertions.assertEquals("fzhrchx", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); + Assertions.assertEquals("mkvavucgjiuaiqpm", model.validationData().uri()); + Assertions.assertEquals(31.75715389895236D, model.validationDataSize()); + Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageObjectDetection model = new ImageObjectDetection().withLogVerbosity(LogVerbosity.CRITICAL) - .withTrainingData(new MLTableJobInput().withDescription("nogykugdla") - .withUri("rrqwfyybpt") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("avgthkslge") - .withPrimaryMetric(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(true) - .withAdvancedSettings("ynpmggqgagen") - .withAugmentations("bugihcdvfo") - .withBeta1(78.53713F) - .withBeta2(79.4358F) - .withCheckpointFrequency(2145428842) - .withCheckpointRunId("jzsaxzgkqwvde") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("p") - .withUri("jnaphifk") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(567285474) - .withEarlyStoppingPatience(2035748937) - .withEvaluationFrequency(1219115371) + ImageObjectDetection model = new ImageObjectDetection().withLogVerbosity(LogVerbosity.DEBUG) + .withTargetColumnName("lvivj") + .withTrainingData(new MLTableJobInput().withDescription("otyxbrii") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("litqdsjipdvi")) + .withModelSettings(new ImageModelSettingsObjectDetection().withAdvancedSettings("cqidkltvdhqnufbx") + .withAmsGradient(false) + .withAugmentations("bntojovfny") + .withBeta1(90.33199262991735D) + .withBeta2(67.54268988923069D) + .withCheckpointFrequency(576344420) + .withCheckpointModel(new MLFlowModelJobInput().withDescription("wvumosqircamqprl") + .withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("dhuaorhjk")) + .withCheckpointRunId("rugejcvjkjy") + .withDistributed(true) + .withEarlyStopping(false) + .withEarlyStoppingDelay(578883268) + .withEarlyStoppingPatience(1331253492) .withEnableOnnxNormalization(false) - .withGradientAccumulationStep(1955623996) - .withLayersToFreeze(38012767) - .withLearningRate(98.00021F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("mskhnkkhbyk") - .withMomentum(82.803696F) + .withEvaluationFrequency(340282419) + .withGradientAccumulationStep(205381412) + .withLayersToFreeze(703900959) + .withLearningRate(88.90730583323922D) + .withLearningRateScheduler(LearningRateScheduler.NONE) + .withModelName("zsizzhra") + .withMomentum(6.228835392523502D) .withNesterov(true) - .withNumberOfEpochs(1727395180) - .withNumberOfWorkers(625230069) + .withNumberOfEpochs(407184360) + .withNumberOfWorkers(728379640) .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(870078306) - .withStepLRGamma(37.18851F) - .withStepLRStepSize(386873853) - .withTrainingBatchSize(1358303870) - .withValidationBatchSize(312601450) - .withWarmupCosineLRCycles(42.782837F) - .withWarmupCosineLRWarmupEpochs(1409319523) - .withWeightDecay(78.56785F) - .withBoxDetectionsPerImage(710248775) - .withBoxScoreThreshold(35.895603F) - .withImageSize(422240348) - .withMaxSize(1978252606) - .withMinSize(623951562) + .withRandomSeed(323091292) + .withStepLRGamma(29.163712972251034D) + .withStepLRStepSize(1913452551) + .withTrainingBatchSize(659472474) + .withValidationBatchSize(403804723) + .withWarmupCosineLRCycles(38.51223304483683D) + .withWarmupCosineLRWarmupEpochs(262615913) + .withWeightDecay(41.60768761575358D) + .withBoxDetectionsPerImage(737508880) + .withBoxScoreThreshold(22.056047562842874D) + .withImageSize(1609678005) + .withMaxSize(2042955583) + .withMinSize(1547425574) .withModelSize(ModelSize.EXTRA_LARGE) .withMultiScale(false) - .withNmsIouThreshold(78.472176F) - .withTileGridSize("sfhshag") - .withTileOverlapRatio(60.31503F) - .withTilePredictionsNmsThreshold(40.6852F) - .withValidationIouThreshold(80.38389F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace( - Arrays.asList(new ImageModelDistributionSettingsObjectDetection().withAmsGradient("gvkdlhuduk") - .withAugmentations("joafm") - .withBeta1("exulvoepknarseia") - .withBeta2("sqoacb") - .withDistributed("dgsapleqfg") - .withEarlyStopping("env") - .withEarlyStoppingDelay("glvyakeszsuuvul") - .withEarlyStoppingPatience("cwgg") - .withEvaluationFrequency("xvlqgfbrve") - .withEnableOnnxNormalization("c") - .withGradientAccumulationStep("vphirlzbip") - .withLayersToFreeze("nnepkwzzzku") - .withLearningRate("uwcjomip") - .withLearningRateScheduler("kaujttwykoxv") - .withModelName("ofxxdplrelfk") - .withMomentum("ahcbtuxlbp") - .withNesterov("hrfjenrazwefiktl") - .withNumberOfEpochs("ashtostjixyzseci") - .withNumberOfWorkers("zdwjtacfvvtdpcbp") - .withOptimizer("omcsaugbrhfiwltk") - .withRandomSeed("su") - .withStepLRGamma("ethklxwhcv") - .withStepLRStepSize("yyhgqokjbmsr") - .withTrainingBatchSize("xyxxhwr") - .withValidationBatchSize("omaqsyilpzzb") - .withWarmupCosineLRCycles("nrz") - .withWarmupCosineLRWarmupEpochs("sxagysokli") - .withWeightDecay("s") - .withBoxDetectionsPerImage("fuzzlapy") - .withBoxScoreThreshold("lvzcgulae") - .withImageSize("iauqsuptessjlw") - .withMaxSize("atpvbl") - .withMinSize("xgxqayga") - .withModelSize("kvc") - .withMultiScale("pvlcjbvyez") - .withNmsIouThreshold("jkqonbw") - .withTileGridSize("ieyozvrcwfpucwnb") - .withTileOverlapRatio("qefgzjvbx") - .withTilePredictionsNmsThreshold("bg") - .withValidationIouThreshold("rx") - .withValidationMetricType("uc"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1698205031) - .withTimeout(Duration.parse("PT29H19M17S")) - .withMaxConcurrentTrials(716194367)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.RANDOM) + .withNmsIouThreshold(7.8074372715565605D) + .withTileGridSize("dfedsb") + .withTileOverlapRatio(93.45227580067048D) + .withTilePredictionsNmsThreshold(92.117998222726D) + .withValidationIouThreshold(67.32875296372481D) + .withValidationMetricType(ValidationMetricType.COCO_VOC)) + .withSearchSpace(Arrays.asList( + new ImageModelDistributionSettingsObjectDetection().withAmsGradient("ydtnaczkfwfatgaw") + .withAugmentations("nskivdwgt") + .withBeta1("umecsaaq") + .withBeta2("qbdiuycsbskowkr") + .withDistributed("zhrbkhtmqo") + .withEarlyStopping("uasfgqgucyhfaimq") + .withEarlyStoppingDelay("ruozkgyfp") + .withEarlyStoppingPatience("e") + .withEnableOnnxNormalization("fm") + .withEvaluationFrequency("sk") + .withGradientAccumulationStep("xvlzjxplhpevasyn") + .withLayersToFreeze("zjyielbqrvv") + .withLearningRate("vknmpecqxgiqas") + .withLearningRateScheduler("ubnsnstlpwq") + .withModelName("nxjkhtupsvyouw") + .withMomentum("iyxfwkztsmsfbevy") + .withNesterov("znfhkqytk") + .withNumberOfEpochs("adopgfzdgjfc") + .withNumberOfWorkers("rsvloy") + .withOptimizer("igqkzjuqwqa") + .withRandomSeed("uzxp") + .withStepLRGamma("hyoipnfdbgso") + .withStepLRStepSize("ienezf") + .withTrainingBatchSize("ennmf") + .withValidationBatchSize("pjnrtekwwnthro") + .withWarmupCosineLRCycles("dudsyiurztvktj") + .withWarmupCosineLRWarmupEpochs("fecqkoqyouerga") + .withWeightDecay("puzxkpyehhfdyldh") + .withBoxDetectionsPerImage("rhnpupkcbkf") + .withBoxScoreThreshold("dljqnvt") + .withImageSize("ydsh") + .withMaxSize("afyalo") + .withMinSize("wz") + .withModelSize("znyufpqzs") + .withMultiScale("fgufyjfdkqiy") + .withNmsIouThreshold("djokgwesym") + .withTileGridSize("hrqpfzl") + .withTileOverlapRatio("j") + .withTilePredictionsNmsThreshold("nxlue") + .withValidationIouThreshold("jqbbgsimwejlw") + .withValidationMetricType("bpjzobdwbcpraswk"), + new ImageModelDistributionSettingsObjectDetection().withAmsGradient("clflioe") + .withAugmentations("hxessmvrk") + .withBeta1("sqeq") + .withBeta2("dxmdses") + .withDistributed("ujbjppp") + .withEarlyStopping("lpdib") + .withEarlyStoppingDelay("th") + .withEarlyStoppingPatience("at") + .withEnableOnnxNormalization("jrnm") + .withEvaluationFrequency("zqpl") + .withGradientAccumulationStep("kihonik") + .withLayersToFreeze("r") + .withLearningRate("ffjilzfbpnt") + .withLearningRateScheduler("kensckh") + .withModelName("carmoyfx") + .withMomentum("wykuqdnd") + .withNesterov("ykhkg") + .withNumberOfEpochs("pvd") + .withNumberOfWorkers("fpeerscdxrnr") + .withOptimizer("rcufmbgacnrgfdtn") + .withRandomSeed("spsanmameubkq") + .withStepLRGamma("mlf") + .withStepLRStepSize("lqcskkqjmxptueip") + .withTrainingBatchSize("gkwdr") + .withValidationBatchSize("rpahuuonjkkxuk") + .withWarmupCosineLRCycles("e") + .withWarmupCosineLRWarmupEpochs("vpxjoegcj") + .withWeightDecay("lleuidpmtonvhgn") + .withBoxDetectionsPerImage("edzfzqiyuqhtdere") + .withBoxScoreThreshold("oka") + .withImageSize("whpjlw") + .withMaxSize("edznmxrfomckewv") + .withMinSize("ifopxfjjtpdyz") + .withModelSize("txfp") + .withMultiScale("fhgnuywezygv") + .withNmsIouThreshold("gaaqw") + .withTileGridSize("gjpytpmpvdnogehl") + .withTileOverlapRatio("b") + .withTilePredictionsNmsThreshold("tbnukkfaxz") + .withValidationIouThreshold("bx") + .withValidationMetricType("jisskob"))) + .withLimitSettings(new ImageLimitSettings().withMaxConcurrentTrials(471846739) + .withMaxTrials(2010390080) + .withTimeout(Duration.parse("PT209H16M39S"))) + .withSweepSettings(new ImageSweepSettings() .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1409785).withDelayEvaluation(962981411))) - .withValidationData(new MLTableJobInput().withDescription("zsyqagqllcbrvaid") - .withUri("cydyllmxv") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(69.76448748367842D); + new EarlyTerminationPolicy().withDelayEvaluation(564003407).withEvaluationInterval(99445401)) + .withSamplingAlgorithm(SamplingAlgorithmType.RANDOM)) + .withValidationData(new MLTableJobInput().withDescription("fzhrchx") + .withMode(InputDeliveryMode.EVAL_MOUNT) + .withUri("mkvavucgjiuaiqpm")) + .withValidationDataSize(31.75715389895236D) + .withPrimaryMetric(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION); model = BinaryData.fromObject(model).toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("nogykugdla", model.trainingData().description()); - Assertions.assertEquals("rrqwfyybpt", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("avgthkslge", model.targetColumnName()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ynpmggqgagen", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bugihcdvfo", model.modelSettings().augmentations()); - Assertions.assertEquals(78.53713F, model.modelSettings().beta1()); - Assertions.assertEquals(79.4358F, model.modelSettings().beta2()); - Assertions.assertEquals(2145428842, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("jzsaxzgkqwvde", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("p", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("jnaphifk", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(567285474, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(2035748937, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1219115371, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1955623996, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(38012767, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(98.00021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("mskhnkkhbyk", model.modelSettings().modelName()); - Assertions.assertEquals(82.803696F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1727395180, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(625230069, model.modelSettings().numberOfWorkers()); + Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); + Assertions.assertEquals("lvivj", model.targetColumnName()); + Assertions.assertEquals("otyxbrii", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("litqdsjipdvi", model.trainingData().uri()); + Assertions.assertEquals("cqidkltvdhqnufbx", model.modelSettings().advancedSettings()); + Assertions.assertFalse(model.modelSettings().amsGradient()); + Assertions.assertEquals("bntojovfny", model.modelSettings().augmentations()); + Assertions.assertEquals(90.33199262991735D, model.modelSettings().beta1()); + Assertions.assertEquals(67.54268988923069D, model.modelSettings().beta2()); + Assertions.assertEquals(576344420, model.modelSettings().checkpointFrequency()); + Assertions.assertEquals("wvumosqircamqprl", model.modelSettings().checkpointModel().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.modelSettings().checkpointModel().mode()); + Assertions.assertEquals("dhuaorhjk", model.modelSettings().checkpointModel().uri()); + Assertions.assertEquals("rugejcvjkjy", model.modelSettings().checkpointRunId()); + Assertions.assertTrue(model.modelSettings().distributed()); + Assertions.assertFalse(model.modelSettings().earlyStopping()); + Assertions.assertEquals(578883268, model.modelSettings().earlyStoppingDelay()); + Assertions.assertEquals(1331253492, model.modelSettings().earlyStoppingPatience()); + Assertions.assertFalse(model.modelSettings().enableOnnxNormalization()); + Assertions.assertEquals(340282419, model.modelSettings().evaluationFrequency()); + Assertions.assertEquals(205381412, model.modelSettings().gradientAccumulationStep()); + Assertions.assertEquals(703900959, model.modelSettings().layersToFreeze()); + Assertions.assertEquals(88.90730583323922D, model.modelSettings().learningRate()); + Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); + Assertions.assertEquals("zsizzhra", model.modelSettings().modelName()); + Assertions.assertEquals(6.228835392523502D, model.modelSettings().momentum()); + Assertions.assertTrue(model.modelSettings().nesterov()); + Assertions.assertEquals(407184360, model.modelSettings().numberOfEpochs()); + Assertions.assertEquals(728379640, model.modelSettings().numberOfWorkers()); Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(870078306, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.18851F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(386873853, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1358303870, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(312601450, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(42.782837F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1409319523, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(78.56785F, model.modelSettings().weightDecay()); - Assertions.assertEquals(710248775, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(35.895603F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(422240348, model.modelSettings().imageSize()); - Assertions.assertEquals(1978252606, model.modelSettings().maxSize()); - Assertions.assertEquals(623951562, model.modelSettings().minSize()); + Assertions.assertEquals(323091292, model.modelSettings().randomSeed()); + Assertions.assertEquals(29.163712972251034D, model.modelSettings().stepLRGamma()); + Assertions.assertEquals(1913452551, model.modelSettings().stepLRStepSize()); + Assertions.assertEquals(659472474, model.modelSettings().trainingBatchSize()); + Assertions.assertEquals(403804723, model.modelSettings().validationBatchSize()); + Assertions.assertEquals(38.51223304483683D, model.modelSettings().warmupCosineLRCycles()); + Assertions.assertEquals(262615913, model.modelSettings().warmupCosineLRWarmupEpochs()); + Assertions.assertEquals(41.60768761575358D, model.modelSettings().weightDecay()); + Assertions.assertEquals(737508880, model.modelSettings().boxDetectionsPerImage()); + Assertions.assertEquals(22.056047562842874D, model.modelSettings().boxScoreThreshold()); + Assertions.assertEquals(1609678005, model.modelSettings().imageSize()); + Assertions.assertEquals(2042955583, model.modelSettings().maxSize()); + Assertions.assertEquals(1547425574, model.modelSettings().minSize()); Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(78.472176F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sfhshag", model.modelSettings().tileGridSize()); - Assertions.assertEquals(60.31503F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(40.6852F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(80.38389F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("gvkdlhuduk", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("joafm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("exulvoepknarseia", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("sqoacb", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dgsapleqfg", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("env", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("glvyakeszsuuvul", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("cwgg", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("xvlqgfbrve", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("c", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("vphirlzbip", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("nnepkwzzzku", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("uwcjomip", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("kaujttwykoxv", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ofxxdplrelfk", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ahcbtuxlbp", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hrfjenrazwefiktl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ashtostjixyzseci", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("zdwjtacfvvtdpcbp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("omcsaugbrhfiwltk", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("su", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ethklxwhcv", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yyhgqokjbmsr", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xyxxhwr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("omaqsyilpzzb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("nrz", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("sxagysokli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("s", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("fuzzlapy", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("lvzcgulae", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("iauqsuptessjlw", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("atpvbl", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("xgxqayga", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("kvc", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("pvlcjbvyez", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("jkqonbw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("ieyozvrcwfpucwnb", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("qefgzjvbx", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("bg", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("rx", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("uc", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1698205031, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H19M17S"), model.limitSettings().timeout()); - Assertions.assertEquals(716194367, model.limitSettings().maxConcurrentTrials()); + Assertions.assertFalse(model.modelSettings().multiScale()); + Assertions.assertEquals(7.8074372715565605D, model.modelSettings().nmsIouThreshold()); + Assertions.assertEquals("dfedsb", model.modelSettings().tileGridSize()); + Assertions.assertEquals(93.45227580067048D, model.modelSettings().tileOverlapRatio()); + Assertions.assertEquals(92.117998222726D, model.modelSettings().tilePredictionsNmsThreshold()); + Assertions.assertEquals(67.32875296372481D, model.modelSettings().validationIouThreshold()); + Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.modelSettings().validationMetricType()); + Assertions.assertEquals("ydtnaczkfwfatgaw", model.searchSpace().get(0).amsGradient()); + Assertions.assertEquals("nskivdwgt", model.searchSpace().get(0).augmentations()); + Assertions.assertEquals("umecsaaq", model.searchSpace().get(0).beta1()); + Assertions.assertEquals("qbdiuycsbskowkr", model.searchSpace().get(0).beta2()); + Assertions.assertEquals("zhrbkhtmqo", model.searchSpace().get(0).distributed()); + Assertions.assertEquals("uasfgqgucyhfaimq", model.searchSpace().get(0).earlyStopping()); + Assertions.assertEquals("ruozkgyfp", model.searchSpace().get(0).earlyStoppingDelay()); + Assertions.assertEquals("e", model.searchSpace().get(0).earlyStoppingPatience()); + Assertions.assertEquals("fm", model.searchSpace().get(0).enableOnnxNormalization()); + Assertions.assertEquals("sk", model.searchSpace().get(0).evaluationFrequency()); + Assertions.assertEquals("xvlzjxplhpevasyn", model.searchSpace().get(0).gradientAccumulationStep()); + Assertions.assertEquals("zjyielbqrvv", model.searchSpace().get(0).layersToFreeze()); + Assertions.assertEquals("vknmpecqxgiqas", model.searchSpace().get(0).learningRate()); + Assertions.assertEquals("ubnsnstlpwq", model.searchSpace().get(0).learningRateScheduler()); + Assertions.assertEquals("nxjkhtupsvyouw", model.searchSpace().get(0).modelName()); + Assertions.assertEquals("iyxfwkztsmsfbevy", model.searchSpace().get(0).momentum()); + Assertions.assertEquals("znfhkqytk", model.searchSpace().get(0).nesterov()); + Assertions.assertEquals("adopgfzdgjfc", model.searchSpace().get(0).numberOfEpochs()); + Assertions.assertEquals("rsvloy", model.searchSpace().get(0).numberOfWorkers()); + Assertions.assertEquals("igqkzjuqwqa", model.searchSpace().get(0).optimizer()); + Assertions.assertEquals("uzxp", model.searchSpace().get(0).randomSeed()); + Assertions.assertEquals("hyoipnfdbgso", model.searchSpace().get(0).stepLRGamma()); + Assertions.assertEquals("ienezf", model.searchSpace().get(0).stepLRStepSize()); + Assertions.assertEquals("ennmf", model.searchSpace().get(0).trainingBatchSize()); + Assertions.assertEquals("pjnrtekwwnthro", model.searchSpace().get(0).validationBatchSize()); + Assertions.assertEquals("dudsyiurztvktj", model.searchSpace().get(0).warmupCosineLRCycles()); + Assertions.assertEquals("fecqkoqyouerga", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); + Assertions.assertEquals("puzxkpyehhfdyldh", model.searchSpace().get(0).weightDecay()); + Assertions.assertEquals("rhnpupkcbkf", model.searchSpace().get(0).boxDetectionsPerImage()); + Assertions.assertEquals("dljqnvt", model.searchSpace().get(0).boxScoreThreshold()); + Assertions.assertEquals("ydsh", model.searchSpace().get(0).imageSize()); + Assertions.assertEquals("afyalo", model.searchSpace().get(0).maxSize()); + Assertions.assertEquals("wz", model.searchSpace().get(0).minSize()); + Assertions.assertEquals("znyufpqzs", model.searchSpace().get(0).modelSize()); + Assertions.assertEquals("fgufyjfdkqiy", model.searchSpace().get(0).multiScale()); + Assertions.assertEquals("djokgwesym", model.searchSpace().get(0).nmsIouThreshold()); + Assertions.assertEquals("hrqpfzl", model.searchSpace().get(0).tileGridSize()); + Assertions.assertEquals("j", model.searchSpace().get(0).tileOverlapRatio()); + Assertions.assertEquals("nxlue", model.searchSpace().get(0).tilePredictionsNmsThreshold()); + Assertions.assertEquals("jqbbgsimwejlw", model.searchSpace().get(0).validationIouThreshold()); + Assertions.assertEquals("bpjzobdwbcpraswk", model.searchSpace().get(0).validationMetricType()); + Assertions.assertEquals(471846739, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(2010390080, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT209H16M39S"), model.limitSettings().timeout()); + Assertions.assertEquals(564003407, model.sweepSettings().earlyTermination().delayEvaluation()); + Assertions.assertEquals(99445401, model.sweepSettings().earlyTermination().evaluationInterval()); Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1409785, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(962981411, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.validationData().description()); - Assertions.assertEquals("cydyllmxv", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(69.76448748367842D, model.validationDataSize()); + Assertions.assertEquals("fzhrchx", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); + Assertions.assertEquals("mkvavucgjiuaiqpm", model.validationData().uri()); + Assertions.assertEquals(31.75715389895236D, model.validationDataSize()); + Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java index 62950c7050e5..bdd864993bdf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,21 +14,22 @@ public final class ImageSweepSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageSweepSettings model = BinaryData.fromString( - "{\"samplingAlgorithm\":\"Grid\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1821428619,\"delayEvaluation\":232113908}}") + "{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":55620701,\"evaluationInterval\":288544736},\"samplingAlgorithm\":\"Bayesian\"}") .toObject(ImageSweepSettings.class); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - Assertions.assertEquals(1821428619, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(232113908, model.earlyTermination().delayEvaluation()); + Assertions.assertEquals(55620701, model.earlyTermination().delayEvaluation()); + Assertions.assertEquals(288544736, model.earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.samplingAlgorithm()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageSweepSettings model = new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.GRID) + ImageSweepSettings model = new ImageSweepSettings() .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1821428619).withDelayEvaluation(232113908)); + new EarlyTerminationPolicy().withDelayEvaluation(55620701).withEvaluationInterval(288544736)) + .withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN); model = BinaryData.fromObject(model).toObject(ImageSweepSettings.class); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - Assertions.assertEquals(1821428619, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(232113908, model.earlyTermination().delayEvaluation()); + Assertions.assertEquals(55620701, model.earlyTermination().delayEvaluation()); + Assertions.assertEquals(288544736, model.earlyTermination().evaluationInterval()); + Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.samplingAlgorithm()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java index 943123deaa9c..ddb374efe676 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,19 +15,24 @@ public final class ImageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Image model = BinaryData.fromString( - "{\"type\":\"azureml\",\"reference\":\"zpbgkzc\",\"\":{\"ti\":\"dataiuzvkunhdimju\",\"gofmhxwrjlv\":\"datazkaugpucdocfqpl\"}}") + "{\"type\":\"docker\",\"reference\":\"sdjpgxe\",\"version\":\"gwkcfferzn\",\"fpohimgckycjpeeb\":\"\\\"dataivoveomkhfeqcoop\\\"\",\"xsuloutnpb\":\"\\\"datanbz\\\"\",\"pfhsldqdza\":\"\\\"dataxooqohgpncdmwkh\\\"\",\"kswhcamwuynfxk\":\"\\\"dataiunyevdyzdsytc\\\"\"}") .toObject(Image.class); - Assertions.assertEquals(ImageType.AZUREML, model.type()); - Assertions.assertEquals("zpbgkzc", model.reference()); + Assertions.assertEquals(ImageType.DOCKER, model.type()); + Assertions.assertEquals("sdjpgxe", model.reference()); + Assertions.assertEquals("gwkcfferzn", model.version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Image model - = new Image().withType(ImageType.AZUREML).withReference("zpbgkzc").withAdditionalProperties(mapOf()); + Image model = new Image().withType(ImageType.DOCKER) + .withReference("sdjpgxe") + .withVersion("gwkcfferzn") + .withAdditionalProperties(mapOf("xsuloutnpb", "\"datanbz\"", "fpohimgckycjpeeb", "\"dataivoveomkhfeqcoop\"", + "kswhcamwuynfxk", "\"dataiunyevdyzdsytc\"", "pfhsldqdza", "\"dataxooqohgpncdmwkh\"")); model = BinaryData.fromObject(model).toObject(Image.class); - Assertions.assertEquals(ImageType.AZUREML, model.type()); - Assertions.assertEquals("zpbgkzc", model.reference()); + Assertions.assertEquals(ImageType.DOCKER, model.type()); + Assertions.assertEquals("sdjpgxe", model.reference()); + Assertions.assertEquals("gwkcfferzn", model.version()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java deleted file mode 100644 index a0296ceb7793..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.ImageVertical; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ImageVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageVertical model = BinaryData.fromString( - "{\"limitSettings\":{\"maxTrials\":1994872439,\"timeout\":\"PT128H24M14S\",\"maxConcurrentTrials\":963869601},\"sweepSettings\":{\"samplingAlgorithm\":\"Random\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":676982942,\"delayEvaluation\":1015925891}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"nirupkqnst\",\"mode\":\"ReadOnlyMount\",\"description\":\"ibjg\"},\"validationDataSize\":70.27294181684461}") - .toObject(ImageVertical.class); - Assertions.assertEquals(1994872439, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT128H24M14S"), model.limitSettings().timeout()); - Assertions.assertEquals(963869601, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(676982942, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(1015925891, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("ibjg", model.validationData().description()); - Assertions.assertEquals("nirupkqnst", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(70.27294181684461D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVertical model - = new ImageVertical() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1994872439) - .withTimeout(Duration.parse("PT128H24M14S")) - .withMaxConcurrentTrials(963869601)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.RANDOM) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(676982942) - .withDelayEvaluation(1015925891))) - .withValidationData(new MLTableJobInput().withDescription("ibjg") - .withUri("nirupkqnst") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(70.27294181684461D); - model = BinaryData.fromObject(model).toObject(ImageVertical.class); - Assertions.assertEquals(1994872439, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT128H24M14S"), model.limitSettings().timeout()); - Assertions.assertEquals(963869601, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(676982942, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(1015925891, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("ibjg", model.validationData().description()); - Assertions.assertEquals("nirupkqnst", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(70.27294181684461D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java index 315649dc9f16..6177da8d0c7b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,17 +12,17 @@ public final class IndexColumnTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IndexColumn model - = BinaryData.fromString("{\"dataType\":\"Boolean\",\"columnName\":\"srsx\"}").toObject(IndexColumn.class); - Assertions.assertEquals(FeatureDataType.BOOLEAN, model.dataType()); - Assertions.assertEquals("srsx", model.columnName()); + IndexColumn model = BinaryData.fromString("{\"columnName\":\"vkiwrsiwdyjqu\",\"dataType\":\"Integer\"}") + .toObject(IndexColumn.class); + Assertions.assertEquals("vkiwrsiwdyjqu", model.columnName()); + Assertions.assertEquals(FeatureDataType.INTEGER, model.dataType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IndexColumn model = new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("srsx"); + IndexColumn model = new IndexColumn().withColumnName("vkiwrsiwdyjqu").withDataType(FeatureDataType.INTEGER); model = BinaryData.fromObject(model).toObject(IndexColumn.class); - Assertions.assertEquals(FeatureDataType.BOOLEAN, model.dataType()); - Assertions.assertEquals("srsx", model.columnName()); + Assertions.assertEquals("vkiwrsiwdyjqu", model.columnName()); + Assertions.assertEquals(FeatureDataType.INTEGER, model.dataType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java index 50c06facefb0..31ee6395ab00 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,28 +13,33 @@ public final class InferenceContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InferenceContainerProperties model = BinaryData.fromString( - "{\"livenessRoute\":{\"path\":\"lnacgcc\",\"port\":682130924},\"readinessRoute\":{\"path\":\"hxkizvytnrzv\",\"port\":349650849},\"scoringRoute\":{\"path\":\"r\",\"port\":2075017284}}") + "{\"livenessRoute\":{\"path\":\"cnyxrxmunjd\",\"port\":477045914},\"readinessRoute\":{\"path\":\"lnkvxlx\",\"port\":1233418998},\"scoringRoute\":{\"path\":\"lqivbgkcv\",\"port\":1672794861},\"startupRoute\":{\"path\":\"zvuqdflvon\",\"port\":427469553}}") .toObject(InferenceContainerProperties.class); - Assertions.assertEquals("lnacgcc", model.livenessRoute().path()); - Assertions.assertEquals(682130924, model.livenessRoute().port()); - Assertions.assertEquals("hxkizvytnrzv", model.readinessRoute().path()); - Assertions.assertEquals(349650849, model.readinessRoute().port()); - Assertions.assertEquals("r", model.scoringRoute().path()); - Assertions.assertEquals(2075017284, model.scoringRoute().port()); + Assertions.assertEquals("cnyxrxmunjd", model.livenessRoute().path()); + Assertions.assertEquals(477045914, model.livenessRoute().port()); + Assertions.assertEquals("lnkvxlx", model.readinessRoute().path()); + Assertions.assertEquals(1233418998, model.readinessRoute().port()); + Assertions.assertEquals("lqivbgkcv", model.scoringRoute().path()); + Assertions.assertEquals(1672794861, model.scoringRoute().port()); + Assertions.assertEquals("zvuqdflvon", model.startupRoute().path()); + Assertions.assertEquals(427469553, model.startupRoute().port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InferenceContainerProperties model - = new InferenceContainerProperties().withLivenessRoute(new Route().withPath("lnacgcc").withPort(682130924)) - .withReadinessRoute(new Route().withPath("hxkizvytnrzv").withPort(349650849)) - .withScoringRoute(new Route().withPath("r").withPort(2075017284)); + InferenceContainerProperties model = new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("cnyxrxmunjd").withPort(477045914)) + .withReadinessRoute(new Route().withPath("lnkvxlx").withPort(1233418998)) + .withScoringRoute(new Route().withPath("lqivbgkcv").withPort(1672794861)) + .withStartupRoute(new Route().withPath("zvuqdflvon").withPort(427469553)); model = BinaryData.fromObject(model).toObject(InferenceContainerProperties.class); - Assertions.assertEquals("lnacgcc", model.livenessRoute().path()); - Assertions.assertEquals(682130924, model.livenessRoute().port()); - Assertions.assertEquals("hxkizvytnrzv", model.readinessRoute().path()); - Assertions.assertEquals(349650849, model.readinessRoute().port()); - Assertions.assertEquals("r", model.scoringRoute().path()); - Assertions.assertEquals(2075017284, model.scoringRoute().port()); + Assertions.assertEquals("cnyxrxmunjd", model.livenessRoute().path()); + Assertions.assertEquals(477045914, model.livenessRoute().port()); + Assertions.assertEquals("lnkvxlx", model.readinessRoute().path()); + Assertions.assertEquals(1233418998, model.readinessRoute().port()); + Assertions.assertEquals("lqivbgkcv", model.scoringRoute().path()); + Assertions.assertEquals(1672794861, model.scoringRoute().port()); + Assertions.assertEquals("zvuqdflvon", model.startupRoute().path()); + Assertions.assertEquals(427469553, model.startupRoute().port()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteMockTests.java new file mode 100644 index 000000000000..e5443297d914 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class InferenceEndpointsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.inferenceEndpoints() + .delete("iohcjugduoggxs", "m", "xguykrpzpm", "zplcrzdwebs", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteMockTests.java new file mode 100644 index 000000000000..ce7ea2d67b62 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsDeleteMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class InferenceGroupsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.inferenceGroups() + .delete("zcevf", "iekydkjdk", "fkneckvyrvdszri", "pejhyrzzxqtcg", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncWithResponseMockTests.java new file mode 100644 index 000000000000..1369d7b728db --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncWithResponseMockTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusResponse; +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 InferenceGroupsGetDeltaModelsStatusAsyncWithResponseMockTests { + @Test + public void testGetDeltaModelsStatusAsyncWithResponse() throws Exception { + String responseStr + = "{\"actualInstanceCount\":2135412436,\"deltaModels\":{\"tkcqixgqxsupevt\":[{\"count\":1811280851,\"sampleInstanceID\":\"sjsoxuuwuungdvvd\",\"status\":\"cpquyi\"},{\"count\":760498231,\"sampleInstanceID\":\"tvonw\",\"status\":\"eliemit\"}],\"vj\":[{\"count\":1994262703,\"sampleInstanceID\":\"dsafqaghwqum\",\"status\":\"qyianjmvvk\"},{\"count\":1048053587,\"sampleInstanceID\":\"ffhuxoxqtgzvzcfm\",\"status\":\"ogjrhmtbpnhj\"},{\"count\":1592654548,\"sampleInstanceID\":\"fzw\",\"status\":\"rmp\"},{\"count\":960410048,\"sampleInstanceID\":\"qeesginpixhul\",\"status\":\"lmw\"}],\"mnrweevtunjdcl\":[{\"count\":1703521996,\"sampleInstanceID\":\"tflotjizviswix\",\"status\":\"nwznfxapylsllbd\"},{\"count\":1845528942,\"sampleInstanceID\":\"pe\",\"status\":\"glfwmajllatbl\"},{\"count\":727311326,\"sampleInstanceID\":\"hwnithxnainssvrk\",\"status\":\"lylioguwshrmc\"},{\"count\":2016627290,\"sampleInstanceID\":\"ghqtthsb\",\"status\":\"wkqztqrnreyj\"}],\"vpglntnsiuxyitj\":[{\"count\":1777861843,\"sampleInstanceID\":\"fpsyqvgaaymfkex\",\"status\":\"wmkljh\"},{\"count\":61306480,\"sampleInstanceID\":\"ewzgoxzkktcrcc\",\"status\":\"edzyzbvsjut\"},{\"count\":1791617008,\"sampleInstanceID\":\"efilncyqnkp\",\"status\":\"fmpz\"},{\"count\":1079572176,\"sampleInstanceID\":\"jckzx\",\"status\":\"upgtptmndzbfoi\"}]},\"expectedInstanceCount\":796898245,\"revisionId\":\"yzgrrllzxx\",\"targetBaseModel\":\"mhenqn\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + DeltaModelStatusResponse response = manager.inferenceGroups() + .getDeltaModelsStatusAsyncWithResponse("e", "xaeiue", "k", "grmwdw", + new DeltaModelStatusRequest().withDeltaModels(Arrays.asList("eplpfrecri", "kabafdlsi")) + .withTargetBaseModel("ob"), + com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(2135412436, response.actualInstanceCount()); + Assertions.assertEquals(1811280851, response.deltaModels().get("tkcqixgqxsupevt").get(0).count()); + Assertions.assertEquals("sjsoxuuwuungdvvd", + response.deltaModels().get("tkcqixgqxsupevt").get(0).sampleInstanceID()); + Assertions.assertEquals("cpquyi", response.deltaModels().get("tkcqixgqxsupevt").get(0).status()); + Assertions.assertEquals(796898245, response.expectedInstanceCount()); + Assertions.assertEquals("yzgrrllzxx", response.revisionId()); + Assertions.assertEquals("mhenqn", response.targetBaseModel()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusWithResponseMockTests.java new file mode 100644 index 000000000000..10a74f65d314 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetStatusWithResponseMockTests.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.GroupStatus; +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 InferenceGroupsGetStatusWithResponseMockTests { + @Test + public void testGetStatusWithResponse() throws Exception { + String responseStr + = "{\"actualCapacityInfo\":{\"total\":969808172,\"succeeded\":1295514727,\"failed\":1065671612,\"outdatedSucceeded\":430211364,\"outdatedFailed\":1923526752},\"endpointCount\":666757100,\"requestedCapacity\":659953867}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + GroupStatus response = manager.inferenceGroups() + .getStatusWithResponse("yzil", "lfgow", "vx", "qruskmbqyfecns", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(969808172, response.actualCapacityInfo().total()); + Assertions.assertEquals(1295514727, response.actualCapacityInfo().succeeded()); + Assertions.assertEquals(1065671612, response.actualCapacityInfo().failed()); + Assertions.assertEquals(430211364, response.actualCapacityInfo().outdatedSucceeded()); + Assertions.assertEquals(1923526752, response.actualCapacityInfo().outdatedFailed()); + Assertions.assertEquals(666757100, response.endpointCount()); + Assertions.assertEquals(659953867, response.requestedCapacity()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusMockTests.java new file mode 100644 index 000000000000..7e3518c570ef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSkusMockTests.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.SkuResource; +import com.azure.resourcemanager.machinelearning.models.SkuScaleType; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +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 InferenceGroupsListSkusMockTests { + @Test + public void testListSkus() throws Exception { + String responseStr + = "{\"value\":[{\"capacity\":{\"default\":879645515,\"maximum\":2008023896,\"minimum\":1061937306,\"scaleType\":\"Manual\"},\"resourceType\":\"xsdxxflwfvahbw\",\"sku\":{\"name\":\"gu\",\"tier\":\"Premium\"}}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response = manager.inferenceGroups() + .listSkus("bhwybwmebmx", "wcf", "txkurp", "wksixhornv", 529646701, "xjkdsqe", + com.azure.core.util.Context.NONE); + + Assertions.assertEquals(879645515, response.iterator().next().capacity().defaultProperty()); + Assertions.assertEquals(2008023896, response.iterator().next().capacity().maximum()); + Assertions.assertEquals(1061937306, response.iterator().next().capacity().minimum()); + Assertions.assertEquals(SkuScaleType.MANUAL, response.iterator().next().capacity().scaleType()); + Assertions.assertEquals("gu", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteMockTests.java new file mode 100644 index 000000000000..791f0d9d27e1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsDeleteMockTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class InferencePoolsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.inferencePools().delete("izvsihsmtx", "cajh", "juqqtzrnubo", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java index fae7e25b9dbf..266dc75546e8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,21 +14,20 @@ public final class InstanceTypeSchemaResourcesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InstanceTypeSchemaResources model = BinaryData.fromString( - "{\"requests\":{\"mdlgy\":\"mw\",\"gnqfqqdlcvmyol\":\"ixokwtjawhv\",\"nzyzawatuwqko\":\"aymjchtvsnvlaq\",\"wgwima\":\"bczothymgobllms\"},\"limits\":{\"vkhgv\":\"akhtmhobcyanrfvq\",\"ymhcctopuo\":\"ogxkfnaoa\",\"hquhczygxvhajp\":\"yrnskb\"}}") + "{\"requests\":{\"he\":\"bdg\",\"zvzuat\":\"onsdunr\",\"bqskgqjbvitptpvs\":\"hgzuyxtrvf\"},\"limits\":{\"fdwfbwxy\":\"vdhpiwrmuwkgjwb\",\"jrzctwymz\":\"dqtmggcpdrmeg\"}}") .toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("mw", model.requests().get("mdlgy")); - Assertions.assertEquals("akhtmhobcyanrfvq", model.limits().get("vkhgv")); + Assertions.assertEquals("bdg", model.requests().get("he")); + Assertions.assertEquals("vdhpiwrmuwkgjwb", model.limits().get("fdwfbwxy")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { InstanceTypeSchemaResources model = new InstanceTypeSchemaResources() - .withRequests(mapOf("mdlgy", "mw", "gnqfqqdlcvmyol", "ixokwtjawhv", "nzyzawatuwqko", "aymjchtvsnvlaq", - "wgwima", "bczothymgobllms")) - .withLimits(mapOf("vkhgv", "akhtmhobcyanrfvq", "ymhcctopuo", "ogxkfnaoa", "hquhczygxvhajp", "yrnskb")); + .withRequests(mapOf("he", "bdg", "zvzuat", "onsdunr", "bqskgqjbvitptpvs", "hgzuyxtrvf")) + .withLimits(mapOf("fdwfbwxy", "vdhpiwrmuwkgjwb", "jrzctwymz", "dqtmggcpdrmeg")); model = BinaryData.fromObject(model).toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("mw", model.requests().get("mdlgy")); - Assertions.assertEquals("akhtmhobcyanrfvq", model.limits().get("vkhgv")); + Assertions.assertEquals("bdg", model.requests().get("he")); + Assertions.assertEquals("vdhpiwrmuwkgjwb", model.limits().get("fdwfbwxy")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java index 617c9326a2fa..91301931039b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,24 +15,23 @@ public final class InstanceTypeSchemaTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InstanceTypeSchema model = BinaryData.fromString( - "{\"nodeSelector\":{\"q\":\"vl\",\"nthbbnkgzukwd\":\"xyrqo\"},\"resources\":{\"requests\":{\"mlfuyfjbp\":\"jthfceyjnc\",\"yjmqrf\":\"iddhlrufzc\"},\"limits\":{\"rsazrhxud\":\"cuselq\",\"jmr\":\"qmdtffi\"}}}") + "{\"nodeSelector\":{\"kyvnhiysdhork\":\"uynf\",\"qki\":\"lhr\",\"qwmwqoguflteat\":\"lwkffl\"},\"resources\":{\"requests\":{\"bgysibthnvxw\":\"fzjxnjt\"},\"limits\":{\"kxunsaujqgbb\":\"tcbjdbtqy\",\"hgjsmbcsloy\":\"vovoa\"}}}") .toObject(InstanceTypeSchema.class); - Assertions.assertEquals("vl", model.nodeSelector().get("q")); - Assertions.assertEquals("jthfceyjnc", model.resources().requests().get("mlfuyfjbp")); - Assertions.assertEquals("cuselq", model.resources().limits().get("rsazrhxud")); + Assertions.assertEquals("uynf", model.nodeSelector().get("kyvnhiysdhork")); + Assertions.assertEquals("fzjxnjt", model.resources().requests().get("bgysibthnvxw")); + Assertions.assertEquals("tcbjdbtqy", model.resources().limits().get("kxunsaujqgbb")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InstanceTypeSchema model - = new InstanceTypeSchema().withNodeSelector(mapOf("q", "vl", "nthbbnkgzukwd", "xyrqo")) - .withResources(new InstanceTypeSchemaResources() - .withRequests(mapOf("mlfuyfjbp", "jthfceyjnc", "yjmqrf", "iddhlrufzc")) - .withLimits(mapOf("rsazrhxud", "cuselq", "jmr", "qmdtffi"))); + InstanceTypeSchema model = new InstanceTypeSchema() + .withNodeSelector(mapOf("kyvnhiysdhork", "uynf", "qki", "lhr", "qwmwqoguflteat", "lwkffl")) + .withResources(new InstanceTypeSchemaResources().withRequests(mapOf("bgysibthnvxw", "fzjxnjt")) + .withLimits(mapOf("kxunsaujqgbb", "tcbjdbtqy", "hgjsmbcsloy", "vovoa"))); model = BinaryData.fromObject(model).toObject(InstanceTypeSchema.class); - Assertions.assertEquals("vl", model.nodeSelector().get("q")); - Assertions.assertEquals("jthfceyjnc", model.resources().requests().get("mlfuyfjbp")); - Assertions.assertEquals("cuselq", model.resources().limits().get("rsazrhxud")); + Assertions.assertEquals("uynf", model.nodeSelector().get("kyvnhiysdhork")); + Assertions.assertEquals("fzjxnjt", model.resources().requests().get("bgysibthnvxw")); + Assertions.assertEquals("tcbjdbtqy", model.resources().limits().get("kxunsaujqgbb")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java index bc33c602dee3..14e4d97c33e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -22,82 +22,82 @@ public final class JobBaseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobBaseInner model = BinaryData.fromString( - "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"agxnvhycvdimw\",\"status\":\"CancelRequested\",\"experimentName\":\"gzgy\",\"services\":{\"auzpjlx\":{\"jobServiceType\":\"rw\",\"port\":1907482272,\"endpoint\":\"ye\",\"status\":\"kdhmeottawjyosx\",\"errorMessage\":\"hnhjtfvpndpmi\",\"properties\":{\"l\":\"nwynudq\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"abnsmj\":{\"jobServiceType\":\"huxiqhzlraymez\",\"port\":161523803,\"endpoint\":\"ihmxrfdsajredn\",\"status\":\"yshtuwgmev\",\"errorMessage\":\"fpwzyifrkgwltx\",\"properties\":{\"r\":\"pxgzdyimsfayor\",\"oge\":\"vk\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"f\":{\"jobServiceType\":\"ynq\",\"port\":1693738620,\"endpoint\":\"qs\",\"status\":\"vwjtqpkevmyltjc\",\"errorMessage\":\"pxklurccl\",\"properties\":{\"gpxvkqmaupxvpi\":\"annnoytzposewx\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"fyzyzeyuub\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"l\",\"notificationSetting\":{\"emails\":[\"ith\",\"ygvfltgvdihoyn\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobCompleted\",\"JobFailed\"],\"webhooks\":{\"ucpcunnuzdqumoen\":{\"webhookType\":\"Webhook\",\"eventType\":\"cy\"},\"hqhsknd\":{\"webhookType\":\"Webhook\",\"eventType\":\"naie\"},\"anniyopetxivcnr\":{\"webhookType\":\"Webhook\",\"eventType\":\"lqkaadlknwf\"}}},\"description\":\"xnucaephblkwqp\",\"tags\":{\"uzqymtuowog\":\"bqsdtcjbctvi\",\"vbrzcdb\":\"gitsqh\"},\"properties\":{\"rdjyibqb\":\"zndscxmxeatkdbmw\",\"alfihcjmobcancd\":\"aomhjrmkuhmaxl\",\"vaknokzwjj\":\"xxqcwgaxf\",\"tixldzyyfytpqs\":\"r\"}},\"id\":\"ymmpujivy\",\"name\":\"lkjuvsmbmslzoyov\",\"type\":\"zdbpqv\"}") + "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"jyihjcwwvaos\",\"computeId\":\"favh\",\"displayName\":\"psp\",\"experimentName\":\"eifdyfa\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"notificationSetting\":{\"emailOn\":[\"JobCompleted\",\"JobCancelled\"],\"emails\":[\"uzlai\"],\"webhooks\":{\"bszam\":{\"webhookType\":\"Webhook\",\"eventType\":\"tgg\"}}},\"parentJobName\":\"xejpd\",\"services\":{\"mowynjmoozmxu\":{\"endpoint\":\"wzu\",\"errorMessage\":\"yelrnh\",\"jobServiceType\":\"t\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1301482477,\"properties\":{\"dp\":\"syovqmqc\",\"xw\":\"oqwrnfckjthlok\"},\"status\":\"fubkngejjx\"},\"idzfpsfy\":{\"endpoint\":\"drsjtmn\",\"errorMessage\":\"jouwfzcfdt\",\"jobServiceType\":\"iaxtyrnuh\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1450785482,\"properties\":{\"soq\":\"sqbcmlroiomme\",\"abebckc\":\"blcyeqdobobaq\",\"pjcxbjgfm\":\"srsixwn\"},\"status\":\"yyfr\"},\"arsrdrw\":{\"endpoint\":\"idfhmlxrqkeknum\",\"errorMessage\":\"afzvptriysjrg\",\"jobServiceType\":\"uwpuqpsrcekdvvo\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1638895513,\"properties\":{\"gclvbwa\":\"g\"},\"status\":\"adrjbjng\"}},\"status\":\"Queued\",\"description\":\"cyniapy\",\"properties\":{\"ipzesstu\":\"rxirq\",\"xvzjoyxj\":\"nytkmlfupjzc\",\"cerfcvcpvf\":\"ahxuerrdaktnytk\",\"kmpwyvlhnh\":\"j\"},\"tags\":{\"lrcygotohzwto\":\"khlebgjgylsacagi\",\"tjsjzelsriemvu\":\"dhbxitrapwzhl\",\"ycvldeehcbsaip\":\"meakosy\"}},\"id\":\"uofkegbv\",\"name\":\"bd\",\"type\":\"edfflzvsluazz\"}") .toObject(JobBaseInner.class); - Assertions.assertEquals("xnucaephblkwqp", model.properties().description()); - Assertions.assertEquals("bqsdtcjbctvi", model.properties().tags().get("uzqymtuowog")); - Assertions.assertEquals("zndscxmxeatkdbmw", model.properties().properties().get("rdjyibqb")); - Assertions.assertEquals("agxnvhycvdimw", model.properties().displayName()); - Assertions.assertEquals("gzgy", model.properties().experimentName()); - Assertions.assertEquals("rw", model.properties().services().get("auzpjlx").jobServiceType()); - Assertions.assertEquals(1907482272, model.properties().services().get("auzpjlx").port()); - Assertions.assertEquals("ye", model.properties().services().get("auzpjlx").endpoint()); - Assertions.assertEquals("nwynudq", model.properties().services().get("auzpjlx").properties().get("l")); - Assertions.assertEquals("fyzyzeyuub", model.properties().computeId()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("l", model.properties().componentId()); - Assertions.assertEquals("ith", model.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, + Assertions.assertEquals("cyniapy", model.properties().description()); + Assertions.assertEquals("rxirq", model.properties().properties().get("ipzesstu")); + Assertions.assertEquals("khlebgjgylsacagi", model.properties().tags().get("lrcygotohzwto")); + Assertions.assertEquals("jyihjcwwvaos", model.properties().componentId()); + Assertions.assertEquals("favh", model.properties().computeId()); + Assertions.assertEquals("psp", model.properties().displayName()); + Assertions.assertEquals("eifdyfa", model.properties().experimentName()); + Assertions.assertFalse(model.properties().isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("cy", - model.properties().notificationSetting().webhooks().get("ucpcunnuzdqumoen").eventType()); + Assertions.assertEquals("uzlai", model.properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("tgg", model.properties().notificationSetting().webhooks().get("bszam").eventType()); + Assertions.assertEquals("xejpd", model.properties().parentJobName()); + Assertions.assertEquals("wzu", model.properties().services().get("mowynjmoozmxu").endpoint()); + Assertions.assertEquals("t", model.properties().services().get("mowynjmoozmxu").jobServiceType()); + Assertions.assertEquals(1301482477, model.properties().services().get("mowynjmoozmxu").port()); + Assertions.assertEquals("syovqmqc", model.properties().services().get("mowynjmoozmxu").properties().get("dp")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobBaseInner model = new JobBaseInner().withProperties(new JobBaseProperties().withDescription("xnucaephblkwqp") - .withTags(mapOf("uzqymtuowog", "bqsdtcjbctvi", "vbrzcdb", "gitsqh")) - .withProperties(mapOf("rdjyibqb", "zndscxmxeatkdbmw", "alfihcjmobcancd", "aomhjrmkuhmaxl", "vaknokzwjj", - "xxqcwgaxf", "tixldzyyfytpqs", "r")) - .withDisplayName("agxnvhycvdimw") - .withExperimentName("gzgy") - .withServices(mapOf("auzpjlx", - new JobService().withJobServiceType("rw") - .withPort(1907482272) - .withEndpoint("ye") - .withProperties(mapOf("l", "nwynudq")) - .withNodes(new Nodes()), - "abnsmj", - new JobService().withJobServiceType("huxiqhzlraymez") - .withPort(161523803) - .withEndpoint("ihmxrfdsajredn") - .withProperties(mapOf("r", "pxgzdyimsfayor", "oge", "vk")) - .withNodes(new Nodes()), - "f", - new JobService().withJobServiceType("ynq") - .withPort(1693738620) - .withEndpoint("qs") - .withProperties(mapOf("gpxvkqmaupxvpi", "annnoytzposewx")) - .withNodes(new Nodes()))) - .withComputeId("fyzyzeyuub") - .withIsArchived(false) + JobBaseInner model = new JobBaseInner().withProperties(new JobBaseProperties().withDescription("cyniapy") + .withProperties(mapOf("ipzesstu", "rxirq", "xvzjoyxj", "nytkmlfupjzc", "cerfcvcpvf", "ahxuerrdaktnytk", + "kmpwyvlhnh", "j")) + .withTags(mapOf("lrcygotohzwto", "khlebgjgylsacagi", "tjsjzelsriemvu", "dhbxitrapwzhl", "ycvldeehcbsaip", + "meakosy")) + .withComponentId("jyihjcwwvaos") + .withComputeId("favh") + .withDisplayName("psp") + .withExperimentName("eifdyfa") .withIdentity(new IdentityConfiguration()) - .withComponentId("l") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ith", "ygvfltgvdihoyn")) + .withIsArchived(false) + .withNotificationSetting(new NotificationSetting() .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("ucpcunnuzdqumoen", new Webhook().withEventType("cy"), "hqhsknd", - new Webhook().withEventType("naie"), "anniyopetxivcnr", - new Webhook().withEventType("lqkaadlknwf"))))); + Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_CANCELLED)) + .withEmails(Arrays.asList("uzlai")) + .withWebhooks(mapOf("bszam", new Webhook().withEventType("tgg")))) + .withParentJobName("xejpd") + .withServices(mapOf("mowynjmoozmxu", + new JobService().withEndpoint("wzu") + .withJobServiceType("t") + .withNodes(new Nodes()) + .withPort(1301482477) + .withProperties(mapOf("dp", "syovqmqc", "xw", "oqwrnfckjthlok")), + "idzfpsfy", + new JobService().withEndpoint("drsjtmn") + .withJobServiceType("iaxtyrnuh") + .withNodes(new Nodes()) + .withPort(1450785482) + .withProperties(mapOf("soq", "sqbcmlroiomme", "abebckc", "blcyeqdobobaq", "pjcxbjgfm", "srsixwn")), + "arsrdrw", + new JobService().withEndpoint("idfhmlxrqkeknum") + .withJobServiceType("uwpuqpsrcekdvvo") + .withNodes(new Nodes()) + .withPort(1638895513) + .withProperties(mapOf("gclvbwa", "g"))))); model = BinaryData.fromObject(model).toObject(JobBaseInner.class); - Assertions.assertEquals("xnucaephblkwqp", model.properties().description()); - Assertions.assertEquals("bqsdtcjbctvi", model.properties().tags().get("uzqymtuowog")); - Assertions.assertEquals("zndscxmxeatkdbmw", model.properties().properties().get("rdjyibqb")); - Assertions.assertEquals("agxnvhycvdimw", model.properties().displayName()); - Assertions.assertEquals("gzgy", model.properties().experimentName()); - Assertions.assertEquals("rw", model.properties().services().get("auzpjlx").jobServiceType()); - Assertions.assertEquals(1907482272, model.properties().services().get("auzpjlx").port()); - Assertions.assertEquals("ye", model.properties().services().get("auzpjlx").endpoint()); - Assertions.assertEquals("nwynudq", model.properties().services().get("auzpjlx").properties().get("l")); - Assertions.assertEquals("fyzyzeyuub", model.properties().computeId()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("l", model.properties().componentId()); - Assertions.assertEquals("ith", model.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, + Assertions.assertEquals("cyniapy", model.properties().description()); + Assertions.assertEquals("rxirq", model.properties().properties().get("ipzesstu")); + Assertions.assertEquals("khlebgjgylsacagi", model.properties().tags().get("lrcygotohzwto")); + Assertions.assertEquals("jyihjcwwvaos", model.properties().componentId()); + Assertions.assertEquals("favh", model.properties().computeId()); + Assertions.assertEquals("psp", model.properties().displayName()); + Assertions.assertEquals("eifdyfa", model.properties().experimentName()); + Assertions.assertFalse(model.properties().isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("cy", - model.properties().notificationSetting().webhooks().get("ucpcunnuzdqumoen").eventType()); + Assertions.assertEquals("uzlai", model.properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("tgg", model.properties().notificationSetting().webhooks().get("bszam").eventType()); + Assertions.assertEquals("xejpd", model.properties().parentJobName()); + Assertions.assertEquals("wzu", model.properties().services().get("mowynjmoozmxu").endpoint()); + Assertions.assertEquals("t", model.properties().services().get("mowynjmoozmxu").jobServiceType()); + Assertions.assertEquals(1301482477, model.properties().services().get("mowynjmoozmxu").port()); + Assertions.assertEquals("syovqmqc", model.properties().services().get("mowynjmoozmxu").properties().get("dp")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java index d3c47d6ab966..6ecbcbcd799d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -21,75 +21,72 @@ public final class JobBasePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobBaseProperties model = BinaryData.fromString( - "{\"jobType\":\"JobBaseProperties\",\"displayName\":\"efgv\",\"status\":\"Preparing\",\"experimentName\":\"kcvtl\",\"services\":{\"kalehp\":{\"jobServiceType\":\"skvcuartrhunl\",\"port\":1593194036,\"endpoint\":\"kycndzfqivjreuy\",\"status\":\"bmnwa\",\"errorMessage\":\"tbxoee\",\"properties\":{\"myymvqdbpbhfckdv\":\"lnf\",\"b\":\"zcrcssbzhddubbnq\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"chkhufm\":{\"jobServiceType\":\"awugiqjti\",\"port\":837547009,\"endpoint\":\"dminic\",\"status\":\"eajohiyg\",\"errorMessage\":\"n\",\"properties\":{\"qcs\":\"hpczykmktpvw\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"sruqnmdvha\":{\"jobServiceType\":\"umqy\",\"port\":1595572928,\"endpoint\":\"zulo\",\"status\":\"aeuzanh\",\"errorMessage\":\"nhsenwphpzfng\",\"properties\":{\"fwbeqrkuorh\":\"lidftujwjj\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"vjytiqswbq\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"iytxt\",\"notificationSetting\":{\"emails\":[\"vlbpktgdstyou\",\"mbewreswmo\",\"egmmuteyxe\",\"guqigijiitns\"],\"emailOn\":[\"JobFailed\"],\"webhooks\":{\"jwaiuf\":{\"webhookType\":\"Webhook\",\"eventType\":\"ygr\"}}},\"description\":\"raybfueqfr\",\"tags\":{\"ydkygywezskieca\":\"ydgr\",\"ixqcahyhxalybxaw\":\"ygzmxieqvdsmak\",\"jodqhykincn\":\"ijpodtblxpkkwj\"},\"properties\":{\"qodkadppyibngql\":\"ehllizhceum\",\"wrxwhydtl\":\"d\",\"uyem\":\"vvadswzs\"}}") + "{\"jobType\":\"JobBaseProperties\",\"componentId\":\"wimaaneakhtmh\",\"computeId\":\"cyanrfvqtvkhgv\",\"displayName\":\"gxkfnaoaqymhccto\",\"experimentName\":\"o\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"notificationSetting\":{\"emailOn\":[\"JobCompleted\",\"JobCompleted\",\"JobCompleted\",\"JobFailed\"],\"emails\":[\"zygxvha\",\"pxecxqnwhscozaw\"],\"webhooks\":{\"fljfewxqouoxudnm\":{\"webhookType\":\"Webhook\",\"eventType\":\"smpknpwi\"},\"oqueqihkkyowltj\":{\"webhookType\":\"Webhook\",\"eventType\":\"aprhknqiijgencdg\"},\"roqksmfxm\":{\"webhookType\":\"Webhook\",\"eventType\":\"whldxwhie\"},\"dyotnplfacqoccq\":{\"webhookType\":\"Webhook\",\"eventType\":\"prstvkitbfj\"}}},\"parentJobName\":\"xwe\",\"services\":{\"e\":{\"endpoint\":\"rhutf\",\"errorMessage\":\"a\",\"jobServiceType\":\"xopgehpadkmd\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1384162220,\"properties\":{\"harls\":\"vctkbbx\",\"yngsuxxcz\":\"rncclabv\",\"dsaidjanormovdxx\":\"myqjog\"},\"status\":\"ntujmoilunwemhd\"}},\"status\":\"Unknown\",\"description\":\"kyozds\",\"properties\":{\"htslejtvxj\":\"uegrh\"},\"tags\":{\"fiobpnjodfc\":\"gj\",\"ejgwe\":\"jqqwmtqsmoxsazu\"}}") .toObject(JobBaseProperties.class); - Assertions.assertEquals("raybfueqfr", model.description()); - Assertions.assertEquals("ydgr", model.tags().get("ydkygywezskieca")); - Assertions.assertEquals("ehllizhceum", model.properties().get("qodkadppyibngql")); - Assertions.assertEquals("efgv", model.displayName()); - Assertions.assertEquals("kcvtl", model.experimentName()); - Assertions.assertEquals("skvcuartrhunl", model.services().get("kalehp").jobServiceType()); - Assertions.assertEquals(1593194036, model.services().get("kalehp").port()); - Assertions.assertEquals("kycndzfqivjreuy", model.services().get("kalehp").endpoint()); - Assertions.assertEquals("lnf", model.services().get("kalehp").properties().get("myymvqdbpbhfckdv")); - Assertions.assertEquals("vjytiqswbq", model.computeId()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("iytxt", model.componentId()); - Assertions.assertEquals("vlbpktgdstyou", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ygr", model.notificationSetting().webhooks().get("jwaiuf").eventType()); + Assertions.assertEquals("kyozds", model.description()); + Assertions.assertEquals("uegrh", model.properties().get("htslejtvxj")); + Assertions.assertEquals("gj", model.tags().get("fiobpnjodfc")); + Assertions.assertEquals("wimaaneakhtmh", model.componentId()); + Assertions.assertEquals("cyanrfvqtvkhgv", model.computeId()); + Assertions.assertEquals("gxkfnaoaqymhccto", model.displayName()); + Assertions.assertEquals("o", model.experimentName()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, + model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("zygxvha", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("smpknpwi", model.notificationSetting().webhooks().get("fljfewxqouoxudnm").eventType()); + Assertions.assertEquals("xwe", model.parentJobName()); + Assertions.assertEquals("rhutf", model.services().get("e").endpoint()); + Assertions.assertEquals("xopgehpadkmd", model.services().get("e").jobServiceType()); + Assertions.assertEquals(1384162220, model.services().get("e").port()); + Assertions.assertEquals("vctkbbx", model.services().get("e").properties().get("harls")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobBaseProperties model = new JobBaseProperties().withDescription("raybfueqfr") - .withTags( - mapOf("ydkygywezskieca", "ydgr", "ixqcahyhxalybxaw", "ygzmxieqvdsmak", "jodqhykincn", "ijpodtblxpkkwj")) - .withProperties(mapOf("qodkadppyibngql", "ehllizhceum", "wrxwhydtl", "d", "uyem", "vvadswzs")) - .withDisplayName("efgv") - .withExperimentName("kcvtl") - .withServices(mapOf("kalehp", - new JobService().withJobServiceType("skvcuartrhunl") - .withPort(1593194036) - .withEndpoint("kycndzfqivjreuy") - .withProperties(mapOf("myymvqdbpbhfckdv", "lnf", "b", "zcrcssbzhddubbnq")) - .withNodes(new Nodes()), - "chkhufm", - new JobService().withJobServiceType("awugiqjti") - .withPort(837547009) - .withEndpoint("dminic") - .withProperties(mapOf("qcs", "hpczykmktpvw")) - .withNodes(new Nodes()), - "sruqnmdvha", - new JobService().withJobServiceType("umqy") - .withPort(1595572928) - .withEndpoint("zulo") - .withProperties(mapOf("fwbeqrkuorh", "lidftujwjj")) - .withNodes(new Nodes()))) - .withComputeId("vjytiqswbq") - .withIsArchived(false) + JobBaseProperties model = new JobBaseProperties().withDescription("kyozds") + .withProperties(mapOf("htslejtvxj", "uegrh")) + .withTags(mapOf("fiobpnjodfc", "gj", "ejgwe", "jqqwmtqsmoxsazu")) + .withComponentId("wimaaneakhtmh") + .withComputeId("cyanrfvqtvkhgv") + .withDisplayName("gxkfnaoaqymhccto") + .withExperimentName("o") .withIdentity(new IdentityConfiguration()) - .withComponentId("iytxt") + .withIsArchived(false) .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("vlbpktgdstyou", "mbewreswmo", "egmmuteyxe", "guqigijiitns")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("jwaiuf", new Webhook().withEventType("ygr")))); + .withEmailOn( + Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_COMPLETED, + EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) + .withEmails(Arrays.asList("zygxvha", "pxecxqnwhscozaw")) + .withWebhooks(mapOf("fljfewxqouoxudnm", new Webhook().withEventType("smpknpwi"), "oqueqihkkyowltj", + new Webhook().withEventType("aprhknqiijgencdg"), "roqksmfxm", + new Webhook().withEventType("whldxwhie"), "dyotnplfacqoccq", + new Webhook().withEventType("prstvkitbfj")))) + .withParentJobName("xwe") + .withServices(mapOf("e", + new JobService().withEndpoint("rhutf") + .withJobServiceType("xopgehpadkmd") + .withNodes(new Nodes()) + .withPort(1384162220) + .withProperties(mapOf("harls", "vctkbbx", "yngsuxxcz", "rncclabv", "dsaidjanormovdxx", "myqjog")))); model = BinaryData.fromObject(model).toObject(JobBaseProperties.class); - Assertions.assertEquals("raybfueqfr", model.description()); - Assertions.assertEquals("ydgr", model.tags().get("ydkygywezskieca")); - Assertions.assertEquals("ehllizhceum", model.properties().get("qodkadppyibngql")); - Assertions.assertEquals("efgv", model.displayName()); - Assertions.assertEquals("kcvtl", model.experimentName()); - Assertions.assertEquals("skvcuartrhunl", model.services().get("kalehp").jobServiceType()); - Assertions.assertEquals(1593194036, model.services().get("kalehp").port()); - Assertions.assertEquals("kycndzfqivjreuy", model.services().get("kalehp").endpoint()); - Assertions.assertEquals("lnf", model.services().get("kalehp").properties().get("myymvqdbpbhfckdv")); - Assertions.assertEquals("vjytiqswbq", model.computeId()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("iytxt", model.componentId()); - Assertions.assertEquals("vlbpktgdstyou", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ygr", model.notificationSetting().webhooks().get("jwaiuf").eventType()); + Assertions.assertEquals("kyozds", model.description()); + Assertions.assertEquals("uegrh", model.properties().get("htslejtvxj")); + Assertions.assertEquals("gj", model.tags().get("fiobpnjodfc")); + Assertions.assertEquals("wimaaneakhtmh", model.componentId()); + Assertions.assertEquals("cyanrfvqtvkhgv", model.computeId()); + Assertions.assertEquals("gxkfnaoaqymhccto", model.displayName()); + Assertions.assertEquals("o", model.experimentName()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, + model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("zygxvha", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("smpknpwi", model.notificationSetting().webhooks().get("fljfewxqouoxudnm").eventType()); + Assertions.assertEquals("xwe", model.parentJobName()); + Assertions.assertEquals("rhutf", model.services().get("e").endpoint()); + Assertions.assertEquals("xopgehpadkmd", model.services().get("e").jobServiceType()); + Assertions.assertEquals(1384162220, model.services().get("e").port()); + Assertions.assertEquals("vctkbbx", model.services().get("e").properties().get("harls")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java index ae19cb7ea066..f65aa19f8204 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java @@ -1,146 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; +import com.azure.resourcemanager.machinelearning.implementation.models.JobBaseResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class JobBaseResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobBaseResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"bjazejwwviy\",\"status\":\"Completed\",\"experimentName\":\"uhbrnnhjxsq\",\"services\":{\"umtggmuwdchozfn\":{\"jobServiceType\":\"kbiwetpozyc\",\"port\":1973801888,\"endpoint\":\"yhgfsetzle\",\"status\":\"sfledyn\",\"errorMessage\":\"pziuwfbzkkdtnh\",\"properties\":{\"pkpbafvafhlbylcc\":\"cljse\",\"fwrsofpltdbmair\":\"evxrhyz\",\"pqigtuujwouhd\":\"hvhfnracw\",\"bvitvqkjya\":\"wsigrbjbxsj\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"exlvxnoakiz\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"naqln\",\"notificationSetting\":{\"emails\":[\"uyxlykwphvxzcw\",\"hmpejtlkexaonw\"],\"emailOn\":[\"JobFailed\"],\"webhooks\":{\"rxhxkn\":{\"webhookType\":\"Webhook\"}}},\"description\":\"crmmkyupijuby\",\"tags\":{\"em\":\"kakfqfr\"},\"properties\":{\"dxphlk\":\"dudxjascowvfdjk\",\"dkz\":\"snmgzvyfi\",\"uqwqulsutrjbhxyk\":\"qnwsithuqolyah\"}},\"id\":\"y\",\"name\":\"ezvqq\",\"type\":\"g\"},{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"ftbcvexreuquow\",\"status\":\"Preparing\",\"experimentName\":\"fwhreagkhyxv\",\"services\":{\"l\":{\"jobServiceType\":\"bczsulmdgglmepjp\",\"port\":1660253828,\"endpoint\":\"kgsangpszng\",\"status\":\"p\",\"errorMessage\":\"lkvec\",\"properties\":{\"foknubnoitp\":\"cngoadyedmzrg\",\"rgdg\":\"pz\",\"we\":\"vcoqraswugyxpqi\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"ckbbcc\":{\"jobServiceType\":\"skbuhzaca\",\"port\":149181411,\"endpoint\":\"tco\",\"status\":\"ujpdsxzak\",\"errorMessage\":\"jkmvbi\",\"properties\":{\"bemyeji\":\"ofqcvovjufycsjm\",\"rtudawlpjfel\":\"iuxegth\",\"bgqnz\":\"erppt\",\"ialwc\":\"nhii\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"iua\":{\"jobServiceType\":\"zpraoxn\",\"port\":606416580,\"endpoint\":\"a\",\"status\":\"gftipwc\",\"errorMessage\":\"yubhiqdx\",\"properties\":{\"gbylbuig\":\"npnuhzafccnuhi\",\"dlbnbqxvhcsy\":\"xvatvcr\",\"xdndsbdweaderzm\":\"zlwxaeaovur\",\"ttmvmmagoaqylkjz\":\"ntopa\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"cgm\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"inzcpdltkrlgj\",\"notificationSetting\":{\"emails\":[\"rvcqguefzhomphe\",\"durelyujl\",\"youmpc\"],\"emailOn\":[\"JobCompleted\",\"JobCancelled\",\"JobCompleted\",\"JobCompleted\"],\"webhooks\":{\"ptajbrzmq\":{\"webhookType\":\"Webhook\"},\"ucycijo\":{\"webhookType\":\"Webhook\"}}},\"description\":\"xiutgjcyzyzj\",\"tags\":{\"fwwvuatbwbqam\":\"qjbtxjeaoqaqbzgy\"},\"properties\":{\"pkcvmwf\":\"liys\",\"pmywbormcq\":\"uxx\",\"mcsmyqwixvcp\":\"iciijqpkzfbojx\"}},\"id\":\"kwywzwofalic\",\"name\":\"duoiqt\",\"type\":\"mt\"}],\"nextLink\":\"sknxrwzawnvsbcf\"}") + "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"veugpx\",\"computeId\":\"empupbscboxra\",\"displayName\":\"czmrjgobe\",\"experimentName\":\"eheow\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"notificationSetting\":{\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"emails\":[\"k\",\"wrjsbd\",\"mseesacuicnvqiqs\"],\"webhooks\":{\"mrfaptndr\":{\"webhookType\":\"Webhook\"},\"mnlhnkmx\":{\"webhookType\":\"Webhook\"},\"qkekcd\":{\"webhookType\":\"Webhook\"},\"viiebe\":{\"webhookType\":\"Webhook\"}}},\"parentJobName\":\"fzavqym\",\"services\":{\"otkxxlwwooxg\":{\"endpoint\":\"iuceplbrzgk\",\"errorMessage\":\"rwpqbstweobptsc\",\"jobServiceType\":\"ykk\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1668426575,\"properties\":{\"bnlyoifgdfzj\":\"noyjyflsm\"},\"status\":\"hykcvoevcwf\"},\"oypoedkspwwibpy\":{\"endpoint\":\"dzc\",\"errorMessage\":\"vypjhubdmgobxe\",\"jobServiceType\":\"jcqgzwvxwi\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1231849868,\"properties\":{\"rjiqoqovqhgphgxu\":\"jklqrljdcukyla\",\"cy\":\"ud\",\"dnqivahfcqw\":\"ruvumry\"},\"status\":\"zebpicci\"}},\"status\":\"NotStarted\",\"description\":\"gxuyxsxteui\",\"properties\":{\"fnhcg\":\"nf\",\"rfqd\":\"aqsr\",\"b\":\"rkrgsdc\",\"zfutgpbygbnb\":\"mgqlwyqznbbyzpo\"},\"tags\":{\"ewflwzhxzuxe\":\"iqgtzpv\"}},\"id\":\"hywlrkqsq\",\"name\":\"vdkfpfjdajd\",\"type\":\"xymxxyfrd\"}],\"nextLink\":\"dcetfvgwfwsldig\"}") .toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("crmmkyupijuby", model.value().get(0).properties().description()); - Assertions.assertEquals("kakfqfr", model.value().get(0).properties().tags().get("em")); - Assertions.assertEquals("dudxjascowvfdjk", model.value().get(0).properties().properties().get("dxphlk")); - Assertions.assertEquals("bjazejwwviy", model.value().get(0).properties().displayName()); - Assertions.assertEquals("uhbrnnhjxsq", model.value().get(0).properties().experimentName()); - Assertions.assertEquals("kbiwetpozyc", - model.value().get(0).properties().services().get("umtggmuwdchozfn").jobServiceType()); - Assertions.assertEquals(1973801888, model.value().get(0).properties().services().get("umtggmuwdchozfn").port()); - Assertions.assertEquals("yhgfsetzle", - model.value().get(0).properties().services().get("umtggmuwdchozfn").endpoint()); - Assertions.assertEquals("cljse", - model.value().get(0).properties().services().get("umtggmuwdchozfn").properties().get("pkpbafvafhlbylcc")); - Assertions.assertEquals("exlvxnoakiz", model.value().get(0).properties().computeId()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("naqln", model.value().get(0).properties().componentId()); - Assertions.assertEquals("uyxlykwphvxzcw", - model.value().get(0).properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("gxuyxsxteui", model.value().get(0).properties().description()); + Assertions.assertEquals("nf", model.value().get(0).properties().properties().get("fnhcg")); + Assertions.assertEquals("iqgtzpv", model.value().get(0).properties().tags().get("ewflwzhxzuxe")); + Assertions.assertEquals("veugpx", model.value().get(0).properties().componentId()); + Assertions.assertEquals("empupbscboxra", model.value().get(0).properties().computeId()); + Assertions.assertEquals("czmrjgobe", model.value().get(0).properties().displayName()); + Assertions.assertEquals("eheow", model.value().get(0).properties().experimentName()); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.value().get(0).properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("sknxrwzawnvsbcf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseResourceArmPaginatedResult model = new JobBaseResourceArmPaginatedResult() - .withValue(Arrays.asList( - new JobBaseInner().withProperties(new JobBaseProperties().withDescription("crmmkyupijuby") - .withTags(mapOf("em", "kakfqfr")) - .withProperties( - mapOf("dxphlk", "dudxjascowvfdjk", "dkz", "snmgzvyfi", "uqwqulsutrjbhxyk", "qnwsithuqolyah")) - .withDisplayName("bjazejwwviy") - .withExperimentName("uhbrnnhjxsq") - .withServices(mapOf("umtggmuwdchozfn", - new JobService().withJobServiceType("kbiwetpozyc") - .withPort(1973801888) - .withEndpoint("yhgfsetzle") - .withProperties(mapOf("pkpbafvafhlbylcc", "cljse", "fwrsofpltdbmair", "evxrhyz", - "pqigtuujwouhd", "hvhfnracw", "bvitvqkjya", "wsigrbjbxsj")) - .withNodes(new Nodes()))) - .withComputeId("exlvxnoakiz") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("naqln") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("uyxlykwphvxzcw", "hmpejtlkexaonw")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("rxhxkn", new Webhook())))), - new JobBaseInner().withProperties(new JobBaseProperties().withDescription("xiutgjcyzyzj") - .withTags(mapOf("fwwvuatbwbqam", "qjbtxjeaoqaqbzgy")) - .withProperties(mapOf("pkcvmwf", "liys", "pmywbormcq", "uxx", "mcsmyqwixvcp", "iciijqpkzfbojx")) - .withDisplayName("ftbcvexreuquow") - .withExperimentName("fwhreagkhyxv") - .withServices(mapOf("l", - new JobService().withJobServiceType("bczsulmdgglmepjp") - .withPort(1660253828) - .withEndpoint("kgsangpszng") - .withProperties( - mapOf("foknubnoitp", "cngoadyedmzrg", "rgdg", "pz", "we", "vcoqraswugyxpqi")) - .withNodes(new Nodes()), - "ckbbcc", - new JobService().withJobServiceType("skbuhzaca") - .withPort(149181411) - .withEndpoint("tco") - .withProperties(mapOf("bemyeji", "ofqcvovjufycsjm", "rtudawlpjfel", "iuxegth", "bgqnz", - "erppt", "ialwc", "nhii")) - .withNodes(new Nodes()), - "iua", - new JobService().withJobServiceType("zpraoxn") - .withPort(606416580) - .withEndpoint("a") - .withProperties(mapOf("gbylbuig", "npnuhzafccnuhi", "dlbnbqxvhcsy", "xvatvcr", - "xdndsbdweaderzm", "zlwxaeaovur", "ttmvmmagoaqylkjz", "ntopa")) - .withNodes(new Nodes()))) - .withComputeId("cgm") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("inzcpdltkrlgj") - .withNotificationSetting( - new NotificationSetting().withEmails(Arrays.asList("rvcqguefzhomphe", "durelyujl", "youmpc")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("ptajbrzmq", new Webhook(), "ucycijo", new Webhook())))))) - .withNextLink("sknxrwzawnvsbcf"); - model = BinaryData.fromObject(model).toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("crmmkyupijuby", model.value().get(0).properties().description()); - Assertions.assertEquals("kakfqfr", model.value().get(0).properties().tags().get("em")); - Assertions.assertEquals("dudxjascowvfdjk", model.value().get(0).properties().properties().get("dxphlk")); - Assertions.assertEquals("bjazejwwviy", model.value().get(0).properties().displayName()); - Assertions.assertEquals("uhbrnnhjxsq", model.value().get(0).properties().experimentName()); - Assertions.assertEquals("kbiwetpozyc", - model.value().get(0).properties().services().get("umtggmuwdchozfn").jobServiceType()); - Assertions.assertEquals(1973801888, model.value().get(0).properties().services().get("umtggmuwdchozfn").port()); - Assertions.assertEquals("yhgfsetzle", - model.value().get(0).properties().services().get("umtggmuwdchozfn").endpoint()); - Assertions.assertEquals("cljse", - model.value().get(0).properties().services().get("umtggmuwdchozfn").properties().get("pkpbafvafhlbylcc")); - Assertions.assertEquals("exlvxnoakiz", model.value().get(0).properties().computeId()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("naqln", model.value().get(0).properties().componentId()); - Assertions.assertEquals("uyxlykwphvxzcw", - model.value().get(0).properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.value().get(0).properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("sknxrwzawnvsbcf", 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; + Assertions.assertEquals("k", model.value().get(0).properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("fzavqym", model.value().get(0).properties().parentJobName()); + Assertions.assertEquals("iuceplbrzgk", + model.value().get(0).properties().services().get("otkxxlwwooxg").endpoint()); + Assertions.assertEquals("ykk", + model.value().get(0).properties().services().get("otkxxlwwooxg").jobServiceType()); + Assertions.assertEquals(1668426575, model.value().get(0).properties().services().get("otkxxlwwooxg").port()); + Assertions.assertEquals("noyjyflsm", + model.value().get(0).properties().services().get("otkxxlwwooxg").properties().get("bnlyoifgdfzj")); + Assertions.assertEquals("dcetfvgwfwsldig", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java index e51367b1c7e8..6c8c1edff981 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class JobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - JobInput model - = BinaryData.fromString("{\"jobInputType\":\"JobInput\",\"description\":\"c\"}").toObject(JobInput.class); - Assertions.assertEquals("c", model.description()); + JobInput model = BinaryData.fromString("{\"jobInputType\":\"JobInput\",\"description\":\"znuxkeuairaabmdl\"}") + .toObject(JobInput.class); + Assertions.assertEquals("znuxkeuairaabmdl", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobInput model = new JobInput().withDescription("c"); + JobInput model = new JobInput().withDescription("znuxkeuairaabmdl"); model = BinaryData.fromObject(model).toObject(JobInput.class); - Assertions.assertEquals("c", model.description()); + Assertions.assertEquals("znuxkeuairaabmdl", model.description()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java index 91ca0dca3536..0acf726901bd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class JobLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - JobLimits model = BinaryData.fromString("{\"jobLimitsType\":\"JobLimits\",\"timeout\":\"PT90H5M41S\"}") + JobLimits model = BinaryData.fromString("{\"jobLimitsType\":\"JobLimits\",\"timeout\":\"PT98H21M41S\"}") .toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H5M41S"), model.timeout()); + Assertions.assertEquals(Duration.parse("PT98H21M41S"), model.timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobLimits model = new JobLimits().withTimeout(Duration.parse("PT90H5M41S")); + JobLimits model = new JobLimits().withTimeout(Duration.parse("PT98H21M41S")); model = BinaryData.fromObject(model).toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H5M41S"), model.timeout()); + Assertions.assertEquals(Duration.parse("PT98H21M41S"), model.timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java index cb466915ff1d..bedc5dcc4e70 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class JobOutputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - JobOutput model = BinaryData.fromString("{\"jobOutputType\":\"JobOutput\",\"description\":\"o\"}") + JobOutput model = BinaryData.fromString("{\"jobOutputType\":\"JobOutput\",\"description\":\"jvpzaptuoskaoiz\"}") .toObject(JobOutput.class); - Assertions.assertEquals("o", model.description()); + Assertions.assertEquals("jvpzaptuoskaoiz", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobOutput model = new JobOutput().withDescription("o"); + JobOutput model = new JobOutput().withDescription("jvpzaptuoskaoiz"); model = BinaryData.fromObject(model).toObject(JobOutput.class); - Assertions.assertEquals("o", model.description()); + Assertions.assertEquals("jvpzaptuoskaoiz", model.description()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java index a72127c5c662..ca9134a8e0ae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -14,27 +15,29 @@ public final class JobResourceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobResourceConfiguration model = BinaryData.fromString( - "{\"shmSize\":\"ocfkumcfjxoky\",\"dockerArgs\":\"syasvfnkwmygjjek\",\"instanceCount\":713077193,\"instanceType\":\"drugjqyc\",\"properties\":{\"r\":\"dataxkrdtul\",\"tcsubmzoo\":\"datajdkl\",\"hdyslbklglm\":\"datasvobchkxfp\",\"yqshwyqxridtt\":\"datankkw\"}}") + "{\"dockerArgs\":\"ecovagzkheubanlx\",\"dockerArgsList\":[\"qcckqiawzlz\",\"laslgacizux\",\"r\"],\"shmSize\":\"wp\",\"instanceCount\":1124635117,\"instanceType\":\"udoejtighsxjp\",\"properties\":{\"vuuwxhmeh\":\"\\\"datakqbalah\\\"\"}}") .toObject(JobResourceConfiguration.class); - Assertions.assertEquals(713077193, model.instanceCount()); - Assertions.assertEquals("drugjqyc", model.instanceType()); - Assertions.assertEquals("ocfkumcfjxoky", model.shmSize()); - Assertions.assertEquals("syasvfnkwmygjjek", model.dockerArgs()); + Assertions.assertEquals(1124635117, model.instanceCount()); + Assertions.assertEquals("udoejtighsxjp", model.instanceType()); + Assertions.assertEquals("ecovagzkheubanlx", model.dockerArgs()); + Assertions.assertEquals("qcckqiawzlz", model.dockerArgsList().get(0)); + Assertions.assertEquals("wp", model.shmSize()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobResourceConfiguration model = new JobResourceConfiguration().withInstanceCount(713077193) - .withInstanceType("drugjqyc") - .withProperties(mapOf("r", "dataxkrdtul", "tcsubmzoo", "datajdkl", "hdyslbklglm", "datasvobchkxfp", - "yqshwyqxridtt", "datankkw")) - .withShmSize("ocfkumcfjxoky") - .withDockerArgs("syasvfnkwmygjjek"); + JobResourceConfiguration model = new JobResourceConfiguration().withInstanceCount(1124635117) + .withInstanceType("udoejtighsxjp") + .withProperties(mapOf("vuuwxhmeh", "\"datakqbalah\"")) + .withDockerArgs("ecovagzkheubanlx") + .withDockerArgsList(Arrays.asList("qcckqiawzlz", "laslgacizux", "r")) + .withShmSize("wp"); model = BinaryData.fromObject(model).toObject(JobResourceConfiguration.class); - Assertions.assertEquals(713077193, model.instanceCount()); - Assertions.assertEquals("drugjqyc", model.instanceType()); - Assertions.assertEquals("ocfkumcfjxoky", model.shmSize()); - Assertions.assertEquals("syasvfnkwmygjjek", model.dockerArgs()); + Assertions.assertEquals(1124635117, model.instanceCount()); + Assertions.assertEquals("udoejtighsxjp", model.instanceType()); + Assertions.assertEquals("ecovagzkheubanlx", model.dockerArgs()); + Assertions.assertEquals("qcckqiawzlz", model.dockerArgsList().get(0)); + Assertions.assertEquals("wp", model.shmSize()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourcesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourcesTests.java new file mode 100644 index 000000000000..2b07ab08d580 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourcesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.JobResources; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class JobResourcesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + JobResources model = BinaryData.fromString("{\"instanceTypes\":[\"p\"]}").toObject(JobResources.class); + Assertions.assertEquals("p", model.instanceTypes().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + JobResources model = new JobResources().withInstanceTypes(Arrays.asList("p")); + model = BinaryData.fromObject(model).toObject(JobResources.class); + Assertions.assertEquals("p", model.instanceTypes().get(0)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java index 0f89d727f4c1..bcce49cbf517 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -22,89 +22,93 @@ public final class JobScheduleActionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobScheduleAction model = BinaryData.fromString( - "{\"actionType\":\"CreateJob\",\"jobDefinition\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"fkbzbfbxjblajy\",\"status\":\"Preparing\",\"experimentName\":\"ycsbtoi\",\"services\":{\"rgihlnzffewv\":{\"jobServiceType\":\"jmofs\",\"port\":2075523091,\"endpoint\":\"gnywxu\",\"status\":\"lfj\",\"errorMessage\":\"gwtmszcf\",\"properties\":{\"pagknxma\":\"peqregfur\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"pwwvmbjecfw\":{\"jobServiceType\":\"ycjcgeipqxxsdy\",\"port\":521155711,\"endpoint\":\"ydsmmabh\",\"status\":\"lejqzhpvhxp\",\"errorMessage\":\"djze\",\"properties\":{\"ogtqscj\":\"gf\",\"cuex\":\"vqerqxkomwdzpzl\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"aagwiijcfqiywhxp\":{\"jobServiceType\":\"ghnkfrwxohlydsn\",\"port\":935936431,\"endpoint\":\"hiypbfhmihi\",\"status\":\"qozewbr\",\"errorMessage\":\"jzgkbrauxbo\",\"properties\":{\"uudrizwkwkjxlaac\":\"nnqbjxgjwsreruk\",\"evgb\":\"dikqelssybz\",\"zyjj\":\"rommkiqhypwt\",\"omzq\":\"u\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"kcu\":{\"jobServiceType\":\"apialezaydpuzu\",\"port\":301398329,\"endpoint\":\"fxlie\",\"status\":\"ot\",\"errorMessage\":\"mhssfnwh\",\"properties\":{\"ckn\":\"hh\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hdgwuzrono\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"kdnwy\",\"notificationSetting\":{\"emails\":[\"ikgxkkzz\",\"zdjekebawnx\"],\"emailOn\":[\"JobCompleted\",\"JobFailed\"],\"webhooks\":{\"ulp\":{\"webhookType\":\"Webhook\",\"eventType\":\"irgcjfai\"},\"qnfforxsqtzngxbs\":{\"webhookType\":\"Webhook\",\"eventType\":\"akrxi\"},\"xcmmhipbvskcitly\":{\"webhookType\":\"Webhook\",\"eventType\":\"ewg\"}}},\"description\":\"wfsaa\",\"tags\":{\"c\":\"gb\"},\"properties\":{\"ajklnac\":\"idyli\",\"rjjaojpz\":\"dnxqeonm\"}}}") + "{\"actionType\":\"CreateJob\",\"jobDefinition\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"scrpilgftrqrej\",\"computeId\":\"ahuqi\",\"displayName\":\"dahlfxlmuifmuadj\",\"experimentName\":\"snc\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"notificationSetting\":{\"emailOn\":[\"JobCompleted\",\"JobCancelled\",\"JobCancelled\"],\"emails\":[\"tybnxgztlcgctj\",\"hfjv\",\"ywjzebecuvlbefvw\"],\"webhooks\":{\"woxzgwpsyxji\":{\"webhookType\":\"Webhook\",\"eventType\":\"xpyl\"},\"qwjxi\":{\"webhookType\":\"Webhook\",\"eventType\":\"ypdvrbkerdkdkga\"},\"pjois\":{\"webhookType\":\"Webhook\",\"eventType\":\"fkcefeygz\"},\"entq\":{\"webhookType\":\"Webhook\",\"eventType\":\"naybdjnxu\"}}},\"parentJobName\":\"tw\",\"services\":{\"rvfsxxbydesq\":{\"endpoint\":\"ymulwivqtowl\",\"errorMessage\":\"sycoybajasqub\",\"jobServiceType\":\"j\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":325528029,\"properties\":{\"tfxcpupuk\":\"wmchqo\",\"osaonhqnamppu\":\"ymjzpwdlvwtiws\",\"eajbkajlcyizyddc\":\"tassaekewna\"},\"status\":\"od\"},\"fpqdow\":{\"endpoint\":\"gecpwgoljtzx\",\"errorMessage\":\"xsdobygoogxqapjx\",\"jobServiceType\":\"zyjfuc\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":762303832,\"properties\":{\"kvibfa\":\"os\",\"nzpducdaaktu\":\"gmat\"},\"status\":\"tzboim\"},\"xoia\":{\"endpoint\":\"pnw\",\"errorMessage\":\"tfvpctfjikff\",\"jobServiceType\":\"g\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1429753327,\"properties\":{\"uldbkke\":\"h\",\"xjqifhujjsbc\":\"jkjigawgaz\",\"lirh\":\"lzaahzbhuroolk\"},\"status\":\"ojusuzgfjzcva\"},\"jbpfiddh\":{\"endpoint\":\"hfxwccokd\",\"errorMessage\":\"ukmkczynu\",\"jobServiceType\":\"oq\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1004791045,\"properties\":{\"kgzukwdrnzkjth\":\"ljqkxyrqolnthbb\"},\"status\":\"eyjncjmlfuy\"}},\"status\":\"Failed\",\"description\":\"zcqy\",\"properties\":{\"k\":\"rfuiocusel\",\"sjmrkkhm\":\"sazrhxuddqmdtff\",\"jawh\":\"dmdlgyqixokw\"},\"tags\":{\"qdlcvmyolc\":\"nqf\",\"tvsnvl\":\"ymjc\",\"atuwqkokbc\":\"qdnzyza\",\"msn\":\"othymgobl\"}}}") .toObject(JobScheduleAction.class); - Assertions.assertEquals("wfsaa", model.jobDefinition().description()); - Assertions.assertEquals("gb", model.jobDefinition().tags().get("c")); - Assertions.assertEquals("idyli", model.jobDefinition().properties().get("ajklnac")); - Assertions.assertEquals("fkbzbfbxjblajy", model.jobDefinition().displayName()); - Assertions.assertEquals("ycsbtoi", model.jobDefinition().experimentName()); - Assertions.assertEquals("jmofs", model.jobDefinition().services().get("rgihlnzffewv").jobServiceType()); - Assertions.assertEquals(2075523091, model.jobDefinition().services().get("rgihlnzffewv").port()); - Assertions.assertEquals("gnywxu", model.jobDefinition().services().get("rgihlnzffewv").endpoint()); - Assertions.assertEquals("peqregfur", - model.jobDefinition().services().get("rgihlnzffewv").properties().get("pagknxma")); - Assertions.assertEquals("hdgwuzrono", model.jobDefinition().computeId()); - Assertions.assertEquals(false, model.jobDefinition().isArchived()); - Assertions.assertEquals("kdnwy", model.jobDefinition().componentId()); - Assertions.assertEquals("ikgxkkzz", model.jobDefinition().notificationSetting().emails().get(0)); + Assertions.assertEquals("zcqy", model.jobDefinition().description()); + Assertions.assertEquals("rfuiocusel", model.jobDefinition().properties().get("k")); + Assertions.assertEquals("nqf", model.jobDefinition().tags().get("qdlcvmyolc")); + Assertions.assertEquals("scrpilgftrqrej", model.jobDefinition().componentId()); + Assertions.assertEquals("ahuqi", model.jobDefinition().computeId()); + Assertions.assertEquals("dahlfxlmuifmuadj", model.jobDefinition().displayName()); + Assertions.assertEquals("snc", model.jobDefinition().experimentName()); + Assertions.assertTrue(model.jobDefinition().isArchived()); Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.jobDefinition().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("irgcjfai", - model.jobDefinition().notificationSetting().webhooks().get("ulp").eventType()); + Assertions.assertEquals("tybnxgztlcgctj", model.jobDefinition().notificationSetting().emails().get(0)); + Assertions.assertEquals("xpyl", + model.jobDefinition().notificationSetting().webhooks().get("woxzgwpsyxji").eventType()); + Assertions.assertEquals("tw", model.jobDefinition().parentJobName()); + Assertions.assertEquals("ymulwivqtowl", model.jobDefinition().services().get("rvfsxxbydesq").endpoint()); + Assertions.assertEquals("j", model.jobDefinition().services().get("rvfsxxbydesq").jobServiceType()); + Assertions.assertEquals(325528029, model.jobDefinition().services().get("rvfsxxbydesq").port()); + Assertions.assertEquals("wmchqo", + model.jobDefinition().services().get("rvfsxxbydesq").properties().get("tfxcpupuk")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobScheduleAction model = new JobScheduleAction().withJobDefinition(new JobBaseProperties() - .withDescription("wfsaa") - .withTags(mapOf("c", "gb")) - .withProperties(mapOf("ajklnac", "idyli", "rjjaojpz", "dnxqeonm")) - .withDisplayName("fkbzbfbxjblajy") - .withExperimentName("ycsbtoi") - .withServices(mapOf("rgihlnzffewv", - new JobService().withJobServiceType("jmofs") - .withPort(2075523091) - .withEndpoint("gnywxu") - .withProperties(mapOf("pagknxma", "peqregfur")) - .withNodes(new Nodes()), - "pwwvmbjecfw", - new JobService().withJobServiceType("ycjcgeipqxxsdy") - .withPort(521155711) - .withEndpoint("ydsmmabh") - .withProperties(mapOf("ogtqscj", "gf", "cuex", "vqerqxkomwdzpzl")) - .withNodes(new Nodes()), - "aagwiijcfqiywhxp", - new JobService().withJobServiceType("ghnkfrwxohlydsn") - .withPort(935936431) - .withEndpoint("hiypbfhmihi") - .withProperties(mapOf("uudrizwkwkjxlaac", "nnqbjxgjwsreruk", "evgb", "dikqelssybz", "zyjj", - "rommkiqhypwt", "omzq", "u")) - .withNodes(new Nodes()), - "kcu", - new JobService().withJobServiceType("apialezaydpuzu") - .withPort(301398329) - .withEndpoint("fxlie") - .withProperties(mapOf("ckn", "hh")) - .withNodes(new Nodes()))) - .withComputeId("hdgwuzrono") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("kdnwy") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ikgxkkzz", "zdjekebawnx")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("ulp", new Webhook().withEventType("irgcjfai"), "qnfforxsqtzngxbs", - new Webhook().withEventType("akrxi"), "xcmmhipbvskcitly", new Webhook().withEventType("ewg"))))); + JobScheduleAction model + = new JobScheduleAction().withJobDefinition(new JobBaseProperties().withDescription("zcqy") + .withProperties(mapOf("k", "rfuiocusel", "sjmrkkhm", "sazrhxuddqmdtff", "jawh", "dmdlgyqixokw")) + .withTags(mapOf("qdlcvmyolc", "nqf", "tvsnvl", "ymjc", "atuwqkokbc", "qdnzyza", "msn", "othymgobl")) + .withComponentId("scrpilgftrqrej") + .withComputeId("ahuqi") + .withDisplayName("dahlfxlmuifmuadj") + .withExperimentName("snc") + .withIdentity(new IdentityConfiguration()) + .withIsArchived(true) + .withNotificationSetting(new NotificationSetting() + .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, + EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_CANCELLED)) + .withEmails(Arrays.asList("tybnxgztlcgctj", "hfjv", "ywjzebecuvlbefvw")) + .withWebhooks(mapOf("woxzgwpsyxji", new Webhook().withEventType("xpyl"), "qwjxi", + new Webhook().withEventType("ypdvrbkerdkdkga"), "pjois", + new Webhook().withEventType("fkcefeygz"), "entq", new Webhook().withEventType("naybdjnxu")))) + .withParentJobName("tw") + .withServices(mapOf("rvfsxxbydesq", new JobService().withEndpoint("ymulwivqtowl") + .withJobServiceType("j") + .withNodes(new Nodes()) + .withPort(325528029) + .withProperties(mapOf( + "tfxcpupuk", "wmchqo", "osaonhqnamppu", "ymjzpwdlvwtiws", "eajbkajlcyizyddc", "tassaekewna")), + "fpqdow", + new JobService().withEndpoint("gecpwgoljtzx") + .withJobServiceType("zyjfuc") + .withNodes(new Nodes()) + .withPort(762303832) + .withProperties(mapOf("kvibfa", "os", "nzpducdaaktu", "gmat")), + "xoia", + new JobService().withEndpoint("pnw") + .withJobServiceType("g") + .withNodes(new Nodes()) + .withPort(1429753327) + .withProperties(mapOf("uldbkke", "h", "xjqifhujjsbc", "jkjigawgaz", "lirh", "lzaahzbhuroolk")), + "jbpfiddh", + new JobService().withEndpoint("hfxwccokd") + .withJobServiceType("oq") + .withNodes(new Nodes()) + .withPort(1004791045) + .withProperties(mapOf("kgzukwdrnzkjth", "ljqkxyrqolnthbb"))))); model = BinaryData.fromObject(model).toObject(JobScheduleAction.class); - Assertions.assertEquals("wfsaa", model.jobDefinition().description()); - Assertions.assertEquals("gb", model.jobDefinition().tags().get("c")); - Assertions.assertEquals("idyli", model.jobDefinition().properties().get("ajklnac")); - Assertions.assertEquals("fkbzbfbxjblajy", model.jobDefinition().displayName()); - Assertions.assertEquals("ycsbtoi", model.jobDefinition().experimentName()); - Assertions.assertEquals("jmofs", model.jobDefinition().services().get("rgihlnzffewv").jobServiceType()); - Assertions.assertEquals(2075523091, model.jobDefinition().services().get("rgihlnzffewv").port()); - Assertions.assertEquals("gnywxu", model.jobDefinition().services().get("rgihlnzffewv").endpoint()); - Assertions.assertEquals("peqregfur", - model.jobDefinition().services().get("rgihlnzffewv").properties().get("pagknxma")); - Assertions.assertEquals("hdgwuzrono", model.jobDefinition().computeId()); - Assertions.assertEquals(false, model.jobDefinition().isArchived()); - Assertions.assertEquals("kdnwy", model.jobDefinition().componentId()); - Assertions.assertEquals("ikgxkkzz", model.jobDefinition().notificationSetting().emails().get(0)); + Assertions.assertEquals("zcqy", model.jobDefinition().description()); + Assertions.assertEquals("rfuiocusel", model.jobDefinition().properties().get("k")); + Assertions.assertEquals("nqf", model.jobDefinition().tags().get("qdlcvmyolc")); + Assertions.assertEquals("scrpilgftrqrej", model.jobDefinition().componentId()); + Assertions.assertEquals("ahuqi", model.jobDefinition().computeId()); + Assertions.assertEquals("dahlfxlmuifmuadj", model.jobDefinition().displayName()); + Assertions.assertEquals("snc", model.jobDefinition().experimentName()); + Assertions.assertTrue(model.jobDefinition().isArchived()); Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.jobDefinition().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("irgcjfai", - model.jobDefinition().notificationSetting().webhooks().get("ulp").eventType()); + Assertions.assertEquals("tybnxgztlcgctj", model.jobDefinition().notificationSetting().emails().get(0)); + Assertions.assertEquals("xpyl", + model.jobDefinition().notificationSetting().webhooks().get("woxzgwpsyxji").eventType()); + Assertions.assertEquals("tw", model.jobDefinition().parentJobName()); + Assertions.assertEquals("ymulwivqtowl", model.jobDefinition().services().get("rvfsxxbydesq").endpoint()); + Assertions.assertEquals("j", model.jobDefinition().services().get("rvfsxxbydesq").jobServiceType()); + Assertions.assertEquals(325528029, model.jobDefinition().services().get("rvfsxxbydesq").port()); + Assertions.assertEquals("wmchqo", + model.jobDefinition().services().get("rvfsxxbydesq").properties().get("tfxcpupuk")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java index 467104c1d539..b46dc66d009a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,26 +15,27 @@ public final class JobServiceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { JobService model = BinaryData.fromString( - "{\"jobServiceType\":\"wuowhlxlnwy\",\"port\":1884184924,\"endpoint\":\"vblgmokzk\",\"status\":\"rfowtdvrfmvlih\",\"errorMessage\":\"jdrqcrjidhftu\",\"properties\":{\"kfnjyixhafrat\":\"dxlwyojbfqz\",\"znv\":\"xmbjroum\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}") + "{\"endpoint\":\"kqnstpaqpibjgbvs\",\"errorMessage\":\"ehfxrttxbmsen\",\"jobServiceType\":\"fab\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1156963756,\"properties\":{\"synbkdn\":\"ectcxsfmbzdx\",\"brnxhjtlxfikj\":\"yufxuzmsvzyq\",\"rxbozp\":\"xaravwwuasnjeglh\"},\"status\":\"cnwjzbqblxr\"}") .toObject(JobService.class); - Assertions.assertEquals("wuowhlxlnwy", model.jobServiceType()); - Assertions.assertEquals(1884184924, model.port()); - Assertions.assertEquals("vblgmokzk", model.endpoint()); - Assertions.assertEquals("dxlwyojbfqz", model.properties().get("kfnjyixhafrat")); + Assertions.assertEquals("kqnstpaqpibjgbvs", model.endpoint()); + Assertions.assertEquals("fab", model.jobServiceType()); + Assertions.assertEquals(1156963756, model.port()); + Assertions.assertEquals("ectcxsfmbzdx", model.properties().get("synbkdn")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - JobService model = new JobService().withJobServiceType("wuowhlxlnwy") - .withPort(1884184924) - .withEndpoint("vblgmokzk") - .withProperties(mapOf("kfnjyixhafrat", "dxlwyojbfqz", "znv", "xmbjroum")) - .withNodes(new Nodes()); + JobService model = new JobService().withEndpoint("kqnstpaqpibjgbvs") + .withJobServiceType("fab") + .withNodes(new Nodes()) + .withPort(1156963756) + .withProperties( + mapOf("synbkdn", "ectcxsfmbzdx", "brnxhjtlxfikj", "yufxuzmsvzyq", "rxbozp", "xaravwwuasnjeglh")); model = BinaryData.fromObject(model).toObject(JobService.class); - Assertions.assertEquals("wuowhlxlnwy", model.jobServiceType()); - Assertions.assertEquals(1884184924, model.port()); - Assertions.assertEquals("vblgmokzk", model.endpoint()); - Assertions.assertEquals("dxlwyojbfqz", model.properties().get("kfnjyixhafrat")); + Assertions.assertEquals("kqnstpaqpibjgbvs", model.endpoint()); + Assertions.assertEquals("fab", model.jobServiceType()); + Assertions.assertEquals(1156963756, model.port()); + Assertions.assertEquals("ectcxsfmbzdx", model.properties().get("synbkdn")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java index 006be11652f0..fd38a526bc38 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testCancel() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.jobs().cancel("bsibzmvd", "yoe", "pothtpaqmfwiesh", com.azure.core.util.Context.NONE); + manager.jobs().cancel("hqqozhesb", "qwnmfjktd", "d", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java index e4909bcdd5e0..27e565ce6175 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; @@ -31,76 +31,60 @@ public final class JobsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"fhdfo\",\"status\":\"Provisioning\",\"experimentName\":\"lcfcpzajgq\",\"services\":{\"ebolhyiohcjugd\":{\"jobServiceType\":\"meqhtngrx\",\"port\":1649257125,\"endpoint\":\"sewfbllegezvwuwi\",\"status\":\"msgg\",\"errorMessage\":\"cmazilq\",\"properties\":{\"oqpyb\":\"ip\",\"aqqqtmpgr\":\"ykmdklwbqkmtw\",\"ltwedllp\":\"c\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"ydc\":{\"jobServiceType\":\"ggxszmyxguyk\",\"port\":1274422195,\"endpoint\":\"mwzplcrzdwe\",\"status\":\"vspknxraidjeddn\",\"errorMessage\":\"n\",\"properties\":{\"tnuckojqoxpw\":\"rhcfeqjkacu\",\"doyqbpzxushmltih\":\"hvfdosq\",\"rzpggs\":\"cptvkbcykntdzze\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"mcjjxx\":{\"jobServiceType\":\"neibhztlzbwb\",\"port\":852314155,\"endpoint\":\"spkgk\",\"status\":\"pvbzmyo\",\"errorMessage\":\"xstxsfztlvs\",\"properties\":{\"yfgtwxmjdbzfiac\":\"shhcdlsowyhxwh\",\"mch\":\"wmce\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"rzzxqtcgs\":{\"jobServiceType\":\"dwmjurtnolzio\",\"port\":1365609318,\"endpoint\":\"ukeplfwykr\",\"status\":\"jenpsff\",\"errorMessage\":\"zefajgb\",\"properties\":{\"cevfbiekydk\":\"xpeuahvxfn\",\"yrvdszrizpej\":\"dkzfkneck\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hzcicitykzyi\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"gnfunh\",\"notificationSetting\":{\"emails\":[\"syiwm\",\"pkudhjztbwzjbqzq\"],\"emailOn\":[\"JobCompleted\"],\"webhooks\":{\"lkdsbekvprkwpvx\":{\"webhookType\":\"Webhook\",\"eventType\":\"zdb\"},\"zshfafbeh\":{\"webhookType\":\"Webhook\",\"eventType\":\"qcnv\"},\"eplpfrecri\":{\"webhookType\":\"Webhook\",\"eventType\":\"eiuexkpgrmwdwlr\"}}},\"description\":\"aba\",\"tags\":{\"sgpdbhbdxsjsox\":\"sizao\",\"inlgttvon\":\"uwuungdvvddrcpqu\",\"mitmtkcqixgqxs\":\"rpeli\",\"wqumecqyianjmv\":\"pevthuvupdsafqag\"},\"properties\":{\"xqtgzvzcfmwfogjr\":\"dkqffhux\"}},\"id\":\"tbpnh\",\"name\":\"o\",\"type\":\"lvfzwt\"}"; + = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"zmy\",\"computeId\":\"n\",\"displayName\":\"ajxv\",\"experimentName\":\"idlwmewrgu\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"notificationSetting\":{\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"emails\":[\"up\",\"nnvmguzqmx\",\"wm\",\"kmsnmfjbefszf\"],\"webhooks\":{\"ypxcqmdeecd\":{\"webhookType\":\"Webhook\",\"eventType\":\"w\"},\"mykgrtwh\":{\"webhookType\":\"Webhook\",\"eventType\":\"jsizyhp\"},\"f\":{\"webhookType\":\"Webhook\",\"eventType\":\"dhismwjkq\"}}},\"parentJobName\":\"ygybshchxu\",\"services\":{\"foabmahuwx\":{\"endpoint\":\"zg\",\"errorMessage\":\"wq\",\"jobServiceType\":\"btkrhc\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":616596214,\"properties\":{\"sq\":\"sew\",\"xyrtec\":\"pkrrppmwozwji\",\"cee\":\"vzslttkpirku\"},\"status\":\"hsd\"},\"llfwxdouuyzpa\":{\"endpoint\":\"ddqzewrr\",\"errorMessage\":\"gso\",\"jobServiceType\":\"kdclbzq\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1743446853,\"properties\":{\"cbhezau\":\"mp\",\"upvqjkqlafiaywm\":\"uaysxh\",\"ifgyxkgqwmpgh\":\"ipuyefhhdrmg\"},\"status\":\"cxqcbnkxhcodhxsb\"},\"nnvd\":{\"endpoint\":\"ahjxgedtmzhofhkt\",\"errorMessage\":\"tacguki\",\"jobServiceType\":\"dqrfassiiilcmrg\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":98905805,\"properties\":{\"znx\":\"yxgcgbvieqonsbu\",\"xtkmknacnfzcy\":\"ivqopxuno\",\"ggzfeyexbgdfyos\":\"bhdjpagwszm\",\"acqjgedxpb\":\"wigvqgc\"},\"status\":\"w\"},\"iwxhc\":{\"endpoint\":\"aodiytxqsohehh\",\"errorMessage\":\"twvijdr\",\"jobServiceType\":\"yqvhz\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":720149400,\"properties\":{\"pmkpcmtsbandesa\":\"enozlgxqfghlosh\",\"stzvtfyqeogw\":\"vuewrljmlo\"},\"status\":\"y\"}},\"status\":\"Finalizing\",\"description\":\"qmdba\",\"properties\":{\"tbwapoy\":\"rgaos\",\"l\":\"ni\",\"gyvwxubgul\":\"dsdmacydqa\"},\"tags\":{\"pprohuabdufh\":\"kas\",\"npuaptpuwek\":\"so\"}},\"id\":\"l\",\"name\":\"c\",\"type\":\"tcljopivtwxvc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); JobBase response = manager.jobs() - .define("ecuve") - .withExistingWorkspace("iel", "kymqmgudvy") - .withProperties(new JobBaseProperties().withDescription("mjtxwazyvi") - .withTags(mapOf("rjmwaa", "ebffkgfiyd")) - .withProperties(mapOf("jnaotavwmrfqt", "khptyhziqeo", "cyrwvoohmcw", "gdfecju")) - .withDisplayName("cwdge") - .withExperimentName("rrvjqhoehyirsv") - .withServices(mapOf("pspaxhfuwygssssj", - new JobService().withJobServiceType("xpvqpblqubfpeome") - .withPort(153862409) - .withEndpoint("eamzlqvajztsvc") - .withProperties(mapOf("moigawlojwv", "rbfvehuweuitqeyo", "jmujz", "ovjvjjuypcnbucb")) - .withNodes(new Nodes()), - "dfeyaev", - new JobService().withJobServiceType("fep") - .withPort(405179371) - .withEndpoint("sdvjv") - .withProperties(mapOf("eynxkxqnwcekqsb", "ht", "apzebje", "cad", "jbpzdwhxputka", - "wwgverbywuuvei", "rw", "l")) - .withNodes(new Nodes()), - "mtxjca", - new JobService().withJobServiceType("qfxfiyjzuqgxbo") - .withPort(91105546) - .withEndpoint("dymdypsxkw") - .withProperties(mapOf("vsi", "zclilyoixeeiznqi")) - .withNodes(new Nodes()), - "vncxtnbutytoaini", - new JobService().withJobServiceType("sjuqqtzrnubodgou") - .withPort(1627288021) - .withEndpoint("npgugrjx") - .withProperties(mapOf("bafiqxomevketa", "tipkdb")) - .withNodes(new Nodes()))) - .withComputeId("xhzqgbaqvqe") - .withIsArchived(false) + .define("tu") + .withExistingWorkspace("lkztaluuupcdao", "tzvajwvxhefm") + .withProperties(new JobBaseProperties().withDescription("mhookefdgfexakct") + .withProperties(mapOf("k", "szdnccouuqxmdie", "iheh", "rsoho")) + .withTags(mapOf("mwdfypsypmth", "uqqmdxcwxfm", "xdldhhkdeviwp", "vszlaf")) + .withComponentId("ilmazg") + .withComputeId("orppso") + .withDisplayName("cvywty") + .withExperimentName("ln") .withIdentity(new IdentityConfiguration()) - .withComponentId("obkrgryfnbx") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("yszhxoth", "yifjufzlg")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("sxyrywdezprycix", new Webhook().withEventType("mnuzyyc"), "k", - new Webhook().withEventType("yamochpwwykfyt"), "oudmcadcojf", - new Webhook().withEventType("dckwqvckh"))))) + .withIsArchived(true) + .withNotificationSetting(new NotificationSetting() + .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)) + .withEmails(Arrays.asList("dxsgwd")) + .withWebhooks(mapOf("jjvyintgkveogel", new Webhook().withEventType("lvvvz"), "kbiibobkxiujaagf", + new Webhook().withEventType("mb"), "vqegmpfzbrhaq", new Webhook().withEventType("wuuxqwmzms")))) + .withParentJobName("tkrsjspziiev") + .withServices(mapOf("thxzrvjfsmfkdh", + new JobService().withEndpoint("zca") + .withJobServiceType("sdeequovanag") + .withNodes(new Nodes()) + .withPort(1417689989) + .withProperties(mapOf("qkuxgyumoamqxwl", "bmbtce", "obknfpdilhzgjje", "slxytiobjledjxb", + "ccypxsrhbqlbnufl", "mctbg", "xhbpyoqfbj", "zawkkz"))))) .create(); - Assertions.assertEquals("aba", response.properties().description()); - Assertions.assertEquals("sizao", response.properties().tags().get("sgpdbhbdxsjsox")); - Assertions.assertEquals("dkqffhux", response.properties().properties().get("xqtgzvzcfmwfogjr")); - Assertions.assertEquals("fhdfo", response.properties().displayName()); - Assertions.assertEquals("lcfcpzajgq", response.properties().experimentName()); - Assertions.assertEquals("meqhtngrx", response.properties().services().get("ebolhyiohcjugd").jobServiceType()); - Assertions.assertEquals(1649257125, response.properties().services().get("ebolhyiohcjugd").port()); - Assertions.assertEquals("sewfbllegezvwuwi", response.properties().services().get("ebolhyiohcjugd").endpoint()); - Assertions.assertEquals("ip", response.properties().services().get("ebolhyiohcjugd").properties().get("oqpyb")); - Assertions.assertEquals("hzcicitykzyi", response.properties().computeId()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("gnfunh", response.properties().componentId()); - Assertions.assertEquals("syiwm", response.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, + Assertions.assertEquals("qmdba", response.properties().description()); + Assertions.assertEquals("rgaos", response.properties().properties().get("tbwapoy")); + Assertions.assertEquals("kas", response.properties().tags().get("pprohuabdufh")); + Assertions.assertEquals("zmy", response.properties().componentId()); + Assertions.assertEquals("n", response.properties().computeId()); + Assertions.assertEquals("ajxv", response.properties().displayName()); + Assertions.assertEquals("idlwmewrgu", response.properties().experimentName()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, response.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("zdb", - response.properties().notificationSetting().webhooks().get("lkdsbekvprkwpvx").eventType()); + Assertions.assertEquals("up", response.properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("w", + response.properties().notificationSetting().webhooks().get("ypxcqmdeecd").eventType()); + Assertions.assertEquals("ygybshchxu", response.properties().parentJobName()); + Assertions.assertEquals("zg", response.properties().services().get("foabmahuwx").endpoint()); + Assertions.assertEquals("btkrhc", response.properties().services().get("foabmahuwx").jobServiceType()); + Assertions.assertEquals(616596214, response.properties().services().get("foabmahuwx").port()); + Assertions.assertEquals("sew", response.properties().services().get("foabmahuwx").properties().get("sq")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java index e1ccfcfb3107..eec8089db5ef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.jobs().delete("gthcdbzoxho", "ogpbogpbwe", "oxlzrijpkbrvm", com.azure.core.util.Context.NONE); + manager.jobs().delete("lainzvhl", "fjibbl", "ihvzdaycme", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java index 2c0484df7646..3ea977f540eb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; @@ -22,36 +22,36 @@ public final class JobsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"ladohniz\",\"status\":\"Unknown\",\"experimentName\":\"pqiyqvmhtyafcvto\",\"services\":{\"emzvqm\":{\"jobServiceType\":\"m\",\"port\":983563156,\"endpoint\":\"e\",\"status\":\"xqrzsngltlbs\",\"errorMessage\":\"fpl\",\"properties\":{\"jvko\":\"hkwhiorhwuujym\",\"hzng\":\"jgtourrqmch\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"fszxnzjxvdn\":{\"jobServiceType\":\"svxbagccvhnoq\",\"port\":81272000,\"endpoint\":\"pcntqoszrwkkxd\",\"status\":\"uyygdoi\",\"errorMessage\":\"fcnxrbyvbd\",\"properties\":{\"dqxff\":\"tjtzsgen\",\"pnfvzbvtxgsn\":\"jcngjcdyk\",\"hsfgaxuvaej\":\"sqjjcwggjimlcb\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"jckm\":{\"jobServiceType\":\"dlptulwgpdzlfx\",\"port\":1065400664,\"endpoint\":\"gmxynwaofnoiphwa\",\"status\":\"pugxjtuhid\",\"errorMessage\":\"szxmcqenyjwadvf\",\"properties\":{\"mjdphtfpjrbnzb\":\"tymncwj\",\"ima\":\"mrqb\",\"neprhxs\":\"eiq\",\"kto\":\"tusrpjmevszbjn\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hxxd\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"nk\",\"notificationSetting\":{\"emails\":[\"tozxlt\",\"sfxxkgxw\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"pfhhtfmhmaknp\":{\"webhookType\":\"Webhook\",\"eventType\":\"z\"},\"cnvd\":{\"webhookType\":\"Webhook\",\"eventType\":\"cfvxqrmxcrhz\"},\"rntphyjuedd\":{\"webhookType\":\"Webhook\",\"eventType\":\"iuxx\"},\"axmkuthooaicms\":{\"webhookType\":\"Webhook\",\"eventType\":\"pysmalpjabzssbu\"}}},\"description\":\"wwvb\",\"tags\":{\"i\":\"bivhjryppmmtqx\",\"gqfcoraj\":\"aef\",\"hjseceuvynh\":\"bglkffgyf\",\"xmlsudtbiycepjkl\":\"bzcufxfyzqrs\"},\"properties\":{\"xeyumwlbpyidecff\":\"dsormbvir\",\"sqwjypiosz\":\"hizwqz\",\"dglxppewtlfsw\":\"zsw\",\"vvb\":\"lwnffczwzr\"}},\"id\":\"npriyttiqdcjg\",\"name\":\"mcwmqpcwoe\",\"type\":\"jrfrucpefwdxbp\"}"; + = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"cobh\",\"computeId\":\"ljsvpokvh\",\"displayName\":\"ygffuzhnusrfffag\",\"experimentName\":\"vfwzysv\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"notificationSetting\":{\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobCancelled\"],\"emails\":[\"g\",\"novwujearowrmesz\"],\"webhooks\":{\"kaomy\":{\"webhookType\":\"Webhook\",\"eventType\":\"yvcgkouf\"}}},\"parentJobName\":\"xrw\",\"services\":{\"yxiaakgdkan\":{\"endpoint\":\"aavfmsxamncuh\",\"errorMessage\":\"nmakxyhuetztorhu\",\"jobServiceType\":\"uysszhsewjqg\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":123662557,\"properties\":{\"ur\":\"x\"},\"status\":\"ljq\"},\"fv\":{\"endpoint\":\"vwgc\",\"errorMessage\":\"pbdkqwgooma\",\"jobServiceType\":\"axno\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1839612991,\"properties\":{\"snmxvsrvkzvxlez\":\"qvectooxjztta\",\"ehjk\":\"mdyb\"},\"status\":\"gtnflaxspg\"}},\"status\":\"Completed\",\"description\":\"myqosrsfaocrr\",\"properties\":{\"vlwhtfscoups\":\"gdpyohnmru\"},\"tags\":{\"xhawkwcfk\":\"wb\",\"ecvkw\":\"qexd\"}},\"id\":\"jotfunsduejxvr\",\"name\":\"ale\",\"type\":\"qedofuobx\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); JobBase response = manager.jobs() - .getWithResponse("up", "krqeqjtzaw", "nrvgitzdjixk", com.azure.core.util.Context.NONE) + .getWithResponse("pg", "bltths", "zxylviflzsrk", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wwvb", response.properties().description()); - Assertions.assertEquals("bivhjryppmmtqx", response.properties().tags().get("i")); - Assertions.assertEquals("dsormbvir", response.properties().properties().get("xeyumwlbpyidecff")); - Assertions.assertEquals("ladohniz", response.properties().displayName()); - Assertions.assertEquals("pqiyqvmhtyafcvto", response.properties().experimentName()); - Assertions.assertEquals("m", response.properties().services().get("emzvqm").jobServiceType()); - Assertions.assertEquals(983563156, response.properties().services().get("emzvqm").port()); - Assertions.assertEquals("e", response.properties().services().get("emzvqm").endpoint()); - Assertions.assertEquals("hkwhiorhwuujym", - response.properties().services().get("emzvqm").properties().get("jvko")); - Assertions.assertEquals("hxxd", response.properties().computeId()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("nk", response.properties().componentId()); - Assertions.assertEquals("tozxlt", response.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, + Assertions.assertEquals("myqosrsfaocrr", response.properties().description()); + Assertions.assertEquals("gdpyohnmru", response.properties().properties().get("vlwhtfscoups")); + Assertions.assertEquals("wb", response.properties().tags().get("xhawkwcfk")); + Assertions.assertEquals("cobh", response.properties().componentId()); + Assertions.assertEquals("ljsvpokvh", response.properties().computeId()); + Assertions.assertEquals("ygffuzhnusrfffag", response.properties().displayName()); + Assertions.assertEquals("vfwzysv", response.properties().experimentName()); + Assertions.assertFalse(response.properties().isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, response.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("z", - response.properties().notificationSetting().webhooks().get("pfhhtfmhmaknp").eventType()); + Assertions.assertEquals("g", response.properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("yvcgkouf", + response.properties().notificationSetting().webhooks().get("kaomy").eventType()); + Assertions.assertEquals("xrw", response.properties().parentJobName()); + Assertions.assertEquals("aavfmsxamncuh", response.properties().services().get("yxiaakgdkan").endpoint()); + Assertions.assertEquals("uysszhsewjqg", response.properties().services().get("yxiaakgdkan").jobServiceType()); + Assertions.assertEquals(123662557, response.properties().services().get("yxiaakgdkan").port()); + Assertions.assertEquals("x", response.properties().services().get("yxiaakgdkan").properties().get("ur")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java index 2b253b644bfb..2919b0cce2c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; @@ -24,38 +24,40 @@ public final class JobsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"jvzlgclia\",\"status\":\"NotStarted\",\"experimentName\":\"vihy\",\"services\":{\"ka\":{\"jobServiceType\":\"oxexvt\",\"port\":2028703772,\"endpoint\":\"ymgkirfzvtzrq\",\"status\":\"lipmuufsek\",\"errorMessage\":\"pufhwpkpejfszw\",\"properties\":{\"jcnzfajptjhwrnw\":\"swbrsmf\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"afjcdccqjaefrzq\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"gidrxdykjchz\",\"notificationSetting\":{\"emails\":[\"pq\",\"pgbssjqjjtcvdz\",\"tsdlp\"],\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"nqfnz\":{\"webhookType\":\"Webhook\",\"eventType\":\"ppnjzbuvmfsfru\"},\"fepsoz\":{\"webhookType\":\"Webhook\",\"eventType\":\"ppnularnupprd\"}}},\"description\":\"xoyan\",\"tags\":{\"taqjhokhi\":\"euewaauxkvruryyq\",\"kikdatbwyarqt\":\"ghpvjqp\",\"pzdgyilwuiklbjl\":\"bjblhefqwirnx\",\"csddplg\":\"bxo\"},\"properties\":{\"oke\":\"via\",\"uosc\":\"cmadyoctmd\"}},\"id\":\"wbestntoeteu\",\"name\":\"gdgbzftsbpef\",\"type\":\"f\"}]}"; + = "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"ftpvgmqzitc\",\"computeId\":\"mlltas\",\"displayName\":\"qsf\",\"experimentName\":\"e\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"notificationSetting\":{\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobCancelled\",\"JobCancelled\"],\"emails\":[\"birvvvrbqxi\"],\"webhooks\":{\"wzvlhi\":{\"webhookType\":\"Webhook\",\"eventType\":\"tu\"},\"vcjkrynziudmh\":{\"webhookType\":\"Webhook\",\"eventType\":\"idagwuvcdymo\"},\"gvu\":{\"webhookType\":\"Webhook\",\"eventType\":\"hrygw\"},\"fotllf\":{\"webhookType\":\"Webhook\",\"eventType\":\"xjwzt\"}}},\"parentJobName\":\"vhf\",\"services\":{\"owgqooiphh\":{\"endpoint\":\"ffsbzz\",\"errorMessage\":\"f\",\"jobServiceType\":\"l\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":218889551,\"properties\":{\"zvqzmlferjw\":\"jcttavbch\",\"qulf\":\"onnqudexni\"},\"status\":\"tfqgd\"},\"pzjysyphxeoqmaq\":{\"endpoint\":\"s\",\"errorMessage\":\"dhkjiwfv\",\"jobServiceType\":\"wfreqvflrrtj\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":370068624,\"properties\":{\"pmiytpji\":\"dcwqal\",\"jutawgylnod\":\"cisolkwipvls\",\"eyjlyxdux\":\"fclehlopipvpe\",\"qxjoazyxmum\":\"opyavcbmzembvfa\"},\"status\":\"kaxzrycvac\"}},\"status\":\"Provisioning\",\"description\":\"ei\",\"properties\":{\"awrbqo\":\"osb\"},\"tags\":{\"ipqrtnkngjnhx\":\"prqlxqhq\",\"cskif\":\"f\"}},\"id\":\"dtpedvh\",\"name\":\"pfsesi\",\"type\":\"wcrejt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.jobs() - .list("olqqpa", "zpzmojupqlus", "kzdnotgyowis", "fifmitqvypkiqlou", "zbceimsco", ListViewType.ALL, - "naehllwqmraihe", com.azure.core.util.Context.NONE); + .list("egzyzlslvgqlexw", "wbbellcjd", "t", "cvddfmflwfxdkp", "dpmy", ListViewType.ARCHIVED_ONLY, + "cugchtwxifudlrxb", com.azure.core.util.Context.NONE); - Assertions.assertEquals("xoyan", response.iterator().next().properties().description()); - Assertions.assertEquals("euewaauxkvruryyq", response.iterator().next().properties().tags().get("taqjhokhi")); - Assertions.assertEquals("via", response.iterator().next().properties().properties().get("oke")); - Assertions.assertEquals("jvzlgclia", response.iterator().next().properties().displayName()); - Assertions.assertEquals("vihy", response.iterator().next().properties().experimentName()); - Assertions.assertEquals("oxexvt", - response.iterator().next().properties().services().get("ka").jobServiceType()); - Assertions.assertEquals(2028703772, response.iterator().next().properties().services().get("ka").port()); - Assertions.assertEquals("ymgkirfzvtzrq", - response.iterator().next().properties().services().get("ka").endpoint()); - Assertions.assertEquals("swbrsmf", - response.iterator().next().properties().services().get("ka").properties().get("jcnzfajptjhwrnw")); - Assertions.assertEquals("afjcdccqjaefrzq", response.iterator().next().properties().computeId()); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals("gidrxdykjchz", response.iterator().next().properties().componentId()); - Assertions.assertEquals("pq", response.iterator().next().properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("ei", response.iterator().next().properties().description()); + Assertions.assertEquals("osb", response.iterator().next().properties().properties().get("awrbqo")); + Assertions.assertEquals("prqlxqhq", response.iterator().next().properties().tags().get("ipqrtnkngjnhx")); + Assertions.assertEquals("ftpvgmqzitc", response.iterator().next().properties().componentId()); + Assertions.assertEquals("mlltas", response.iterator().next().properties().computeId()); + Assertions.assertEquals("qsf", response.iterator().next().properties().displayName()); + Assertions.assertEquals("e", response.iterator().next().properties().experimentName()); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, response.iterator().next().properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ppnjzbuvmfsfru", - response.iterator().next().properties().notificationSetting().webhooks().get("nqfnz").eventType()); + Assertions.assertEquals("birvvvrbqxi", + response.iterator().next().properties().notificationSetting().emails().get(0)); + Assertions.assertEquals("tu", + response.iterator().next().properties().notificationSetting().webhooks().get("wzvlhi").eventType()); + Assertions.assertEquals("vhf", response.iterator().next().properties().parentJobName()); + Assertions.assertEquals("ffsbzz", + response.iterator().next().properties().services().get("owgqooiphh").endpoint()); + Assertions.assertEquals("l", + response.iterator().next().properties().services().get("owgqooiphh").jobServiceType()); + Assertions.assertEquals(218889551, response.iterator().next().properties().services().get("owgqooiphh").port()); + Assertions.assertEquals("jcttavbch", + response.iterator().next().properties().services().get("owgqooiphh").properties().get("zvqzmlferjw")); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JupyterKernelConfigTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JupyterKernelConfigTests.java new file mode 100644 index 000000000000..c1ea6d2c2f58 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JupyterKernelConfigTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class JupyterKernelConfigTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + JupyterKernelConfig model = BinaryData.fromString( + "{\"argv\":[\"egqxsorchazrq\",\"xz\",\"hlbeqvhs\"],\"displayName\":\"mpwxsl\",\"language\":\"ggfzgaefh\"}") + .toObject(JupyterKernelConfig.class); + Assertions.assertEquals("egqxsorchazrq", model.argv().get(0)); + Assertions.assertEquals("mpwxsl", model.displayName()); + Assertions.assertEquals("ggfzgaefh", model.language()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + JupyterKernelConfig model = new JupyterKernelConfig().withArgv(Arrays.asList("egqxsorchazrq", "xz", "hlbeqvhs")) + .withDisplayName("mpwxsl") + .withLanguage("ggfzgaefh"); + model = BinaryData.fromObject(model).toObject(JupyterKernelConfig.class); + Assertions.assertEquals("egqxsorchazrq", model.argv().get(0)); + Assertions.assertEquals("mpwxsl", model.displayName()); + Assertions.assertEquals("ggfzgaefh", model.language()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java index 77081f2cc423..e515d1147cfe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,48 +16,62 @@ public final class KubernetesPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KubernetesProperties model = BinaryData.fromString( - "{\"relayConnectionString\":\"od\",\"serviceBusConnectionString\":\"vfsxx\",\"extensionPrincipalId\":\"desqlvg\",\"extensionInstanceReleaseTrain\":\"pwgoljt\",\"vcName\":\"nm\",\"namespace\":\"dobygoogxqapj\",\"defaultInstanceType\":\"azyj\",\"instanceTypes\":{\"qeq\":{\"nodeSelector\":{\"kvibfa\":\"odjnos\"},\"resources\":{\"requests\":{\"ktz\":\"trnzpducdaaktu\",\"wkppnwyytfvp\":\"oimyfpqd\",\"nwhvuldbkkejj\":\"tfjikffffgkuh\",\"xjqifhujjsbc\":\"jigawgaz\"},\"limits\":{\"rhhmojusu\":\"aahzbhuroolkol\",\"ia\":\"gfjzcvaax\",\"xkukm\":\"ahfxwccok\",\"ynuhh\":\"c\"}}}}}") + "{\"relayConnectionString\":\"ailxqkdyqjvzvcg\",\"serviceBusConnectionString\":\"spzesfkqqxuhvz\",\"extensionPrincipalId\":\"brouszxac\",\"extensionInstanceReleaseTrain\":\"uk\",\"vcName\":\"goojjfuk\",\"namespace\":\"bc\",\"defaultInstanceType\":\"nhgbtzvxxvsbc\",\"instanceTypes\":{\"xsgcemegd\":{\"nodeSelector\":{\"urqmw\":\"fnkcnihkswxm\",\"t\":\"wwp\"},\"resources\":{\"requests\":{\"tzuaedrlhxgcq\":\"ahbqsvnkxm\",\"yftgpqoswgfqv\":\"yrhkvxzzmiem\",\"sornfbmeqagkn\":\"mghpakbqyh\",\"bnyevztnjawrhule\":\"jm\"},\"limits\":{\"itaxju\":\"mbwppxirxbkitzmn\",\"j\":\"l\"}}},\"xhhlbmyphf\":{\"nodeSelector\":{\"jubvfjyzuf\":\"y\",\"aacxauhvc\":\"difnivlutgg\",\"qxtoiyygktsrjyxx\":\"zxhkl\",\"owbebsnbwut\":\"xwfzbkvecnxfxph\"},\"resources\":{\"requests\":{\"jvkyxmmj\":\"msumustihtgrafj\"},\"limits\":{\"ennmkvaeuwqd\":\"ogtder\"}}},\"zzevtzqwczochwb\":{\"nodeSelector\":{\"kx\":\"pdhewokyqs\",\"b\":\"sy\",\"zdmvdd\":\"hqbtodjfyxbvkv\"},\"resources\":{\"requests\":{\"yoz\":\"u\",\"njdvv\":\"za\",\"rkkvxundqzbv\":\"rho\",\"uvqhxtozfgdkw\":\"p\"},\"limits\":{\"utui\":\"rklpiigfuzk\",\"xyll\":\"jclzjwaqdzqydewu\"}}}}}") .toObject(KubernetesProperties.class); - Assertions.assertEquals("od", model.relayConnectionString()); - Assertions.assertEquals("vfsxx", model.serviceBusConnectionString()); - Assertions.assertEquals("desqlvg", model.extensionPrincipalId()); - Assertions.assertEquals("pwgoljt", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("nm", model.vcName()); - Assertions.assertEquals("dobygoogxqapj", model.namespace()); - Assertions.assertEquals("azyj", model.defaultInstanceType()); - Assertions.assertEquals("odjnos", model.instanceTypes().get("qeq").nodeSelector().get("kvibfa")); - Assertions.assertEquals("trnzpducdaaktu", model.instanceTypes().get("qeq").resources().requests().get("ktz")); - Assertions.assertEquals("aahzbhuroolkol", - model.instanceTypes().get("qeq").resources().limits().get("rhhmojusu")); + Assertions.assertEquals("ailxqkdyqjvzvcg", model.relayConnectionString()); + Assertions.assertEquals("spzesfkqqxuhvz", model.serviceBusConnectionString()); + Assertions.assertEquals("brouszxac", model.extensionPrincipalId()); + Assertions.assertEquals("uk", model.extensionInstanceReleaseTrain()); + Assertions.assertEquals("goojjfuk", model.vcName()); + Assertions.assertEquals("bc", model.namespace()); + Assertions.assertEquals("nhgbtzvxxvsbc", model.defaultInstanceType()); + Assertions.assertEquals("fnkcnihkswxm", model.instanceTypes().get("xsgcemegd").nodeSelector().get("urqmw")); + Assertions.assertEquals("ahbqsvnkxm", + model.instanceTypes().get("xsgcemegd").resources().requests().get("tzuaedrlhxgcq")); + Assertions.assertEquals("mbwppxirxbkitzmn", + model.instanceTypes().get("xsgcemegd").resources().limits().get("itaxju")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - KubernetesProperties model = new KubernetesProperties().withRelayConnectionString("od") - .withServiceBusConnectionString("vfsxx") - .withExtensionPrincipalId("desqlvg") - .withExtensionInstanceReleaseTrain("pwgoljt") - .withVcName("nm") - .withNamespace("dobygoogxqapj") - .withDefaultInstanceType("azyj") - .withInstanceTypes(mapOf("qeq", new InstanceTypeSchema().withNodeSelector(mapOf("kvibfa", "odjnos")) - .withResources(new InstanceTypeSchemaResources() - .withRequests(mapOf("ktz", "trnzpducdaaktu", "wkppnwyytfvp", "oimyfpqd", "nwhvuldbkkejj", - "tfjikffffgkuh", "xjqifhujjsbc", "jigawgaz")) - .withLimits( - mapOf("rhhmojusu", "aahzbhuroolkol", "ia", "gfjzcvaax", "xkukm", "ahfxwccok", "ynuhh", "c"))))); + KubernetesProperties model = new KubernetesProperties().withRelayConnectionString("ailxqkdyqjvzvcg") + .withServiceBusConnectionString("spzesfkqqxuhvz") + .withExtensionPrincipalId("brouszxac") + .withExtensionInstanceReleaseTrain("uk") + .withVcName("goojjfuk") + .withNamespace("bc") + .withDefaultInstanceType("nhgbtzvxxvsbc") + .withInstanceTypes(mapOf("xsgcemegd", + new InstanceTypeSchema().withNodeSelector(mapOf("urqmw", "fnkcnihkswxm", "t", "wwp")) + .withResources(new InstanceTypeSchemaResources() + .withRequests(mapOf("tzuaedrlhxgcq", "ahbqsvnkxm", "yftgpqoswgfqv", "yrhkvxzzmiem", + "sornfbmeqagkn", "mghpakbqyh", "bnyevztnjawrhule", "jm")) + .withLimits(mapOf("itaxju", "mbwppxirxbkitzmn", "j", "l"))), + "xhhlbmyphf", + new InstanceTypeSchema() + .withNodeSelector(mapOf("jubvfjyzuf", "y", "aacxauhvc", "difnivlutgg", "qxtoiyygktsrjyxx", "zxhkl", + "owbebsnbwut", "xwfzbkvecnxfxph")) + .withResources(new InstanceTypeSchemaResources().withRequests(mapOf("jvkyxmmj", "msumustihtgrafj")) + .withLimits(mapOf("ennmkvaeuwqd", "ogtder"))), + "zzevtzqwczochwb", + new InstanceTypeSchema() + .withNodeSelector(mapOf("kx", "pdhewokyqs", "b", "sy", "zdmvdd", "hqbtodjfyxbvkv")) + .withResources(new InstanceTypeSchemaResources() + .withRequests(mapOf("yoz", "u", "njdvv", "za", "rkkvxundqzbv", "rho", "uvqhxtozfgdkw", "p")) + .withLimits(mapOf("utui", "rklpiigfuzk", "xyll", "jclzjwaqdzqydewu"))))); model = BinaryData.fromObject(model).toObject(KubernetesProperties.class); - Assertions.assertEquals("od", model.relayConnectionString()); - Assertions.assertEquals("vfsxx", model.serviceBusConnectionString()); - Assertions.assertEquals("desqlvg", model.extensionPrincipalId()); - Assertions.assertEquals("pwgoljt", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("nm", model.vcName()); - Assertions.assertEquals("dobygoogxqapj", model.namespace()); - Assertions.assertEquals("azyj", model.defaultInstanceType()); - Assertions.assertEquals("odjnos", model.instanceTypes().get("qeq").nodeSelector().get("kvibfa")); - Assertions.assertEquals("trnzpducdaaktu", model.instanceTypes().get("qeq").resources().requests().get("ktz")); - Assertions.assertEquals("aahzbhuroolkol", - model.instanceTypes().get("qeq").resources().limits().get("rhhmojusu")); + Assertions.assertEquals("ailxqkdyqjvzvcg", model.relayConnectionString()); + Assertions.assertEquals("spzesfkqqxuhvz", model.serviceBusConnectionString()); + Assertions.assertEquals("brouszxac", model.extensionPrincipalId()); + Assertions.assertEquals("uk", model.extensionInstanceReleaseTrain()); + Assertions.assertEquals("goojjfuk", model.vcName()); + Assertions.assertEquals("bc", model.namespace()); + Assertions.assertEquals("nhgbtzvxxvsbc", model.defaultInstanceType()); + Assertions.assertEquals("fnkcnihkswxm", model.instanceTypes().get("xsgcemegd").nodeSelector().get("urqmw")); + Assertions.assertEquals("ahbqsvnkxm", + model.instanceTypes().get("xsgcemegd").resources().requests().get("tzuaedrlhxgcq")); + Assertions.assertEquals("mbwppxirxbkitzmn", + model.instanceTypes().get("xsgcemegd").resources().limits().get("itaxju")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java deleted file mode 100644 index a2fa559b16a3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import com.azure.resourcemanager.machinelearning.models.KubernetesSchema; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesSchema model = BinaryData.fromString( - "{\"properties\":{\"relayConnectionString\":\"hjgczetyb\",\"serviceBusConnectionString\":\"gztlcgc\",\"extensionPrincipalId\":\"chfjvmywjzebe\",\"extensionInstanceReleaseTrain\":\"vlbefvwclj\",\"vcName\":\"pylrwoxzgwpsy\",\"namespace\":\"ijeypdvrbkerdkdk\",\"defaultInstanceType\":\"wqwjxil\",\"instanceTypes\":{\"eajbkajlcyizyddc\":{\"nodeSelector\":{\"oisfmnaybdjn\":\"feygzqp\"},\"resources\":{\"requests\":{\"ymulwivqtowl\":\"ntqontwhym\"},\"limits\":{\"j\":\"ycoybajasqubf\",\"htfxcpupuki\":\"ywhjqwmchq\",\"sa\":\"mjzpwdlvwtiwsm\",\"ltassaekewna\":\"nhqnampp\"}}}}}}") - .toObject(KubernetesSchema.class); - Assertions.assertEquals("hjgczetyb", model.properties().relayConnectionString()); - Assertions.assertEquals("gztlcgc", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("chfjvmywjzebe", model.properties().extensionPrincipalId()); - Assertions.assertEquals("vlbefvwclj", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("pylrwoxzgwpsy", model.properties().vcName()); - Assertions.assertEquals("ijeypdvrbkerdkdk", model.properties().namespace()); - Assertions.assertEquals("wqwjxil", model.properties().defaultInstanceType()); - Assertions.assertEquals("feygzqp", - model.properties().instanceTypes().get("eajbkajlcyizyddc").nodeSelector().get("oisfmnaybdjn")); - Assertions.assertEquals("ntqontwhym", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().requests().get("ymulwivqtowl")); - Assertions.assertEquals("ycoybajasqubf", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().limits().get("j")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesSchema model = new KubernetesSchema().withProperties(new KubernetesProperties() - .withRelayConnectionString("hjgczetyb") - .withServiceBusConnectionString("gztlcgc") - .withExtensionPrincipalId("chfjvmywjzebe") - .withExtensionInstanceReleaseTrain("vlbefvwclj") - .withVcName("pylrwoxzgwpsy") - .withNamespace("ijeypdvrbkerdkdk") - .withDefaultInstanceType("wqwjxil") - .withInstanceTypes(mapOf("eajbkajlcyizyddc", - new InstanceTypeSchema().withNodeSelector(mapOf("oisfmnaybdjn", "feygzqp")) - .withResources(new InstanceTypeSchemaResources().withRequests(mapOf("ymulwivqtowl", "ntqontwhym")) - .withLimits(mapOf("j", "ycoybajasqubf", "htfxcpupuki", "ywhjqwmchq", "sa", "mjzpwdlvwtiwsm", - "ltassaekewna", "nhqnampp")))))); - model = BinaryData.fromObject(model).toObject(KubernetesSchema.class); - Assertions.assertEquals("hjgczetyb", model.properties().relayConnectionString()); - Assertions.assertEquals("gztlcgc", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("chfjvmywjzebe", model.properties().extensionPrincipalId()); - Assertions.assertEquals("vlbefvwclj", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("pylrwoxzgwpsy", model.properties().vcName()); - Assertions.assertEquals("ijeypdvrbkerdkdk", model.properties().namespace()); - Assertions.assertEquals("wqwjxil", model.properties().defaultInstanceType()); - Assertions.assertEquals("feygzqp", - model.properties().instanceTypes().get("eajbkajlcyizyddc").nodeSelector().get("oisfmnaybdjn")); - Assertions.assertEquals("ntqontwhym", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().requests().get("ymulwivqtowl")); - Assertions.assertEquals("ycoybajasqubf", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().limits().get("j")); - } - - // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LabelGenerationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LabelGenerationTests.java new file mode 100644 index 000000000000..7de6d0917b64 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LabelGenerationTests.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType; +import com.azure.resourcemanager.machinelearning.models.JobInput; +import com.azure.resourcemanager.machinelearning.models.LabelGeneration; +import com.azure.resourcemanager.machinelearning.models.PromptSettings; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings; +import com.azure.resourcemanager.machinelearning.models.TeacherModelSettings; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class LabelGenerationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LabelGeneration model = BinaryData.fromString( + "{\"dataGenerationType\":\"LabelGeneration\",\"trainingData\":{\"jobInputType\":\"JobInput\",\"description\":\"kmgobliqe\"},\"validationData\":{\"jobInputType\":\"JobInput\",\"description\":\"iiisklbonxxu\"},\"dataGenerationTaskType\":\"Conversation\",\"promptSettings\":{\"enableChainOfDensity\":true,\"enableChainOfThought\":true,\"maxLenSummary\":1841598394},\"teacherModelEndpoint\":{\"endpointName\":\"enjqnnpjw\"},\"teacherModelSettings\":{\"teacherModelEndpointRequestSettings\":{\"minEndpointSuccessRatio\":40.119399963877186,\"requestBatchSize\":1455466288},\"teacherModelInferenceParameters\":{\"kwopswnyinxupr\":\"ujjcxgdqmrlhn\",\"uekdcpvu\":\"xyxwjezbfqplo\"}}}") + .toObject(LabelGeneration.class); + Assertions.assertEquals(DataGenerationTaskType.CONVERSATION, model.dataGenerationTaskType()); + Assertions.assertTrue(model.promptSettings().enableChainOfDensity()); + Assertions.assertTrue(model.promptSettings().enableChainOfThought()); + Assertions.assertEquals(1841598394, model.promptSettings().maxLenSummary()); + Assertions.assertEquals("enjqnnpjw", model.teacherModelEndpoint().endpointName()); + Assertions.assertEquals(40.119399963877186D, + model.teacherModelSettings().teacherModelEndpointRequestSettings().minEndpointSuccessRatio()); + Assertions.assertEquals(1455466288, + model.teacherModelSettings().teacherModelEndpointRequestSettings().requestBatchSize()); + Assertions.assertEquals("ujjcxgdqmrlhn", + model.teacherModelSettings().teacherModelInferenceParameters().get("kwopswnyinxupr")); + Assertions.assertEquals("kmgobliqe", model.trainingData().description()); + Assertions.assertEquals("iiisklbonxxu", model.validationData().description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LabelGeneration model = new LabelGeneration().withDataGenerationTaskType(DataGenerationTaskType.CONVERSATION) + .withPromptSettings(new PromptSettings().withEnableChainOfDensity(true) + .withEnableChainOfThought(true) + .withMaxLenSummary(1841598394)) + .withTeacherModelEndpoint(new TeacherModelEndpoint().withEndpointName("enjqnnpjw")) + .withTeacherModelSettings(new TeacherModelSettings() + .withTeacherModelEndpointRequestSettings( + new TeacherModelEndpointRequestSettings().withMinEndpointSuccessRatio(40.119399963877186D) + .withRequestBatchSize(1455466288)) + .withTeacherModelInferenceParameters( + mapOf("kwopswnyinxupr", "ujjcxgdqmrlhn", "uekdcpvu", "xyxwjezbfqplo"))) + .withTrainingData(new JobInput().withDescription("kmgobliqe")) + .withValidationData(new JobInput().withDescription("iiisklbonxxu")); + model = BinaryData.fromObject(model).toObject(LabelGeneration.class); + Assertions.assertEquals(DataGenerationTaskType.CONVERSATION, model.dataGenerationTaskType()); + Assertions.assertTrue(model.promptSettings().enableChainOfDensity()); + Assertions.assertTrue(model.promptSettings().enableChainOfThought()); + Assertions.assertEquals(1841598394, model.promptSettings().maxLenSummary()); + Assertions.assertEquals("enjqnnpjw", model.teacherModelEndpoint().endpointName()); + Assertions.assertEquals(40.119399963877186D, + model.teacherModelSettings().teacherModelEndpointRequestSettings().minEndpointSuccessRatio()); + Assertions.assertEquals(1455466288, + model.teacherModelSettings().teacherModelEndpointRequestSettings().requestBatchSize()); + Assertions.assertEquals("ujjcxgdqmrlhn", + model.teacherModelSettings().teacherModelInferenceParameters().get("kwopswnyinxupr")); + Assertions.assertEquals("kmgobliqe", model.trainingData().description()); + Assertions.assertEquals("iiisklbonxxu", model.validationData().description()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java index 547174e98ce7..badc9a6468f6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,16 @@ public final class LakeHouseArtifactTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LakeHouseArtifact model = BinaryData.fromString("{\"artifactType\":\"LakeHouse\",\"artifactName\":\"n\"}") - .toObject(LakeHouseArtifact.class); - Assertions.assertEquals("n", model.artifactName()); + LakeHouseArtifact model + = BinaryData.fromString("{\"artifactType\":\"LakeHouse\",\"artifactName\":\"kschgcgqyhle\"}") + .toObject(LakeHouseArtifact.class); + Assertions.assertEquals("kschgcgqyhle", model.artifactName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LakeHouseArtifact model = new LakeHouseArtifact().withArtifactName("n"); + LakeHouseArtifact model = new LakeHouseArtifact().withArtifactName("kschgcgqyhle"); model = BinaryData.fromObject(model).toObject(LakeHouseArtifact.class); - Assertions.assertEquals("n", model.artifactName()); + Assertions.assertEquals("kschgcgqyhle", model.artifactName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java index 78909282b83f..a4d322eb89f4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ListAmlUserFeatureResult; +import org.junit.jupiter.api.Assertions; public final class ListAmlUserFeatureResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListAmlUserFeatureResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zczfkiceevs\",\"displayName\":\"xwspcaxikhfjq\",\"description\":\"glcxkxg\"},{\"id\":\"romv\",\"displayName\":\"ysemtmesrfsvpin\",\"description\":\"pat\"},{\"id\":\"diswxspvckojazb\",\"displayName\":\"spftesubzpv\",\"description\":\"dylytcovq\"},{\"id\":\"usrf\",\"displayName\":\"d\",\"description\":\"fxnxml\"}],\"nextLink\":\"uoswkjmdih\"}") + "{\"value\":[{\"id\":\"obnhrfbrjokjwqd\",\"displayName\":\"aqnilpp\",\"description\":\"aigazwf\"},{\"id\":\"rfd\",\"displayName\":\"lzs\",\"description\":\"dtqfdrslzy\"},{\"id\":\"xserw\",\"displayName\":\"uhytjwgetfi\",\"description\":\"n\"},{\"id\":\"jxzi\",\"displayName\":\"bjrahgdstubw\",\"description\":\"xzsshxliqmsckwh\"}],\"nextLink\":\"doi\"}") .toObject(ListAmlUserFeatureResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListAmlUserFeatureResult model = new ListAmlUserFeatureResult(); - model = BinaryData.fromObject(model).toObject(ListAmlUserFeatureResult.class); + Assertions.assertEquals("doi", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java index e82cd847e8c1..10df7f2f47f2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; +import com.azure.resourcemanager.machinelearning.implementation.models.ListUsagesResult; +import org.junit.jupiter.api.Assertions; public final class ListUsagesResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListUsagesResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"qn\",\"amlWorkspaceLocation\":\"oczvy\",\"type\":\"qrvkdv\",\"unit\":\"Count\",\"currentValue\":2186677248457800483,\"limit\":135145213418293643,\"name\":{\"value\":\"atkpnp\",\"localizedValue\":\"exxbczwtr\"}},{\"id\":\"iqzbq\",\"amlWorkspaceLocation\":\"sovmyokacspkwl\",\"type\":\"dobpxjmflbvvn\",\"unit\":\"Count\",\"currentValue\":3490424163698610193,\"limit\":8548098953378232008,\"name\":{\"value\":\"uqkhrsajiwku\",\"localizedValue\":\"oskg\"}},{\"id\":\"auu\",\"amlWorkspaceLocation\":\"jmvxie\",\"type\":\"ugidyjrr\",\"unit\":\"Count\",\"currentValue\":7621842593771814376,\"limit\":122532505466115624,\"name\":{\"value\":\"onpc\",\"localizedValue\":\"ocohslkevleg\"}},{\"id\":\"fbuhfmvfaxkffe\",\"amlWorkspaceLocation\":\"th\",\"type\":\"m\",\"unit\":\"Count\",\"currentValue\":9115490458846755949,\"limit\":3938193441578010473,\"name\":{\"value\":\"bzoggigrx\",\"localizedValue\":\"ur\"}}],\"nextLink\":\"xxjnspydptk\"}") + "{\"value\":[{\"id\":\"iadd\",\"amlWorkspaceLocation\":\"huvnlmdcnutie\",\"type\":\"izunzbqvioyn\",\"unit\":\"Count\",\"currentValue\":2469519608018888042,\"limit\":4591862988552242383,\"name\":{\"value\":\"rj\",\"localizedValue\":\"aiaibtvavly\"}},{\"id\":\"tlocnwmefzvzuzq\",\"amlWorkspaceLocation\":\"lko\",\"type\":\"bzgy\",\"unit\":\"Count\",\"currentValue\":1007917423236602932,\"limit\":2734655068304419001,\"name\":{\"value\":\"wmh\",\"localizedValue\":\"zfbywji\"}}],\"nextLink\":\"osladagwaakktbj\"}") .toObject(ListUsagesResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult(); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); + Assertions.assertEquals("osladagwaakktbj", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java index c506122bb15f..9cff476433a8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas; +import com.azure.resourcemanager.machinelearning.implementation.models.ListWorkspaceQuotas; +import org.junit.jupiter.api.Assertions; public final class ListWorkspaceQuotasTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListWorkspaceQuotas model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zjancuxr\",\"amlWorkspaceLocation\":\"wbavxbniwdj\",\"type\":\"zt\",\"name\":{\"value\":\"pgn\",\"localizedValue\":\"txhp\"},\"limit\":6965353138700786103,\"unit\":\"Count\"},{\"id\":\"abgl\",\"amlWorkspaceLocation\":\"hxw\",\"type\":\"tyq\",\"name\":{\"value\":\"bbovplwzbhvgyugu\",\"localizedValue\":\"vmkfssxqu\"},\"limit\":2455965823671467627,\"unit\":\"Count\"},{\"id\":\"gsxnkjzkdeslpv\",\"amlWorkspaceLocation\":\"pwiyig\",\"type\":\"pkdwzbai\",\"name\":{\"value\":\"baumnyqupedeoj\",\"localizedValue\":\"bckhsmtxpsi\"},\"limit\":8592172469751933163,\"unit\":\"Count\"}],\"nextLink\":\"esap\"}") + "{\"value\":[{\"id\":\"shvfxjtxlawmvdyq\",\"amlWorkspaceLocation\":\"jropxfqdm\",\"type\":\"znyjyu\",\"name\":{\"value\":\"zwgdpvhwiril\",\"localizedValue\":\"qtr\"},\"limit\":6245186789143678875,\"unit\":\"Count\"}],\"nextLink\":\"gacde\"}") .toObject(ListWorkspaceQuotas.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListWorkspaceQuotas model = new ListWorkspaceQuotas(); - model = BinaryData.fromObject(model).toObject(ListWorkspaceQuotas.class); + Assertions.assertEquals("gacde", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java index 31912a4ddd42..cd77cabfce08 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,17 +12,17 @@ public final class LiteralJobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LiteralJobInput model = BinaryData - .fromString("{\"jobInputType\":\"literal\",\"value\":\"ntqrcjqpzj\",\"description\":\"pjrrhpgsjbioag\"}") + .fromString("{\"jobInputType\":\"literal\",\"value\":\"efgvqcp\",\"description\":\"jgquxweysland\"}") .toObject(LiteralJobInput.class); - Assertions.assertEquals("pjrrhpgsjbioag", model.description()); - Assertions.assertEquals("ntqrcjqpzj", model.value()); + Assertions.assertEquals("jgquxweysland", model.description()); + Assertions.assertEquals("efgvqcp", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LiteralJobInput model = new LiteralJobInput().withDescription("pjrrhpgsjbioag").withValue("ntqrcjqpzj"); + LiteralJobInput model = new LiteralJobInput().withDescription("jgquxweysland").withValue("efgvqcp"); model = BinaryData.fromObject(model).toObject(LiteralJobInput.class); - Assertions.assertEquals("pjrrhpgsjbioag", model.description()); - Assertions.assertEquals("ntqrcjqpzj", model.value()); + Assertions.assertEquals("jgquxweysland", model.description()); + Assertions.assertEquals("efgvqcp", model.value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java index 5fa57b29c6ea..a3fca739a271 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class MLFlowModelJobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MLFlowModelJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"mlflow_model\",\"uri\":\"hximkgfmxpq\",\"mode\":\"ReadWriteMount\",\"description\":\"yriwnto\"}") + "{\"jobInputType\":\"mlflow_model\",\"mode\":\"EvalDownload\",\"uri\":\"fss\",\"description\":\"ghsfxrkbhammgmqf\"}") .toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("yriwnto", model.description()); - Assertions.assertEquals("hximkgfmxpq", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("ghsfxrkbhammgmqf", model.description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.mode()); + Assertions.assertEquals("fss", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MLFlowModelJobInput model = new MLFlowModelJobInput().withDescription("yriwnto") - .withUri("hximkgfmxpq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); + MLFlowModelJobInput model = new MLFlowModelJobInput().withDescription("ghsfxrkbhammgmqf") + .withMode(InputDeliveryMode.EVAL_DOWNLOAD) + .withUri("fss"); model = BinaryData.fromObject(model).toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("yriwnto", model.description()); - Assertions.assertEquals("hximkgfmxpq", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("ghsfxrkbhammgmqf", model.description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.mode()); + Assertions.assertEquals("fss", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java index a5dc943e5d81..163aee2b2319 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,22 +12,25 @@ public final class MLFlowModelJobOutputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MLFlowModelJobOutput model = BinaryData - .fromString( - "{\"jobOutputType\":\"mlflow_model\",\"uri\":\"i\",\"mode\":\"Direct\",\"description\":\"dqvao\"}") + MLFlowModelJobOutput model = BinaryData.fromString( + "{\"jobOutputType\":\"mlflow_model\",\"assetName\":\"raxq\",\"mode\":\"ReadWriteMount\",\"uri\":\"wjc\",\"description\":\"brhlhpvzadb\"}") .toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dqvao", model.description()); - Assertions.assertEquals("i", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("brhlhpvzadb", model.description()); + Assertions.assertEquals("raxq", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("wjc", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MLFlowModelJobOutput model - = new MLFlowModelJobOutput().withDescription("dqvao").withUri("i").withMode(OutputDeliveryMode.DIRECT); + MLFlowModelJobOutput model = new MLFlowModelJobOutput().withDescription("brhlhpvzadb") + .withAssetName("raxq") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("wjc"); model = BinaryData.fromObject(model).toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dqvao", model.description()); - Assertions.assertEquals("i", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("brhlhpvzadb", model.description()); + Assertions.assertEquals("raxq", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("wjc", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java index 1f88c2e14522..059f83e6b20e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,36 +15,34 @@ public final class MLTableDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MLTableData model = BinaryData.fromString( - "{\"dataType\":\"mltable\",\"referencedUris\":[\"xdfsfvkjc\",\"m\"],\"dataUri\":\"rsvxphtjnhptj\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"z\",\"tags\":{\"rgyzcslazp\":\"mydtdtftmizuzjd\",\"teagbgac\":\"kqoyimxpggk\",\"lpbybkisb\":\"qpjuytvude\",\"glpwdjr\":\"ifm\"},\"properties\":{\"ttuhaaax\":\"fshznu\",\"xstowagehxuihwes\":\"dcdjmdkqtxfrmbe\",\"kncypmte\":\"tjaqgbl\",\"hrfbrj\":\"spsaneyvaerpiob\"}}") + "{\"dataType\":\"mltable\",\"referencedUris\":[\"vnh\"],\"dataUri\":\"abrqnkkzj\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"aehvvibrxjjstoq\",\"properties\":{\"dgfcwqmp\":\"tpkxztmoobklft\"},\"tags\":{\"yhohujswtwkozzwc\":\"qxzhem\",\"wpfaj\":\"lkb\",\"talhsnvkcdmxzr\":\"jwltlwtjjgu\"}}") .toObject(MLTableData.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("mydtdtftmizuzjd", model.tags().get("rgyzcslazp")); - Assertions.assertEquals("fshznu", model.properties().get("ttuhaaax")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals("rsvxphtjnhptj", model.dataUri()); - Assertions.assertEquals("xdfsfvkjc", model.referencedUris().get(0)); + Assertions.assertEquals("aehvvibrxjjstoq", model.description()); + Assertions.assertEquals("tpkxztmoobklft", model.properties().get("dgfcwqmp")); + Assertions.assertEquals("qxzhem", model.tags().get("yhohujswtwkozzwc")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("abrqnkkzj", model.dataUri()); + Assertions.assertEquals("vnh", model.referencedUris().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MLTableData model = new MLTableData().withDescription("z") - .withTags(mapOf("rgyzcslazp", "mydtdtftmizuzjd", "teagbgac", "kqoyimxpggk", "lpbybkisb", "qpjuytvude", - "glpwdjr", "ifm")) - .withProperties(mapOf("ttuhaaax", "fshznu", "xstowagehxuihwes", "dcdjmdkqtxfrmbe", "kncypmte", "tjaqgbl", - "hrfbrj", "spsaneyvaerpiob")) - .withIsArchived(false) - .withIsAnonymous(true) - .withDataUri("rsvxphtjnhptj") - .withReferencedUris(Arrays.asList("xdfsfvkjc", "m")); + MLTableData model = new MLTableData().withDescription("aehvvibrxjjstoq") + .withProperties(mapOf("dgfcwqmp", "tpkxztmoobklft")) + .withTags(mapOf("yhohujswtwkozzwc", "qxzhem", "wpfaj", "lkb", "talhsnvkcdmxzr", "jwltlwtjjgu")) + .withIsAnonymous(false) + .withIsArchived(true) + .withDataUri("abrqnkkzj") + .withReferencedUris(Arrays.asList("vnh")); model = BinaryData.fromObject(model).toObject(MLTableData.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("mydtdtftmizuzjd", model.tags().get("rgyzcslazp")); - Assertions.assertEquals("fshznu", model.properties().get("ttuhaaax")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals("rsvxphtjnhptj", model.dataUri()); - Assertions.assertEquals("xdfsfvkjc", model.referencedUris().get(0)); + Assertions.assertEquals("aehvvibrxjjstoq", model.description()); + Assertions.assertEquals("tpkxztmoobklft", model.properties().get("dgfcwqmp")); + Assertions.assertEquals("qxzhem", model.tags().get("yhohujswtwkozzwc")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("abrqnkkzj", model.dataUri()); + Assertions.assertEquals("vnh", model.referencedUris().get(0)); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java index 00c211bd2c3b..e9fe2e6c2fc7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class MLTableJobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MLTableJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"mltable\",\"uri\":\"ezefkhkqtwqlepjj\",\"mode\":\"ReadOnlyMount\",\"description\":\"sf\"}") + "{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"edpf\",\"description\":\"lhupmomihzbdnpxp\"}") .toObject(MLTableJobInput.class); - Assertions.assertEquals("sf", model.description()); - Assertions.assertEquals("ezefkhkqtwqlepjj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); + Assertions.assertEquals("lhupmomihzbdnpxp", model.description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("edpf", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MLTableJobInput model = new MLTableJobInput().withDescription("sf") - .withUri("ezefkhkqtwqlepjj") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT); + MLTableJobInput model = new MLTableJobInput().withDescription("lhupmomihzbdnpxp") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("edpf"); model = BinaryData.fromObject(model).toObject(MLTableJobInput.class); - Assertions.assertEquals("sf", model.description()); - Assertions.assertEquals("ezefkhkqtwqlepjj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); + Assertions.assertEquals("lhupmomihzbdnpxp", model.description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("edpf", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java index b2ee04cf7c10..a5db9dfaa56a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,24 @@ public final class MLTableJobOutputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MLTableJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"mltable\",\"uri\":\"jwqdmr\",\"mode\":\"Upload\",\"description\":\"lppqcaigazwfwlr\"}") + "{\"jobOutputType\":\"mltable\",\"assetName\":\"nnin\",\"mode\":\"Direct\",\"uri\":\"rzfr\",\"description\":\"ztiucwviql\"}") .toObject(MLTableJobOutput.class); - Assertions.assertEquals("lppqcaigazwfwlr", model.description()); - Assertions.assertEquals("jwqdmr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); + Assertions.assertEquals("ztiucwviql", model.description()); + Assertions.assertEquals("nnin", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("rzfr", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MLTableJobOutput model = new MLTableJobOutput().withDescription("lppqcaigazwfwlr") - .withUri("jwqdmr") - .withMode(OutputDeliveryMode.UPLOAD); + MLTableJobOutput model = new MLTableJobOutput().withDescription("ztiucwviql") + .withAssetName("nnin") + .withMode(OutputDeliveryMode.DIRECT) + .withUri("rzfr"); model = BinaryData.fromObject(model).toObject(MLTableJobOutput.class); - Assertions.assertEquals("lppqcaigazwfwlr", model.description()); - Assertions.assertEquals("jwqdmr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); + Assertions.assertEquals("ztiucwviql", model.description()); + Assertions.assertEquals("nnin", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("rzfr", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java index e138e9b9c8fc..e8a00dfa7d32 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,20 +17,18 @@ public final class ManagedComputeIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedComputeIdentity model = BinaryData.fromString( - "{\"computeIdentityType\":\"ManagedIdentity\",\"identity\":{\"principalId\":\"ac27e7a4-e37a-4a73-ac6d-825782241d27\",\"tenantId\":\"5de2a901-fd71-4a09-b7b2-d28cbd13275f\",\"type\":\"None\",\"userAssignedIdentities\":{\"dtqfdrslzy\":{\"principalId\":\"727491ce-ba18-47e7-afa8-66472129f016\",\"clientId\":\"2a8ed716-1cb0-46ba-a012-8ae6592edc5f\"},\"serwyc\":{\"principalId\":\"742777d7-4b97-40ba-a340-8b5a8bee335a\",\"clientId\":\"b40dff74-a8fa-4431-bb17-ae3570eeaad0\"},\"tjwgetfigwn\":{\"principalId\":\"c693785e-2e1d-4c6c-a356-b522b6ffa031\",\"clientId\":\"232013d3-965d-45cd-97f3-a3c6405ab3a6\"},\"xzizebjr\":{\"principalId\":\"4e9f274b-4fdf-42dd-9e92-23d397371caa\",\"clientId\":\"22074597-d87e-4b5e-9bd9-b53cee169626\"}}}}") + "{\"computeIdentityType\":\"ManagedIdentity\",\"identity\":{\"principalId\":\"psimioy\",\"tenantId\":\"glkmiqwnnr\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"kexzgpmnmabeddqi\":{\"principalId\":\"bfqpspkladyd\",\"clientId\":\"hautw\"}}}}") .toObject(ManagedComputeIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedComputeIdentity model = new ManagedComputeIdentity() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("dtqfdrslzy", new UserAssignedIdentity(), "serwyc", new UserAssignedIdentity(), "tjwgetfigwn", - new UserAssignedIdentity(), "xzizebjr", new UserAssignedIdentity()))); + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("kexzgpmnmabeddqi", new UserAssignedIdentity()))); model = BinaryData.fromObject(model).toObject(ManagedComputeIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java index d7dfe57cb2e8..58673881deb0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java @@ -1,34 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.ManagedIdentity; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class ManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedIdentity model = BinaryData.fromString( - "{\"identityType\":\"Managed\",\"clientId\":\"c1cac5a4-f742-4da9-85fd-d6c1a568ade8\",\"objectId\":\"571ce55d-766a-492c-b0fc-2ed317841bdc\",\"resourceId\":\"stubw\"}") + "{\"identityType\":\"Managed\",\"clientId\":\"hhylx\",\"objectId\":\"vfiyymot\",\"resourceId\":\"bybwjmtftcvelnir\"}") .toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8"), model.clientId()); - Assertions.assertEquals(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc"), model.objectId()); - Assertions.assertEquals("stubw", model.resourceId()); + Assertions.assertEquals("hhylx", model.clientId()); + Assertions.assertEquals("vfiyymot", model.objectId()); + Assertions.assertEquals("bybwjmtftcvelnir", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedIdentity model - = new ManagedIdentity().withClientId(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8")) - .withObjectId(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc")) - .withResourceId("stubw"); + = new ManagedIdentity().withClientId("hhylx").withObjectId("vfiyymot").withResourceId("bybwjmtftcvelnir"); model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8"), model.clientId()); - Assertions.assertEquals(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc"), model.objectId()); - Assertions.assertEquals("stubw", model.resourceId()); + Assertions.assertEquals("hhylx", model.clientId()); + Assertions.assertEquals("vfiyymot", model.objectId()); + Assertions.assertEquals("bybwjmtftcvelnir", model.resourceId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkListResultTests.java new file mode 100644 index 000000000000..592f5d9df3fe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkListResultTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.ManagedNetworkListResult; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import org.junit.jupiter.api.Assertions; + +public final class ManagedNetworkListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedNetworkListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\",\"AllowInternetOutbound\",\"Disabled\",\"AllowOnlyApprovedOutbound\"],\"enableNetworkMonitor\":true,\"isolationMode\":\"Disabled\",\"networkId\":\"icgvpzgyxccnp\",\"outboundRules\":{\"m\":{\"type\":\"OutboundRule\"}},\"status\":{\"sparkReady\":true,\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"nbrysgktfmocnqbb\"},\"provisioningState\":\"Updating\"},\"id\":\"ofzghfuifwxu\",\"name\":\"ynohocqxug\",\"type\":\"xugdcrrfb\"},{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\",\"Disabled\",\"AllowOnlyApprovedOutbound\",\"AllowOnlyApprovedOutbound\"],\"enableNetworkMonitor\":false,\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"bdmddg\",\"outboundRules\":{\"uyaorservpv\":{\"type\":\"OutboundRule\"},\"sorsbegcl\":{\"type\":\"OutboundRule\"},\"ex\":{\"type\":\"OutboundRule\"}},\"status\":{\"sparkReady\":true,\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"vtuqvirl\"},\"provisioningState\":\"Deleted\"},\"id\":\"kydigt\",\"name\":\"jx\",\"type\":\"ocsvjekejchxzj\"},{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\",\"AllowInternetOutbound\"],\"enableNetworkMonitor\":false,\"isolationMode\":\"Disabled\",\"networkId\":\"ecmasjnfgngxaoje\",\"outboundRules\":{\"fxbfckmo\":{\"type\":\"OutboundRule\"}},\"status\":{\"sparkReady\":true,\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"zhvojyffwflbk\"},\"provisioningState\":\"Succeeded\"},\"id\":\"uiygtcyzcjefpub\",\"name\":\"ldjcgldryvlrlkb\",\"type\":\"zirmxcauj\"},{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\"],\"enableNetworkMonitor\":true,\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"xefppq\",\"outboundRules\":{\"nnjjthpsnxebycy\":{\"type\":\"OutboundRule\"},\"pohxubn\":{\"type\":\"OutboundRule\"}},\"status\":{\"sparkReady\":false,\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"spdyzssj\"},\"provisioningState\":\"Deleting\"},\"id\":\"dygjvgspjlfz\",\"name\":\"j\",\"type\":\"g\"}],\"nextLink\":\"xcrbcrgyoimm\"}") + .toObject(ManagedNetworkListResult.class); + Assertions.assertTrue(model.value().get(0).properties().managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.DISABLED, + model.value().get(0).properties().managedNetwork().isolationMode()); + Assertions.assertTrue(model.value().get(0).properties().managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, + model.value().get(0).properties().managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.value().get(0).properties().managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, + model.value().get(0).properties().managedNetwork().managedNetworkKind()); + Assertions.assertEquals("xcrbcrgyoimm", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java index fe52d995a98c..e520df45a9dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,13 +13,13 @@ public final class ManagedNetworkProvisionOptionsTests { public void testDeserialize() throws Exception { ManagedNetworkProvisionOptions model = BinaryData.fromString("{\"includeSpark\":true}").toObject(ManagedNetworkProvisionOptions.class); - Assertions.assertEquals(true, model.includeSpark()); + Assertions.assertTrue(model.includeSpark()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedNetworkProvisionOptions model = new ManagedNetworkProvisionOptions().withIncludeSpark(true); model = BinaryData.fromObject(model).toObject(ManagedNetworkProvisionOptions.class); - Assertions.assertEquals(true, model.includeSpark()); + Assertions.assertTrue(model.includeSpark()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java index 2ef9d27faca9..2db5285d0ba4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,19 +12,18 @@ public final class ManagedNetworkProvisionStatusInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ManagedNetworkProvisionStatusInner model - = BinaryData.fromString("{\"sparkReady\":false,\"status\":\"Inactive\"}") - .toObject(ManagedNetworkProvisionStatusInner.class); - Assertions.assertEquals(false, model.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status()); + ManagedNetworkProvisionStatusInner model = BinaryData.fromString("{\"sparkReady\":true,\"status\":\"Active\"}") + .toObject(ManagedNetworkProvisionStatusInner.class); + Assertions.assertTrue(model.sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedNetworkProvisionStatusInner model - = new ManagedNetworkProvisionStatusInner().withSparkReady(false).withStatus(ManagedNetworkStatus.INACTIVE); + = new ManagedNetworkProvisionStatusInner().withSparkReady(true).withStatus(ManagedNetworkStatus.ACTIVE); model = BinaryData.fromObject(model).toObject(ManagedNetworkProvisionStatusInner.class); - Assertions.assertEquals(false, model.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status()); + Assertions.assertTrue(model.sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java index 7ca93205e6a7..d951b996cc48 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; @@ -22,20 +22,20 @@ public final class ManagedNetworkProvisionsProvisionManagedNetworkMockTests { @Test public void testProvisionManagedNetwork() throws Exception { - String responseStr = "{\"sparkReady\":false,\"status\":\"Inactive\"}"; + String responseStr = "{\"sparkReady\":false,\"status\":\"Active\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedNetworkProvisionStatus response = manager.managedNetworkProvisions() - .provisionManagedNetwork("ljzbkdwlfjwxgvtk", "ctvrpeawzzkvf", - new ManagedNetworkProvisionOptions().withIncludeSpark(true), com.azure.core.util.Context.NONE); + .provisionManagedNetwork("ecttub", "welutrvd", new ManagedNetworkProvisionOptions().withIncludeSpark(false), + com.azure.core.util.Context.NONE); - Assertions.assertEquals(false, response.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, response.status()); + Assertions.assertFalse(response.sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, response.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsBasicResourceInnerTests.java new file mode 100644 index 000000000000..81561390cdbb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsBasicResourceInnerTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedNetworkSettingsBasicResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedNetworkSettingsBasicResourceInner model = BinaryData.fromString( + "{\"properties\":{\"enableNetworkMonitor\":true,\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"vkognhtv\",\"outboundRules\":{\"doqejexfdlhu\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Failed\",\"errorInformation\":\"vpnyldjd\",\"parentRuleNames\":[\"dryknkxioxhn\",\"jl\"]},\"fvuhzmolhveolngs\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\",\"errorInformation\":\"ywadr\",\"parentRuleNames\":[\"d\",\"ehjrwcflv\",\"bocayw\"]}},\"status\":{\"sparkReady\":true,\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"lhklmnj\"},\"id\":\"mqynhitrnwqg\",\"name\":\"rbthbfpiqnrjo\",\"type\":\"ogwfvkywz\"}") + .toObject(ManagedNetworkSettingsBasicResourceInner.class); + Assertions.assertTrue(model.properties().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.properties().isolationMode()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, + model.properties().outboundRules().get("doqejexfdlhu").category()); + Assertions.assertEquals(RuleStatus.FAILED, model.properties().outboundRules().get("doqejexfdlhu").status()); + Assertions.assertTrue(model.properties().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.properties().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.properties().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, model.properties().managedNetworkKind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedNetworkSettingsBasicResourceInner model = new ManagedNetworkSettingsBasicResourceInner() + .withProperties(new ManagedNetworkSettingsInner().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_INTERNET_OUTBOUND) + .withOutboundRules(mapOf("doqejexfdlhu", + new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.FAILED), + "fvuhzmolhveolngs", + new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.INACTIVE))) + .withStatus(new ManagedNetworkProvisionStatusInner().withSparkReady(true) + .withStatus(ManagedNetworkStatus.ACTIVE)) + .withFirewallSku(FirewallSku.BASIC) + .withManagedNetworkKind(ManagedNetworkKind.V2)); + model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsBasicResourceInner.class); + Assertions.assertTrue(model.properties().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.properties().isolationMode()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, + model.properties().outboundRules().get("doqejexfdlhu").category()); + Assertions.assertEquals(RuleStatus.FAILED, model.properties().outboundRules().get("doqejexfdlhu").status()); + Assertions.assertTrue(model.properties().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.properties().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.properties().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, model.properties().managedNetworkKind()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsExTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsExTests.java new file mode 100644 index 000000000000..d539df043dae --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsExTests.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedNetworkSettingsExTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedNetworkSettingsEx model = BinaryData.fromString( + "{\"changeableIsolationModes\":[\"AllowInternetOutbound\",\"AllowOnlyApprovedOutbound\",\"AllowOnlyApprovedOutbound\",\"Disabled\"],\"enableNetworkMonitor\":false,\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"fgcvs\",\"outboundRules\":{\"bvejo\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\",\"errorInformation\":\"cx\",\"parentRuleNames\":[\"nxaj\",\"tcdf\",\"zxaoxlhmvjcnnls\",\"nucqxhpaqo\"]}},\"status\":{\"sparkReady\":true,\"status\":\"Active\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"eldkqdlqqhn\"}") + .toObject(ManagedNetworkSettingsEx.class); + Assertions.assertFalse(model.enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.isolationMode()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, model.outboundRules().get("bvejo").category()); + Assertions.assertEquals(RuleStatus.ACTIVE, model.outboundRules().get("bvejo").status()); + Assertions.assertTrue(model.status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); + Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetworkKind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedNetworkSettingsEx model = new ManagedNetworkSettingsEx().withEnableNetworkMonitor(false) + .withIsolationMode(IsolationMode.ALLOW_INTERNET_OUTBOUND) + .withOutboundRules( + mapOf("bvejo", new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE))) + .withStatus( + new ManagedNetworkProvisionStatusInner().withSparkReady(true).withStatus(ManagedNetworkStatus.ACTIVE)) + .withFirewallSku(FirewallSku.STANDARD) + .withManagedNetworkKind(ManagedNetworkKind.V2); + model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsEx.class); + Assertions.assertFalse(model.enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.isolationMode()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, model.outboundRules().get("bvejo").category()); + Assertions.assertEquals(RuleStatus.ACTIVE, model.outboundRules().get("bvejo").status()); + Assertions.assertTrue(model.status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); + Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, model.managedNetworkKind()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java index c547f4a752d5..6f09f5872492 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; import com.azure.resourcemanager.machinelearning.models.OutboundRule; import com.azure.resourcemanager.machinelearning.models.RuleCategory; @@ -20,29 +22,40 @@ public final class ManagedNetworkSettingsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedNetworkSettingsInner model = BinaryData.fromString( - "{\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"koty\",\"outboundRules\":{\"ndlik\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"}},\"status\":{\"sparkReady\":false,\"status\":\"Active\"}}") + "{\"enableNetworkMonitor\":false,\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"mwisdkfthwxmnt\",\"outboundRules\":{\"dwzjeiach\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\",\"errorInformation\":\"mijcmmxdcufufs\",\"parentRuleNames\":[\"mzidnsezcxtb\",\"sgfyccsnew\"]},\"gr\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Deleting\",\"errorInformation\":\"nrosfqpte\",\"parentRuleNames\":[\"zvypyqrimzinp\",\"swjdkirso\",\"dqxhcrmnohjtckwh\",\"soifiyipjxsqw\"]},\"c\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Active\",\"errorInformation\":\"cjxvsnbyxqab\",\"parentRuleNames\":[\"cpc\",\"shurzafbljjgpbto\"]},\"rlkhbzhfepgzgq\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Active\",\"errorInformation\":\"vbqid\",\"parentRuleNames\":[\"jzyulpk\",\"dj\"]}},\"status\":{\"sparkReady\":false,\"status\":\"Inactive\"},\"firewallSku\":\"Standard\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"ierhhbcsglummaj\"}") .toObject(ManagedNetworkSettingsInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("ndlik").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("ndlik").status()); - Assertions.assertEquals(false, model.status().sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); + Assertions.assertFalse(model.enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.isolationMode()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("dwzjeiach").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("dwzjeiach").status()); + Assertions.assertFalse(model.status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status().status()); + Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.managedNetworkKind()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedNetworkSettingsInner model = new ManagedNetworkSettingsInner() - .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) - .withOutboundRules(mapOf("ndlik", - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE))) - .withStatus( - new ManagedNetworkProvisionStatusInner().withSparkReady(false).withStatus(ManagedNetworkStatus.ACTIVE)); + ManagedNetworkSettingsInner model = new ManagedNetworkSettingsInner().withEnableNetworkMonitor(false) + .withIsolationMode(IsolationMode.ALLOW_INTERNET_OUTBOUND) + .withOutboundRules(mapOf("dwzjeiach", + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE), "gr", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.DELETING), "c", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.ACTIVE), + "rlkhbzhfepgzgq", new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.ACTIVE))) + .withStatus(new ManagedNetworkProvisionStatusInner().withSparkReady(false) + .withStatus(ManagedNetworkStatus.INACTIVE)) + .withFirewallSku(FirewallSku.STANDARD) + .withManagedNetworkKind(ManagedNetworkKind.V1); model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("ndlik").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("ndlik").status()); - Assertions.assertEquals(false, model.status().sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); + Assertions.assertFalse(model.enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, model.isolationMode()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("dwzjeiach").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("dwzjeiach").status()); + Assertions.assertFalse(model.status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status().status()); + Assertions.assertEquals(FirewallSku.STANDARD, model.firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.managedNetworkKind()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java new file mode 100644 index 000000000000..3e71f828bffe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsGetWithResponseMockTests.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +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 ManagedNetworkSettingsOperationsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\",\"AllowOnlyApprovedOutbound\",\"AllowOnlyApprovedOutbound\"],\"enableNetworkMonitor\":true,\"isolationMode\":\"Disabled\",\"networkId\":\"tsofdhrifek\",\"outboundRules\":{\"cbzyhtbjyycac\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"grzkeuplorntnssm\",\"parentRuleNames\":[\"zcdlnvupi\"]},\"gog\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Deleting\",\"errorInformation\":\"lt\",\"parentRuleNames\":[\"alqqrymjwwo\",\"anefell\",\"d\"]},\"j\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\",\"errorInformation\":\"lth\",\"parentRuleNames\":[\"uvwdpylp\",\"naghgla\"]}},\"status\":{\"sparkReady\":false,\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"swvtd\"},\"provisioningState\":\"Deleted\"},\"id\":\"wn\",\"name\":\"tvlrsfm\",\"type\":\"rm\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ManagedNetworkSettingsPropertiesBasicResource response = manager.managedNetworkSettingsOperations() + .getWithResponse("hxcrweeqkdmp", "mcrcel", "njftnfdcjtvei", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertTrue(response.properties().managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.DISABLED, response.properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, + response.properties().managedNetwork().outboundRules().get("cbzyhtbjyycac").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, + response.properties().managedNetwork().outboundRules().get("cbzyhtbjyycac").status()); + Assertions.assertFalse(response.properties().managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, + response.properties().managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, response.properties().managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, response.properties().managedNetwork().managedNetworkKind()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsListMockTests.java new file mode 100644 index 000000000000..357350e3099e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsListMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +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 ManagedNetworkSettingsOperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\"],\"enableNetworkMonitor\":true,\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"brvtaulh\",\"outboundRules\":{\"vpd\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Provisioning\",\"errorInformation\":\"ijcndwoyqvcyqjj\",\"parentRuleNames\":[\"jbfiyuhoxul\"]},\"kf\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\",\"errorInformation\":\"mphyacdhjmpnv\",\"parentRuleNames\":[\"shhljtkuyvyt\",\"uqzstqbxpyfawkj\",\"i\"]},\"qkotxodbxzhadm\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\",\"errorInformation\":\"dbkl\",\"parentRuleNames\":[\"kafaqqipvnvdz\",\"sssncghgi\"]},\"hnlweyzvrixcves\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Active\",\"errorInformation\":\"tcyyupaqdood\",\"parentRuleNames\":[\"kmjoybyogwjrssnr\",\"kkhxawohsjewx\"]}},\"status\":{\"sparkReady\":false,\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"opvkr\"},\"provisioningState\":\"Succeeded\"},\"id\":\"sf\",\"name\":\"dmbxfy\",\"type\":\"weiqvhfyvkxgo\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.managedNetworkSettingsOperations() + .list("dknxerkaiikbpf", "qxpq", com.azure.core.util.Context.NONE); + + Assertions.assertTrue(response.iterator().next().properties().managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, + response.iterator().next().properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, + response.iterator().next().properties().managedNetwork().outboundRules().get("vpd").category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, + response.iterator().next().properties().managedNetwork().outboundRules().get("vpd").status()); + Assertions.assertFalse(response.iterator().next().properties().managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, + response.iterator().next().properties().managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, + response.iterator().next().properties().managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, + response.iterator().next().properties().managedNetwork().managedNetworkKind()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsPutMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsPutMockTests.java new file mode 100644 index 000000000000..1c06a392b15c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsOperationsPutMockTests.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class ManagedNetworkSettingsOperationsPutMockTests { + @Test + public void testPut() throws Exception { + String responseStr + = "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\"],\"enableNetworkMonitor\":true,\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"tmtjsklkwtnqqiqc\",\"outboundRules\":{\"rorxej\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Active\",\"errorInformation\":\"mand\",\"parentRuleNames\":[\"emrfqjh\",\"dpwlezbfgull\",\"pcijyxcmq\",\"ggk\"]},\"f\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Provisioning\",\"errorInformation\":\"ltlftraylxz\",\"parentRuleNames\":[\"puhbao\"]}},\"status\":{\"sparkReady\":true,\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V2\",\"firewallPublicIpAddress\":\"sq\"},\"provisioningState\":\"Succeeded\"},\"id\":\"zixpd\",\"name\":\"tvndvwwejvqpw\",\"type\":\"r\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + ManagedNetworkSettingsPropertiesBasicResource response = manager.managedNetworkSettingsOperations() + .define("vygttd") + .withExistingWorkspace("svei", "cuxwnojvcrgqmbn") + .withProperties(new ManagedNetworkSettingsProperties() + .withManagedNetwork(new ManagedNetworkSettingsEx().withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("au", + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.FAILED))) + .withStatus(new ManagedNetworkProvisionStatusInner().withSparkReady(false) + .withStatus(ManagedNetworkStatus.ACTIVE)) + .withFirewallSku(FirewallSku.BASIC) + .withManagedNetworkKind(ManagedNetworkKind.V2))) + .create(); + + Assertions.assertTrue(response.properties().managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, + response.properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.REQUIRED, + response.properties().managedNetwork().outboundRules().get("rorxej").category()); + Assertions.assertEquals(RuleStatus.ACTIVE, + response.properties().managedNetwork().outboundRules().get("rorxej").status()); + Assertions.assertTrue(response.properties().managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, response.properties().managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, response.properties().managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V2, response.properties().managedNetwork().managedNetworkKind()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java new file mode 100644 index 000000000000..f1dc433af63c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesBasicResourceInnerTests.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedNetworkSettingsPropertiesBasicResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedNetworkSettingsPropertiesBasicResourceInner model = BinaryData.fromString( + "{\"properties\":{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowOnlyApprovedOutbound\",\"AllowInternetOutbound\",\"Disabled\",\"AllowInternetOutbound\"],\"enableNetworkMonitor\":true,\"isolationMode\":\"AllowInternetOutbound\",\"networkId\":\"couhwivkdfvjskn\",\"outboundRules\":{\"pwbopvhcbt\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Deleting\",\"errorInformation\":\"tv\",\"parentRuleNames\":[\"qdqbvxqto\"]},\"ueocs\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Failed\",\"errorInformation\":\"cont\",\"parentRuleNames\":[\"fkit\"]},\"b\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\",\"errorInformation\":\"bjwvrudm\",\"parentRuleNames\":[\"wpm\",\"ol\",\"aj\"]},\"wrdkqlvzkfekd\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"phbjksc\",\"parentRuleNames\":[\"baajd\"]}},\"status\":{\"sparkReady\":true,\"status\":\"Active\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"jjpduibsrrrq\"},\"provisioningState\":\"Updating\"},\"id\":\"rypyurv\",\"name\":\"hhovtue\",\"type\":\"cp\"}") + .toObject(ManagedNetworkSettingsPropertiesBasicResourceInner.class); + Assertions.assertTrue(model.properties().managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, + model.properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.REQUIRED, + model.properties().managedNetwork().outboundRules().get("pwbopvhcbt").category()); + Assertions.assertEquals(RuleStatus.DELETING, + model.properties().managedNetwork().outboundRules().get("pwbopvhcbt").status()); + Assertions.assertTrue(model.properties().managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.properties().managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.properties().managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.properties().managedNetwork().managedNetworkKind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedNetworkSettingsPropertiesBasicResourceInner model + = new ManagedNetworkSettingsPropertiesBasicResourceInner() + .withProperties(new ManagedNetworkSettingsProperties().withManagedNetwork(new ManagedNetworkSettingsEx() + .withEnableNetworkMonitor(true) + .withIsolationMode(IsolationMode.ALLOW_INTERNET_OUTBOUND) + .withOutboundRules(mapOf("pwbopvhcbt", + new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.DELETING), "ueocs", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.FAILED), "b", + new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.INACTIVE), + "wrdkqlvzkfekd", + new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.FAILED))) + .withStatus(new ManagedNetworkProvisionStatusInner().withSparkReady(true) + .withStatus(ManagedNetworkStatus.ACTIVE)) + .withFirewallSku(FirewallSku.BASIC) + .withManagedNetworkKind(ManagedNetworkKind.V1))); + model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsPropertiesBasicResourceInner.class); + Assertions.assertTrue(model.properties().managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_INTERNET_OUTBOUND, + model.properties().managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.REQUIRED, + model.properties().managedNetwork().outboundRules().get("pwbopvhcbt").category()); + Assertions.assertEquals(RuleStatus.DELETING, + model.properties().managedNetwork().outboundRules().get("pwbopvhcbt").status()); + Assertions.assertTrue(model.properties().managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.properties().managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.properties().managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.properties().managedNetwork().managedNetworkKind()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesTests.java new file mode 100644 index 000000000000..88393d079609 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsPropertiesTests.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; +import com.azure.resourcemanager.machinelearning.models.IsolationMode; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedNetworkSettingsPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedNetworkSettingsProperties model = BinaryData.fromString( + "{\"managedNetwork\":{\"changeableIsolationModes\":[\"AllowInternetOutbound\"],\"enableNetworkMonitor\":false,\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"zycxhaoegjzg\",\"outboundRules\":{\"ykwu\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\",\"errorInformation\":\"srazcbybicq\",\"parentRuleNames\":[\"jpuapasizzfmu\"]},\"mrvnuvqkrrsguogk\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"nndzg\",\"parentRuleNames\":[\"zitjzffpherwjq\",\"s\",\"twonadezmzxvfybx\"]}},\"status\":{\"sparkReady\":true,\"status\":\"Inactive\"},\"firewallSku\":\"Basic\",\"managedNetworkKind\":\"V1\",\"firewallPublicIpAddress\":\"s\"},\"provisioningState\":\"Deleted\"}") + .toObject(ManagedNetworkSettingsProperties.class); + Assertions.assertFalse(model.managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, + model.managedNetwork().outboundRules().get("ykwu").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.managedNetwork().outboundRules().get("ykwu").status()); + Assertions.assertTrue(model.managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.managedNetwork().managedNetworkKind()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedNetworkSettingsProperties model = new ManagedNetworkSettingsProperties() + .withManagedNetwork(new ManagedNetworkSettingsEx().withEnableNetworkMonitor(false) + .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) + .withOutboundRules(mapOf("ykwu", + new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE), + "mrvnuvqkrrsguogk", + new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.FAILED))) + .withStatus(new ManagedNetworkProvisionStatusInner().withSparkReady(true) + .withStatus(ManagedNetworkStatus.INACTIVE)) + .withFirewallSku(FirewallSku.BASIC) + .withManagedNetworkKind(ManagedNetworkKind.V1)); + model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsProperties.class); + Assertions.assertFalse(model.managedNetwork().enableNetworkMonitor()); + Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.managedNetwork().isolationMode()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, + model.managedNetwork().outboundRules().get("ykwu").category()); + Assertions.assertEquals(RuleStatus.INACTIVE, model.managedNetwork().outboundRules().get("ykwu").status()); + Assertions.assertTrue(model.managedNetwork().status().sparkReady()); + Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.managedNetwork().status().status()); + Assertions.assertEquals(FirewallSku.BASIC, model.managedNetwork().firewallSku()); + Assertions.assertEquals(ManagedNetworkKind.V1, model.managedNetwork().managedNetworkKind()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java index 7315863af293..cab337ee9a18 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.OutboundRule; @@ -24,22 +24,22 @@ public final class ManagedNetworkSettingsRulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\"},\"id\":\"akk\",\"name\":\"bjortztkajqhsns\",\"type\":\"jplislx\"}"; + = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Failed\",\"errorInformation\":\"taatvpbiojncgjog\",\"parentRuleNames\":[\"ykekmgpsea\",\"sdqpwhp\",\"wdosfgbvsoz\"]},\"id\":\"npwxcjciotlbp\",\"name\":\"emqetmo\",\"type\":\"u\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); OutboundRuleBasicResource response = manager.managedNetworkSettingsRules() - .define("crlkorv") - .withExistingWorkspace("ibtvavl", "aqtlocnwmefzvzuz") - .withProperties(new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)) + .define("divghajpd") + .withExistingWorkspace("aljcqp", "pmathiydmkyvsx") + .withProperties(new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE)) .create(); - Assertions.assertEquals(RuleCategory.DEPENDENCY, response.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, response.properties().status()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, response.properties().category()); + Assertions.assertEquals(RuleStatus.FAILED, response.properties().status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java index aff10ac700ce..1c5c83fb483f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.managedNetworkSettingsRules() - .delete("lngsfmh", "dxqupyml", "klmnjqzmqynhitr", com.azure.core.util.Context.NONE); + manager.managedNetworkSettingsRules().delete("sn", "jcmkpxbc", "jrfkwc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java index d95f7468c7fd..07d193d92c22 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; @@ -23,20 +23,20 @@ public final class ManagedNetworkSettingsRulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Active\"},\"id\":\"nlmdcnutiex\",\"name\":\"izunzbqvioyn\",\"type\":\"tfqhhvvwzprjaaai\"}"; + = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\",\"errorInformation\":\"zy\",\"parentRuleNames\":[\"ars\",\"hqmrpdxnrdvtvty\"]},\"id\":\"thnndfplksdieh\",\"name\":\"ajb\",\"type\":\"tgmxkol\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); OutboundRuleBasicResource response = manager.managedNetworkSettingsRules() - .getWithResponse("wqgqrbthbfpi", "nrjocogwf", "kywzrqeiad", com.azure.core.util.Context.NONE) + .getWithResponse("rkntfwxkeu", "xgpcrvvmrdlckp", "noveabw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(RuleCategory.RECOMMENDED, response.properties().category()); - Assertions.assertEquals(RuleStatus.ACTIVE, response.properties().status()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, response.properties().category()); + Assertions.assertEquals(RuleStatus.INACTIVE, response.properties().status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java index 65b2e56a4489..6e899167832b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; @@ -24,19 +24,19 @@ public final class ManagedNetworkSettingsRulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\"},\"id\":\"x\",\"name\":\"ocaywmfvuhz\",\"type\":\"olhve\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Active\",\"errorInformation\":\"psteuvj\",\"parentRuleNames\":[\"ocyvymvn\",\"a\",\"hitxo\"]},\"id\":\"fomohcyno\",\"name\":\"hhbvbqxtktkeuapo\",\"type\":\"oofbnbhpt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.managedNetworkSettingsRules().list("hdkubgywadr", "lpdyehj", com.azure.core.util.Context.NONE); + PagedIterable response = manager.managedNetworkSettingsRules() + .list("qmyowddhtwaxob", "zatqocvrdj", com.azure.core.util.Context.NONE); - Assertions.assertEquals(RuleCategory.DEPENDENCY, response.iterator().next().properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, response.iterator().next().properties().status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, response.iterator().next().properties().category()); + Assertions.assertEquals(RuleStatus.ACTIVE, response.iterator().next().properties().status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointDeploymentResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointDeploymentResourcePropertiesTests.java new file mode 100644 index 000000000000..763dfbc37c52 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointDeploymentResourcePropertiesTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; +import com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointDeploymentResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class ManagedOnlineEndpointDeploymentResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedOnlineEndpointDeploymentResourceProperties model = BinaryData.fromString( + "{\"type\":\"managedOnlineEndpoint\",\"endpointComputeType\":\"AzureMLCompute\",\"model\":\"j\",\"failureReason\":\"hbcryffdfdosyge\",\"provisioningState\":\"Disabled\"}") + .toObject(ManagedOnlineEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("hbcryffdfdosyge", model.failureReason()); + Assertions.assertEquals(EndpointComputeType.AZURE_MLCOMPUTE, model.endpointComputeType()); + Assertions.assertEquals("j", model.model()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedOnlineEndpointDeploymentResourceProperties model + = new ManagedOnlineEndpointDeploymentResourceProperties().withFailureReason("hbcryffdfdosyge") + .withEndpointComputeType(EndpointComputeType.AZURE_MLCOMPUTE) + .withModel("j"); + model = BinaryData.fromObject(model).toObject(ManagedOnlineEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("hbcryffdfdosyge", model.failureReason()); + Assertions.assertEquals(EndpointComputeType.AZURE_MLCOMPUTE, model.endpointComputeType()); + Assertions.assertEquals("j", model.model()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..2e53ec4061d9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedOnlineEndpointResourcePropertiesTests.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointResourceProperties; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class ManagedOnlineEndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedOnlineEndpointResourceProperties model = BinaryData.fromString( + "{\"endpointType\":\"managedOnlineEndpoint\",\"authMode\":\"Key\",\"compute\":\"izmadjrsbgailj\",\"description\":\"vqmxqsxofxqnki\",\"mirrorTraffic\":{\"ltsxooi\":289380204,\"hiebruptls\":624309873,\"qzgaqsosrnjlvgrg\":949478358,\"huoxrqhjninpesw\":819380162},\"scoringUri\":\"hq\",\"traffic\":{\"zq\":745554741,\"csviu\":156493894},\"associatedResourceId\":\"j\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"s\",\"provisioningState\":\"Succeeded\"},\"id\":\"xsxoxvimdvet\",\"name\":\"hdbitq\",\"type\":\"byujs\"}],\"endpointUri\":\"mrihu\",\"failureReason\":\"rmsdbvqxgfyg\",\"location\":\"gxbdpbcehwbdpse\",\"name\":\"oynpytporrvkxtf\",\"provisioningState\":\"Disabled\",\"shouldCreateAiServicesEndpoint\":true}") + .toObject(ManagedOnlineEndpointResourceProperties.class); + Assertions.assertEquals("j", model.associatedResourceId()); + Assertions.assertEquals("s", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("mrihu", model.endpointUri()); + Assertions.assertEquals("rmsdbvqxgfyg", model.failureReason()); + Assertions.assertEquals("gxbdpbcehwbdpse", model.location()); + Assertions.assertEquals("oynpytporrvkxtf", model.name()); + Assertions.assertTrue(model.shouldCreateAiServicesEndpoint()); + Assertions.assertEquals(EndpointAuthMode.KEY, model.authMode()); + Assertions.assertEquals("izmadjrsbgailj", model.compute()); + Assertions.assertEquals("vqmxqsxofxqnki", model.description()); + Assertions.assertEquals(289380204, model.mirrorTraffic().get("ltsxooi")); + Assertions.assertEquals("hq", model.scoringUri()); + Assertions.assertEquals(745554741, model.traffic().get("zq")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedOnlineEndpointResourceProperties model + = new ManagedOnlineEndpointResourceProperties().withAssociatedResourceId("j") + .withDeployments(Arrays.asList(new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("s")))) + .withEndpointUri("mrihu") + .withFailureReason("rmsdbvqxgfyg") + .withLocation("gxbdpbcehwbdpse") + .withName("oynpytporrvkxtf") + .withShouldCreateAiServicesEndpoint(true) + .withAuthMode(EndpointAuthMode.KEY) + .withCompute("izmadjrsbgailj") + .withDescription("vqmxqsxofxqnki") + .withMirrorTraffic(mapOf("ltsxooi", 289380204, "hiebruptls", 624309873, "qzgaqsosrnjlvgrg", 949478358, + "huoxrqhjninpesw", 819380162)) + .withScoringUri("hq") + .withTraffic(mapOf("zq", 745554741, "csviu", 156493894)); + model = BinaryData.fromObject(model).toObject(ManagedOnlineEndpointResourceProperties.class); + Assertions.assertEquals("j", model.associatedResourceId()); + Assertions.assertEquals("s", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("mrihu", model.endpointUri()); + Assertions.assertEquals("rmsdbvqxgfyg", model.failureReason()); + Assertions.assertEquals("gxbdpbcehwbdpse", model.location()); + Assertions.assertEquals("oynpytporrvkxtf", model.name()); + Assertions.assertTrue(model.shouldCreateAiServicesEndpoint()); + Assertions.assertEquals(EndpointAuthMode.KEY, model.authMode()); + Assertions.assertEquals("izmadjrsbgailj", model.compute()); + Assertions.assertEquals("vqmxqsxofxqnki", model.description()); + Assertions.assertEquals(289380204, model.mirrorTraffic().get("ltsxooi")); + Assertions.assertEquals("hq", model.scoringUri()); + Assertions.assertEquals(745554741, model.traffic().get("zq")); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupAssignedIdentitiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupAssignedIdentitiesTests.java new file mode 100644 index 000000000000..4fb210ca3658 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupAssignedIdentitiesTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities; +import org.junit.jupiter.api.Assertions; + +public final class ManagedResourceGroupAssignedIdentitiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedResourceGroupAssignedIdentities model = BinaryData.fromString("{\"principalId\":\"kgymareqnajxqug\"}") + .toObject(ManagedResourceGroupAssignedIdentities.class); + Assertions.assertEquals("kgymareqnajxqug", model.principalId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedResourceGroupAssignedIdentities model + = new ManagedResourceGroupAssignedIdentities().withPrincipalId("kgymareqnajxqug"); + model = BinaryData.fromObject(model).toObject(ManagedResourceGroupAssignedIdentities.class); + Assertions.assertEquals("kgymareqnajxqug", model.principalId()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupSettingsTests.java new file mode 100644 index 000000000000..67133f742b1d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedResourceGroupSettingsTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ManagedResourceGroupSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ManagedResourceGroupSettings model + = BinaryData.fromString("{\"assignedIdentities\":[{\"principalId\":\"jhhyxxrwlycoduhp\"}]}") + .toObject(ManagedResourceGroupSettings.class); + Assertions.assertEquals("jhhyxxrwlycoduhp", model.assignedIdentities().get(0).principalId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ManagedResourceGroupSettings model = new ManagedResourceGroupSettings().withAssignedIdentities( + Arrays.asList(new ManagedResourceGroupAssignedIdentities().withPrincipalId("jhhyxxrwlycoduhp"))); + model = BinaryData.fromObject(model).toObject(ManagedResourceGroupSettings.class); + Assertions.assertEquals("jhhyxxrwlycoduhp", model.assignedIdentities().get(0).principalId()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java index 21416ca8b395..def496d3b522 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,17 +16,18 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"1d0fdb15-2831-4e0e-a59d-c10c1c336a7c\",\"tenantId\":\"4e5f2ce2-d525-44ab-b1d1-7b0e5316f387\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"dkwt\":{\"principalId\":\"32b7f306-79e8-413a-b464-f34445d25a75\",\"clientId\":\"027bed66-ef57-4b54-9ee5-b18937e924d7\"}}}") + "{\"principalId\":\"ymddys\",\"tenantId\":\"i\",\"type\":\"None\",\"userAssignedIdentities\":{\"llr\":{\"principalId\":\"yudxorrqnbp\",\"clientId\":\"zvyifqrvkdvj\"},\"iqzbq\":{\"principalId\":\"vdfwatkpn\",\"clientId\":\"lexxbczwtru\"},\"hrk\":{\"principalId\":\"sovmyokacspkwl\",\"clientId\":\"dobpxjmflbvvn\"},\"iwkuofos\":{\"principalId\":\"iwwzjuqk\",\"clientId\":\"sa\"}}}") .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("dkwt", new UserAssignedIdentity())); + ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("llr", new UserAssignedIdentity(), "iqzbq", new UserAssignedIdentity(), + "hrk", new UserAssignedIdentity(), "iwkuofos", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java index 06b32cf33b45..4620a1d4ded4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,14 +10,8 @@ public final class MarketplacePlanTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MarketplacePlan model = BinaryData - .fromString("{\"publisherId\":\"rvxhmtfhocnxzcm\",\"offerId\":\"ngxno\",\"planId\":\"xtdisnjevhd\"}") - .toObject(MarketplacePlan.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplacePlan model = new MarketplacePlan(); - model = BinaryData.fromObject(model).toObject(MarketplacePlan.class); + MarketplacePlan model + = BinaryData.fromString("{\"offerId\":\"pjlh\",\"planId\":\"xpzruzythqkk\",\"publisherId\":\"bg\"}") + .toObject(MarketplacePlan.class); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java index 6715139b4812..a23afae8ac9e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,16 +13,16 @@ public final class MarketplaceSubscriptionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceSubscriptionInner model = BinaryData.fromString( - "{\"properties\":{\"modelId\":\"cpxdazvd\",\"marketplacePlan\":{\"publisherId\":\"mmkoszudb\",\"offerId\":\"s\",\"planId\":\"rpcaqkiofkbtf\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"l\",\"name\":\"pvcbhhe\",\"type\":\"yq\"}") + "{\"properties\":{\"marketplacePlan\":{\"offerId\":\"ofldseacdhz\",\"planId\":\"kbrfgdrwji\",\"publisherId\":\"whfjsrwqrxe\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"modelId\":\"cwv\",\"provisioningState\":\"Failed\"},\"id\":\"qnt\",\"name\":\"cnawth\",\"type\":\"maxgnuyeamcmhudf\"}") .toObject(MarketplaceSubscriptionInner.class); - Assertions.assertEquals("cpxdazvd", model.properties().modelId()); + Assertions.assertEquals("cwv", model.properties().modelId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MarketplaceSubscriptionInner model = new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("cpxdazvd")); + .withProperties(new MarketplaceSubscriptionProperties().withModelId("cwv")); model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionInner.class); - Assertions.assertEquals("cpxdazvd", model.properties().modelId()); + Assertions.assertEquals("cwv", model.properties().modelId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java index 7cb3e3217304..0aba2bd69091 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class MarketplaceSubscriptionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceSubscriptionProperties model = BinaryData.fromString( - "{\"modelId\":\"wusqx\",\"marketplacePlan\":{\"publisherId\":\"pbrruyu\",\"offerId\":\"tvlmbjwcolbmxlb\",\"planId\":\"tpc\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Deleting\"}") + "{\"marketplacePlan\":{\"offerId\":\"ehok\",\"planId\":\"pqtwloesqrggvrb\",\"publisherId\":\"rukoi\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"modelId\":\"iduw\",\"provisioningState\":\"Failed\"}") .toObject(MarketplaceSubscriptionProperties.class); - Assertions.assertEquals("wusqx", model.modelId()); + Assertions.assertEquals("iduw", model.modelId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MarketplaceSubscriptionProperties model = new MarketplaceSubscriptionProperties().withModelId("wusqx"); + MarketplaceSubscriptionProperties model = new MarketplaceSubscriptionProperties().withModelId("iduw"); model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionProperties.class); - Assertions.assertEquals("wusqx", model.modelId()); + Assertions.assertEquals("iduw", model.modelId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java index 5768c128755d..32f04782ad36 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java @@ -1,38 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionResourceArmPaginatedResult; -import java.util.Arrays; +import com.azure.resourcemanager.machinelearning.implementation.models.MarketplaceSubscriptionResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class MarketplaceSubscriptionResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MarketplaceSubscriptionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"modelId\":\"rhuzgfxonjtpu\",\"marketplacePlan\":{\"publisherId\":\"ywpvt\",\"offerId\":\"tzbpdbollgry\",\"planId\":\"iuas\"},\"marketplaceSubscriptionStatus\":\"Suspended\",\"provisioningState\":\"Succeeded\"},\"id\":\"ocnequygdjboqgrm\",\"name\":\"qjkqevadrmmwi\",\"type\":\"awvcmjzkxiid\"},{\"properties\":{\"modelId\":\"scz\",\"marketplacePlan\":{\"publisherId\":\"s\",\"offerId\":\"qiqazugamxzkr\",\"planId\":\"oiisbamnppcce\"},\"marketplaceSubscriptionStatus\":\"Suspended\",\"provisioningState\":\"Deleting\"},\"id\":\"bezaxyfukzxuiz\",\"name\":\"y\",\"type\":\"nepk\"}],\"nextLink\":\"tiarxqiubxduk\"}") + "{\"value\":[{\"properties\":{\"marketplacePlan\":{\"offerId\":\"lvulnxdmnitmujdt\",\"planId\":\"clyymffhmjpddn\",\"publisherId\":\"fzuvrzmz\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"modelId\":\"jqrbrpvnm\",\"provisioningState\":\"Updating\"},\"id\":\"ebojtjppglao\",\"name\":\"o\",\"type\":\"kpjtnqjilaywk\"},{\"properties\":{\"marketplacePlan\":{\"offerId\":\"m\",\"planId\":\"yrilmhxdqaolf\",\"publisherId\":\"nkkbjpjvlywltmfw\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"modelId\":\"jw\",\"provisioningState\":\"Deleting\"},\"id\":\"j\",\"name\":\"nqzocrdzg\",\"type\":\"zeunt\"},{\"properties\":{\"marketplacePlan\":{\"offerId\":\"ncaqttiekoifu\",\"planId\":\"yttzgixgyrih\",\"publisherId\":\"mgb\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"modelId\":\"qtxnrflkndrndpg\",\"provisioningState\":\"Failed\"},\"id\":\"hdaqotwfhipxwg\",\"name\":\"abvcipowzaf\",\"type\":\"zuu\"},{\"properties\":{\"marketplacePlan\":{\"offerId\":\"cirvpefycdveit\",\"planId\":\"jnsxzajlnsjhwjuy\",\"publisherId\":\"bxqvmvuayt\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"modelId\":\"xkxeqbwp\",\"provisioningState\":\"Failed\"},\"id\":\"yksarcdrnxsluvlz\",\"name\":\"adltxkpbqhvfdq\",\"type\":\"jwkrhwzdan\"}],\"nextLink\":\"isgglmvokat\"}") .toObject(MarketplaceSubscriptionResourceArmPaginatedResult.class); - Assertions.assertEquals("rhuzgfxonjtpu", model.value().get(0).properties().modelId()); - Assertions.assertEquals("tiarxqiubxduk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSubscriptionResourceArmPaginatedResult model - = new MarketplaceSubscriptionResourceArmPaginatedResult() - .withValue(Arrays.asList( - new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("rhuzgfxonjtpu")), - new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("scz")))) - .withNextLink("tiarxqiubxduk"); - model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionResourceArmPaginatedResult.class); - Assertions.assertEquals("rhuzgfxonjtpu", model.value().get(0).properties().modelId()); - Assertions.assertEquals("tiarxqiubxduk", model.nextLink()); + Assertions.assertEquals("jqrbrpvnm", model.value().get(0).properties().modelId()); + Assertions.assertEquals("isgglmvokat", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java index f53826fa955f..f9a2de1f377f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; @@ -22,21 +22,21 @@ public final class MarketplaceSubscriptionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"modelId\":\"mhenqn\",\"marketplacePlan\":{\"publisherId\":\"mk\",\"offerId\":\"xvexusjfjuphjjue\",\"planId\":\"vjtgpyoat\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Succeeded\"},\"id\":\"qm\",\"name\":\"xjdkvyzilrlfgowv\",\"type\":\"xjqru\"}"; + = "{\"properties\":{\"marketplacePlan\":{\"offerId\":\"rgcufiphnr\",\"planId\":\"zz\",\"publisherId\":\"nybfsoayatqkdzux\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"modelId\":\"zkv\",\"provisioningState\":\"Succeeded\"},\"id\":\"jsaoggd\",\"name\":\"jjkox\",\"type\":\"ccjd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MarketplaceSubscription response = manager.marketplaceSubscriptions() - .define("edzyzbvsjut") - .withExistingWorkspace("ktcr", "ct") - .withProperties(new MarketplaceSubscriptionProperties().withModelId("sysefil")) + .define("gi") + .withExistingWorkspace("rpuwacfqn", "vrbb") + .withProperties(new MarketplaceSubscriptionProperties().withModelId("klywdlxm")) .create(); - Assertions.assertEquals("mhenqn", response.properties().modelId()); + Assertions.assertEquals("zkv", response.properties().modelId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java index 7d5e2d1b5772..5bc8b1347566 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; @@ -21,19 +21,19 @@ public final class MarketplaceSubscriptionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"modelId\":\"nssvrkzslyliog\",\"marketplacePlan\":{\"publisherId\":\"hrmcpbmyghqtth\",\"offerId\":\"blwkqztqrnre\",\"planId\":\"fmnrweevtun\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"vsjfpsyqvgaaymfk\",\"name\":\"xhiwmkljhk\",\"type\":\"xcewzgoxz\"}"; + = "{\"properties\":{\"marketplacePlan\":{\"offerId\":\"jikgp\",\"planId\":\"czzkzi\",\"publisherId\":\"jnhhiofcnyz\"},\"marketplaceSubscriptionStatus\":\"Suspended\",\"modelId\":\"lddngqwmlleg\",\"provisioningState\":\"Updating\"},\"id\":\"agsyljwwp\",\"name\":\"qh\",\"type\":\"hlajmikqvnrj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); MarketplaceSubscription response = manager.marketplaceSubscriptions() - .getWithResponse("a", "bldhcfhw", "ithxna", com.azure.core.util.Context.NONE) + .getWithResponse("oube", "zipyiafsuuv", "qqseoinxkothrnlg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nssvrkzslyliog", response.properties().modelId()); + Assertions.assertEquals("lddngqwmlleg", response.properties().modelId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java index 286fcb370eb4..89907c1e92b1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; @@ -22,18 +22,18 @@ public final class MarketplaceSubscriptionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"modelId\":\"lmw\",\"marketplacePlan\":{\"publisherId\":\"bkwrvtflotji\",\"offerId\":\"iswi\",\"planId\":\"vnw\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"ylsl\",\"name\":\"bdtrwkpely\",\"type\":\"lfwmajl\"}]}"; + = "{\"value\":[{\"properties\":{\"marketplacePlan\":{\"offerId\":\"j\",\"planId\":\"derkvbdvlazkx\",\"publisherId\":\"jjryztghd\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"modelId\":\"ffjpws\",\"provisioningState\":\"Canceled\"},\"id\":\"ftgaetcpl\",\"name\":\"idiuxzzhld\",\"type\":\"xv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.marketplaceSubscriptions().list("rmp", "apyq", "esginpixhulf", com.azure.core.util.Context.NONE); + PagedIterable response = manager.marketplaceSubscriptions() + .list("jopbgtzrgyrldoa", "ldglz", "k", com.azure.core.util.Context.NONE); - Assertions.assertEquals("lmw", response.iterator().next().properties().modelId()); + Assertions.assertEquals("ffjpws", response.iterator().next().properties().modelId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java index 3c764ebe79e8..a25036de7ba7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class MaterializationComputeResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MaterializationComputeResource model - = BinaryData.fromString("{\"instanceType\":\"emv\"}").toObject(MaterializationComputeResource.class); - Assertions.assertEquals("emv", model.instanceType()); + = BinaryData.fromString("{\"instanceType\":\"kcvtl\"}").toObject(MaterializationComputeResource.class); + Assertions.assertEquals("kcvtl", model.instanceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MaterializationComputeResource model = new MaterializationComputeResource().withInstanceType("emv"); + MaterializationComputeResource model = new MaterializationComputeResource().withInstanceType("kcvtl"); model = BinaryData.fromObject(model).toObject(MaterializationComputeResource.class); - Assertions.assertEquals("emv", model.instanceType()); + Assertions.assertEquals("kcvtl", model.instanceType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java index 5c0769367cf9..6f9927157ddb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -24,64 +24,65 @@ public final class MaterializationSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MaterializationSettings model = BinaryData.fromString( - "{\"storeType\":\"Offline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":1695764846,\"schedule\":{\"hours\":[448963425,170152558,1340957573,1561402676],\"minutes\":[1767773898,490513850,526112283],\"weekDays\":[\"Thursday\",\"Thursday\"],\"monthDays\":[1412806239,1522988272,495310352,1541316864]},\"endTime\":\"yghs\",\"startTime\":\"cyl\",\"timeZone\":\"gmnsghpxy\"},\"notification\":{\"emails\":[\"rwjjkhvyomacluzv\",\"nqmhrp\",\"pd\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobCompleted\"],\"webhooks\":{\"ypobkdqzr\":{\"webhookType\":\"Webhook\",\"eventType\":\"ssffxuifmc\"}}},\"resource\":{\"instanceType\":\"ylollgtrczzydmxz\"},\"sparkConfiguration\":{\"uaurkihcir\":\"p\",\"xnbkkj\":\"defxrdc\",\"nqbpi\":\"nurnnq\",\"gypxrxvbfihwuhvc\":\"xqltgrd\"}}") + "{\"notification\":{\"emailOn\":[\"JobCompleted\",\"JobCompleted\",\"JobCancelled\",\"JobCancelled\"],\"emails\":[\"qm\"],\"webhooks\":{\"aifyzyzeyuubeids\":{\"webhookType\":\"Webhook\",\"eventType\":\"vpifd\"},\"hgygvfltgvd\":{\"webhookType\":\"Webhook\",\"eventType\":\"fytoi\"},\"cpcunnuzdqum\":{\"webhookType\":\"Webhook\",\"eventType\":\"oynkrxwetwkdrcyr\"}}},\"resource\":{\"instanceType\":\"odnaienhqhskndn\"},\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":778201768,\"schedule\":{\"hours\":[1463877924,1252261227,638814851],\"minutes\":[489873775],\"monthDays\":[1742378408,367362868,125911630],\"weekDays\":[\"Saturday\",\"Thursday\",\"Saturday\"]},\"endTime\":\"xivcnrlyxnu\",\"startTime\":\"ephblkwqpatvbqs\",\"timeZone\":\"cjbctviv\"},\"sparkConfiguration\":{\"tuowogtgitsqh\":\"y\",\"nfzndscxmxeat\":\"vbrzcdb\",\"wnrdjyibqbnaom\":\"db\",\"hcjmo\":\"jrmkuhmaxljalf\"},\"storeType\":\"None\"}") .toObject(MaterializationSettings.class); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, model.storeType()); - Assertions.assertEquals("yghs", model.schedule().endTime()); - Assertions.assertEquals("cyl", model.schedule().startTime()); - Assertions.assertEquals("gmnsghpxy", model.schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.schedule().frequency()); - Assertions.assertEquals(1695764846, model.schedule().interval()); - Assertions.assertEquals(448963425, model.schedule().schedule().hours().get(0)); - Assertions.assertEquals(1767773898, model.schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1412806239, model.schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rwjjkhvyomacluzv", model.notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.notification().emailOn().get(0)); - Assertions.assertEquals("ssffxuifmc", model.notification().webhooks().get("ypobkdqzr").eventType()); - Assertions.assertEquals("ylollgtrczzydmxz", model.resource().instanceType()); - Assertions.assertEquals("p", model.sparkConfiguration().get("uaurkihcir")); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.notification().emailOn().get(0)); + Assertions.assertEquals("qm", model.notification().emails().get(0)); + Assertions.assertEquals("vpifd", model.notification().webhooks().get("aifyzyzeyuubeids").eventType()); + Assertions.assertEquals("odnaienhqhskndn", model.resource().instanceType()); + Assertions.assertEquals("xivcnrlyxnu", model.schedule().endTime()); + Assertions.assertEquals("ephblkwqpatvbqs", model.schedule().startTime()); + Assertions.assertEquals("cjbctviv", model.schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.WEEK, model.schedule().frequency()); + Assertions.assertEquals(778201768, model.schedule().interval()); + Assertions.assertEquals(1463877924, model.schedule().schedule().hours().get(0)); + Assertions.assertEquals(489873775, model.schedule().schedule().minutes().get(0)); + Assertions.assertEquals(1742378408, model.schedule().schedule().monthDays().get(0)); + Assertions.assertEquals(WeekDay.SATURDAY, model.schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("y", model.sparkConfiguration().get("tuowogtgitsqh")); + Assertions.assertEquals(MaterializationStoreType.NONE, model.storeType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MaterializationSettings model - = new MaterializationSettings().withStoreType(MaterializationStoreType.OFFLINE) - .withSchedule( - new RecurrenceTrigger().withEndTime("yghs") - .withStartTime("cyl") - .withTimeZone("gmnsghpxy") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(1695764846) - .withSchedule(new RecurrenceSchedule() - .withHours(Arrays.asList(448963425, 170152558, 1340957573, 1561402676)) - .withMinutes(Arrays.asList(1767773898, 490513850, 526112283)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY, WeekDay.THURSDAY)) - .withMonthDays(Arrays.asList(1412806239, 1522988272, 495310352, 1541316864)))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("rwjjkhvyomacluzv", "nqmhrp", "pd")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, - EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("ypobkdqzr", new Webhook().withEventType("ssffxuifmc")))) - .withResource(new MaterializationComputeResource().withInstanceType("ylollgtrczzydmxz")) - .withSparkConfiguration( - mapOf("uaurkihcir", "p", "xnbkkj", "defxrdc", "nqbpi", "nurnnq", "gypxrxvbfihwuhvc", "xqltgrd")); + MaterializationSettings model = new MaterializationSettings() + .withNotification(new NotificationSetting() + .withEmailOn( + Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_COMPLETED, + EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_CANCELLED)) + .withEmails(Arrays.asList("qm")) + .withWebhooks(mapOf("aifyzyzeyuubeids", new Webhook().withEventType("vpifd"), "hgygvfltgvd", + new Webhook().withEventType("fytoi"), "cpcunnuzdqum", + new Webhook().withEventType("oynkrxwetwkdrcyr")))) + .withResource(new MaterializationComputeResource().withInstanceType("odnaienhqhskndn")) + .withSchedule(new RecurrenceTrigger().withEndTime("xivcnrlyxnu") + .withStartTime("ephblkwqpatvbqs") + .withTimeZone("cjbctviv") + .withFrequency(RecurrenceFrequency.WEEK) + .withInterval(778201768) + .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1463877924, 1252261227, 638814851)) + .withMinutes(Arrays.asList(489873775)) + .withMonthDays(Arrays.asList(1742378408, 367362868, 125911630)) + .withWeekDays(Arrays.asList(WeekDay.SATURDAY, WeekDay.THURSDAY, WeekDay.SATURDAY)))) + .withSparkConfiguration(mapOf("tuowogtgitsqh", "y", "nfzndscxmxeat", "vbrzcdb", "wnrdjyibqbnaom", "db", + "hcjmo", "jrmkuhmaxljalf")) + .withStoreType(MaterializationStoreType.NONE); model = BinaryData.fromObject(model).toObject(MaterializationSettings.class); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, model.storeType()); - Assertions.assertEquals("yghs", model.schedule().endTime()); - Assertions.assertEquals("cyl", model.schedule().startTime()); - Assertions.assertEquals("gmnsghpxy", model.schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.schedule().frequency()); - Assertions.assertEquals(1695764846, model.schedule().interval()); - Assertions.assertEquals(448963425, model.schedule().schedule().hours().get(0)); - Assertions.assertEquals(1767773898, model.schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1412806239, model.schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rwjjkhvyomacluzv", model.notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.notification().emailOn().get(0)); - Assertions.assertEquals("ssffxuifmc", model.notification().webhooks().get("ypobkdqzr").eventType()); - Assertions.assertEquals("ylollgtrczzydmxz", model.resource().instanceType()); - Assertions.assertEquals("p", model.sparkConfiguration().get("uaurkihcir")); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.notification().emailOn().get(0)); + Assertions.assertEquals("qm", model.notification().emails().get(0)); + Assertions.assertEquals("vpifd", model.notification().webhooks().get("aifyzyzeyuubeids").eventType()); + Assertions.assertEquals("odnaienhqhskndn", model.resource().instanceType()); + Assertions.assertEquals("xivcnrlyxnu", model.schedule().endTime()); + Assertions.assertEquals("ephblkwqpatvbqs", model.schedule().startTime()); + Assertions.assertEquals("cjbctviv", model.schedule().timeZone()); + Assertions.assertEquals(RecurrenceFrequency.WEEK, model.schedule().frequency()); + Assertions.assertEquals(778201768, model.schedule().interval()); + Assertions.assertEquals(1463877924, model.schedule().schedule().hours().get(0)); + Assertions.assertEquals(489873775, model.schedule().schedule().minutes().get(0)); + Assertions.assertEquals(1742378408, model.schedule().schedule().monthDays().get(0)); + Assertions.assertEquals(WeekDay.SATURDAY, model.schedule().schedule().weekDays().get(0)); + Assertions.assertEquals("y", model.sparkConfiguration().get("tuowogtgitsqh")); + Assertions.assertEquals(MaterializationStoreType.NONE, model.storeType()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java index 487617bb3617..5709ba8ca6bd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,18 @@ public final class MedianStoppingPolicyTests { public void testDeserialize() throws Exception { MedianStoppingPolicy model = BinaryData .fromString( - "{\"policyType\":\"MedianStopping\",\"evaluationInterval\":146013478,\"delayEvaluation\":808656938}") + "{\"policyType\":\"MedianStopping\",\"delayEvaluation\":1657701466,\"evaluationInterval\":833506508}") .toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(146013478, model.evaluationInterval()); - Assertions.assertEquals(808656938, model.delayEvaluation()); + Assertions.assertEquals(1657701466, model.delayEvaluation()); + Assertions.assertEquals(833506508, model.evaluationInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MedianStoppingPolicy model - = new MedianStoppingPolicy().withEvaluationInterval(146013478).withDelayEvaluation(808656938); + = new MedianStoppingPolicy().withDelayEvaluation(1657701466).withEvaluationInterval(833506508); model = BinaryData.fromObject(model).toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(146013478, model.evaluationInterval()); - Assertions.assertEquals(808656938, model.delayEvaluation()); + Assertions.assertEquals(1657701466, model.delayEvaluation()); + Assertions.assertEquals(833506508, model.evaluationInterval()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java index 29b6f9291692..d574ac1fad61 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,26 +15,26 @@ public final class ModelContainerInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"yrxpdlcgqls\",\"nextVersion\":\"mjqfrddgamquhio\",\"description\":\"sjuivfcdisyir\",\"tags\":{\"xrxzbujrtr\":\"hcz\",\"khgn\":\"qvwre\",\"piqywnc\":\"nzonzl\",\"zehtdhgb\":\"jtszcof\"},\"properties\":{\"zmlovuanash\":\"reljeamur\",\"erbdk\":\"xlpm\"}},\"id\":\"vidizozsdb\",\"name\":\"cxjmonfdgnwncyp\",\"type\":\"uwwltvuqjctz\"}") + "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"sxjb\",\"nextVersion\":\"ehgpdohzjqatu\",\"description\":\"igebxncnwfepb\",\"properties\":{\"g\":\"fmxjg\"},\"tags\":{\"y\":\"gdlfgt\",\"ctqhamzjrwdk\":\"naquflq\",\"xdfzantkw\":\"zeqyjleziun\"}},\"id\":\"gyamlbnseqacjjv\",\"name\":\"ilguooqjagmditg\",\"type\":\"eiookjbsah\"}") .toObject(ModelContainerInner.class); - Assertions.assertEquals("sjuivfcdisyir", model.properties().description()); - Assertions.assertEquals("hcz", model.properties().tags().get("xrxzbujrtr")); - Assertions.assertEquals("reljeamur", model.properties().properties().get("zmlovuanash")); - Assertions.assertEquals(false, model.properties().isArchived()); + Assertions.assertEquals("igebxncnwfepb", model.properties().description()); + Assertions.assertEquals("fmxjg", model.properties().properties().get("g")); + Assertions.assertEquals("gdlfgt", model.properties().tags().get("y")); + Assertions.assertFalse(model.properties().isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ModelContainerInner model - = new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("sjuivfcdisyir") - .withTags(mapOf("xrxzbujrtr", "hcz", "khgn", "qvwre", "piqywnc", "nzonzl", "zehtdhgb", "jtszcof")) - .withProperties(mapOf("zmlovuanash", "reljeamur", "erbdk", "xlpm")) + = new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("igebxncnwfepb") + .withProperties(mapOf("g", "fmxjg")) + .withTags(mapOf("y", "gdlfgt", "ctqhamzjrwdk", "naquflq", "xdfzantkw", "zeqyjleziun")) .withIsArchived(false)); model = BinaryData.fromObject(model).toObject(ModelContainerInner.class); - Assertions.assertEquals("sjuivfcdisyir", model.properties().description()); - Assertions.assertEquals("hcz", model.properties().tags().get("xrxzbujrtr")); - Assertions.assertEquals("reljeamur", model.properties().properties().get("zmlovuanash")); - Assertions.assertEquals(false, model.properties().isArchived()); + Assertions.assertEquals("igebxncnwfepb", model.properties().description()); + Assertions.assertEquals("fmxjg", model.properties().properties().get("g")); + Assertions.assertEquals("gdlfgt", model.properties().tags().get("y")); + Assertions.assertFalse(model.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java index 99a677855f69..b917c4d523c3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,25 +14,26 @@ public final class ModelContainerPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"zzhmkd\",\"nextVersion\":\"vflyhbxcu\",\"description\":\"hxgsrboldfor\",\"tags\":{\"qpbtuodxes\":\"jlvizbfhfovva\",\"rrwoycqucwyhahn\":\"abbelawumuaslzk\",\"ywuhpsvfuur\":\"mdr\"},\"properties\":{\"xwlalniexzsrzpg\":\"we\",\"wpgdak\":\"pqtybb\"}}") + "{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"elqacslmot\",\"nextVersion\":\"bnfxofvc\",\"description\":\"gdirazf\",\"properties\":{\"jtmvc\":\"jwabmd\",\"kyqltqsrogt\":\"pexcmjurbuhh\",\"ysidfvclgl\":\"wkffdjkt\",\"uijtkbu\":\"n\"},\"tags\":{\"ujtjiqxfz\":\"gsfikayiansha\"}}") .toObject(ModelContainerProperties.class); - Assertions.assertEquals("hxgsrboldfor", model.description()); - Assertions.assertEquals("jlvizbfhfovva", model.tags().get("qpbtuodxes")); - Assertions.assertEquals("we", model.properties().get("xwlalniexzsrzpg")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("gdirazf", model.description()); + Assertions.assertEquals("jwabmd", model.properties().get("jtmvc")); + Assertions.assertEquals("gsfikayiansha", model.tags().get("ujtjiqxfz")); + Assertions.assertFalse(model.isArchived()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ModelContainerProperties model = new ModelContainerProperties().withDescription("hxgsrboldfor") - .withTags(mapOf("qpbtuodxes", "jlvizbfhfovva", "rrwoycqucwyhahn", "abbelawumuaslzk", "ywuhpsvfuur", "mdr")) - .withProperties(mapOf("xwlalniexzsrzpg", "we", "wpgdak", "pqtybb")) + ModelContainerProperties model = new ModelContainerProperties().withDescription("gdirazf") + .withProperties( + mapOf("jtmvc", "jwabmd", "kyqltqsrogt", "pexcmjurbuhh", "ysidfvclgl", "wkffdjkt", "uijtkbu", "n")) + .withTags(mapOf("ujtjiqxfz", "gsfikayiansha")) .withIsArchived(false); model = BinaryData.fromObject(model).toObject(ModelContainerProperties.class); - Assertions.assertEquals("hxgsrboldfor", model.description()); - Assertions.assertEquals("jlvizbfhfovva", model.tags().get("qpbtuodxes")); - Assertions.assertEquals("we", model.properties().get("xwlalniexzsrzpg")); - Assertions.assertEquals(false, model.isArchived()); + Assertions.assertEquals("gdirazf", model.description()); + Assertions.assertEquals("jwabmd", model.properties().get("jtmvc")); + Assertions.assertEquals("gsfikayiansha", model.tags().get("ujtjiqxfz")); + Assertions.assertFalse(model.isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java index 729884d38345..6ce104f1b0b5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java @@ -1,66 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.ModelContainerResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class ModelContainerResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"lcdisd\",\"nextVersion\":\"fj\",\"description\":\"svgjrwhryvy\",\"tags\":{\"knfnwmbtmvpdv\":\"dclxgc\"},\"properties\":{\"ihchrphkmcrjdqn\":\"ttzaefed\"}},\"id\":\"fzpbgtgkyl\",\"name\":\"dgh\",\"type\":\"jeuut\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"zhokvbwnhh\",\"nextVersion\":\"lgehg\",\"description\":\"ipifhpfeoajvg\",\"tags\":{\"sr\":\"xjcsheafidltu\",\"h\":\"smkss\",\"egprhptil\":\"iftxfkf\",\"qtgdqohmcwsl\":\"ucb\"},\"properties\":{\"llibphbqzmizak\":\"zetpwbra\",\"jpdn\":\"kan\"}},\"id\":\"ha\",\"name\":\"oylhjlmuoyxprimr\",\"type\":\"opteecj\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"tvasy\",\"nextVersion\":\"xdza\",\"description\":\"weoohguufuzboyj\",\"tags\":{\"jscjpahl\":\"wtzolbaemwmdxmeb\",\"yijddtvqcttad\":\"veabfqxnmwmqtib\"},\"properties\":{\"ieekpndzaa\":\"eukmr\",\"igpibud\":\"mudqmeq\"}},\"id\":\"yxeb\",\"name\":\"ybpmzznrtffyaq\",\"type\":\"tmhheioqa\"}],\"nextLink\":\"v\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":false,\"latestVersion\":\"kpqhjpenuygbq\",\"nextVersion\":\"qekewvnqvcd\",\"description\":\"uaucmf\",\"properties\":{\"vitac\":\"nlaxpunjqikcz\",\"oxhlw\":\"xmfcsserxhtv\"},\"tags\":{\"qrsxyp\":\"j\",\"yuel\":\"uuuybnchrsziz\",\"nlgmtrwahzjmu\":\"etndnbfqyggagf\"}},\"id\":\"tb\",\"name\":\"r\",\"type\":\"lrohkpig\"}],\"nextLink\":\"usuckzmkwklsno\"}") .toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("svgjrwhryvy", model.value().get(0).properties().description()); - Assertions.assertEquals("dclxgc", model.value().get(0).properties().tags().get("knfnwmbtmvpdv")); - Assertions.assertEquals("ttzaefed", model.value().get(0).properties().properties().get("ihchrphkmcrjdqn")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("v", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerResourceArmPaginatedResult model - = new ModelContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("svgjrwhryvy") - .withTags(mapOf("knfnwmbtmvpdv", "dclxgc")) - .withProperties(mapOf("ihchrphkmcrjdqn", "ttzaefed")) - .withIsArchived(true)), - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("ipifhpfeoajvg") - .withTags(mapOf("sr", "xjcsheafidltu", "h", "smkss", "egprhptil", "iftxfkf", "qtgdqohmcwsl", "ucb")) - .withProperties(mapOf("llibphbqzmizak", "zetpwbra", "jpdn", "kan")) - .withIsArchived(false)), - new ModelContainerInner() - .withProperties(new ModelContainerProperties().withDescription("weoohguufuzboyj") - .withTags(mapOf("jscjpahl", "wtzolbaemwmdxmeb", "yijddtvqcttad", "veabfqxnmwmqtib")) - .withProperties(mapOf("ieekpndzaa", "eukmr", "igpibud", "mudqmeq")) - .withIsArchived(false)))) - .withNextLink("v"); - model = BinaryData.fromObject(model).toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("svgjrwhryvy", model.value().get(0).properties().description()); - Assertions.assertEquals("dclxgc", model.value().get(0).properties().tags().get("knfnwmbtmvpdv")); - Assertions.assertEquals("ttzaefed", model.value().get(0).properties().properties().get("ihchrphkmcrjdqn")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("v", 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; + Assertions.assertEquals("uaucmf", model.value().get(0).properties().description()); + Assertions.assertEquals("nlaxpunjqikcz", model.value().get(0).properties().properties().get("vitac")); + Assertions.assertEquals("j", model.value().get(0).properties().tags().get("qrsxyp")); + Assertions.assertFalse(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("usuckzmkwklsno", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java index 2a5ca165ff07..cf00c315b0de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ModelContainer; @@ -24,28 +24,28 @@ public final class ModelContainersCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"rwnpwgchlabtt\",\"nextVersion\":\"ittheaxq\",\"description\":\"flnl\",\"tags\":{\"gqtcxyrslegh\":\"csslellfukqurrtc\"},\"properties\":{\"zr\":\"mjjsvym\",\"spjqafsxvqq\":\"yyvlx\",\"vvih\":\"azoblxxksputiz\"}},\"id\":\"sdolodfodokhaog\",\"name\":\"wdhlnarjtuoarj\",\"type\":\"riccuyqtj\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":true,\"latestVersion\":\"lyvzlljydg\",\"nextVersion\":\"oqgrucwzcyju\",\"description\":\"gwjqeglymnrr\",\"properties\":{\"cilfiulgnnyxwdp\":\"qpiyxkmqmgex\",\"bbsnptmmvd\":\"cewqvvzxgbamq\",\"jkb\":\"av\"},\"tags\":{\"izcbqjxmhwdtunpc\":\"w\",\"rfouwkoltjdauujj\":\"kd\",\"eykudjzrim\":\"tyhdd\",\"znqqkqxkdglse\":\"ehplmqyoduksa\"}},\"id\":\"krbyy\",\"name\":\"krjgbnwgokrll\",\"type\":\"ecannv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelContainer response = manager.modelContainers() - .define("xm") - .withExistingWorkspace("jnpatazfyxegkly", "d") - .withProperties(new ModelContainerProperties().withDescription("forgcufi") - .withTags(mapOf("zknybfsoayatq", "roiz", "oggdp", "dzuxpldzkvbebdjs")) - .withProperties(mapOf("ooyxc", "oxlccj", "jhqq", "zzogz")) - .withIsArchived(false)) + .define("cccpxbnwitaf") + .withExistingWorkspace("ynpgomzmkj", "ajlfpsvrljlhe") + .withProperties(new ModelContainerProperties().withDescription("cxqm") + .withProperties(mapOf("gul", "dcy", "mqoubxlpkdsn", "llfwrmsuxyq")) + .withTags(mapOf("rppoy", "ymsdlraduhgwaxz")) + .withIsArchived(true)) .create(); - Assertions.assertEquals("flnl", response.properties().description()); - Assertions.assertEquals("csslellfukqurrtc", response.properties().tags().get("gqtcxyrslegh")); - Assertions.assertEquals("mjjsvym", response.properties().properties().get("zr")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("gwjqeglymnrr", response.properties().description()); + Assertions.assertEquals("qpiyxkmqmgex", response.properties().properties().get("cilfiulgnnyxwdp")); + Assertions.assertEquals("w", response.properties().tags().get("izcbqjxmhwdtunpc")); + Assertions.assertTrue(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java index 674e9ac21035..9aea83d43956 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.modelContainers().deleteWithResponse("gnwwji", "gpwdczzkz", "bpj", com.azure.core.util.Context.NONE); + manager.modelContainers().deleteWithResponse("nbfvkiwmqnwmytc", "ti", "gy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java index 95a9b05b3f6f..dfd22263140a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ModelContainer; @@ -21,22 +21,22 @@ public final class ModelContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"zqhph\",\"nextVersion\":\"jmi\",\"description\":\"vnrj\",\"tags\":{\"lldglzdkxftjre\":\"pbgtzrgyrldo\"},\"properties\":{\"ztghdwrvffjpw\":\"kvbdvlazkxaujjr\",\"cplxid\":\"zlfyftgae\",\"puw\":\"uxzzhldaxvi\"}},\"id\":\"f\",\"name\":\"nwvrbbpgibyzrpq\",\"type\":\"hrdldvxcjj\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"cidsjqcqyzmrtfd\",\"nextVersion\":\"pryyjlikalbcyu\",\"description\":\"hwzagva\",\"properties\":{\"fz\":\"cephnhnuhg\",\"mrwpe\":\"hi\",\"rjbpertjpair\":\"i\"},\"tags\":{\"tvqopugrse\":\"mcgiwsywpe\",\"dmcbc\":\"giuztqefzypul\"}},\"id\":\"didhuepikwc\",\"name\":\"oasg\",\"type\":\"kqmki\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelContainer response = manager.modelContainers() - .getWithResponse("hhiofcnyzqznld", "ngqwmllegucem", "gs", com.azure.core.util.Context.NONE) + .getWithResponse("xplcsinb", "lolxxhcyn", "mvaizv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vnrj", response.properties().description()); - Assertions.assertEquals("pbgtzrgyrldo", response.properties().tags().get("lldglzdkxftjre")); - Assertions.assertEquals("kvbdvlazkxaujjr", response.properties().properties().get("ztghdwrvffjpw")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("hwzagva", response.properties().description()); + Assertions.assertEquals("cephnhnuhg", response.properties().properties().get("fz")); + Assertions.assertEquals("mcgiwsywpe", response.properties().tags().get("tvqopugrse")); + Assertions.assertTrue(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java index 761268dd3f51..df7b26c5c130 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -23,21 +23,22 @@ public final class ModelContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"mebmxzwcf\",\"nextVersion\":\"x\",\"description\":\"rppwksixho\",\"tags\":{\"dqttiqwixsdx\":\"ydxjkdsqeay\",\"tvbqhyszflzjzdci\":\"flwfvahbwhrguq\",\"shbkdptcm\":\"xlggrtpayfklb\"},\"properties\":{\"fiykloeqx\":\"nvkhjtrashnf\"}},\"id\":\"pqboubehzipyia\",\"name\":\"suuvo\",\"type\":\"qseoinxkothrn\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"bjfpxo\",\"nextVersion\":\"nm\",\"description\":\"iqw\",\"properties\":{\"sstnwvravntvk\":\"yxfknj\"},\"tags\":{\"nlpaymketotk\":\"qi\",\"wlkryzmpgqqdh\":\"dme\",\"zjohdhczh\":\"ctxxregykjmpad\",\"xgjqqbactffxd\":\"xitydljgrpqua\"}},\"id\":\"sihumwafapctglj\",\"name\":\"pizqqihvbkufq\",\"type\":\"qdd\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.modelContainers() - .list("k", "bqyfecnsqeewf", "wgmkcaya", 659953867, ListViewType.ALL, com.azure.core.util.Context.NONE); + .list("texnzhdmcgvjbryb", "arkhkoqcud", "wmoyhd", 817830914, ListViewType.ARCHIVED_ONLY, + com.azure.core.util.Context.NONE); - Assertions.assertEquals("rppwksixho", response.iterator().next().properties().description()); - Assertions.assertEquals("ydxjkdsqeay", response.iterator().next().properties().tags().get("dqttiqwixsdx")); - Assertions.assertEquals("nvkhjtrashnf", response.iterator().next().properties().properties().get("fiykloeqx")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("iqw", response.iterator().next().properties().description()); + Assertions.assertEquals("yxfknj", response.iterator().next().properties().properties().get("sstnwvravntvk")); + Assertions.assertEquals("qi", response.iterator().next().properties().tags().get("nlpaymketotk")); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java index 05d7123de90a..5b584820e069 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,14 @@ public final class ModelSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ModelSettings model = BinaryData.fromString("{\"modelId\":\"okatu\"}").toObject(ModelSettings.class); - Assertions.assertEquals("okatu", model.modelId()); + ModelSettings model = BinaryData.fromString("{\"modelId\":\"nrzpghlrdtbg\"}").toObject(ModelSettings.class); + Assertions.assertEquals("nrzpghlrdtbg", model.modelId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ModelSettings model = new ModelSettings().withModelId("okatu"); + ModelSettings model = new ModelSettings().withModelId("nrzpghlrdtbg"); model = BinaryData.fromObject(model).toObject(ModelSettings.class); - Assertions.assertEquals("okatu", model.modelId()); + Assertions.assertEquals("nrzpghlrdtbg", model.modelId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java index 6eca28a3d3dc..b8776b4e2947 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java @@ -1,13 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.DatasetReference; import com.azure.resourcemanager.machinelearning.models.FlavorData; import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -16,44 +18,54 @@ public final class ModelVersionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelVersionInner model = BinaryData.fromString( - "{\"properties\":{\"flavors\":{\"zcyjtot\":{\"data\":{\"ftpmdtzfjltfv\":\"lgorb\"}}},\"modelType\":\"opv\",\"modelUri\":\"dbzqgqqihed\",\"jobName\":\"qwthmky\",\"provisioningState\":\"Deleting\",\"stage\":\"sihsgqcwdhohsd\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ufcohdxbz\",\"tags\":{\"qxeysko\":\"muapcvhdbevw\",\"z\":\"qzinkfkbg\",\"vkzqk\":\"owxeqocljmy\"},\"properties\":{\"zrxcczurt\":\"okbzef\",\"pqxbkwvzgnzvdf\":\"e\"}},\"id\":\"d\",\"name\":\"xzmqpnodawop\",\"type\":\"hewjptmcgsbost\"}") + "{\"properties\":{\"flavors\":{\"khgb\":{\"data\":{\"alhhjnhgwydyynfs\":\"e\"}},\"nmg\":{\"data\":{\"zjcpeogk\":\"anarfdlpukhpyrne\"}}},\"jobName\":\"ouxddbhfhpfpazj\",\"modelType\":\"ywjxh\",\"modelUri\":\"ulontacnpqwteht\",\"provisioningState\":\"Succeeded\",\"stage\":\"hrljy\",\"datasets\":[{\"name\":\"xh\",\"id\":\"duugwbsre\"},{\"name\":\"fqkfuarenl\",\"id\":\"htkln\"},{\"name\":\"afvvk\",\"id\":\"edev\"},{\"name\":\"oslc\",\"id\":\"y\"}],\"isAnonymous\":true,\"isArchived\":true,\"description\":\"inqcymczngnbdxxe\",\"properties\":{\"qdtvqecrqctmxx\":\"invudbch\",\"huytxzvtzn\":\"tddmf\",\"ytprwnwvroev\":\"pxbannovvoxc\",\"rrrouuxvnsa\":\"tlyo\"},\"tags\":{\"izrxklob\":\"rymo\",\"vevfxz\":\"xnazpmkml\",\"bzxliohrdddtfgxq\":\"pj\",\"p\":\"awpcbbnzqcykn\"}},\"id\":\"fyuicdh\",\"name\":\"bd\",\"type\":\"bwwg\"}") .toObject(ModelVersionInner.class); - Assertions.assertEquals("ufcohdxbz", model.properties().description()); - Assertions.assertEquals("muapcvhdbevw", model.properties().tags().get("qxeysko")); - Assertions.assertEquals("okbzef", model.properties().properties().get("zrxcczurt")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("lgorb", model.properties().flavors().get("zcyjtot").data().get("ftpmdtzfjltfv")); - Assertions.assertEquals("opv", model.properties().modelType()); - Assertions.assertEquals("dbzqgqqihed", model.properties().modelUri()); - Assertions.assertEquals("qwthmky", model.properties().jobName()); - Assertions.assertEquals("sihsgqcwdhohsd", model.properties().stage()); + Assertions.assertEquals("inqcymczngnbdxxe", model.properties().description()); + Assertions.assertEquals("invudbch", model.properties().properties().get("qdtvqecrqctmxx")); + Assertions.assertEquals("rymo", model.properties().tags().get("izrxklob")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertTrue(model.properties().isArchived()); + Assertions.assertEquals("e", model.properties().flavors().get("khgb").data().get("alhhjnhgwydyynfs")); + Assertions.assertEquals("ouxddbhfhpfpazj", model.properties().jobName()); + Assertions.assertEquals("ywjxh", model.properties().modelType()); + Assertions.assertEquals("ulontacnpqwteht", model.properties().modelUri()); + Assertions.assertEquals("hrljy", model.properties().stage()); + Assertions.assertEquals("xh", model.properties().datasets().get(0).name()); + Assertions.assertEquals("duugwbsre", model.properties().datasets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ModelVersionInner model - = new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("ufcohdxbz") - .withTags(mapOf("qxeysko", "muapcvhdbevw", "z", "qzinkfkbg", "vkzqk", "owxeqocljmy")) - .withProperties(mapOf("zrxcczurt", "okbzef", "pqxbkwvzgnzvdf", "e")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("zcyjtot", new FlavorData().withData(mapOf("ftpmdtzfjltfv", "lgorb")))) - .withModelType("opv") - .withModelUri("dbzqgqqihed") - .withJobName("qwthmky") - .withStage("sihsgqcwdhohsd")); + ModelVersionInner model = new ModelVersionInner().withProperties(new ModelVersionProperties() + .withDescription("inqcymczngnbdxxe") + .withProperties(mapOf("qdtvqecrqctmxx", "invudbch", "huytxzvtzn", "tddmf", "ytprwnwvroev", "pxbannovvoxc", + "rrrouuxvnsa", "tlyo")) + .withTags(mapOf("izrxklob", "rymo", "vevfxz", "xnazpmkml", "bzxliohrdddtfgxq", "pj", "p", "awpcbbnzqcykn")) + .withIsAnonymous(true) + .withIsArchived(true) + .withFlavors(mapOf("khgb", new FlavorData().withData(mapOf("alhhjnhgwydyynfs", "e")), "nmg", + new FlavorData().withData(mapOf("zjcpeogk", "anarfdlpukhpyrne")))) + .withJobName("ouxddbhfhpfpazj") + .withModelType("ywjxh") + .withModelUri("ulontacnpqwteht") + .withStage("hrljy") + .withDatasets(Arrays.asList(new DatasetReference().withName("xh").withId("duugwbsre"), + new DatasetReference().withName("fqkfuarenl").withId("htkln"), + new DatasetReference().withName("afvvk").withId("edev"), + new DatasetReference().withName("oslc").withId("y")))); model = BinaryData.fromObject(model).toObject(ModelVersionInner.class); - Assertions.assertEquals("ufcohdxbz", model.properties().description()); - Assertions.assertEquals("muapcvhdbevw", model.properties().tags().get("qxeysko")); - Assertions.assertEquals("okbzef", model.properties().properties().get("zrxcczurt")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("lgorb", model.properties().flavors().get("zcyjtot").data().get("ftpmdtzfjltfv")); - Assertions.assertEquals("opv", model.properties().modelType()); - Assertions.assertEquals("dbzqgqqihed", model.properties().modelUri()); - Assertions.assertEquals("qwthmky", model.properties().jobName()); - Assertions.assertEquals("sihsgqcwdhohsd", model.properties().stage()); + Assertions.assertEquals("inqcymczngnbdxxe", model.properties().description()); + Assertions.assertEquals("invudbch", model.properties().properties().get("qdtvqecrqctmxx")); + Assertions.assertEquals("rymo", model.properties().tags().get("izrxklob")); + Assertions.assertTrue(model.properties().isAnonymous()); + Assertions.assertTrue(model.properties().isArchived()); + Assertions.assertEquals("e", model.properties().flavors().get("khgb").data().get("alhhjnhgwydyynfs")); + Assertions.assertEquals("ouxddbhfhpfpazj", model.properties().jobName()); + Assertions.assertEquals("ywjxh", model.properties().modelType()); + Assertions.assertEquals("ulontacnpqwteht", model.properties().modelUri()); + Assertions.assertEquals("hrljy", model.properties().stage()); + Assertions.assertEquals("xh", model.properties().datasets().get(0).name()); + Assertions.assertEquals("duugwbsre", model.properties().datasets().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java index 1fd0f7511319..5e924835c4dc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java @@ -1,12 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DatasetReference; import com.azure.resourcemanager.machinelearning.models.FlavorData; import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -15,43 +17,54 @@ public final class ModelVersionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelVersionProperties model = BinaryData.fromString( - "{\"flavors\":{\"neqvcwwyyurmo\":{\"data\":{\"utmzlbiojlvfhrbb\":\"la\"}}},\"modelType\":\"ppr\",\"modelUri\":\"snmokayzej\",\"jobName\":\"lbkpb\",\"provisioningState\":\"Failed\",\"stage\":\"iljhahz\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"bnwieholew\",\"tags\":{\"fqsfa\":\"uubw\",\"wexjkmfxapjwogq\":\"aqtferr\",\"awbzasqb\":\"nobpudcdabtqwpw\"},\"properties\":{\"yexaoguy\":\"jg\",\"ids\":\"i\"}}") + "{\"flavors\":{\"yoxoy\":{\"data\":{\"plfmuvapckccrrvw\":\"idmhmwf\"}},\"fsv\":{\"data\":{\"oqboshbragapyyr\":\"phaimmoi\"}},\"hoqhnl\":{\"data\":{\"gahxkumasjcaa\":\"vbopfppdbwnu\",\"ehqepvufhbzehe\":\"fdmmcpug\"}},\"kizmdksaoafclu\":{\"data\":{\"imkrsrrmouc\":\"bldxeaclgscho\",\"eolhbhlvbmx\":\"ofldpuviyfcaa\",\"s\":\"qi\",\"kjxnqpvwgfstmhq\":\"tkcudfbsfarfsiow\"}}},\"jobName\":\"oxmycjimryvw\",\"modelType\":\"wwpbmzgwesyd\",\"modelUri\":\"wefohecbvo\",\"provisioningState\":\"Succeeded\",\"stage\":\"yqleallklmtk\",\"datasets\":[{\"name\":\"kxxpvbrd\",\"id\":\"mzsyzfhotl\"},{\"name\":\"k\",\"id\":\"ychunsjlpjrtwszh\"}],\"isAnonymous\":false,\"isArchived\":false,\"description\":\"hvtrrmhwrbfdpyf\",\"properties\":{\"lrocuyzlwh\":\"hvj\",\"emc\":\"memhooclutnpq\"},\"tags\":{\"jxsglhsr\":\"mmyky\",\"ylmbkzudni\":\"rye\",\"tjewlpxuzzj\":\"rfih\",\"otoihiqa\":\"nrefqyh\"}}") .toObject(ModelVersionProperties.class); - Assertions.assertEquals("bnwieholew", model.description()); - Assertions.assertEquals("uubw", model.tags().get("fqsfa")); - Assertions.assertEquals("jg", model.properties().get("yexaoguy")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("la", model.flavors().get("neqvcwwyyurmo").data().get("utmzlbiojlvfhrbb")); - Assertions.assertEquals("ppr", model.modelType()); - Assertions.assertEquals("snmokayzej", model.modelUri()); - Assertions.assertEquals("lbkpb", model.jobName()); - Assertions.assertEquals("iljhahz", model.stage()); + Assertions.assertEquals("hvtrrmhwrbfdpyf", model.description()); + Assertions.assertEquals("hvj", model.properties().get("lrocuyzlwh")); + Assertions.assertEquals("mmyky", model.tags().get("jxsglhsr")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals("idmhmwf", model.flavors().get("yoxoy").data().get("plfmuvapckccrrvw")); + Assertions.assertEquals("oxmycjimryvw", model.jobName()); + Assertions.assertEquals("wwpbmzgwesyd", model.modelType()); + Assertions.assertEquals("wefohecbvo", model.modelUri()); + Assertions.assertEquals("yqleallklmtk", model.stage()); + Assertions.assertEquals("kxxpvbrd", model.datasets().get(0).name()); + Assertions.assertEquals("mzsyzfhotl", model.datasets().get(0).id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ModelVersionProperties model = new ModelVersionProperties().withDescription("bnwieholew") - .withTags(mapOf("fqsfa", "uubw", "wexjkmfxapjwogq", "aqtferr", "awbzasqb", "nobpudcdabtqwpw")) - .withProperties(mapOf("yexaoguy", "jg", "ids", "i")) - .withIsArchived(true) + ModelVersionProperties model = new ModelVersionProperties().withDescription("hvtrrmhwrbfdpyf") + .withProperties(mapOf("lrocuyzlwh", "hvj", "emc", "memhooclutnpq")) + .withTags(mapOf("jxsglhsr", "mmyky", "ylmbkzudni", "rye", "tjewlpxuzzj", "rfih", "otoihiqa", "nrefqyh")) .withIsAnonymous(false) - .withFlavors(mapOf("neqvcwwyyurmo", new FlavorData().withData(mapOf("utmzlbiojlvfhrbb", "la")))) - .withModelType("ppr") - .withModelUri("snmokayzej") - .withJobName("lbkpb") - .withStage("iljhahz"); + .withIsArchived(false) + .withFlavors(mapOf("yoxoy", new FlavorData().withData(mapOf("plfmuvapckccrrvw", "idmhmwf")), "fsv", + new FlavorData().withData(mapOf("oqboshbragapyyr", "phaimmoi")), "hoqhnl", + new FlavorData().withData(mapOf("gahxkumasjcaa", "vbopfppdbwnu", "ehqepvufhbzehe", "fdmmcpug")), + "kizmdksaoafclu", + new FlavorData().withData(mapOf("imkrsrrmouc", "bldxeaclgscho", "eolhbhlvbmx", "ofldpuviyfcaa", "s", + "qi", "kjxnqpvwgfstmhq", "tkcudfbsfarfsiow")))) + .withJobName("oxmycjimryvw") + .withModelType("wwpbmzgwesyd") + .withModelUri("wefohecbvo") + .withStage("yqleallklmtk") + .withDatasets(Arrays.asList(new DatasetReference().withName("kxxpvbrd").withId("mzsyzfhotl"), + new DatasetReference().withName("k").withId("ychunsjlpjrtwszh"))); model = BinaryData.fromObject(model).toObject(ModelVersionProperties.class); - Assertions.assertEquals("bnwieholew", model.description()); - Assertions.assertEquals("uubw", model.tags().get("fqsfa")); - Assertions.assertEquals("jg", model.properties().get("yexaoguy")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("la", model.flavors().get("neqvcwwyyurmo").data().get("utmzlbiojlvfhrbb")); - Assertions.assertEquals("ppr", model.modelType()); - Assertions.assertEquals("snmokayzej", model.modelUri()); - Assertions.assertEquals("lbkpb", model.jobName()); - Assertions.assertEquals("iljhahz", model.stage()); + Assertions.assertEquals("hvtrrmhwrbfdpyf", model.description()); + Assertions.assertEquals("hvj", model.properties().get("lrocuyzlwh")); + Assertions.assertEquals("mmyky", model.tags().get("jxsglhsr")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertFalse(model.isArchived()); + Assertions.assertEquals("idmhmwf", model.flavors().get("yoxoy").data().get("plfmuvapckccrrvw")); + Assertions.assertEquals("oxmycjimryvw", model.jobName()); + Assertions.assertEquals("wwpbmzgwesyd", model.modelType()); + Assertions.assertEquals("wefohecbvo", model.modelUri()); + Assertions.assertEquals("yqleallklmtk", model.stage()); + Assertions.assertEquals("kxxpvbrd", model.datasets().get(0).name()); + Assertions.assertEquals("mzsyzfhotl", model.datasets().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java index a1c46416a0f1..761306aff91d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java @@ -1,91 +1,32 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.ModelVersionResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class ModelVersionResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ModelVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"flavors\":{\"jjrcgegydc\":{\"data\":{\"ibn\":\"xqnrkcxk\",\"swqrntvlwijp\":\"mysu\",\"uncuw\":\"ttexoqqpwcyyufmh\",\"unqndyfpchrqb\":\"qspkcdqzhlctd\"}}},\"modelType\":\"oxjumvqqo\",\"modelUri\":\"hrraiouaubrj\",\"jobName\":\"oq\",\"provisioningState\":\"Deleting\",\"stage\":\"jrngif\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ccbiuimzdlyjdfq\",\"tags\":{\"lzo\":\"yoqufdvruz\",\"fnmdxotn\":\"hpc\"},\"properties\":{\"i\":\"gugey\"}},\"id\":\"rkyui\",\"name\":\"absnmfpp\",\"type\":\"ojeevy\"},{\"properties\":{\"flavors\":{\"eglqgleohibetn\":{\"data\":{\"mfg\":\"zfczbg\"}}},\"modelType\":\"ankrrfxee\",\"modelUri\":\"tijv\",\"jobName\":\"vbmqzbqq\",\"provisioningState\":\"Creating\",\"stage\":\"rnwxacevehjkuyxo\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"lt\",\"tags\":{\"nm\":\"yl\"},\"properties\":{\"oqeyhlqhykprl\":\"xirpghriy\",\"mexiitdfuxt\":\"yznuciqd\",\"nlj\":\"asiibmiybnnust\"}},\"id\":\"mgixhcmavmqfou\",\"name\":\"or\",\"type\":\"cgyypro\"}],\"nextLink\":\"ypundmbxhugc\"}") + "{\"value\":[{\"properties\":{\"flavors\":{\"ggcvk\":{\"data\":{\"sowsaael\":\"nbatzvi\",\"plrvkmjcwmjvlg\":\"attcju\"}}},\"jobName\":\"lizrzbjpsfxsfuz\",\"modelType\":\"vtmva\",\"modelUri\":\"w\",\"provisioningState\":\"Failed\",\"stage\":\"vhuk\",\"datasets\":[{\"name\":\"fizr\",\"id\":\"f\"},{\"name\":\"jmvl\",\"id\":\"z\"}],\"isAnonymous\":true,\"isArchived\":true,\"description\":\"jrllf\",\"properties\":{\"ejikzoeovvtzejet\":\"idjpuuyju\",\"tikyj\":\"kl\",\"zvhqjwtrhtgvg\":\"zkdbqzolx\",\"lawjmjsmwrok\":\"pcrrk\"},\"tags\":{\"ynuchlgmltxd\":\"fzzzwyjafitlhg\",\"sgzv\":\"hmoz\",\"nj\":\"ns\",\"rag\":\"fpafolpymwamxq\"}},\"id\":\"dphtv\",\"name\":\"ulajvlejchc\",\"type\":\"rlzk\"},{\"properties\":{\"flavors\":{\"rwgdnqzbrfks\":{\"data\":{\"hmqrhvthlaiwdc\":\"nrupdwvnphcnzqtp\",\"lhqvlnnpxybafi\":\"smlzzhzdtxetlgy\",\"gjekglklby\":\"geaar\",\"hj\":\"lidwcwvmzegjon\"}},\"mskwhqjjysl\":{\"data\":{\"digsxcdgl\":\"zmtksjci\",\"wfpfmdgycx\":\"plkeuachtomflryt\"}},\"crse\":{\"data\":{\"mpqvwwsk\":\"pshhkvpedwqslsr\",\"uvqejosovyrrle\":\"ndcbrwi\",\"uqtljqobbpih\":\"esi\",\"bbmpxdlvykfre\":\"hcecybmrqbr\"}},\"pwpgddei\":{\"data\":{\"voujkxibdafhrk\":\"ksghudgzhxogjgg\",\"bhdyir\":\"dyomkxfbv\"}}},\"jobName\":\"wzovgk\",\"modelType\":\"muikjcjcaztbws\",\"modelUri\":\"qowxwcom\",\"provisioningState\":\"Canceled\",\"stage\":\"twvc\",\"datasets\":[{\"name\":\"k\",\"id\":\"ve\"},{\"name\":\"fdv\",\"id\":\"hbwrnfxtgddpqth\"}],\"isAnonymous\":false,\"isArchived\":false,\"description\":\"oya\",\"properties\":{\"swankltytmh\":\"oe\",\"sggux\":\"roznnhdrlktgj\",\"ywaeeczgf\":\"eml\",\"blycsxzujksr\":\"ukklelss\"},\"tags\":{\"wb\":\"desqplpvmjcdo\",\"owx\":\"dyvt\"}},\"id\":\"piudeugfsxzecpa\",\"name\":\"wkufykhvuhxepm\",\"type\":\"utznabaobns\"},{\"properties\":{\"flavors\":{\"ctotiowlx\":{\"data\":{\"pphkixkykxds\":\"ltymkmvguihywart\",\"emmucfxh\":\"j\",\"s\":\"kkflrmymyincqlhr\",\"iiiovgqcgxuugq\":\"sl\"}},\"hoi\":{\"data\":{\"wphqlkccuzgygqw\":\"dptjgwdtgukranb\"}},\"gvgovpbbttefjo\":{\"data\":{\"wzdufypivlsbb\":\"gniiprglvaw\",\"phavpmhbrb\":\"pmcubkmifoxxkub\"}},\"myqwcab\":{\"data\":{\"biqmrjgei\":\"sqyzqedikdfr\",\"iwzcxmjpbyeph\":\"fqlggw\",\"ljvrcmyfqipgxhnp\":\"gt\"}}},\"jobName\":\"ui\",\"modelType\":\"ey\",\"modelUri\":\"wlpaugmrmfjlrxwt\",\"provisioningState\":\"Succeeded\",\"stage\":\"hfkvcisizmoaedsx\",\"datasets\":[{\"name\":\"vedwcgyeewx\",\"id\":\"qbpsmg\"},{\"name\":\"guamlj\",\"id\":\"rgmsplzga\"},{\"name\":\"cshhv\",\"id\":\"wgnxkympqanxrj\"},{\"name\":\"xtwbta\",\"id\":\"pnyghs\"}],\"isAnonymous\":false,\"isArchived\":true,\"description\":\"kgmnsghpxyc\",\"properties\":{\"nqmhrp\":\"rwjjkhvyomacluzv\",\"wmkoisq\":\"pd\",\"ypobkdqzr\":\"ssffxuifmc\"},\"tags\":{\"ijpvuaurkihc\":\"ylollgtrczzydmxz\",\"b\":\"rldefxrdcox\",\"nqbnqb\":\"kjanur\"}},\"id\":\"zxqltgrdogypx\",\"name\":\"x\",\"type\":\"bfihw\"}],\"nextLink\":\"vctafsrb\"}") .toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("ccbiuimzdlyjdfq", model.value().get(0).properties().description()); - Assertions.assertEquals("yoqufdvruz", model.value().get(0).properties().tags().get("lzo")); - Assertions.assertEquals("gugey", model.value().get(0).properties().properties().get("i")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("xqnrkcxk", - model.value().get(0).properties().flavors().get("jjrcgegydc").data().get("ibn")); - Assertions.assertEquals("oxjumvqqo", model.value().get(0).properties().modelType()); - Assertions.assertEquals("hrraiouaubrj", model.value().get(0).properties().modelUri()); - Assertions.assertEquals("oq", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jrngif", model.value().get(0).properties().stage()); - Assertions.assertEquals("ypundmbxhugc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionResourceArmPaginatedResult model - = new ModelVersionResourceArmPaginatedResult().withValue(Arrays.asList( - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("ccbiuimzdlyjdfq") - .withTags(mapOf("lzo", "yoqufdvruz", "fnmdxotn", "hpc")) - .withProperties(mapOf("i", "gugey")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("jjrcgegydc", - new FlavorData().withData(mapOf("ibn", "xqnrkcxk", "swqrntvlwijp", "mysu", "uncuw", - "ttexoqqpwcyyufmh", "unqndyfpchrqb", "qspkcdqzhlctd")))) - .withModelType("oxjumvqqo") - .withModelUri("hrraiouaubrj") - .withJobName("oq") - .withStage("jrngif")), - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("lt") - .withTags(mapOf("nm", "yl")) - .withProperties( - mapOf("oqeyhlqhykprl", "xirpghriy", "mexiitdfuxt", "yznuciqd", "nlj", "asiibmiybnnust")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("eglqgleohibetn", new FlavorData().withData(mapOf("mfg", "zfczbg")))) - .withModelType("ankrrfxee") - .withModelUri("tijv") - .withJobName("vbmqzbqq") - .withStage("rnwxacevehjkuyxo")))) - .withNextLink("ypundmbxhugc"); - model = BinaryData.fromObject(model).toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("ccbiuimzdlyjdfq", model.value().get(0).properties().description()); - Assertions.assertEquals("yoqufdvruz", model.value().get(0).properties().tags().get("lzo")); - Assertions.assertEquals("gugey", model.value().get(0).properties().properties().get("i")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("xqnrkcxk", - model.value().get(0).properties().flavors().get("jjrcgegydc").data().get("ibn")); - Assertions.assertEquals("oxjumvqqo", model.value().get(0).properties().modelType()); - Assertions.assertEquals("hrraiouaubrj", model.value().get(0).properties().modelUri()); - Assertions.assertEquals("oq", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jrngif", model.value().get(0).properties().stage()); - Assertions.assertEquals("ypundmbxhugc", 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; + Assertions.assertEquals("jrllf", model.value().get(0).properties().description()); + Assertions.assertEquals("idjpuuyju", model.value().get(0).properties().properties().get("ejikzoeovvtzejet")); + Assertions.assertEquals("fzzzwyjafitlhg", model.value().get(0).properties().tags().get("ynuchlgmltxd")); + Assertions.assertTrue(model.value().get(0).properties().isAnonymous()); + Assertions.assertTrue(model.value().get(0).properties().isArchived()); + Assertions.assertEquals("nbatzvi", + model.value().get(0).properties().flavors().get("ggcvk").data().get("sowsaael")); + Assertions.assertEquals("lizrzbjpsfxsfuz", model.value().get(0).properties().jobName()); + Assertions.assertEquals("vtmva", model.value().get(0).properties().modelType()); + Assertions.assertEquals("w", model.value().get(0).properties().modelUri()); + Assertions.assertEquals("vhuk", model.value().get(0).properties().stage()); + Assertions.assertEquals("fizr", model.value().get(0).properties().datasets().get(0).name()); + Assertions.assertEquals("f", model.value().get(0).properties().datasets().get(0).id()); + Assertions.assertEquals("vctafsrb", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java index 590c09cc3493..11a6bc349a9d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java @@ -1,20 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.DatasetReference; import com.azure.resourcemanager.machinelearning.models.FlavorData; import com.azure.resourcemanager.machinelearning.models.ModelVersion; import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -25,47 +27,50 @@ public final class ModelVersionsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"flavors\":{\"eouxpdnl\":{\"data\":{\"eipfotaaqyxk\":\"qztrpj\",\"q\":\"oabcoxqaavjkre\",\"ivianklqclftp\":\"sviysbvo\"}},\"xfspxghwf\":{\"data\":{\"ohnroa\":\"bc\",\"ur\":\"zekg\"}}},\"modelType\":\"uofegrzfsf\",\"modelUri\":\"ookwnz\",\"jobName\":\"jb\",\"provisioningState\":\"Deleting\",\"stage\":\"dlo\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"kkqvmmmw\",\"tags\":{\"mnsmnjitxug\":\"cauegym\",\"ioecmbyoxpv\":\"lbibwodayipgsh\"},\"properties\":{\"okzdshhhdixn\":\"chfuxuqpdde\",\"ywspajakjhv\":\"apzibmstvzzkzv\",\"srvsbkn\":\"ktbnmhxtmzzpau\"}},\"id\":\"uytsaj\",\"name\":\"gvusnwich\",\"type\":\"kwctlsohrtgpv\"}"; + = "{\"properties\":{\"flavors\":{\"vfgukrxumwdqwy\":{\"data\":{\"mmpvo\":\"emsd\"}},\"sytidz\":{\"data\":{\"krum\":\"wzeleqpnkq\",\"gwjxatwxiyarfhi\":\"aeqbo\"}},\"pwpuayxtvpiul\":{\"data\":{\"pkplaseylt\":\"dprwruexhgd\",\"ek\":\"xfpfo\",\"eqyjekvzpqrxsi\":\"zdzvhyoidd\",\"vnylfutg\":\"ixo\"}}},\"jobName\":\"b\",\"modelType\":\"mjrsmkjalor\",\"modelUri\":\"egiczrvnezlcvnd\",\"provisioningState\":\"Failed\",\"stage\":\"hfzgkku\",\"datasets\":[{\"name\":\"mgswtwmskuqgneor\",\"id\":\"rkxe\"},{\"name\":\"qvaagnzbkqqbjcda\",\"id\":\"somzvgjynuwcq\"}],\"isAnonymous\":true,\"isArchived\":false,\"description\":\"dm\",\"properties\":{\"wvsqpeavlcb\":\"dpgtblmxblc\"},\"tags\":{\"xjvipehxlbbur\":\"epcgirsfilxusyzc\"}},\"id\":\"ovgjipbnnghs\",\"name\":\"xwjnwgoxenhpyix\",\"type\":\"brsaeuzsojblyygf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelVersion response = manager.modelVersions() - .define("wzoup") - .withExistingModel("lllkfjgjl", "fssgieb", "vuscmcegy") - .withProperties(new ModelVersionProperties().withDescription("v") - .withTags(mapOf("cvnhpebuiywkysgq", "jzofyldxkzhvfo", "dnmguifqj", "cbeauvld", "arfumitjaiis", - "oxzxbljpzauug")) - .withProperties(mapOf("y", "fdyb", "rwrylcttvxk", "bgmjrvrsqrjco", "jbl", "gffpvvqwvvnxoqaa", - "tsztxoswvfrym", "qwwtevfeugc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("sgn", - new FlavorData() - .withData(mapOf("o", "ffvxnis", "zzcdrgtu", "wfdtjpsjwlpcxl", "rolge", "oouocafaxvhjrpb")), - "bnduqgjibrxxiao", - new FlavorData().withData(mapOf("uwd", "tx", "cbwmvp", "rqahlbyjahbzbtlm", "rlazcgwn", "mjyzice")), - "okoxqboz", new FlavorData().withData(mapOf("pugnvhtgwadu", "uhumgw")))) - .withModelType("xzwinrguk") - .withModelUri("bov") - .withJobName("ltqlqufkrnrbnjkc") - .withStage("qlyputawdmd")) + .define("afqsozawqxnhlv") + .withExistingModel("iyapifcjl", "ugnrzowc", "r") + .withProperties(new ModelVersionProperties().withDescription("gdqjhzfecjgpjn") + .withProperties( + mapOf("vgavnrhrqq", "kgbvsqksrg", "sujcvhclgpexrxy", "wf", "sm", "pw", "dvtwunc", "gebpskbpci")) + .withTags(mapOf("kymjdwirglqibj", "yjwjmyubhtmlgjai", "uxbzfhurrw", "vmkaw")) + .withIsAnonymous(true) + .withIsArchived(true) + .withFlavors(mapOf("haljomgzorprrapt", new FlavorData().withData(mapOf("krzp", "xdwtfmf")), "euyg", + new FlavorData().withData( + mapOf("brsnvofuyzvbploa", "enylg", "e", "ccgh", "oaw", "mmadkbxuip", "kwxzmuzg", "ugpube")), + "sfxqcmejezjcb", new FlavorData().withData(mapOf("l", "auhejmsw", "qzxyyl", "gxxzxwrnqwdjvl")))) + .withJobName("uagakmxg") + .withModelType("mavllp") + .withModelUri("guzsyfwamhm") + .withStage("bzagwnompvyis") + .withDatasets(Arrays.asList(new DatasetReference().withName("ufysalbjfkjex").withId("zmh"), + new DatasetReference().withName("idipwczjnnmpifj").withId("jen"), + new DatasetReference().withName("upfpllo").withId("djffllrsfghyyeok"), + new DatasetReference().withName("zuddccclsnflcxx").withId("nypktgslkokqa")))) .create(); - Assertions.assertEquals("kkqvmmmw", response.properties().description()); - Assertions.assertEquals("cauegym", response.properties().tags().get("mnsmnjitxug")); - Assertions.assertEquals("chfuxuqpdde", response.properties().properties().get("okzdshhhdixn")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("qztrpj", response.properties().flavors().get("eouxpdnl").data().get("eipfotaaqyxk")); - Assertions.assertEquals("uofegrzfsf", response.properties().modelType()); - Assertions.assertEquals("ookwnz", response.properties().modelUri()); - Assertions.assertEquals("jb", response.properties().jobName()); - Assertions.assertEquals("dlo", response.properties().stage()); + Assertions.assertEquals("dm", response.properties().description()); + Assertions.assertEquals("dpgtblmxblc", response.properties().properties().get("wvsqpeavlcb")); + Assertions.assertEquals("epcgirsfilxusyzc", response.properties().tags().get("xjvipehxlbbur")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertFalse(response.properties().isArchived()); + Assertions.assertEquals("emsd", response.properties().flavors().get("vfgukrxumwdqwy").data().get("mmpvo")); + Assertions.assertEquals("b", response.properties().jobName()); + Assertions.assertEquals("mjrsmkjalor", response.properties().modelType()); + Assertions.assertEquals("egiczrvnezlcvnd", response.properties().modelUri()); + Assertions.assertEquals("hfzgkku", response.properties().stage()); + Assertions.assertEquals("mgswtwmskuqgneor", response.properties().datasets().get(0).name()); + Assertions.assertEquals("rkxe", response.properties().datasets().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java index 33cd76ac7430..7e90e2be4c75 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.modelVersions() - .deleteWithResponse("bargbmemopypc", "omowucjznnowp", "xuuv", "wsrmegph", com.azure.core.util.Context.NONE); + .deleteWithResponse("bwlbqn", "dderrxyiwuzpsvcm", "sfstyyy", "qnwnlc", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java index e23b28e761e2..61afac6f3174 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ModelVersion; @@ -21,29 +21,31 @@ public final class ModelVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"flavors\":{\"wcaicd\":{\"data\":{\"aptexzylqhew\":\"suyqvmxnavxzp\",\"wggmitdwolfmfaz\":\"cchexczrmyn\"}},\"nyhivhyujqxyfb\":{\"data\":{\"wohddli\":\"tzf\",\"evuuk\":\"kkosqpliegemtnb\",\"tlrbzqtu\":\"diksncrz\",\"ftohdlpcixpx\":\"gajfa\"}},\"mcivhwwhyej\":{\"data\":{\"ohgcnr\":\"ylayabrdnovuduww\"}},\"dispasxwiicfsbj\":{\"data\":{\"fsqbcfqaqoveqowq\":\"dfcfyzwkmr\"}}},\"modelType\":\"adndowkxq\",\"modelUri\":\"sax\",\"jobName\":\"ieehpvqfifrr\",\"provisioningState\":\"Deleting\",\"stage\":\"gjgyovcpgqiism\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"oykrbk\",\"tags\":{\"mtrhwwdfncquty\":\"cmjkron\",\"mepbmogtfpksk\":\"zhzlvkmirnvdbza\",\"rlyynkgnychu\":\"syoh\",\"oeodgnu\":\"hngwtbhjgli\"},\"properties\":{\"mfixtyavv\":\"fgtw\",\"o\":\"xjqdj\"}},\"id\":\"gegwxjgkrppmvno\",\"name\":\"t\",\"type\":\"qciqawhkdk\"}"; + = "{\"properties\":{\"flavors\":{\"fycigcbmayhdtj\":{\"data\":{\"iqcypmonfcorcn\":\"eylszrtn\"}},\"rplfqqnwojsrg\":{\"data\":{\"wrfrm\":\"onajzdjqzb\",\"rb\":\"oufo\",\"unnik\":\"vojcksirsn\",\"pnsvkyq\":\"yxdeggnzadqmvpe\"}},\"itqzqnbseujcmtci\":{\"data\":{\"tuecmguk\":\"nsvbkhhaqs\",\"xkr\":\"wdpuowlc\"}},\"m\":{\"data\":{\"nxhcxct\":\"b\",\"ylx\":\"hxoeftfo\",\"wkjzvqpsymt\":\"k\",\"nqhyefnak\":\"pyjtrxxzwd\"}}},\"jobName\":\"jksdlulytjxh\",\"modelType\":\"tittlnvukvupupl\",\"modelUri\":\"ulynvpdvctqdapy\",\"provisioningState\":\"Succeeded\",\"stage\":\"zpjbsilbn\",\"datasets\":[{\"name\":\"ehy\",\"id\":\"zm\"},{\"name\":\"gfbmpsz\",\"id\":\"bcstz\"}],\"isAnonymous\":false,\"isArchived\":false,\"description\":\"smaxdwxr\",\"properties\":{\"akxy\":\"bvwsd\",\"u\":\"lkgjhomywlypghhu\",\"b\":\"yfvgpqwgiqmbrisk\"},\"tags\":{\"vyqmmczuguvlieeg\":\"tq\",\"jscgqcr\":\"nqwhfjoxse\",\"uhffjjqvjyqmpmsk\":\"aucftotedhjxdl\",\"udpypboqlefxf\":\"axrhljwqu\"}},\"id\":\"majvwfi\",\"name\":\"f\",\"type\":\"jjrvsvhmsmrihdd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelVersion response = manager.modelVersions() - .getWithResponse("j", "fkjd", "lqtqjabwtk", "jytvq", com.azure.core.util.Context.NONE) + .getWithResponse("ouhdcftptfcjap", "fwxmcxhwkgihif", "yocmgadh", "qyuf", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("oykrbk", response.properties().description()); - Assertions.assertEquals("cmjkron", response.properties().tags().get("mtrhwwdfncquty")); - Assertions.assertEquals("fgtw", response.properties().properties().get("mfixtyavv")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("suyqvmxnavxzp", - response.properties().flavors().get("wcaicd").data().get("aptexzylqhew")); - Assertions.assertEquals("adndowkxq", response.properties().modelType()); - Assertions.assertEquals("sax", response.properties().modelUri()); - Assertions.assertEquals("ieehpvqfifrr", response.properties().jobName()); - Assertions.assertEquals("gjgyovcpgqiism", response.properties().stage()); + Assertions.assertEquals("smaxdwxr", response.properties().description()); + Assertions.assertEquals("bvwsd", response.properties().properties().get("akxy")); + Assertions.assertEquals("tq", response.properties().tags().get("vyqmmczuguvlieeg")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertFalse(response.properties().isArchived()); + Assertions.assertEquals("eylszrtn", + response.properties().flavors().get("fycigcbmayhdtj").data().get("iqcypmonfcorcn")); + Assertions.assertEquals("jksdlulytjxh", response.properties().jobName()); + Assertions.assertEquals("tittlnvukvupupl", response.properties().modelType()); + Assertions.assertEquals("ulynvpdvctqdapy", response.properties().modelUri()); + Assertions.assertEquals("zpjbsilbn", response.properties().stage()); + Assertions.assertEquals("ehy", response.properties().datasets().get(0).name()); + Assertions.assertEquals("zm", response.properties().datasets().get(0).id()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java index 4644b12b8dd7..5e89c36c5bf6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -23,29 +23,31 @@ public final class ModelVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"flavors\":{\"wqyousqmern\":{\"data\":{\"rhyx\":\"xzqzjv\"}}},\"modelType\":\"plgmem\",\"modelUri\":\"ouwmjxhmkchjdxr\",\"jobName\":\"hukxuq\",\"provisioningState\":\"Succeeded\",\"stage\":\"eqpgadesnesgnxd\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"vsictoqcezmzn\",\"tags\":{\"qbz\":\"qdu\",\"x\":\"yzajdpbnbp\",\"xi\":\"opryutxasnigh\"},\"properties\":{\"ggzqheitty\":\"i\",\"gw\":\"ipfudzntbzg\"}},\"id\":\"wypbqnxpohcrk\",\"name\":\"bajyuegsbuqdp\",\"type\":\"hqeczzutxtidsxre\"}]}"; + = "{\"value\":[{\"properties\":{\"flavors\":{\"rvjhwgkynxlwrj\":{\"data\":{\"erlurgipvnbxle\":\"mwh\",\"gpxd\":\"smc\",\"ihrfcowla\":\"gcqmguvdko\",\"wxjjylaqhxevfd\":\"ewif\"}}},\"jobName\":\"td\",\"modelType\":\"cktkalhpiybfnky\",\"modelUri\":\"rignqlwogqn\",\"provisioningState\":\"Failed\",\"stage\":\"iuv\",\"datasets\":[{\"name\":\"bnkivexiath\",\"id\":\"ryywyfcenkbfxqc\"},{\"name\":\"ggeciradmxokbutb\",\"id\":\"cxzayvcse\"}],\"isAnonymous\":true,\"isArchived\":true,\"description\":\"yiitreddj\",\"properties\":{\"xm\":\"ppybseckg\",\"tfstdwqdvzc\":\"aszji\",\"jtkreisojhusw\":\"lkvw\",\"avzmqpaa\":\"grbkobmg\"},\"tags\":{\"ikzppgijncuba\":\"dtebwedj\",\"ssbmgersd\":\"cxepgaxpydemccq\"}},\"id\":\"hnhsmnfgzmxtxfuh\",\"name\":\"yksfyzevcknglffn\",\"type\":\"zzf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.modelVersions() - .list("rzdjgmgfayvbs", "aenvpzd", "zpizgaujv", "uwfy", "xorrceom", 1638949557, "arb", "rkdnoef", 2111895596, - "pjiudnustbmox", "hg", "dnhbhu", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); + .list("zfjd", "kfthsydphdb", "zet", "gkzqbvhvdulymkgj", "ryhxf", 1256241884, "a", "npftkgm", 351668958, + "vxbiu", "zghpsotbameir", "usnaqsvruuh", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); - Assertions.assertEquals("vsictoqcezmzn", response.iterator().next().properties().description()); - Assertions.assertEquals("qdu", response.iterator().next().properties().tags().get("qbz")); - Assertions.assertEquals("i", response.iterator().next().properties().properties().get("ggzqheitty")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("xzqzjv", - response.iterator().next().properties().flavors().get("wqyousqmern").data().get("rhyx")); - Assertions.assertEquals("plgmem", response.iterator().next().properties().modelType()); - Assertions.assertEquals("ouwmjxhmkchjdxr", response.iterator().next().properties().modelUri()); - Assertions.assertEquals("hukxuq", response.iterator().next().properties().jobName()); - Assertions.assertEquals("eqpgadesnesgnxd", response.iterator().next().properties().stage()); + Assertions.assertEquals("yiitreddj", response.iterator().next().properties().description()); + Assertions.assertEquals("ppybseckg", response.iterator().next().properties().properties().get("xm")); + Assertions.assertEquals("dtebwedj", response.iterator().next().properties().tags().get("ikzppgijncuba")); + Assertions.assertTrue(response.iterator().next().properties().isAnonymous()); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); + Assertions.assertEquals("mwh", + response.iterator().next().properties().flavors().get("rvjhwgkynxlwrj").data().get("erlurgipvnbxle")); + Assertions.assertEquals("td", response.iterator().next().properties().jobName()); + Assertions.assertEquals("cktkalhpiybfnky", response.iterator().next().properties().modelType()); + Assertions.assertEquals("rignqlwogqn", response.iterator().next().properties().modelUri()); + Assertions.assertEquals("iuv", response.iterator().next().properties().stage()); + Assertions.assertEquals("bnkivexiath", response.iterator().next().properties().datasets().get(0).name()); + Assertions.assertEquals("ryywyfcenkbfxqc", response.iterator().next().properties().datasets().get(0).id()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java index 6fed962ed95e..666b964fd90b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DestinationAsset; @@ -26,13 +26,13 @@ public void testPublish() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.modelVersions() - .publish("aqspbdscotidik", "mtmjkfmrjngrjsq", "irha", "hhpcvsdy", - new DestinationAsset().withRegistryName("bydrgxvnmt") - .withDestinationName("uxrdmudwruog") - .withDestinationVersion("hfqcyyc"), + .publish("sffrpjfxsyx", "dosyhhw", "ufrspreyilqcskxk", "eoykqrqtxq", + new DestinationAsset().withDestinationName("rddimnackl") + .withDestinationVersion("bvmbdgexpnphtq") + .withRegistryName("pjpsbcx"), com.azure.core.util.Context.NONE); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java index a9458a463949..d717bb9dd4ea 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java index 79226c313ce7..39744ca9a615 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java index aca1e756d025..2ecd70ac6460 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,10 +9,10 @@ import com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase; import com.azure.resourcemanager.machinelearning.models.MonitorDefinition; import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; +import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -22,47 +22,41 @@ public final class MonitorDefinitionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitorDefinition model = BinaryData.fromString( - "{\"monitoringTarget\":{\"modelId\":\"cgdhyhgoq\",\"deploymentId\":\"oyqyxyjrcbqpb\",\"taskType\":\"Classification\"},\"signals\":{\"oeehpmjenvjeatea\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"fwjlof\":\"tdahneaoovtyjzti\",\"uklajvcfoc\":\"ekfsrm\",\"kwxnhwhhnoyrza\":\"hapejov\"}},\"kft\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"olrndwdb\":\"djxldnaryyinzk\",\"xlu\":\"xvzaledoy\"}}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"qxmyzkl\",\"oanpohrvm\",\"rqra\",\"a\"]}}}") + "{\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"yvrtp\",\"pemhzcgkrepdqhqy\",\"wqwemvxqabckmze\",\"xin\"]}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"monitoringTarget\":{\"deploymentId\":\"eoh\",\"modelId\":\"h\",\"taskType\":\"Classification\"},\"signals\":{\"p\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"zlbciphmse\":\"nzangprbfaxy\",\"dktxfv\":\"roqr\",\"gpkrie\":\"nfee\",\"kyfwnwpiwxeiicr\":\"bgnixxoww\"}}}}") .toObject(MonitorDefinition.class); - Assertions.assertEquals("cgdhyhgoq", model.monitoringTarget().modelId()); - Assertions.assertEquals("oyqyxyjrcbqpb", model.monitoringTarget().deploymentId()); + Assertions.assertEquals("yvrtp", model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); + Assertions.assertEquals("eoh", model.monitoringTarget().deploymentId()); + Assertions.assertEquals("h", model.monitoringTarget().modelId()); Assertions.assertEquals(ModelTaskType.CLASSIFICATION, model.monitoringTarget().taskType()); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.signals().get("oeehpmjenvjeatea").notificationTypes().get(0)); - Assertions.assertEquals("tdahneaoovtyjzti", model.signals().get("oeehpmjenvjeatea").properties().get("fwjlof")); - Assertions.assertEquals("qxmyzkl", - model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); + model.signals().get("p").notificationTypes().get(0)); + Assertions.assertEquals("nzangprbfaxy", model.signals().get("p").properties().get("zlbciphmse")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitorDefinition model = new MonitorDefinition() - .withMonitoringTarget(new MonitoringTarget().withModelId("cgdhyhgoq") - .withDeploymentId("oyqyxyjrcbqpb") + .withAlertNotificationSettings( + new MonitorNotificationSettings().withEmailNotificationSettings(new MonitorEmailNotificationSettings() + .withEmails(Arrays.asList("yvrtp", "pemhzcgkrepdqhqy", "wqwemvxqabckmze", "xin")))) + .withComputeConfiguration(new MonitorComputeConfigurationBase()) + .withMonitoringTarget(new MonitoringTarget().withDeploymentId("eoh") + .withModelId("h") .withTaskType(ModelTaskType.CLASSIFICATION)) - .withSignals(mapOf("oeehpmjenvjeatea", + .withSignals(mapOf("p", new MonitoringSignalBase() .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("fwjlof", "tdahneaoovtyjzti", "uklajvcfoc", "ekfsrm", "kwxnhwhhnoyrza", "hapejov")), - "kft", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("olrndwdb", "djxldnaryyinzk", "xlu", "xvzaledoy")))) - .withComputeConfiguration(new MonitorComputeConfigurationBase()) - .withAlertNotificationSettings(new MonitorNotificationSettings().withEmailNotificationSettings( - new MonitorEmailNotificationSettings().withEmails(Arrays.asList("qxmyzkl", "oanpohrvm", "rqra", "a")))); + MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) + .withProperties(mapOf("zlbciphmse", "nzangprbfaxy", "dktxfv", "roqr", "gpkrie", "nfee", + "kyfwnwpiwxeiicr", "bgnixxoww")))); model = BinaryData.fromObject(model).toObject(MonitorDefinition.class); - Assertions.assertEquals("cgdhyhgoq", model.monitoringTarget().modelId()); - Assertions.assertEquals("oyqyxyjrcbqpb", model.monitoringTarget().deploymentId()); + Assertions.assertEquals("yvrtp", model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); + Assertions.assertEquals("eoh", model.monitoringTarget().deploymentId()); + Assertions.assertEquals("h", model.monitoringTarget().modelId()); Assertions.assertEquals(ModelTaskType.CLASSIFICATION, model.monitoringTarget().taskType()); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.signals().get("oeehpmjenvjeatea").notificationTypes().get(0)); - Assertions.assertEquals("tdahneaoovtyjzti", model.signals().get("oeehpmjenvjeatea").properties().get("fwjlof")); - Assertions.assertEquals("qxmyzkl", - model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); + model.signals().get("p").notificationTypes().get(0)); + Assertions.assertEquals("nzangprbfaxy", model.signals().get("p").properties().get("zlbciphmse")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java index 2247c0405920..3f525b5f7dfa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,14 +13,16 @@ public final class MonitorEmailNotificationSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitorEmailNotificationSettings model - = BinaryData.fromString("{\"emails\":[\"eu\"]}").toObject(MonitorEmailNotificationSettings.class); - Assertions.assertEquals("eu", model.emails().get(0)); + = BinaryData.fromString("{\"emails\":[\"nwoqartwy\",\"qicladv\",\"tdavuqmcbymsfobj\"]}") + .toObject(MonitorEmailNotificationSettings.class); + Assertions.assertEquals("nwoqartwy", model.emails().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitorEmailNotificationSettings model = new MonitorEmailNotificationSettings().withEmails(Arrays.asList("eu")); + MonitorEmailNotificationSettings model = new MonitorEmailNotificationSettings() + .withEmails(Arrays.asList("nwoqartwy", "qicladv", "tdavuqmcbymsfobj")); model = BinaryData.fromObject(model).toObject(MonitorEmailNotificationSettings.class); - Assertions.assertEquals("eu", model.emails().get(0)); + Assertions.assertEquals("nwoqartwy", model.emails().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java index d93d473a7f0f..43b2b3f87181 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,17 +14,17 @@ public final class MonitorNotificationSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitorNotificationSettings model = BinaryData - .fromString("{\"emailNotificationSettings\":{\"emails\":[\"mrjctryldsxeb\",\"hsxrznmgsdaluyc\",\"hefr\"]}}") + .fromString("{\"emailNotificationSettings\":{\"emails\":[\"dm\",\"xxij\",\"skwsdgkj\",\"yacwrasekwefc\"]}}") .toObject(MonitorNotificationSettings.class); - Assertions.assertEquals("mrjctryldsxeb", model.emailNotificationSettings().emails().get(0)); + Assertions.assertEquals("dm", model.emailNotificationSettings().emails().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitorNotificationSettings model = new MonitorNotificationSettings().withEmailNotificationSettings(new MonitorEmailNotificationSettings() - .withEmails(Arrays.asList("mrjctryldsxeb", "hsxrznmgsdaluyc", "hefr"))); + .withEmails(Arrays.asList("dm", "xxij", "skwsdgkj", "yacwrasekwefc"))); model = BinaryData.fromObject(model).toObject(MonitorNotificationSettings.class); - Assertions.assertEquals("mrjctryldsxeb", model.emailNotificationSettings().emails().get(0)); + Assertions.assertEquals("dm", model.emailNotificationSettings().emails().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java index f8e05273be15..d055b9821f0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,20 +13,20 @@ public final class MonitorServerlessSparkComputeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitorServerlessSparkCompute model = BinaryData.fromString( - "{\"computeType\":\"ServerlessSpark\",\"computeIdentity\":{\"computeIdentityType\":\"MonitorComputeIdentityBase\"},\"instanceType\":\"ffcnuestbsliejdn\",\"runtimeVersion\":\"cotelikjiyteh\"}") + "{\"computeType\":\"ServerlessSpark\",\"computeIdentity\":{\"computeIdentityType\":\"MonitorComputeIdentityBase\"},\"instanceType\":\"quvjez\",\"runtimeVersion\":\"j\"}") .toObject(MonitorServerlessSparkCompute.class); - Assertions.assertEquals("ffcnuestbsliejdn", model.instanceType()); - Assertions.assertEquals("cotelikjiyteh", model.runtimeVersion()); + Assertions.assertEquals("quvjez", model.instanceType()); + Assertions.assertEquals("j", model.runtimeVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitorServerlessSparkCompute model = new MonitorServerlessSparkCompute().withComputeIdentity(new MonitorComputeIdentityBase()) - .withInstanceType("ffcnuestbsliejdn") - .withRuntimeVersion("cotelikjiyteh"); + .withInstanceType("quvjez") + .withRuntimeVersion("j"); model = BinaryData.fromObject(model).toObject(MonitorServerlessSparkCompute.class); - Assertions.assertEquals("ffcnuestbsliejdn", model.instanceType()); - Assertions.assertEquals("cotelikjiyteh", model.runtimeVersion()); + Assertions.assertEquals("quvjez", model.instanceType()); + Assertions.assertEquals("j", model.runtimeVersion()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java index 5438736a88af..9afd39b7f42e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java index 5eb0a6a10828..342b3fc2ecb6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,25 +15,26 @@ public final class MonitoringInputDataBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoringInputDataBase model = BinaryData.fromString( - "{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"twujjzgx\",\"jobInputType\":\"mlflow_model\",\"uri\":\"qwlxrhg\",\"columns\":{\"bkkteo\":\"vtqqy\",\"vmvm\":\"ejogmkor\",\"osnqliwkmzojfe\":\"ofnqhlbs\"}}") + "{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"h\":\"ryegp\",\"okxkhupzer\":\"rmexznlwkb\"},\"dataContext\":\"g\",\"jobInputType\":\"literal\",\"uri\":\"l\"}") .toObject(MonitoringInputDataBase.class); - Assertions.assertEquals("twujjzgx", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("qwlxrhg", model.uri()); - Assertions.assertEquals("vtqqy", model.columns().get("bkkteo")); + Assertions.assertEquals("ryegp", model.columns().get("h")); + Assertions.assertEquals("g", model.dataContext()); + Assertions.assertEquals(JobInputType.LITERAL, model.jobInputType()); + Assertions.assertEquals("l", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoringInputDataBase model = new MonitoringInputDataBase().withDataContext("twujjzgx") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("qwlxrhg") - .withColumns(mapOf("bkkteo", "vtqqy", "vmvm", "ejogmkor", "osnqliwkmzojfe", "ofnqhlbs")); + MonitoringInputDataBase model + = new MonitoringInputDataBase().withColumns(mapOf("h", "ryegp", "okxkhupzer", "rmexznlwkb")) + .withDataContext("g") + .withJobInputType(JobInputType.LITERAL) + .withUri("l"); model = BinaryData.fromObject(model).toObject(MonitoringInputDataBase.class); - Assertions.assertEquals("twujjzgx", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("qwlxrhg", model.uri()); - Assertions.assertEquals("vtqqy", model.columns().get("bkkteo")); + Assertions.assertEquals("ryegp", model.columns().get("h")); + Assertions.assertEquals("g", model.dataContext()); + Assertions.assertEquals(JobInputType.LITERAL, model.jobInputType()); + Assertions.assertEquals("l", model.uri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java index 5307137c38c4..0608d5471236 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,22 +16,22 @@ public final class MonitoringSignalBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoringSignalBase model = BinaryData.fromString( - "{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"nwldfmhljq\":\"igbsfsgsa\"}}") + "{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"fkwdvbtbrekqh\":\"bsmtbljjehhc\",\"uwyqwdq\":\"qhtfpwpqbye\",\"cmrnkfmkhcq\":\"gmghginztxlujkhn\"}}") .toObject(MonitoringSignalBase.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("igbsfsgsa", model.properties().get("nwldfmhljq")); + Assertions.assertEquals("bsmtbljjehhc", model.properties().get("fkwdvbtbrekqh")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MonitoringSignalBase model = new MonitoringSignalBase() .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("nwldfmhljq", "igbsfsgsa")); + Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) + .withProperties( + mapOf("fkwdvbtbrekqh", "bsmtbljjehhc", "uwyqwdq", "qhtfpwpqbye", "cmrnkfmkhcq", "gmghginztxlujkhn")); model = BinaryData.fromObject(model).toObject(MonitoringSignalBase.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("igbsfsgsa", model.properties().get("nwldfmhljq")); + Assertions.assertEquals("bsmtbljjehhc", model.properties().get("fkwdvbtbrekqh")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java index c5e8a7dc8cdc..632e3a0f7fca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class MonitoringTargetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoringTarget model = BinaryData - .fromString("{\"modelId\":\"vznllaslkskhjqj\",\"deploymentId\":\"baihxjtgzg\",\"taskType\":\"Regression\"}") + .fromString("{\"deploymentId\":\"gdfpfqfpcvst\",\"modelId\":\"gq\",\"taskType\":\"Regression\"}") .toObject(MonitoringTarget.class); - Assertions.assertEquals("vznllaslkskhjqj", model.modelId()); - Assertions.assertEquals("baihxjtgzg", model.deploymentId()); + Assertions.assertEquals("gdfpfqfpcvst", model.deploymentId()); + Assertions.assertEquals("gq", model.modelId()); Assertions.assertEquals(ModelTaskType.REGRESSION, model.taskType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoringTarget model = new MonitoringTarget().withModelId("vznllaslkskhjqj") - .withDeploymentId("baihxjtgzg") + MonitoringTarget model = new MonitoringTarget().withDeploymentId("gdfpfqfpcvst") + .withModelId("gq") .withTaskType(ModelTaskType.REGRESSION); model = BinaryData.fromObject(model).toObject(MonitoringTarget.class); - Assertions.assertEquals("vznllaslkskhjqj", model.modelId()); - Assertions.assertEquals("baihxjtgzg", model.deploymentId()); + Assertions.assertEquals("gdfpfqfpcvst", model.deploymentId()); + Assertions.assertEquals("gq", model.modelId()); Assertions.assertEquals(ModelTaskType.REGRESSION, model.taskType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java index 5467444a73c8..678601af33c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class MonitoringThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MonitoringThreshold model - = BinaryData.fromString("{\"value\":18.738037219976512}").toObject(MonitoringThreshold.class); - Assertions.assertEquals(18.738037219976512D, model.value()); + = BinaryData.fromString("{\"value\":15.58753515516158}").toObject(MonitoringThreshold.class); + Assertions.assertEquals(15.58753515516158D, model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MonitoringThreshold model = new MonitoringThreshold().withValue(18.738037219976512D); + MonitoringThreshold model = new MonitoringThreshold().withValue(15.58753515516158D); model = BinaryData.fromObject(model).toObject(MonitoringThreshold.class); - Assertions.assertEquals(18.738037219976512D, model.value()); + Assertions.assertEquals(15.58753515516158D, model.value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java index 0965e8f042fe..187bd9ec749d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class MpiTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Mpi model = BinaryData.fromString("{\"distributionType\":\"Mpi\",\"processCountPerInstance\":2025598947}") + Mpi model = BinaryData.fromString("{\"distributionType\":\"Mpi\",\"processCountPerInstance\":578136991}") .toObject(Mpi.class); - Assertions.assertEquals(2025598947, model.processCountPerInstance()); + Assertions.assertEquals(578136991, model.processCountPerInstance()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Mpi model = new Mpi().withProcessCountPerInstance(2025598947); + Mpi model = new Mpi().withProcessCountPerInstance(578136991); model = BinaryData.fromObject(model).toObject(Mpi.class); - Assertions.assertEquals(2025598947, model.processCountPerInstance()); + Assertions.assertEquals(578136991, model.processCountPerInstance()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java index f75ca36d9c3f..a7ce6496f957 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NetworkAclsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NetworkAclsTests.java new file mode 100644 index 000000000000..b9ea0833a0a1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NetworkAclsTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.DefaultActionType; +import com.azure.resourcemanager.machinelearning.models.IPRule; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class NetworkAclsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkAcls model = BinaryData.fromString( + "{\"defaultAction\":\"Allow\",\"ipRules\":[{\"value\":\"vpk\"},{\"value\":\"rxnjeaseipheofl\"},{\"value\":\"eyy\"}]}") + .toObject(NetworkAcls.class); + Assertions.assertEquals(DefaultActionType.ALLOW, model.defaultAction()); + Assertions.assertEquals("vpk", model.ipRules().get(0).value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkAcls model = new NetworkAcls().withDefaultAction(DefaultActionType.ALLOW) + .withIpRules(Arrays.asList(new IPRule().withValue("vpk"), new IPRule().withValue("rxnjeaseipheofl"), + new IPRule().withValue("eyy"))); + model = BinaryData.fromObject(model).toObject(NetworkAcls.class); + Assertions.assertEquals(DefaultActionType.ALLOW, model.defaultAction()); + Assertions.assertEquals("vpk", model.ipRules().get(0).value()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java index bd1df1afe399..53025e66d04e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class NlpVerticalFeaturizationSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NlpVerticalFeaturizationSettings model = BinaryData.fromString("{\"datasetLanguage\":\"svxupqt\"}") + NlpVerticalFeaturizationSettings model = BinaryData.fromString("{\"datasetLanguage\":\"tzqzcloy\"}") .toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("svxupqt", model.datasetLanguage()); + Assertions.assertEquals("tzqzcloy", model.datasetLanguage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NlpVerticalFeaturizationSettings model = new NlpVerticalFeaturizationSettings().withDatasetLanguage("svxupqt"); + NlpVerticalFeaturizationSettings model = new NlpVerticalFeaturizationSettings().withDatasetLanguage("tzqzcloy"); model = BinaryData.fromObject(model).toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("svxupqt", model.datasetLanguage()); + Assertions.assertEquals("tzqzcloy", model.datasetLanguage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java index 61989458289b..692ec2cb60f5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class NlpVerticalLimitSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NlpVerticalLimitSettings model = BinaryData - .fromString("{\"timeout\":\"PT132H5S\",\"maxTrials\":1475844965,\"maxConcurrentTrials\":2049501339}") + .fromString("{\"maxConcurrentTrials\":15717829,\"maxTrials\":471230426,\"timeout\":\"PT117H9M50S\"}") .toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(Duration.parse("PT132H5S"), model.timeout()); - Assertions.assertEquals(1475844965, model.maxTrials()); - Assertions.assertEquals(2049501339, model.maxConcurrentTrials()); + Assertions.assertEquals(15717829, model.maxConcurrentTrials()); + Assertions.assertEquals(471230426, model.maxTrials()); + Assertions.assertEquals(Duration.parse("PT117H9M50S"), model.timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NlpVerticalLimitSettings model = new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT132H5S")) - .withMaxTrials(1475844965) - .withMaxConcurrentTrials(2049501339); + NlpVerticalLimitSettings model = new NlpVerticalLimitSettings().withMaxConcurrentTrials(15717829) + .withMaxTrials(471230426) + .withTimeout(Duration.parse("PT117H9M50S")); model = BinaryData.fromObject(model).toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(Duration.parse("PT132H5S"), model.timeout()); - Assertions.assertEquals(1475844965, model.maxTrials()); - Assertions.assertEquals(2049501339, model.maxConcurrentTrials()); + Assertions.assertEquals(15717829, model.maxConcurrentTrials()); + Assertions.assertEquals(471230426, model.maxTrials()); + Assertions.assertEquals(Duration.parse("PT117H9M50S"), model.timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java deleted file mode 100644 index 221fc2b0df56..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVertical; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVertical model = BinaryData.fromString( - "{\"limitSettings\":{\"timeout\":\"PT133H10M21S\",\"maxTrials\":730548786,\"maxConcurrentTrials\":450987294},\"featurizationSettings\":{\"datasetLanguage\":\"qlngncrdorctysec\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"khxd\",\"mode\":\"ReadOnlyMount\",\"description\":\"tzcvimmwckoz\"}}") - .toObject(NlpVertical.class); - Assertions.assertEquals(Duration.parse("PT133H10M21S"), model.limitSettings().timeout()); - Assertions.assertEquals(730548786, model.limitSettings().maxTrials()); - Assertions.assertEquals(450987294, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qlngncrdorctysec", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("tzcvimmwckoz", model.validationData().description()); - Assertions.assertEquals("khxd", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVertical model = new NlpVertical() - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT133H10M21S")) - .withMaxTrials(730548786) - .withMaxConcurrentTrials(450987294)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("qlngncrdorctysec")) - .withValidationData(new MLTableJobInput().withDescription("tzcvimmwckoz") - .withUri("khxd") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)); - model = BinaryData.fromObject(model).toObject(NlpVertical.class); - Assertions.assertEquals(Duration.parse("PT133H10M21S"), model.limitSettings().timeout()); - Assertions.assertEquals(730548786, model.limitSettings().maxTrials()); - Assertions.assertEquals(450987294, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qlngncrdorctysec", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("tzcvimmwckoz", model.validationData().description()); - Assertions.assertEquals("khxd", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java index 72f14005c0df..b92f18eadc11 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,13 +11,7 @@ public final class NodeStateCountsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodeStateCounts model = BinaryData.fromString( - "{\"idleNodeCount\":17437062,\"runningNodeCount\":194546120,\"preparingNodeCount\":863569272,\"unusableNodeCount\":765041265,\"leavingNodeCount\":232651506,\"preemptedNodeCount\":1489395185}") + "{\"idleNodeCount\":1970809898,\"runningNodeCount\":1654938944,\"preparingNodeCount\":195233131,\"unusableNodeCount\":2114305274,\"leavingNodeCount\":1711262872,\"preemptedNodeCount\":1465968202}") .toObject(NodeStateCounts.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeStateCounts model = new NodeStateCounts(); - model = BinaryData.fromObject(model).toObject(NodeStateCounts.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java index 9fdf16c020f6..6dbc65e6a778 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java index 0e35ff9a396a..a4209e9c8d10 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java @@ -1,13 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; @@ -18,39 +19,44 @@ public final class NoneAuthTypeWorkspaceConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NoneAuthTypeWorkspaceConnectionProperties model = BinaryData.fromString( - "{\"authType\":\"None\",\"category\":\"AzureSynapseAnalytics\",\"createdByWorkspaceArmId\":\"wf\",\"expiryTime\":\"2021-09-18T05:09:03Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"target\":\"lt\",\"metadata\":{\"vazjpwexcd\":\"gexojfccylhtrht\",\"o\":\"zp\",\"pjeuxsp\":\"zzxezmnrkj\",\"bhwbdqufvcgnrgla\":\"lokfpmijpdvzv\"},\"sharedUserList\":[\"yambhb\",\"febzxf\"],\"value\":\"qutibhl\",\"valueFormat\":\"JSON\"}") + "{\"authType\":\"None\",\"category\":\"Xero\",\"createdByWorkspaceArmId\":\"jk\",\"error\":\"eecwtfm\",\"expiryTime\":\"2021-12-05T04:59:29Z\",\"group\":\"AzureAI\",\"isSharedToAll\":true,\"metadata\":{\"mlqkiekhj\":\"ofxfmhlvyqnslbq\",\"spt\":\"qqrugwespscvs\",\"supcvqgxcvw\":\"uwozfvz\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Active\",\"sharedUserList\":[\"gmlmpnvqxuyiar\",\"n\"],\"target\":\"qseypdlmajpu\",\"useWorkspaceManagedIdentity\":false}") .toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:09:03Z"), model.expiryTime()); - Assertions.assertEquals(true, model.isSharedToAll()); - Assertions.assertEquals("lt", model.target()); - Assertions.assertEquals("gexojfccylhtrht", model.metadata().get("vazjpwexcd")); - Assertions.assertEquals("yambhb", model.sharedUserList().get(0)); - Assertions.assertEquals("qutibhl", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); + Assertions.assertEquals(ConnectionCategory.XERO, model.category()); + Assertions.assertEquals("eecwtfm", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-05T04:59:29Z"), model.expiryTime()); + Assertions.assertTrue(model.isSharedToAll()); + Assertions.assertEquals("ofxfmhlvyqnslbq", model.metadata().get("mlqkiekhj")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.ACTIVE, model.peStatus()); + Assertions.assertEquals("gmlmpnvqxuyiar", model.sharedUserList().get(0)); + Assertions.assertEquals("qseypdlmajpu", model.target()); + Assertions.assertFalse(model.useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NoneAuthTypeWorkspaceConnectionProperties model - = new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS) - .withExpiryTime(OffsetDateTime.parse("2021-09-18T05:09:03Z")) + = new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.XERO) + .withError("eecwtfm") + .withExpiryTime(OffsetDateTime.parse("2021-12-05T04:59:29Z")) .withIsSharedToAll(true) - .withTarget("lt") - .withMetadata(mapOf("vazjpwexcd", "gexojfccylhtrht", "o", "zp", "pjeuxsp", "zzxezmnrkj", - "bhwbdqufvcgnrgla", "lokfpmijpdvzv")) - .withSharedUserList(Arrays.asList("yambhb", "febzxf")) - .withValue("qutibhl") - .withValueFormat(ValueFormat.JSON); + .withMetadata(mapOf("mlqkiekhj", "ofxfmhlvyqnslbq", "spt", "qqrugwespscvs", "supcvqgxcvw", "uwozfvz")) + .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) + .withPeStatus(ManagedPEStatus.ACTIVE) + .withSharedUserList(Arrays.asList("gmlmpnvqxuyiar", "n")) + .withTarget("qseypdlmajpu") + .withUseWorkspaceManagedIdentity(false); model = BinaryData.fromObject(model).toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:09:03Z"), model.expiryTime()); - Assertions.assertEquals(true, model.isSharedToAll()); - Assertions.assertEquals("lt", model.target()); - Assertions.assertEquals("gexojfccylhtrht", model.metadata().get("vazjpwexcd")); - Assertions.assertEquals("yambhb", model.sharedUserList().get(0)); - Assertions.assertEquals("qutibhl", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); + Assertions.assertEquals(ConnectionCategory.XERO, model.category()); + Assertions.assertEquals("eecwtfm", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-05T04:59:29Z"), model.expiryTime()); + Assertions.assertTrue(model.isSharedToAll()); + Assertions.assertEquals("ofxfmhlvyqnslbq", model.metadata().get("mlqkiekhj")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.ACTIVE, model.peStatus()); + Assertions.assertEquals("gmlmpnvqxuyiar", model.sharedUserList().get(0)); + Assertions.assertEquals("qseypdlmajpu", model.target()); + Assertions.assertFalse(model.useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java index 7a80dacd79f9..32eb002fc528 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,26 +17,23 @@ public final class NotificationSettingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NotificationSetting model = BinaryData.fromString( - "{\"emails\":[\"nmbscbbx\",\"gdhxi\",\"d\",\"opedbwdpyqyybxub\"],\"emailOn\":[\"JobCancelled\",\"JobCompleted\"],\"webhooks\":{\"qacigeleo\":{\"webhookType\":\"Webhook\",\"eventType\":\"wremjel\"},\"r\":{\"webhookType\":\"Webhook\",\"eventType\":\"bvqvwzkjopwbeo\"},\"qfyiaseqchkr\":{\"webhookType\":\"Webhook\",\"eventType\":\"wzdqybxceakxcpts\"}}}") + "{\"emailOn\":[\"JobCompleted\"],\"emails\":[\"xqcwgax\",\"gvaknokzwjjzrl\",\"ixldzyyfy\"],\"webhooks\":{\"juvsmbmslzoyovw\":{\"webhookType\":\"Webhook\",\"eventType\":\"ixymmpujivyql\"}}}") .toObject(NotificationSetting.class); - Assertions.assertEquals("nmbscbbx", model.emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.emailOn().get(0)); - Assertions.assertEquals("wremjel", model.webhooks().get("qacigeleo").eventType()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.emailOn().get(0)); + Assertions.assertEquals("xqcwgax", model.emails().get(0)); + Assertions.assertEquals("ixymmpujivyql", model.webhooks().get("juvsmbmslzoyovw").eventType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NotificationSetting model - = new NotificationSetting().withEmails(Arrays.asList("nmbscbbx", "gdhxi", "d", "opedbwdpyqyybxub")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("qacigeleo", new Webhook().withEventType("wremjel"), "r", - new Webhook().withEventType("bvqvwzkjopwbeo"), "qfyiaseqchkr", - new Webhook().withEventType("wzdqybxceakxcpts"))); + = new NotificationSetting().withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)) + .withEmails(Arrays.asList("xqcwgax", "gvaknokzwjjzrl", "ixldzyyfy")) + .withWebhooks(mapOf("juvsmbmslzoyovw", new Webhook().withEventType("ixymmpujivyql"))); model = BinaryData.fromObject(model).toObject(NotificationSetting.class); - Assertions.assertEquals("nmbscbbx", model.emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.emailOn().get(0)); - Assertions.assertEquals("wremjel", model.webhooks().get("qacigeleo").eventType()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, model.emailOn().get(0)); + Assertions.assertEquals("xqcwgax", model.emails().get(0)); + Assertions.assertEquals("ixymmpujivyql", model.webhooks().get("juvsmbmslzoyovw").eventType()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java index eef1a3ef4266..35fb89d1b469 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,19 +14,19 @@ public final class NumericalDataDriftMetricThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NumericalDataDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"PopulationStabilityIndex\",\"threshold\":{\"value\":56.24244908661416}}") + "{\"dataType\":\"Numerical\",\"metric\":\"JensenShannonDistance\",\"threshold\":{\"value\":15.550682694181639}}") .toObject(NumericalDataDriftMetricThreshold.class); - Assertions.assertEquals(56.24244908661416D, model.threshold().value()); - Assertions.assertEquals(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); + Assertions.assertEquals(15.550682694181639D, model.threshold().value()); + Assertions.assertEquals(NumericalDataDriftMetric.JENSEN_SHANNON_DISTANCE, model.metric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NumericalDataDriftMetricThreshold model = new NumericalDataDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(56.24244908661416D)) - .withMetric(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX); + .withThreshold(new MonitoringThreshold().withValue(15.550682694181639D)) + .withMetric(NumericalDataDriftMetric.JENSEN_SHANNON_DISTANCE); model = BinaryData.fromObject(model).toObject(NumericalDataDriftMetricThreshold.class); - Assertions.assertEquals(56.24244908661416D, model.threshold().value()); - Assertions.assertEquals(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); + Assertions.assertEquals(15.550682694181639D, model.threshold().value()); + Assertions.assertEquals(NumericalDataDriftMetric.JENSEN_SHANNON_DISTANCE, model.metric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java index 0ed8af30995d..b557561dc950 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,19 +14,19 @@ public final class NumericalDataQualityMetricThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NumericalDataQualityMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"OutOfBoundsRate\",\"threshold\":{\"value\":97.91248731841587}}") + "{\"dataType\":\"Numerical\",\"metric\":\"OutOfBoundsRate\",\"threshold\":{\"value\":44.38906651679052}}") .toObject(NumericalDataQualityMetricThreshold.class); - Assertions.assertEquals(97.91248731841587D, model.threshold().value()); + Assertions.assertEquals(44.38906651679052D, model.threshold().value()); Assertions.assertEquals(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NumericalDataQualityMetricThreshold model = new NumericalDataQualityMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(97.91248731841587D)) + .withThreshold(new MonitoringThreshold().withValue(44.38906651679052D)) .withMetric(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE); model = BinaryData.fromObject(model).toObject(NumericalDataQualityMetricThreshold.class); - Assertions.assertEquals(97.91248731841587D, model.threshold().value()); + Assertions.assertEquals(44.38906651679052D, model.threshold().value()); Assertions.assertEquals(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java index d83d88282e6f..9a1f5cb9f4e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,19 +14,19 @@ public final class NumericalPredictionDriftMetricThresholdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NumericalPredictionDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"TwoSampleKolmogorovSmirnovTest\",\"threshold\":{\"value\":63.51610151085381}}") + "{\"dataType\":\"Numerical\",\"metric\":\"NormalizedWassersteinDistance\",\"threshold\":{\"value\":81.69629494102246}}") .toObject(NumericalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(63.51610151085381D, model.threshold().value()); - Assertions.assertEquals(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST, model.metric()); + Assertions.assertEquals(81.69629494102246D, model.threshold().value()); + Assertions.assertEquals(NumericalPredictionDriftMetric.NORMALIZED_WASSERSTEIN_DISTANCE, model.metric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NumericalPredictionDriftMetricThreshold model = new NumericalPredictionDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(63.51610151085381D)) - .withMetric(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST); + .withThreshold(new MonitoringThreshold().withValue(81.69629494102246D)) + .withMetric(NumericalPredictionDriftMetric.NORMALIZED_WASSERSTEIN_DISTANCE); model = BinaryData.fromObject(model).toObject(NumericalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(63.51610151085381D, model.threshold().value()); - Assertions.assertEquals(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST, model.metric()); + Assertions.assertEquals(81.69629494102246D, model.threshold().value()); + Assertions.assertEquals(NumericalPredictionDriftMetric.NORMALIZED_WASSERSTEIN_DISTANCE, model.metric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java index 2f93343745f5..dbb2f23ce7e4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,17 +12,17 @@ public final class ObjectiveTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Objective model = BinaryData.fromString("{\"primaryMetric\":\"hjxncqzahg\",\"goal\":\"Minimize\"}") - .toObject(Objective.class); - Assertions.assertEquals("hjxncqzahg", model.primaryMetric()); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); + Objective model + = BinaryData.fromString("{\"goal\":\"Maximize\",\"primaryMetric\":\"ow\"}").toObject(Objective.class); + Assertions.assertEquals(Goal.MAXIMIZE, model.goal()); + Assertions.assertEquals("ow", model.primaryMetric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Objective model = new Objective().withPrimaryMetric("hjxncqzahg").withGoal(Goal.MINIMIZE); + Objective model = new Objective().withGoal(Goal.MAXIMIZE).withPrimaryMetric("ow"); model = BinaryData.fromObject(model).toObject(Objective.class); - Assertions.assertEquals("hjxncqzahg", model.primaryMetric()); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); + Assertions.assertEquals(Goal.MAXIMIZE, model.goal()); + Assertions.assertEquals("ow", model.primaryMetric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java index 9091e9d71dec..5f488c93ffdc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class OneLakeArtifactTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OneLakeArtifact model - = BinaryData.fromString("{\"artifactType\":\"OneLakeArtifact\",\"artifactName\":\"tpcjpt\"}") + = BinaryData.fromString("{\"artifactType\":\"OneLakeArtifact\",\"artifactName\":\"ftptnuwj\"}") .toObject(OneLakeArtifact.class); - Assertions.assertEquals("tpcjpt", model.artifactName()); + Assertions.assertEquals("ftptnuwj", model.artifactName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OneLakeArtifact model = new OneLakeArtifact().withArtifactName("tpcjpt"); + OneLakeArtifact model = new OneLakeArtifact().withArtifactName("ftptnuwj"); model = BinaryData.fromObject(model).toObject(OneLakeArtifact.class); - Assertions.assertEquals("tpcjpt", model.artifactName()); + Assertions.assertEquals("ftptnuwj", model.artifactName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java index 51e69882431a..38f008d2a590 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,11 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.onlineDeployments() - .delete("wlkovopqp", "cdpyoqmwpmrlgj", "qs", "fptvam", com.azure.core.util.Context.NONE); + .delete("iegemtnbkevuukyd", "ksncrzbtlrbzqt", "hgajfayftohdlpc", "xpxxnyhivhyujqx", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java index c913e16b592a..c4c1b04ed712 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ContainerType; @@ -22,21 +22,21 @@ public final class OnlineDeploymentsGetLogsWithResponseMockTests { @Test public void testGetLogsWithResponse() throws Exception { - String responseStr = "{\"content\":\"ufipyg\"}"; + String responseStr = "{\"content\":\"f\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DeploymentLogs response = manager.onlineDeployments() - .getLogsWithResponse("fhfgoyxxszpai", "curfsofshfmgiix", "rveekhsmulvmy", "oefkpuuuxiuwhc", - new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1397087365), + .getLogsWithResponse("jqdjkonbgegwx", "gkrppmvnoqt", "qciqawhkdk", "aqspbdscotidik", + new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1659259913), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ufipyg", response.content()); + Assertions.assertEquals("f", response.content()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java index 5ccab6043887..076a7d43a649 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.SkuResource; @@ -24,24 +24,23 @@ public final class OnlineDeploymentsListSkusMockTests { @Test public void testListSkus() throws Exception { String responseStr - = "{\"value\":[{\"resourceType\":\"fmortrsnpbsungn\",\"sku\":{\"name\":\"km\",\"tier\":\"Basic\"},\"capacity\":{\"minimum\":279895478,\"maximum\":1991847525,\"default\":1529540251,\"scaleType\":\"Manual\"}}]}"; + = "{\"value\":[{\"capacity\":{\"default\":1085682451,\"maximum\":1357446348,\"minimum\":910705207,\"scaleType\":\"Manual\"},\"resourceType\":\"gmt\",\"sku\":{\"name\":\"qcyycxlllk\",\"tier\":\"Free\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.onlineDeployments() - .listSkus("moycpotmaos", "ngtbhvhsqvubww", "giyujnrvwjx", "walhljtn", 1777716757, "bpiuvqh", - com.azure.core.util.Context.NONE); + .listSkus("rj", "grjsqtirhabh", "pcvsd", "jmbydrg", 1597911039, "nmtjm", com.azure.core.util.Context.NONE); - Assertions.assertEquals("km", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals(279895478, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(1991847525, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(1529540251, response.iterator().next().capacity().defaultProperty()); + Assertions.assertEquals(1085682451, response.iterator().next().capacity().defaultProperty()); + Assertions.assertEquals(1357446348, response.iterator().next().capacity().maximum()); + Assertions.assertEquals(910705207, response.iterator().next().capacity().minimum()); Assertions.assertEquals(SkuScaleType.MANUAL, response.iterator().next().capacity().scaleType()); + Assertions.assertEquals("qcyycxlllk", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java index 583aa4119208..3b684e4249f9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.onlineEndpoints().delete("t", "o", "qudjdwcw", com.azure.core.util.Context.NONE); + manager.onlineEndpoints().delete("xmspjqafsxv", "quazo", "lxxksputizpvvihg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java index ea0889d23a13..5ee94c07e4ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class OnlineRequestSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OnlineRequestSettings model = BinaryData.fromString( - "{\"maxQueueWait\":\"PT192H43M50S\",\"requestTimeout\":\"PT2H5M54S\",\"maxConcurrentRequestsPerInstance\":1291498461}") + "{\"maxConcurrentRequestsPerInstance\":641187974,\"maxQueueWait\":\"PT32H43M47S\",\"requestTimeout\":\"PT53H36M45S\"}") .toObject(OnlineRequestSettings.class); - Assertions.assertEquals(Duration.parse("PT192H43M50S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT2H5M54S"), model.requestTimeout()); - Assertions.assertEquals(1291498461, model.maxConcurrentRequestsPerInstance()); + Assertions.assertEquals(641187974, model.maxConcurrentRequestsPerInstance()); + Assertions.assertEquals(Duration.parse("PT32H43M47S"), model.maxQueueWait()); + Assertions.assertEquals(Duration.parse("PT53H36M45S"), model.requestTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OnlineRequestSettings model = new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT192H43M50S")) - .withRequestTimeout(Duration.parse("PT2H5M54S")) - .withMaxConcurrentRequestsPerInstance(1291498461); + OnlineRequestSettings model = new OnlineRequestSettings().withMaxConcurrentRequestsPerInstance(641187974) + .withMaxQueueWait(Duration.parse("PT32H43M47S")) + .withRequestTimeout(Duration.parse("PT53H36M45S")); model = BinaryData.fromObject(model).toObject(OnlineRequestSettings.class); - Assertions.assertEquals(Duration.parse("PT192H43M50S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT2H5M54S"), model.requestTimeout()); - Assertions.assertEquals(1291498461, model.maxConcurrentRequestsPerInstance()); + Assertions.assertEquals(641187974, model.maxConcurrentRequestsPerInstance()); + Assertions.assertEquals(Duration.parse("PT32H43M47S"), model.maxQueueWait()); + Assertions.assertEquals(Duration.parse("PT53H36M45S"), model.requestTimeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java index d9549c2a2710..2cc88bfec0dd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointDeploymentResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointDeploymentResourcePropertiesTests.java new file mode 100644 index 000000000000..1595735fdd05 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointDeploymentResourcePropertiesTests.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku; +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class OpenAIEndpointDeploymentResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OpenAIEndpointDeploymentResourceProperties model = BinaryData.fromString( + "{\"type\":\"Azure.OpenAI\",\"model\":{\"format\":\"jakhmsbzjh\",\"name\":\"zevdphlx\",\"source\":\"lthqtrgqjbp\",\"version\":\"fsinzgvfcjrwzoxx\"},\"raiPolicyName\":\"felluwfzitonpe\",\"sku\":{\"capacity\":1432370634,\"family\":\"jlxofpdvhpfxxyp\",\"name\":\"i\",\"size\":\"ayhuy\",\"tier\":\"kpode\"},\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"failureReason\":\"inuvamiheogn\",\"provisioningState\":\"Disabled\"}") + .toObject(OpenAIEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("inuvamiheogn", model.failureReason()); + Assertions.assertEquals("jakhmsbzjh", model.model().format()); + Assertions.assertEquals("zevdphlx", model.model().name()); + Assertions.assertEquals("lthqtrgqjbp", model.model().source()); + Assertions.assertEquals("fsinzgvfcjrwzoxx", model.model().version()); + Assertions.assertEquals("felluwfzitonpe", model.raiPolicyName()); + Assertions.assertEquals(1432370634, model.sku().capacity()); + Assertions.assertEquals("jlxofpdvhpfxxyp", model.sku().family()); + Assertions.assertEquals("i", model.sku().name()); + Assertions.assertEquals("ayhuy", model.sku().size()); + Assertions.assertEquals("kpode", model.sku().tier()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, + model.versionUpgradeOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OpenAIEndpointDeploymentResourceProperties model + = new OpenAIEndpointDeploymentResourceProperties().withFailureReason("inuvamiheogn") + .withModel(new EndpointDeploymentModel().withFormat("jakhmsbzjh") + .withName("zevdphlx") + .withSource("lthqtrgqjbp") + .withVersion("fsinzgvfcjrwzoxx")) + .withRaiPolicyName("felluwfzitonpe") + .withSku(new CognitiveServicesSku().withCapacity(1432370634) + .withFamily("jlxofpdvhpfxxyp") + .withName("i") + .withSize("ayhuy") + .withTier("kpode")) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED); + model = BinaryData.fromObject(model).toObject(OpenAIEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("inuvamiheogn", model.failureReason()); + Assertions.assertEquals("jakhmsbzjh", model.model().format()); + Assertions.assertEquals("zevdphlx", model.model().name()); + Assertions.assertEquals("lthqtrgqjbp", model.model().source()); + Assertions.assertEquals("fsinzgvfcjrwzoxx", model.model().version()); + Assertions.assertEquals("felluwfzitonpe", model.raiPolicyName()); + Assertions.assertEquals(1432370634, model.sku().capacity()); + Assertions.assertEquals("jlxofpdvhpfxxyp", model.sku().family()); + Assertions.assertEquals("i", model.sku().name()); + Assertions.assertEquals("ayhuy", model.sku().size()); + Assertions.assertEquals("kpode", model.sku().tier()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, + model.versionUpgradeOption()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..b287d9632c1c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OpenAIEndpointResourcePropertiesTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class OpenAIEndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OpenAIEndpointResourceProperties model = BinaryData.fromString( + "{\"endpointType\":\"Azure.OpenAI\",\"associatedResourceId\":\"inqxdhnpjnezj\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"umltpmrzwv\",\"provisioningState\":\"Creating\"},\"id\":\"ffuxvfhuqh\",\"name\":\"gqqxjbs\",\"type\":\"toclmrttujydea\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"xpxbxedhxbb\",\"provisioningState\":\"Scaling\"},\"id\":\"sramqc\",\"name\":\"l\",\"type\":\"gfnlvvkswurxd\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"vhauimnntfkqp\",\"provisioningState\":\"Succeeded\"},\"id\":\"bnwivlqcwyzhn\",\"name\":\"qkzstzpze\",\"type\":\"dl\"}],\"endpointUri\":\"irtahtu\",\"failureReason\":\"imt\",\"location\":\"umviudzpsjqrm\",\"name\":\"jmtunlo\",\"provisioningState\":\"Creating\",\"shouldCreateAiServicesEndpoint\":true}") + .toObject(OpenAIEndpointResourceProperties.class); + Assertions.assertEquals("inqxdhnpjnezj", model.associatedResourceId()); + Assertions.assertEquals("umltpmrzwv", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("irtahtu", model.endpointUri()); + Assertions.assertEquals("imt", model.failureReason()); + Assertions.assertEquals("umviudzpsjqrm", model.location()); + Assertions.assertEquals("jmtunlo", model.name()); + Assertions.assertTrue(model.shouldCreateAiServicesEndpoint()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + OpenAIEndpointResourceProperties model + = new OpenAIEndpointResourceProperties().withAssociatedResourceId("inqxdhnpjnezj") + .withDeployments(Arrays.asList( + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("umltpmrzwv")), + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("xpxbxedhxbb")), + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("vhauimnntfkqp")))) + .withEndpointUri("irtahtu") + .withFailureReason("imt") + .withLocation("umviudzpsjqrm") + .withName("jmtunlo") + .withShouldCreateAiServicesEndpoint(true); + model = BinaryData.fromObject(model).toObject(OpenAIEndpointResourceProperties.class); + Assertions.assertEquals("inqxdhnpjnezj", model.associatedResourceId()); + Assertions.assertEquals("umltpmrzwv", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("irtahtu", model.endpointUri()); + Assertions.assertEquals("imt", model.failureReason()); + Assertions.assertEquals("umviudzpsjqrm", model.location()); + Assertions.assertEquals("jmtunlo", model.name()); + Assertions.assertTrue(model.shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.java index c630ed3fe155..aa5df409cc7b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,13 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") + "{\"provider\":\"cdm\",\"resource\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"description\":\"kknryrtihf\"}") .toObject(OperationDisplay.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java index 6c716ad68009..395d0cf841a9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearning.models.OperationDisplay; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") + "{\"name\":\"nygj\",\"isDataAction\":true,\"display\":{\"provider\":\"eqsrdeupewnwreit\",\"resource\":\"yflusarhmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java index 3c37565d1f2b..13e0352a6d4f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java @@ -1,23 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OperationListResult; +import com.azure.resourcemanager.machinelearning.implementation.models.OperationListResult; +import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"fpownoizhwlr\",\"isDataAction\":false,\"display\":{\"provider\":\"oqijgkdmbpaz\",\"resource\":\"bc\",\"operation\":\"pdznrbtcqqjnqgl\",\"description\":\"gnufoooj\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"esaagdfm\",\"isDataAction\":true,\"display\":{\"provider\":\"j\",\"resource\":\"ifkwmrvktsizntoc\",\"operation\":\"a\",\"description\":\"ajpsquc\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"kfo\"}") .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); + Assertions.assertEquals("kfo", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java index f382e7c26328..ecfde9c0fc9c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.Operation; @@ -21,14 +21,14 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"wipze\",\"isDataAction\":true,\"display\":{\"provider\":\"nytkmlfupjzc\",\"resource\":\"vzjoyxjgahxue\",\"operation\":\"daktnytkbcerf\",\"description\":\"cpvfqjckmp\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"wlpxc\",\"isDataAction\":true,\"display\":{\"provider\":\"e\",\"resource\":\"fc\",\"operation\":\"uzowqrzvuxnxa\",\"description\":\"hshzult\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java index cf65fe213cb5..0a63710f8584 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,18 +15,18 @@ public final class OutboundRuleBasicResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundRuleBasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\"},\"id\":\"hp\",\"name\":\"xkgymareqnajxqu\",\"type\":\"jhkycub\"}") + "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Active\",\"errorInformation\":\"hdmvfoyrxxxffgmc\",\"parentRuleNames\":[\"s\",\"eervgc\"]},\"id\":\"sapvbcqpfu\",\"name\":\"ekijhminen\",\"type\":\"bivpyrkvor\"}") .toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().status()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.properties().category()); + Assertions.assertEquals(RuleStatus.ACTIVE, model.properties().status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { OutboundRuleBasicResourceInner model = new OutboundRuleBasicResourceInner() - .withProperties(new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.INACTIVE)); + .withProperties(new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.ACTIVE)); model = BinaryData.fromObject(model).toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().status()); + Assertions.assertEquals(RuleCategory.USER_DEFINED, model.properties().category()); + Assertions.assertEquals(RuleStatus.ACTIVE, model.properties().status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java index 1ceacdcdfdad..828ca9d40aec 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java @@ -1,44 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleListResult; +import com.azure.resourcemanager.machinelearning.implementation.models.OutboundRuleListResult; import com.azure.resourcemanager.machinelearning.models.RuleCategory; import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class OutboundRuleListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundRuleListResult model = BinaryData.fromString( - "{\"nextLink\":\"tkl\",\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"},\"id\":\"aanozjosphyoulpj\",\"name\":\"v\",\"type\":\"ag\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\"},\"id\":\"wosytxitcskf\",\"name\":\"k\",\"type\":\"qumiek\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"},\"id\":\"hlyfjhdgqgg\",\"name\":\"bdunygaeqid\",\"type\":\"qfatpxllrxcyjm\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\"},\"id\":\"arm\",\"name\":\"wdmjsjqbjhhyx\",\"type\":\"rw\"}]}") + "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\",\"errorInformation\":\"wynbfvvc\",\"parentRuleNames\":[\"rkm\",\"ufavvlnpbso\",\"m\",\"nklnmrz\"]},\"id\":\"tvrkkfcwxizkstx\",\"name\":\"eykeipxutcbvriuv\",\"type\":\"fazxt\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Provisioning\",\"errorInformation\":\"eiivjq\",\"parentRuleNames\":[\"jwrvewojoqfxqetx\",\"dqiuspguzljvgji\",\"zq\"]},\"id\":\"ljsazmjsisfq\",\"name\":\"hcmecags\",\"type\":\"feiirpnjygllfkc\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"zzcajl\",\"parentRuleNames\":[\"cyca\",\"aamkkh\"]},\"id\":\"pmkxdujkxpu\",\"name\":\"zdyoqywsu\",\"type\":\"rpzhr\"}],\"nextLink\":\"ezxiz\"}") .toObject(OutboundRuleListResult.class); - Assertions.assertEquals("tkl", model.nextLink()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.value().get(0).properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.value().get(0).properties().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundRuleListResult model = new OutboundRuleListResult().withNextLink("tkl") - .withValue(Arrays.asList( - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE)))); - model = BinaryData.fromObject(model).toObject(OutboundRuleListResult.class); - Assertions.assertEquals("tkl", model.nextLink()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.value().get(0).properties().category()); + Assertions.assertEquals(RuleCategory.DEPENDENCY, model.value().get(0).properties().category()); Assertions.assertEquals(RuleStatus.INACTIVE, model.value().get(0).properties().status()); + Assertions.assertEquals("ezxiz", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java index 0e36352ccee9..388921cbf474 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,18 @@ public final class OutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OutboundRule model - = BinaryData.fromString("{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\"}") - .toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); + OutboundRule model = BinaryData.fromString( + "{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Deleting\",\"errorInformation\":\"obnbdxkqpxokaj\",\"parentRuleNames\":[\"pimexgstxgcpodg\",\"aajrm\"]}") + .toObject(OutboundRule.class); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); + Assertions.assertEquals(RuleStatus.DELETING, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OutboundRule model = new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE); + OutboundRule model = new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.DELETING); model = BinaryData.fromObject(model).toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); + Assertions.assertEquals(RuleCategory.RECOMMENDED, model.category()); + Assertions.assertEquals(RuleStatus.DELETING, model.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesCreateOrUpdateMockTests.java new file mode 100644 index 000000000000..323c761aaba3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesCreateOrUpdateMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.OutboundRule; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +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 OutboundRulesCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Deleting\",\"errorInformation\":\"iezbmhsqy\",\"parentRuleNames\":[\"bzhafcoayuqwnt\",\"hjm\",\"jmmjnxhy\"]},\"id\":\"tsemnid\",\"name\":\"aykvlrsbrn\",\"type\":\"ocyo\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + OutboundRuleBasicResource response = manager.outboundRules() + .createOrUpdate("in", "mvcvnmgqls", "glym", "elazvcfhiayro", + new OutboundRuleBasicResourceInner().withProperties( + new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.PROVISIONING)), + com.azure.core.util.Context.NONE); + + Assertions.assertEquals(RuleCategory.DEPENDENCY, response.properties().category()); + Assertions.assertEquals(RuleStatus.DELETING, response.properties().status()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesGetWithResponseMockTests.java new file mode 100644 index 000000000000..1cc494dbbd57 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesGetWithResponseMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +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 OutboundRulesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Deleting\",\"errorInformation\":\"kbxwncggamxbtqi\",\"parentRuleNames\":[\"aiolnkkghlexvqh\",\"nwmokz\",\"ylt\",\"pqjfoujeiagny\"]},\"id\":\"fjssayrwyf\",\"name\":\"utezxrpxdhzwdyva\",\"type\":\"hvxhwexwhos\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + OutboundRuleBasicResource response = manager.outboundRules() + .getWithResponse("hhed", "oyl", "crldwcc", "sghbdvsorvhbygwt", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(RuleCategory.RECOMMENDED, response.properties().category()); + Assertions.assertEquals(RuleStatus.DELETING, response.properties().status()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesListMockTests.java new file mode 100644 index 000000000000..c60535fabdfc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRulesListMockTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; +import com.azure.resourcemanager.machinelearning.models.RuleCategory; +import com.azure.resourcemanager.machinelearning.models.RuleStatus; +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 OutboundRulesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Provisioning\",\"errorInformation\":\"jzcargsxmawlvaa\",\"parentRuleNames\":[\"ry\",\"jjwggpcdugwddobp\",\"sj\",\"exedzmmcgqifhyhz\"]},\"id\":\"wkqnmhf\",\"name\":\"ll\",\"type\":\"rvh\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.outboundRules().list("p", "mbch", "skwaffsjqnjp", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(RuleCategory.USER_DEFINED, response.iterator().next().properties().category()); + Assertions.assertEquals(RuleStatus.PROVISIONING, response.iterator().next().properties().status()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java index 4c94528a9fc8..ef580accd665 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,17 +12,18 @@ public final class OutputPathAssetReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutputPathAssetReference model = BinaryData - .fromString("{\"referenceType\":\"OutputPath\",\"path\":\"mxq\",\"jobId\":\"vznjqswshesgcsqo\"}") + .fromString("{\"referenceType\":\"OutputPath\",\"jobId\":\"moqqtlffhzbk\",\"path\":\"jjjavfqnvhnq\"}") .toObject(OutputPathAssetReference.class); - Assertions.assertEquals("mxq", model.path()); - Assertions.assertEquals("vznjqswshesgcsqo", model.jobId()); + Assertions.assertEquals("moqqtlffhzbk", model.jobId()); + Assertions.assertEquals("jjjavfqnvhnq", model.path()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OutputPathAssetReference model = new OutputPathAssetReference().withPath("mxq").withJobId("vznjqswshesgcsqo"); + OutputPathAssetReference model + = new OutputPathAssetReference().withJobId("moqqtlffhzbk").withPath("jjjavfqnvhnq"); model = BinaryData.fromObject(model).toObject(OutputPathAssetReference.class); - Assertions.assertEquals("mxq", model.path()); - Assertions.assertEquals("vznjqswshesgcsqo", model.jobId()); + Assertions.assertEquals("moqqtlffhzbk", model.jobId()); + Assertions.assertEquals("jjjavfqnvhnq", model.path()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUDeploymentUsageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUDeploymentUsageTests.java new file mode 100644 index 000000000000..4671a8234f06 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUDeploymentUsageTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.PTUDeploymentUsage; +import org.junit.jupiter.api.Assertions; + +public final class PTUDeploymentUsageTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PTUDeploymentUsage model = BinaryData.fromString( + "{\"collectionQuotaUsage\":7580814837725485922,\"deploymentName\":\"rkn\",\"resourceGroup\":\"kfxmuqeqkwq\",\"usage\":4033093669982948942,\"workspaceName\":\"fts\"}") + .toObject(PTUDeploymentUsage.class); + Assertions.assertEquals(7580814837725485922L, model.collectionQuotaUsage()); + Assertions.assertEquals("rkn", model.deploymentName()); + Assertions.assertEquals("kfxmuqeqkwq", model.resourceGroup()); + Assertions.assertEquals(4033093669982948942L, model.usage()); + Assertions.assertEquals("fts", model.workspaceName()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasGetAvailableWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasGetAvailableWithResponseMockTests.java new file mode 100644 index 000000000000..f825e5a28af2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasGetAvailableWithResponseMockTests.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.AvailableQuota; +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 PTUQuotasGetAvailableWithResponseMockTests { + @Test + public void testGetAvailableWithResponse() throws Exception { + String responseStr = "{\"properties\":{\"total\":8450583645374854728}}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + AvailableQuota response + = manager.pTUQuotas().getAvailableWithResponse("bfjdfl", com.azure.core.util.Context.NONE).getValue(); + + Assertions.assertEquals(8450583645374854728L, response.properties().total()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListAvailableMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListAvailableMockTests.java new file mode 100644 index 000000000000..78986d47fa7d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListAvailableMockTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.AvailableQuota; +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 PTUQuotasListAvailableMockTests { + @Test + public void testListAvailable() throws Exception { + String responseStr = "{\"value\":[{\"properties\":{\"total\":8941611182901011985}}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.pTUQuotas().listAvailable("npegoupdqeflvd", "aqcqlexobeekzyeb", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(8941611182901011985L, response.iterator().next().properties().total()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListMockTests.java new file mode 100644 index 000000000000..f0549eae81ad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PTUQuotasListMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.UsageAndQuotaDetails; +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 PTUQuotasListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"modelCollection\":\"yuspz\",\"quota\":3744808428124007895,\"usageDetails\":[{\"collectionQuotaUsage\":5388495685553834688,\"deploymentName\":\"ebdefep\",\"resourceGroup\":\"hruzzwgbboziv\",\"usage\":7864567325910111064,\"workspaceName\":\"nlhsxeasxsqq\"},{\"collectionQuotaUsage\":8731553491150594339,\"deploymentName\":\"b\",\"resourceGroup\":\"mohdukprqyi\",\"usage\":2955206883854919785,\"workspaceName\":\"morsyirfkxazuboi\"}]}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.pTUQuotas().list("lcahhfuydgdhit", "v", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("yuspz", response.iterator().next().modelCollection()); + Assertions.assertEquals(3744808428124007895L, response.iterator().next().quota()); + Assertions.assertEquals(5388495685553834688L, + response.iterator().next().usageDetails().get(0).collectionQuotaUsage()); + Assertions.assertEquals("ebdefep", response.iterator().next().usageDetails().get(0).deploymentName()); + Assertions.assertEquals("hruzzwgbboziv", response.iterator().next().usageDetails().get(0).resourceGroup()); + Assertions.assertEquals(7864567325910111064L, response.iterator().next().usageDetails().get(0).usage()); + Assertions.assertEquals("nlhsxeasxsqq", response.iterator().next().usageDetails().get(0).workspaceName()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PackageDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PackageDetailsTests.java new file mode 100644 index 000000000000..6bd197851933 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PackageDetailsTests.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.PackageDetails; +import org.junit.jupiter.api.Assertions; + +public final class PackageDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PackageDetails model = BinaryData.fromString( + "{\"installPath\":\"g\",\"installedVersion\":\"mzyospspshck\",\"name\":\"yjpmspbpssdfppyo\",\"patchedVersion\":\"ieyujtvc\"}") + .toObject(PackageDetails.class); + Assertions.assertEquals("g", model.installPath()); + Assertions.assertEquals("mzyospspshck", model.installedVersion()); + Assertions.assertEquals("yjpmspbpssdfppyo", model.name()); + Assertions.assertEquals("ieyujtvc", model.patchedVersion()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PackageDetails model = new PackageDetails().withInstallPath("g") + .withInstalledVersion("mzyospspshck") + .withName("yjpmspbpssdfppyo") + .withPatchedVersion("ieyujtvc"); + model = BinaryData.fromObject(model).toObject(PackageDetails.class); + Assertions.assertEquals("g", model.installPath()); + Assertions.assertEquals("mzyospspshck", model.installedVersion()); + Assertions.assertEquals("yjpmspbpssdfppyo", model.name()); + Assertions.assertEquals("ieyujtvc", model.patchedVersion()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java index 171738ac4382..f033f9b3a2f6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,23 +14,24 @@ public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = BinaryData - .fromString("{\"properties\":{\"description\":\"yxrxmunj\"},\"tags\":{\"ivbgkcv\":\"glnkvxlxpagl\"}}") + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = BinaryData.fromString( + "{\"properties\":{\"description\":\"eukdqkkyih\"},\"tags\":{\"gqzgwldoychill\":\"eq\",\"a\":\"ecfehuwa\",\"rweft\":\"uhicqllizstacsjv\",\"aepwamcxtcz\":\"wqejpmvsse\"}}") .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("yxrxmunj", model.properties().description()); - Assertions.assertEquals("glnkvxlxpagl", model.tags().get("ivbgkcv")); + Assertions.assertEquals("eukdqkkyih", model.properties().description()); + Assertions.assertEquals("eq", model.tags().get("gqzgwldoychill")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() - .withProperties(new PartialBatchDeployment().withDescription("yxrxmunj")) - .withTags(mapOf("ivbgkcv", "glnkvxlxpagl")); + .withProperties(new PartialBatchDeployment().withDescription("eukdqkkyih")) + .withTags(mapOf("gqzgwldoychill", "eq", "a", "ecfehuwa", "rweft", "uhicqllizstacsjv", "aepwamcxtcz", + "wqejpmvsse")); model = BinaryData.fromObject(model) .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("yxrxmunj", model.properties().description()); - Assertions.assertEquals("glnkvxlxpagl", model.tags().get("ivbgkcv")); + Assertions.assertEquals("eukdqkkyih", model.properties().description()); + Assertions.assertEquals("eq", model.tags().get("gqzgwldoychill")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java index 2eab63ece4a4..7d28973281d5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,14 @@ public final class PartialBatchDeploymentTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartialBatchDeployment model - = BinaryData.fromString("{\"description\":\"pzvuqdflvo\"}").toObject(PartialBatchDeployment.class); - Assertions.assertEquals("pzvuqdflvo", model.description()); + = BinaryData.fromString("{\"description\":\"peuknijd\"}").toObject(PartialBatchDeployment.class); + Assertions.assertEquals("peuknijd", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartialBatchDeployment model = new PartialBatchDeployment().withDescription("pzvuqdflvo"); + PartialBatchDeployment model = new PartialBatchDeployment().withDescription("peuknijd"); model = BinaryData.fromObject(model).toObject(PartialBatchDeployment.class); - Assertions.assertEquals("pzvuqdflvo", model.description()); + Assertions.assertEquals("peuknijd", model.description()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java index f3a2b95d5821..378a605bff8f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,7 +15,7 @@ public final class PartialManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartialManagedServiceIdentity model = BinaryData.fromString( - "{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"sqqw\":\"dataclafzvaylpt\",\"waxfewzjkj\":\"datatcmwqkchc\",\"ksh\":\"dataxfdeqvhpsyl\",\"rgywwp\":\"databffmbmxz\"}}") + "{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"woyxqvapcohhou\":\"\\\"dataojpslsvjgpliufi\\\"\",\"gdzbenr\":\"\\\"dataqpqojxcxzrzd\\\"\",\"ddtjwfljhznam\":\"\\\"databcawetz\\\"\"}}") .toObject(PartialManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } @@ -24,8 +24,8 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { PartialManagedServiceIdentity model = new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("sqqw", "dataclafzvaylpt", "waxfewzjkj", "datatcmwqkchc", "ksh", - "dataxfdeqvhpsyl", "rgywwp", "databffmbmxz")); + .withUserAssignedIdentities(mapOf("woyxqvapcohhou", "\"dataojpslsvjgpliufi\"", "gdzbenr", + "\"dataqpqojxcxzrzd\"", "ddtjwfljhznam", "\"databcawetz\"")); model = BinaryData.fromObject(model).toObject(PartialManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java index 32bf81cef0ac..04ff90947dc7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,17 +13,18 @@ public final class PartialMinimalTrackedResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PartialMinimalTrackedResource model = BinaryData.fromString("{\"tags\":{\"pttaqutd\":\"snptfujgicgaao\"}}") - .toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("snptfujgicgaao", model.tags().get("pttaqutd")); + PartialMinimalTrackedResource model + = BinaryData.fromString("{\"tags\":{\"uem\":\"azisgyk\",\"klinhmdptysprq\":\"anbwzohmnrxxbso\"}}") + .toObject(PartialMinimalTrackedResource.class); + Assertions.assertEquals("azisgyk", model.tags().get("uem")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartialMinimalTrackedResource model - = new PartialMinimalTrackedResource().withTags(mapOf("pttaqutd", "snptfujgicgaao")); + PartialMinimalTrackedResource model = new PartialMinimalTrackedResource() + .withTags(mapOf("uem", "azisgyk", "klinhmdptysprq", "anbwzohmnrxxbso")); model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("snptfujgicgaao", model.tags().get("pttaqutd")); + Assertions.assertEquals("azisgyk", model.tags().get("uem")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java index 5db273373789..f3c70fdd9b0c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,24 +16,21 @@ public final class PartialMinimalTrackedResourceWithIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartialMinimalTrackedResourceWithIdentity model = BinaryData.fromString( - "{\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ni\":\"dataspofapvuhry\",\"st\":\"datafrzgbzjed\",\"nsnvpd\":\"datavnlvxbcuiiznktwf\",\"z\":\"databmikost\"}},\"tags\":{\"ophzfylsgcrp\":\"wbuqn\",\"fwyfwlwxjwet\":\"bcunezzceze\"}}") + "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"qacigeleo\":\"\\\"datawremjel\\\"\",\"vqvwzkjopwbe\":\"\\\"datad\\\"\"}},\"tags\":{\"soqfyiaseqchkrt\":\"lkwzdqybxceakxcp\"}}") .toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("wbuqn", model.tags().get("ophzfylsgcrp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("lkwzdqybxceakxcp", model.tags().get("soqfyiaseqchkrt")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartialMinimalTrackedResourceWithIdentity model - = new PartialMinimalTrackedResourceWithIdentity() - .withTags(mapOf("ophzfylsgcrp", "wbuqn", "fwyfwlwxjwet", "bcunezzceze")) - .withIdentity(new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ni", "dataspofapvuhry", "st", "datafrzgbzjed", "nsnvpd", - "datavnlvxbcuiiznktwf", "z", "databmikost"))); + = new PartialMinimalTrackedResourceWithIdentity().withTags(mapOf("soqfyiaseqchkrt", "lkwzdqybxceakxcp")) + .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("qacigeleo", "\"datawremjel\"", "vqvwzkjopwbe", "\"datad\""))); model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("wbuqn", model.tags().get("ophzfylsgcrp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("lkwzdqybxceakxcp", model.tags().get("soqfyiaseqchkrt")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java index b0eb4816ada0..7d9c749e52d0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,37 +18,38 @@ public final class PartialMinimalTrackedResourceWithSkuAndIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartialMinimalTrackedResourceWithSkuAndIdentity model = BinaryData.fromString( - "{\"sku\":{\"name\":\"ljuxl\",\"tier\":\"Free\",\"size\":\"tvtfjms\",\"family\":\"chmaiubavlzwpvgm\",\"capacity\":30040168},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"rokzrthqetwpq\":\"datagokedgjqafkm\"}},\"tags\":{\"ixiezeag\":\"aoznq\",\"hfpjstlzmbls\":\"ceituuge\"}}") + "{\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{\"jt\":\"\\\"datamcrdcue\\\"\",\"q\":\"\\\"dataahxm\\\"\",\"yspthzod\":\"\\\"datayarvsxzqbglcjk\\\"\"}},\"sku\":{\"capacity\":1215663059,\"family\":\"jtgblios\",\"name\":\"fmkmfdjxyxgbkkq\",\"size\":\"cteoedlrslsk\",\"tier\":\"Basic\"},\"tags\":{\"xzfsnggytexvzilm\":\"jnzdpvocojhpcna\",\"kwwwnckn\":\"iv\",\"weucyrth\":\"zdajlskzptjxu\",\"hokamvfej\":\"qlehmcgcjeinu\"}}") .toObject(PartialMinimalTrackedResourceWithSkuAndIdentity.class); - Assertions.assertEquals("aoznq", model.tags().get("ixiezeag")); - Assertions.assertEquals("ljuxl", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("tvtfjms", model.sku().size()); - Assertions.assertEquals("chmaiubavlzwpvgm", model.sku().family()); - Assertions.assertEquals(30040168, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("jnzdpvocojhpcna", model.tags().get("xzfsnggytexvzilm")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals(1215663059, model.sku().capacity()); + Assertions.assertEquals("jtgblios", model.sku().family()); + Assertions.assertEquals("fmkmfdjxyxgbkkq", model.sku().name()); + Assertions.assertEquals("cteoedlrslsk", model.sku().size()); + Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartialMinimalTrackedResourceWithSkuAndIdentity model = new PartialMinimalTrackedResourceWithSkuAndIdentity() - .withTags(mapOf("ixiezeag", "aoznq", "hfpjstlzmbls", "ceituuge")) - .withSku(new PartialSku().withName("ljuxl") - .withTier(SkuTier.FREE) - .withSize("tvtfjms") - .withFamily("chmaiubavlzwpvgm") - .withCapacity(30040168)) - .withIdentity( - new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("rokzrthqetwpq", "datagokedgjqafkm"))); + .withTags(mapOf("xzfsnggytexvzilm", "jnzdpvocojhpcna", "kwwwnckn", "iv", "weucyrth", "zdajlskzptjxu", + "hokamvfej", "qlehmcgcjeinu")) + .withIdentity(new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("jt", "\"datamcrdcue\"", "q", "\"dataahxm\"", "yspthzod", "\"datayarvsxzqbglcjk\""))) + .withSku(new PartialSku().withCapacity(1215663059) + .withFamily("jtgblios") + .withName("fmkmfdjxyxgbkkq") + .withSize("cteoedlrslsk") + .withTier(SkuTier.BASIC)); model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSkuAndIdentity.class); - Assertions.assertEquals("aoznq", model.tags().get("ixiezeag")); - Assertions.assertEquals("ljuxl", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("tvtfjms", model.sku().size()); - Assertions.assertEquals("chmaiubavlzwpvgm", model.sku().family()); - Assertions.assertEquals(30040168, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("jnzdpvocojhpcna", model.tags().get("xzfsnggytexvzilm")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals(1215663059, model.sku().capacity()); + Assertions.assertEquals("jtgblios", model.sku().family()); + Assertions.assertEquals("fmkmfdjxyxgbkkq", model.sku().name()); + Assertions.assertEquals("cteoedlrslsk", model.sku().size()); + Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java index a6bca875b0fb..689dc4a115f5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,32 +16,32 @@ public final class PartialMinimalTrackedResourceWithSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartialMinimalTrackedResourceWithSku model = BinaryData.fromString( - "{\"sku\":{\"name\":\"rkuz\",\"tier\":\"Free\",\"size\":\"ndtsnxawqytll\",\"family\":\"yzm\",\"capacity\":1452137809},\"tags\":{\"kck\":\"xnx\"}}") + "{\"sku\":{\"capacity\":1759115220,\"family\":\"drdaasa\",\"name\":\"obsmf\",\"size\":\"iyjvz\",\"tier\":\"Premium\"},\"tags\":{\"lnk\":\"nawnvz\"}}") .toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("xnx", model.tags().get("kck")); - Assertions.assertEquals("rkuz", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ndtsnxawqytll", model.sku().size()); - Assertions.assertEquals("yzm", model.sku().family()); - Assertions.assertEquals(1452137809, model.sku().capacity()); + Assertions.assertEquals("nawnvz", model.tags().get("lnk")); + Assertions.assertEquals(1759115220, model.sku().capacity()); + Assertions.assertEquals("drdaasa", model.sku().family()); + Assertions.assertEquals("obsmf", model.sku().name()); + Assertions.assertEquals("iyjvz", model.sku().size()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartialMinimalTrackedResourceWithSku model - = new PartialMinimalTrackedResourceWithSku().withTags(mapOf("kck", "xnx")) - .withSku(new PartialSku().withName("rkuz") - .withTier(SkuTier.FREE) - .withSize("ndtsnxawqytll") - .withFamily("yzm") - .withCapacity(1452137809)); + = new PartialMinimalTrackedResourceWithSku().withTags(mapOf("lnk", "nawnvz")) + .withSku(new PartialSku().withCapacity(1759115220) + .withFamily("drdaasa") + .withName("obsmf") + .withSize("iyjvz") + .withTier(SkuTier.PREMIUM)); model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("xnx", model.tags().get("kck")); - Assertions.assertEquals("rkuz", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ndtsnxawqytll", model.sku().size()); - Assertions.assertEquals("yzm", model.sku().family()); - Assertions.assertEquals(1452137809, model.sku().capacity()); + Assertions.assertEquals("nawnvz", model.tags().get("lnk")); + Assertions.assertEquals(1759115220, model.sku().capacity()); + Assertions.assertEquals("drdaasa", model.sku().family()); + Assertions.assertEquals("obsmf", model.sku().name()); + Assertions.assertEquals("iyjvz", model.sku().size()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java index 8ad4095da8d8..0f229ac16506 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -19,38 +19,37 @@ public final class PartialRegistryPartialTrackedResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartialRegistryPartialTrackedResource model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"370e11aa-1cde-446e-8d05-867ab14f8848\",\"tenantId\":\"6ce29048-e549-4164-b52f-77a4a18b36b5\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"r\":{\"principalId\":\"c0ed1deb-cbad-445a-b9ba-e55fb37d4cda\",\"clientId\":\"6027cd1a-6031-447a-8589-17ea0ae59b90\"},\"neyttl\":{\"principalId\":\"065f8464-6928-4247-b151-0cfc74b63250\",\"clientId\":\"c36db973-09ef-4904-af3f-cc91f0a96536\"},\"ivcbkutpumltwj\":{\"principalId\":\"d91934d8-363d-495a-88b2-425c44255200\",\"clientId\":\"0aa30399-8e40-4496-ac14-d68156b72902\"}}},\"sku\":{\"name\":\"xynbpvzlqywa\",\"tier\":\"Standard\",\"size\":\"jckhmocgj\",\"family\":\"gouarhwvixqq\",\"capacity\":902896501},\"tags\":{\"rvtz\":\"ybsjrc\",\"y\":\"nrbctbhpjhxpcvrd\"}}") + "{\"identity\":{\"principalId\":\"oaongbjc\",\"tenantId\":\"ujitcjedftww\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"p\":{\"principalId\":\"jvdcpzfoqouic\",\"clientId\":\"xarzgszufoxciq\"},\"gokdwbwhks\":{\"principalId\":\"oamciodh\",\"clientId\":\"azxkhnzbonlwnto\"}}},\"sku\":{\"capacity\":793958832,\"family\":\"vexztvbtqgs\",\"name\":\"aoyzkoow\",\"size\":\"mnguxawqaldsyu\",\"tier\":\"Premium\"},\"tags\":{\"bw\":\"rqf\"}}") .toObject(PartialRegistryPartialTrackedResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xynbpvzlqywa", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("jckhmocgj", model.sku().size()); - Assertions.assertEquals("gouarhwvixqq", model.sku().family()); - Assertions.assertEquals(902896501, model.sku().capacity()); - Assertions.assertEquals("ybsjrc", model.tags().get("rvtz")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals(793958832, model.sku().capacity()); + Assertions.assertEquals("vexztvbtqgs", model.sku().family()); + Assertions.assertEquals("aoyzkoow", model.sku().name()); + Assertions.assertEquals("mnguxawqaldsyu", model.sku().size()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); + Assertions.assertEquals("rqf", model.tags().get("bw")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PartialRegistryPartialTrackedResource model = new PartialRegistryPartialTrackedResource() - .withIdentity(new RegistryPartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("r", new UserAssignedIdentity(), "neyttl", new UserAssignedIdentity(), - "ivcbkutpumltwj", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("xynbpvzlqywa") - .withTier(SkuTier.STANDARD) - .withSize("jckhmocgj") - .withFamily("gouarhwvixqq") - .withCapacity(902896501)) - .withTags(mapOf("rvtz", "ybsjrc", "y", "nrbctbhpjhxpcvrd")); + .withIdentity(new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf("p", new UserAssignedIdentity(), "gokdwbwhks", new UserAssignedIdentity()))) + .withSku(new PartialSku().withCapacity(793958832) + .withFamily("vexztvbtqgs") + .withName("aoyzkoow") + .withSize("mnguxawqaldsyu") + .withTier(SkuTier.PREMIUM)) + .withTags(mapOf("bw", "rqf")); model = BinaryData.fromObject(model).toObject(PartialRegistryPartialTrackedResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xynbpvzlqywa", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("jckhmocgj", model.sku().size()); - Assertions.assertEquals("gouarhwvixqq", model.sku().family()); - Assertions.assertEquals(902896501, model.sku().capacity()); - Assertions.assertEquals("ybsjrc", model.tags().get("rvtz")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals(793958832, model.sku().capacity()); + Assertions.assertEquals("vexztvbtqgs", model.sku().family()); + Assertions.assertEquals("aoyzkoow", model.sku().name()); + Assertions.assertEquals("mnguxawqaldsyu", model.sku().size()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); + Assertions.assertEquals("rqf", model.tags().get("bw")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java index e1bfe9a92bc6..03fe49e96465 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,27 +13,27 @@ public final class PartialSkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PartialSku model = BinaryData.fromString( - "{\"name\":\"ymx\",\"tier\":\"Standard\",\"size\":\"jkdtfoh\",\"family\":\"ogzvk\",\"capacity\":372734200}") + "{\"capacity\":896458989,\"family\":\"vwitqscyw\",\"name\":\"gwol\",\"size\":\"czbwemhairsbr\",\"tier\":\"Standard\"}") .toObject(PartialSku.class); - Assertions.assertEquals("ymx", model.name()); + Assertions.assertEquals(896458989, model.capacity()); + Assertions.assertEquals("vwitqscyw", model.family()); + Assertions.assertEquals("gwol", model.name()); + Assertions.assertEquals("czbwemhairsbr", model.size()); Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkdtfoh", model.size()); - Assertions.assertEquals("ogzvk", model.family()); - Assertions.assertEquals(372734200, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PartialSku model = new PartialSku().withName("ymx") - .withTier(SkuTier.STANDARD) - .withSize("jkdtfoh") - .withFamily("ogzvk") - .withCapacity(372734200); + PartialSku model = new PartialSku().withCapacity(896458989) + .withFamily("vwitqscyw") + .withName("gwol") + .withSize("czbwemhairsbr") + .withTier(SkuTier.STANDARD); model = BinaryData.fromObject(model).toObject(PartialSku.class); - Assertions.assertEquals("ymx", model.name()); + Assertions.assertEquals(896458989, model.capacity()); + Assertions.assertEquals("vwitqscyw", model.family()); + Assertions.assertEquals("gwol", model.name()); + Assertions.assertEquals("czbwemhairsbr", model.size()); Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkdtfoh", model.size()); - Assertions.assertEquals("ogzvk", model.family()); - Assertions.assertEquals(372734200, model.capacity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java index a4e7fec01c48..9874abaae63d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,12 +10,7 @@ public final class PasswordTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Password model = BinaryData.fromString("{\"name\":\"yocf\",\"value\":\"ksymd\"}").toObject(Password.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Password model = new Password(); - model = BinaryData.fromObject(model).toObject(Password.class); + Password model + = BinaryData.fromString("{\"name\":\"tazqugxywpmueefj\",\"value\":\"fqkquj\"}").toObject(Password.class); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.java index 734ac01c5445..fcc8fed8a76a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,19 +12,19 @@ public final class PendingUploadRequestDtoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PendingUploadRequestDto model - = BinaryData.fromString("{\"pendingUploadId\":\"zrfze\",\"pendingUploadType\":\"TemporaryBlobReference\"}") - .toObject(PendingUploadRequestDto.class); - Assertions.assertEquals("zrfze", model.pendingUploadId()); + PendingUploadRequestDto model = BinaryData + .fromString("{\"pendingUploadId\":\"lwuenvrkp\",\"pendingUploadType\":\"TemporaryBlobReference\"}") + .toObject(PendingUploadRequestDto.class); + Assertions.assertEquals("lwuenvrkp", model.pendingUploadId()); Assertions.assertEquals(PendingUploadType.TEMPORARY_BLOB_REFERENCE, model.pendingUploadType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PendingUploadRequestDto model = new PendingUploadRequestDto().withPendingUploadId("zrfze") + PendingUploadRequestDto model = new PendingUploadRequestDto().withPendingUploadId("lwuenvrkp") .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE); model = BinaryData.fromObject(model).toObject(PendingUploadRequestDto.class); - Assertions.assertEquals("zrfze", model.pendingUploadId()); + Assertions.assertEquals("lwuenvrkp", model.pendingUploadId()); Assertions.assertEquals(PendingUploadType.TEMPORARY_BLOB_REFERENCE, model.pendingUploadType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java index 911a176e9a52..375cc2eebb58 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,18 @@ public final class PersonalComputeInstanceSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PersonalComputeInstanceSettings model - = BinaryData.fromString("{\"assignedUser\":{\"objectId\":\"rgkrfi\",\"tenantId\":\"rpywlptyuqh\"}}") + = BinaryData.fromString("{\"assignedUser\":{\"objectId\":\"knmstbdoprwkamp\",\"tenantId\":\"hwpbldzniu\"}}") .toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("rgkrfi", model.assignedUser().objectId()); - Assertions.assertEquals("rpywlptyuqh", model.assignedUser().tenantId()); + Assertions.assertEquals("knmstbdoprwkamp", model.assignedUser().objectId()); + Assertions.assertEquals("hwpbldzniu", model.assignedUser().tenantId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PersonalComputeInstanceSettings model = new PersonalComputeInstanceSettings() - .withAssignedUser(new AssignedUser().withObjectId("rgkrfi").withTenantId("rpywlptyuqh")); + .withAssignedUser(new AssignedUser().withObjectId("knmstbdoprwkamp").withTenantId("hwpbldzniu")); model = BinaryData.fromObject(model).toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("rgkrfi", model.assignedUser().objectId()); - Assertions.assertEquals("rpywlptyuqh", model.assignedUser().tenantId()); + Assertions.assertEquals("knmstbdoprwkamp", model.assignedUser().objectId()); + Assertions.assertEquals("hwpbldzniu", model.assignedUser().tenantId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java index 0235ddd033d7..26c44bc7acda 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -23,93 +23,86 @@ public final class PipelineJobTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PipelineJob model = BinaryData.fromString( - "{\"jobType\":\"Pipeline\",\"settings\":\"datacxlngoufpi\",\"jobs\":{\"vsl\":\"datamfxzspf\"},\"inputs\":{\"dumjtycildrzn\":{\"jobInputType\":\"JobInput\",\"description\":\"plxg\"},\"xduyjnqzbrqcakm\":{\"jobInputType\":\"JobInput\",\"description\":\"xozqthkwxfugfziz\"}},\"outputs\":{\"whmucjiuhcxyveh\":{\"jobOutputType\":\"JobOutput\",\"description\":\"iyjucamnsbqoi\"},\"ycudus\":{\"jobOutputType\":\"JobOutput\",\"description\":\"lelyqdvpqfbx\"},\"lefnoheywvfo\":{\"jobOutputType\":\"JobOutput\",\"description\":\"tx\"},\"enjpwdmsfw\":{\"jobOutputType\":\"JobOutput\",\"description\":\"yllre\"}},\"sourceJobId\":\"rsvevcneqswxhqh\",\"displayName\":\"htbzvulqevvj\",\"status\":\"Paused\",\"experimentName\":\"yhtxgdmvghcm\",\"services\":{\"rxowvhufcmuajwb\":{\"jobServiceType\":\"wkfefbcyjr\",\"port\":658805241,\"endpoint\":\"eebu\",\"status\":\"yimooaezkto\",\"errorMessage\":\"go\",\"properties\":{\"fztvnabfbbtown\":\"qwbywaazbaeee\",\"zxkrdpuyytbpkrpk\":\"ljdkxhmewyaolc\",\"enefnoafpcnrx\":\"qetp\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"c\":{\"jobServiceType\":\"p\",\"port\":942163314,\"endpoint\":\"frfa\",\"status\":\"nnsvrfajynihti\",\"errorMessage\":\"fgzqzhl\",\"properties\":{\"yohrcmeqljxdum\":\"blfehbgc\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"tg\":{\"jobServiceType\":\"nebldxag\",\"port\":2015322122,\"endpoint\":\"wcn\",\"status\":\"wxjsjquv\",\"errorMessage\":\"ufzdtsrpju\",\"properties\":{\"huqczouanbfulv\":\"acrzhnsbylgmg\",\"bzbwbgwzhbhfljey\":\"xglxoqwbztil\",\"lhrwyakzuafapwx\":\"dpiov\",\"extqd\":\"vdeatjiobnirg\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"imznupbmtbs\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"sqvhe\",\"notificationSetting\":{\"emails\":[\"ghc\",\"zmmmjyvdhdgdi\",\"m\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"caqfkakh\":{\"webhookType\":\"Webhook\",\"eventType\":\"tqjisjmol\"}}},\"description\":\"rvty\",\"tags\":{\"pfzxkczbdypbbim\":\"ytvjejqawfus\",\"ortclnhbjcyuzly\":\"jbozv\"},\"properties\":{\"lkv\":\"cibv\",\"nviulbylmgjzr\":\"kcafnwqhawv\"}}") + "{\"jobType\":\"Pipeline\",\"inputs\":{\"kshfy\":{\"jobInputType\":\"JobInput\",\"description\":\"kchkapit\"}},\"jobs\":{\"nfd\":\"\\\"dataibjepzwhj\\\"\"},\"outputs\":{\"zhblivw\":{\"jobOutputType\":\"JobOutput\",\"description\":\"cj\"}},\"settings\":\"\\\"datasudy\\\"\",\"sourceJobId\":\"mbhdo\",\"componentId\":\"bng\",\"computeId\":\"lgxz\",\"displayName\":\"vxd\",\"experimentName\":\"exatmdmnrsen\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"notificationSetting\":{\"emailOn\":[\"JobFailed\",\"JobCancelled\",\"JobCancelled\",\"JobCancelled\"],\"emails\":[\"isjkzsoxznn\"],\"webhooks\":{\"zwwy\":{\"webhookType\":\"Webhook\",\"eventType\":\"vyohpsapzu\"},\"mxpqkjnpyriwn\":{\"webhookType\":\"Webhook\",\"eventType\":\"djzghximkg\"}}},\"parentJobName\":\"tcxmmqm\",\"services\":{\"lf\":{\"endpoint\":\"yjrexwdonbexfte\",\"errorMessage\":\"ubheeggzgrnqtl\",\"jobServiceType\":\"zuum\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":1037538880,\"properties\":{\"nsyxzxjmk\":\"acan\",\"lazof\":\"nb\",\"anydsc\":\"exvtemasp\"},\"status\":\"xwdpwjcbhaahntof\"},\"sp\":{\"endpoint\":\"fixoskk\",\"errorMessage\":\"fivsujybsr\",\"jobServiceType\":\"zmrgtxdhmfppinmg\",\"nodes\":{\"nodesValueType\":\"Nodes\"},\"port\":835504028,\"properties\":{\"fragjhxerx\":\"wtz\",\"yholhjns\":\"obkdbtqhvmmnii\",\"blxk\":\"bggicnqwlctmw\"},\"status\":\"qgvxrktjcjigcw\"}},\"status\":\"Preparing\",\"description\":\"xasevchefpgee\",\"properties\":{\"aemwcgimm\":\"bruho\",\"z\":\"imaabsqqlon\"},\"tags\":{\"dkmbjsmihrijez\":\"ca\",\"lkvbgukbsv\":\"fsjwfcz\",\"ygnbknhjgclxaxwc\":\"wyo\",\"aqipmnxclfrsbzrn\":\"faspsdzkucszghd\"}}") .toObject(PipelineJob.class); - Assertions.assertEquals("rvty", model.description()); - Assertions.assertEquals("ytvjejqawfus", model.tags().get("pfzxkczbdypbbim")); - Assertions.assertEquals("cibv", model.properties().get("lkv")); - Assertions.assertEquals("htbzvulqevvj", model.displayName()); - Assertions.assertEquals("yhtxgdmvghcm", model.experimentName()); - Assertions.assertEquals("wkfefbcyjr", model.services().get("rxowvhufcmuajwb").jobServiceType()); - Assertions.assertEquals(658805241, model.services().get("rxowvhufcmuajwb").port()); - Assertions.assertEquals("eebu", model.services().get("rxowvhufcmuajwb").endpoint()); - Assertions.assertEquals("qwbywaazbaeee", - model.services().get("rxowvhufcmuajwb").properties().get("fztvnabfbbtown")); - Assertions.assertEquals("imznupbmtbs", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("sqvhe", model.componentId()); - Assertions.assertEquals("ghc", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("tqjisjmol", model.notificationSetting().webhooks().get("caqfkakh").eventType()); - Assertions.assertEquals("plxg", model.inputs().get("dumjtycildrzn").description()); - Assertions.assertEquals("iyjucamnsbqoi", model.outputs().get("whmucjiuhcxyveh").description()); - Assertions.assertEquals("rsvevcneqswxhqh", model.sourceJobId()); + Assertions.assertEquals("xasevchefpgee", model.description()); + Assertions.assertEquals("bruho", model.properties().get("aemwcgimm")); + Assertions.assertEquals("ca", model.tags().get("dkmbjsmihrijez")); + Assertions.assertEquals("bng", model.componentId()); + Assertions.assertEquals("lgxz", model.computeId()); + Assertions.assertEquals("vxd", model.displayName()); + Assertions.assertEquals("exatmdmnrsen", model.experimentName()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("isjkzsoxznn", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("vyohpsapzu", model.notificationSetting().webhooks().get("zwwy").eventType()); + Assertions.assertEquals("tcxmmqm", model.parentJobName()); + Assertions.assertEquals("yjrexwdonbexfte", model.services().get("lf").endpoint()); + Assertions.assertEquals("zuum", model.services().get("lf").jobServiceType()); + Assertions.assertEquals(1037538880, model.services().get("lf").port()); + Assertions.assertEquals("acan", model.services().get("lf").properties().get("nsyxzxjmk")); + Assertions.assertEquals("kchkapit", model.inputs().get("kshfy").description()); + Assertions.assertEquals("cj", model.outputs().get("zhblivw").description()); + Assertions.assertEquals("mbhdo", model.sourceJobId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PipelineJob model = new PipelineJob().withDescription("rvty") - .withTags(mapOf("pfzxkczbdypbbim", "ytvjejqawfus", "ortclnhbjcyuzly", "jbozv")) - .withProperties(mapOf("lkv", "cibv", "nviulbylmgjzr", "kcafnwqhawv")) - .withDisplayName("htbzvulqevvj") - .withExperimentName("yhtxgdmvghcm") - .withServices(mapOf("rxowvhufcmuajwb", - new JobService().withJobServiceType("wkfefbcyjr") - .withPort(658805241) - .withEndpoint("eebu") - .withProperties(mapOf("fztvnabfbbtown", "qwbywaazbaeee", "zxkrdpuyytbpkrpk", "ljdkxhmewyaolc", - "enefnoafpcnrx", "qetp")) - .withNodes(new Nodes()), - "c", - new JobService().withJobServiceType("p") - .withPort(942163314) - .withEndpoint("frfa") - .withProperties(mapOf("yohrcmeqljxdum", "blfehbgc")) - .withNodes(new Nodes()), - "tg", - new JobService().withJobServiceType("nebldxag") - .withPort(2015322122) - .withEndpoint("wcn") - .withProperties(mapOf("huqczouanbfulv", "acrzhnsbylgmg", "bzbwbgwzhbhfljey", "xglxoqwbztil", - "lhrwyakzuafapwx", "dpiov", "extqd", "vdeatjiobnirg")) - .withNodes(new Nodes()))) - .withComputeId("imznupbmtbs") - .withIsArchived(true) + PipelineJob model = new PipelineJob().withDescription("xasevchefpgee") + .withProperties(mapOf("aemwcgimm", "bruho", "z", "imaabsqqlon")) + .withTags(mapOf("dkmbjsmihrijez", "ca", "lkvbgukbsv", "fsjwfcz", "ygnbknhjgclxaxwc", "wyo", + "aqipmnxclfrsbzrn", "faspsdzkucszghd")) + .withComponentId("bng") + .withComputeId("lgxz") + .withDisplayName("vxd") + .withExperimentName("exatmdmnrsen") .withIdentity(new IdentityConfiguration()) - .withComponentId("sqvhe") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ghc", "zmmmjyvdhdgdi", "m")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("caqfkakh", new Webhook().withEventType("tqjisjmol")))) - .withSettings("datacxlngoufpi") - .withJobs(mapOf("vsl", "datamfxzspf")) - .withInputs(mapOf("dumjtycildrzn", new JobInput().withDescription("plxg"), "xduyjnqzbrqcakm", - new JobInput().withDescription("xozqthkwxfugfziz"))) - .withOutputs(mapOf("whmucjiuhcxyveh", new JobOutput().withDescription("iyjucamnsbqoi"), "ycudus", - new JobOutput().withDescription("lelyqdvpqfbx"), "lefnoheywvfo", new JobOutput().withDescription("tx"), - "enjpwdmsfw", new JobOutput().withDescription("yllre"))) - .withSourceJobId("rsvevcneqswxhqh"); + .withIsArchived(true) + .withNotificationSetting(new NotificationSetting() + .withEmailOn( + Arrays.asList(EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_CANCELLED, + EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_CANCELLED)) + .withEmails(Arrays.asList("isjkzsoxznn")) + .withWebhooks(mapOf("zwwy", new Webhook().withEventType("vyohpsapzu"), "mxpqkjnpyriwn", + new Webhook().withEventType("djzghximkg")))) + .withParentJobName("tcxmmqm") + .withServices(mapOf("lf", + new JobService().withEndpoint("yjrexwdonbexfte") + .withJobServiceType("zuum") + .withNodes(new Nodes()) + .withPort(1037538880) + .withProperties(mapOf("nsyxzxjmk", "acan", "lazof", "nb", "anydsc", "exvtemasp")), + "sp", + new JobService().withEndpoint("fixoskk") + .withJobServiceType("zmrgtxdhmfppinmg") + .withNodes(new Nodes()) + .withPort(835504028) + .withProperties(mapOf("fragjhxerx", "wtz", "yholhjns", "obkdbtqhvmmnii", "blxk", "bggicnqwlctmw")))) + .withInputs(mapOf("kshfy", new JobInput().withDescription("kchkapit"))) + .withJobs(mapOf("nfd", "\"dataibjepzwhj\"")) + .withOutputs(mapOf("zhblivw", new JobOutput().withDescription("cj"))) + .withSettings("\"datasudy\"") + .withSourceJobId("mbhdo"); model = BinaryData.fromObject(model).toObject(PipelineJob.class); - Assertions.assertEquals("rvty", model.description()); - Assertions.assertEquals("ytvjejqawfus", model.tags().get("pfzxkczbdypbbim")); - Assertions.assertEquals("cibv", model.properties().get("lkv")); - Assertions.assertEquals("htbzvulqevvj", model.displayName()); - Assertions.assertEquals("yhtxgdmvghcm", model.experimentName()); - Assertions.assertEquals("wkfefbcyjr", model.services().get("rxowvhufcmuajwb").jobServiceType()); - Assertions.assertEquals(658805241, model.services().get("rxowvhufcmuajwb").port()); - Assertions.assertEquals("eebu", model.services().get("rxowvhufcmuajwb").endpoint()); - Assertions.assertEquals("qwbywaazbaeee", - model.services().get("rxowvhufcmuajwb").properties().get("fztvnabfbbtown")); - Assertions.assertEquals("imznupbmtbs", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("sqvhe", model.componentId()); - Assertions.assertEquals("ghc", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("tqjisjmol", model.notificationSetting().webhooks().get("caqfkakh").eventType()); - Assertions.assertEquals("plxg", model.inputs().get("dumjtycildrzn").description()); - Assertions.assertEquals("iyjucamnsbqoi", model.outputs().get("whmucjiuhcxyveh").description()); - Assertions.assertEquals("rsvevcneqswxhqh", model.sourceJobId()); + Assertions.assertEquals("xasevchefpgee", model.description()); + Assertions.assertEquals("bruho", model.properties().get("aemwcgimm")); + Assertions.assertEquals("ca", model.tags().get("dkmbjsmihrijez")); + Assertions.assertEquals("bng", model.componentId()); + Assertions.assertEquals("lgxz", model.computeId()); + Assertions.assertEquals("vxd", model.displayName()); + Assertions.assertEquals("exatmdmnrsen", model.experimentName()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); + Assertions.assertEquals("isjkzsoxznn", model.notificationSetting().emails().get(0)); + Assertions.assertEquals("vyohpsapzu", model.notificationSetting().webhooks().get("zwwy").eventType()); + Assertions.assertEquals("tcxmmqm", model.parentJobName()); + Assertions.assertEquals("yjrexwdonbexfte", model.services().get("lf").endpoint()); + Assertions.assertEquals("zuum", model.services().get("lf").jobServiceType()); + Assertions.assertEquals(1037538880, model.services().get("lf").port()); + Assertions.assertEquals("acan", model.services().get("lf").properties().get("nsyxzxjmk")); + Assertions.assertEquals("kchkapit", model.inputs().get("kshfy").description()); + Assertions.assertEquals("cj", model.outputs().get("zhblivw").description()); + Assertions.assertEquals("mbhdo", model.sourceJobId()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java index 9b5d474f3a74..da2b5ef06472 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,16 +14,16 @@ public final class PredictionDriftMetricThresholdBaseTests { public void testDeserialize() throws Exception { PredictionDriftMetricThresholdBase model = BinaryData .fromString( - "{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":21.01964242630283}}") + "{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":60.977978053164925}}") .toObject(PredictionDriftMetricThresholdBase.class); - Assertions.assertEquals(21.01964242630283D, model.threshold().value()); + Assertions.assertEquals(60.977978053164925D, model.threshold().value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PredictionDriftMetricThresholdBase model = new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(21.01964242630283D)); + .withThreshold(new MonitoringThreshold().withValue(60.977978053164925D)); model = BinaryData.fromObject(model).toObject(PredictionDriftMetricThresholdBase.class); - Assertions.assertEquals(21.01964242630283D, model.threshold().value()); + Assertions.assertEquals(60.977978053164925D, model.threshold().value()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java index f7253776a236..f68508f8ed8c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -21,58 +21,62 @@ public final class PredictionDriftMonitoringSignalTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PredictionDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"PredictionDrift\",\"metricThresholds\":[{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":82.50470090588112}},{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":17.174727928466226}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"xpuckn\",\"jobInputType\":\"mlflow_model\",\"uri\":\"s\",\"columns\":{\"micttrvl\":\"smg\",\"cjrzvlcivqx\":\"vjmxokxxamq\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"mklphxwww\",\"jobInputType\":\"custom_model\",\"uri\":\"jkbgnfbr\",\"columns\":{\"evlahxczywyw\":\"fsunh\",\"axqjf\":\"ahwcorewcnn\",\"gewdqbxexfyzn\":\"ajrfgimom\"}},\"featureDataTypeOverride\":{\"uqks\":\"Categorical\",\"sfx\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"rtlikff\":\"pmoh\",\"qrf\":\"dzt\",\"zdteqjmyqxuhg\":\"gynzfw\",\"wrrlccklyf\":\"axnyprijyoxxjxbs\"}}") + "{\"signalType\":\"PredictionDrift\",\"featureDataTypeOverride\":{\"uajgcqwulynk\":\"Numerical\"},\"metricThresholds\":[{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":47.449056360869115}},{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":9.154683434035892}},{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":90.31899256760244}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"vjgb\":\"huulriqbyo\",\"uoard\":\"sxebrslttfyhcdjw\",\"g\":\"agttpufpb\"},\"dataContext\":\"holhujbfw\",\"jobInputType\":\"mlflow_model\",\"uri\":\"plkys\"},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"columns\":{\"dmcvhtbbz\":\"yjprxslw\",\"ihotjecohmxv\":\"hfvhuwzbxpcqz\",\"xwieexuyade\":\"lrrskap\",\"ccgrvkcxzznn\":\"ltfokyksyim\"},\"dataContext\":\"fers\",\"jobInputType\":\"literal\",\"uri\":\"egprkjguwrj\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"wgxql\":\"kxxi\",\"qfkyfhiwvjaqu\":\"ekotjgxi\",\"nvskpaj\":\"by\"}}") .toObject(PredictionDriftMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("pmoh", model.properties().get("rtlikff")); - Assertions.assertEquals(82.50470090588112D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("xpuckn", model.productionData().dataContext()); + Assertions.assertEquals("kxxi", model.properties().get("wgxql")); + Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, + model.featureDataTypeOverride().get("uajgcqwulynk")); + Assertions.assertEquals(47.449056360869115D, model.metricThresholds().get(0).threshold().value()); + Assertions.assertEquals("huulriqbyo", model.productionData().columns().get("vjgb")); + Assertions.assertEquals("holhujbfw", model.productionData().dataContext()); Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("s", model.productionData().uri()); - Assertions.assertEquals("smg", model.productionData().columns().get("micttrvl")); - Assertions.assertEquals("mklphxwww", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("jkbgnfbr", model.referenceData().uri()); - Assertions.assertEquals("fsunh", model.referenceData().columns().get("evlahxczywyw")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("uqks")); + Assertions.assertEquals("plkys", model.productionData().uri()); + Assertions.assertEquals("yjprxslw", model.referenceData().columns().get("dmcvhtbbz")); + Assertions.assertEquals("fers", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.LITERAL, model.referenceData().jobInputType()); + Assertions.assertEquals("egprkjguwrj", model.referenceData().uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PredictionDriftMonitoringSignal model = new PredictionDriftMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("rtlikff", "pmoh", "qrf", "dzt", "zdteqjmyqxuhg", "gynzfw", "wrrlccklyf", "axnyprijyoxxjxbs")) + .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, + MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) + .withProperties(mapOf("wgxql", "kxxi", "qfkyfhiwvjaqu", "ekotjgxi", "nvskpaj", "by")) + .withFeatureDataTypeOverride(mapOf("uajgcqwulynk", MonitoringFeatureDataType.NUMERICAL)) .withMetricThresholds(Arrays.asList( new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(82.50470090588112D)), + .withThreshold(new MonitoringThreshold().withValue(47.449056360869115D)), new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(17.174727928466226D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("xpuckn") + .withThreshold(new MonitoringThreshold().withValue(9.154683434035892D)), + new PredictionDriftMetricThresholdBase() + .withThreshold(new MonitoringThreshold().withValue(90.31899256760244D)))) + .withProductionData(new MonitoringInputDataBase() + .withColumns(mapOf("vjgb", "huulriqbyo", "uoard", "sxebrslttfyhcdjw", "g", "agttpufpb")) + .withDataContext("holhujbfw") .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("s") - .withColumns(mapOf("micttrvl", "smg", "cjrzvlcivqx", "vjmxokxxamq"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("mklphxwww") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("jkbgnfbr") - .withColumns(mapOf("evlahxczywyw", "fsunh", "axqjf", "ahwcorewcnn", "gewdqbxexfyzn", "ajrfgimom"))) - .withFeatureDataTypeOverride( - mapOf("uqks", MonitoringFeatureDataType.CATEGORICAL, "sfx", MonitoringFeatureDataType.NUMERICAL)); + .withUri("plkys")) + .withReferenceData(new MonitoringInputDataBase() + .withColumns(mapOf("dmcvhtbbz", "yjprxslw", "ihotjecohmxv", "hfvhuwzbxpcqz", "xwieexuyade", "lrrskap", + "ccgrvkcxzznn", "ltfokyksyim")) + .withDataContext("fers") + .withJobInputType(JobInputType.LITERAL) + .withUri("egprkjguwrj")); model = BinaryData.fromObject(model).toObject(PredictionDriftMonitoringSignal.class); Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("pmoh", model.properties().get("rtlikff")); - Assertions.assertEquals(82.50470090588112D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("xpuckn", model.productionData().dataContext()); + Assertions.assertEquals("kxxi", model.properties().get("wgxql")); + Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, + model.featureDataTypeOverride().get("uajgcqwulynk")); + Assertions.assertEquals(47.449056360869115D, model.metricThresholds().get(0).threshold().value()); + Assertions.assertEquals("huulriqbyo", model.productionData().columns().get("vjgb")); + Assertions.assertEquals("holhujbfw", model.productionData().dataContext()); Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("s", model.productionData().uri()); - Assertions.assertEquals("smg", model.productionData().columns().get("micttrvl")); - Assertions.assertEquals("mklphxwww", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("jkbgnfbr", model.referenceData().uri()); - Assertions.assertEquals("fsunh", model.referenceData().columns().get("evlahxczywyw")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("uqks")); + Assertions.assertEquals("plkys", model.productionData().uri()); + Assertions.assertEquals("yjprxslw", model.referenceData().columns().get("dmcvhtbbz")); + Assertions.assertEquals("fers", model.referenceData().dataContext()); + Assertions.assertEquals(JobInputType.LITERAL, model.referenceData().jobInputType()); + Assertions.assertEquals("egprkjguwrj", model.referenceData().uri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java index ee1becf99c9c..0037bdf49a1d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -8,12 +8,12 @@ import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -22,53 +22,53 @@ public final class PrivateEndpointConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"jsprozvcpute\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"mfdatscmdvpj\",\"actionsRequired\":\"lsuuvmkjozkrwfnd\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"7019862e-4533-4693-8853-f0cd6b6c6e89\",\"tenantId\":\"2a954b50-28af-4b69-b3b9-ff3698c39bfa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pvwryoqpsoacc\":{\"principalId\":\"c4839c09-9288-4406-9085-53ead4ae12ad\",\"clientId\":\"8bbf256b-2782-4abf-aeb5-f48b167f634e\"}}},\"location\":\"zakljlahbc\",\"tags\":{\"jakhmsbzjh\":\"fdfdosygexpa\",\"hqtrgqjbpf\":\"rzevdphlxaol\",\"tfell\":\"fsinzgvfcjrwzoxx\",\"lxofpdvhpfxxypin\":\"wfzitonpeqfpjk\"},\"sku\":{\"name\":\"mayhuybbkpodepoo\",\"tier\":\"Standard\",\"size\":\"vamih\",\"family\":\"gnarxzxtheo\",\"capacity\":372211152},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"}") + "{\"properties\":{\"privateEndpoint\":{\"id\":\"zvdudgwdslfhotwm\",\"subnetArmId\":\"npwlbjnpg\"},\"privateLinkServiceConnectionState\":{\"actionsRequired\":\"tadehxnltyfsopp\",\"description\":\"uesnzwdejbavo\",\"status\":\"Rejected\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"ctbqvudwx\",\"tenantId\":\"dnvowg\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"hbkuofqwey\":{\"principalId\":\"wdkcglhsl\",\"clientId\":\"jdyggdtji\"}}},\"sku\":{\"name\":\"menevfyexfwh\",\"tier\":\"Premium\",\"size\":\"bvyvdcsity\",\"family\":\"aamdect\",\"capacity\":267275595},\"location\":\"qsc\",\"tags\":{\"kgqhcjrefovg\":\"pvhez\",\"jpkcattpng\":\"kqsleyyvxy\",\"czsqpjhvm\":\"cr\"},\"id\":\"jvnysounqe\",\"name\":\"a\",\"type\":\"oaeupfhyhltrpmo\"}") .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zakljlahbc", model.location()); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals("mayhuybbkpodepoo", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("vamih", model.sku().size()); - Assertions.assertEquals("gnarxzxtheo", model.sku().family()); - Assertions.assertEquals(372211152, model.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("menevfyexfwh", model.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); + Assertions.assertEquals("bvyvdcsity", model.sku().size()); + Assertions.assertEquals("aamdect", model.sku().family()); + Assertions.assertEquals(267275595, model.sku().capacity()); + Assertions.assertEquals("qsc", model.location()); + Assertions.assertEquals("pvhez", model.tags().get("kgqhcjrefovg")); + Assertions.assertEquals("tadehxnltyfsopp", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("uesnzwdejbavo", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mfdatscmdvpj", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lsuuvmkjozkrwfnd", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("pvwryoqpsoacc", new UserAssignedIdentity()))) - .withLocation("zakljlahbc") - .withTags(mapOf("jakhmsbzjh", "fdfdosygexpa", "hqtrgqjbpf", "rzevdphlxaol", "tfell", "fsinzgvfcjrwzoxx", - "lxofpdvhpfxxypin", "wfzitonpeqfpjk")) - .withSku(new Sku().withName("mayhuybbkpodepoo") - .withTier(SkuTier.STANDARD) - .withSize("vamih") - .withFamily("gnarxzxtheo") - .withCapacity(372211152)) - .withPrivateEndpoint(new PrivateEndpoint()) + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("hbkuofqwey", new UserAssignedIdentity()))) + .withSku(new Sku().withName("menevfyexfwh") + .withTier(SkuTier.PREMIUM) + .withSize("bvyvdcsity") + .withFamily("aamdect") + .withCapacity(267275595)) + .withLocation("qsc") + .withTags(mapOf("kgqhcjrefovg", "pvhez", "jpkcattpng", "kqsleyyvxy", "czsqpjhvm", "cr")) + .withPrivateEndpoint(new WorkspacePrivateEndpointResource()) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("mfdatscmdvpj") - .withActionsRequired("lsuuvmkjozkrwfnd")); + new PrivateLinkServiceConnectionState().withActionsRequired("tadehxnltyfsopp") + .withDescription("uesnzwdejbavo") + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED)); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zakljlahbc", model.location()); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals("mayhuybbkpodepoo", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("vamih", model.sku().size()); - Assertions.assertEquals("gnarxzxtheo", model.sku().family()); - Assertions.assertEquals(372211152, model.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); + Assertions.assertEquals("menevfyexfwh", model.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); + Assertions.assertEquals("bvyvdcsity", model.sku().size()); + Assertions.assertEquals("aamdect", model.sku().family()); + Assertions.assertEquals(267275595, model.sku().capacity()); + Assertions.assertEquals("qsc", model.location()); + Assertions.assertEquals("pvhez", model.tags().get("kgqhcjrefovg")); + Assertions.assertEquals("tadehxnltyfsopp", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("uesnzwdejbavo", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mfdatscmdvpj", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lsuuvmkjozkrwfnd", model.privateLinkServiceConnectionState().actionsRequired()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java index 30ee0d402165..b14995b148fb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java @@ -1,93 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.implementation.models.PrivateEndpointConnectionListResult; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class PrivateEndpointConnectionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"ixisxyawjoy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"lyjpk\",\"actionsRequired\":\"dzyexznelixh\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"428d0cb0-8c12-44d5-b252-76000bc1d935\",\"tenantId\":\"f4f8d2be-887c-4354-92ba-25a99a96f6e0\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"knalaulppg\":{\"principalId\":\"1df48505-2f4c-46e9-a6c1-083d560032d5\",\"clientId\":\"e6efcb15-b4b5-4cd9-a646-c87614610d11\"},\"pnapnyiropuh\":{\"principalId\":\"e8ff1dfc-ab01-42fa-b808-9ecf16483ab8\",\"clientId\":\"f9a7da4b-ec5c-45cf-902a-a6bf525b29c1\"},\"vpgylgqgitxmed\":{\"principalId\":\"69de999a-08c9-4be5-8d89-098f1cb44432\",\"clientId\":\"eca6c331-dc16-48ec-a4b5-69fed487c753\"},\"slynqwwnc\":{\"principalId\":\"4578118c-32fd-493e-b0fe-373d0f63c7be\",\"clientId\":\"2c28c670-8b11-4634-9d9e-3032b463722b\"}}},\"location\":\"zhxgktrmgucn\",\"tags\":{\"oellwp\":\"t\"},\"sku\":{\"name\":\"d\",\"tier\":\"Standard\",\"size\":\"qbuaceopzfqr\",\"family\":\"uaopppcqeq\",\"capacity\":1990032205},\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"}]}") + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"ofmftasp\",\"subnetArmId\":\"reihuftrnigh\"},\"privateLinkServiceConnectionState\":{\"actionsRequired\":\"uwqxungrobgw\",\"description\":\"sxjwdy\",\"status\":\"Pending\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"ow\",\"tenantId\":\"geerclbl\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ruccwmecbtxsytr\":{\"principalId\":\"achyeurjwmvw\",\"clientId\":\"vdifkiikg\"}}},\"sku\":{\"name\":\"xe\",\"tier\":\"Basic\",\"size\":\"qjywi\",\"family\":\"vycfjncindi\",\"capacity\":37112688},\"location\":\"ajwjuriarsbcll\",\"tags\":{\"njxizbax\":\"zc\",\"mlxppdndzkfevuii\":\"ygzkztxfexwacyy\",\"kcj\":\"iib\"},\"id\":\"qdcizeqqfopvnopm\",\"name\":\"tdsfh\",\"type\":\"xqlyoazyfbkmvl\"}],\"nextLink\":\"mxojzsvmaigbqk\"}") .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("zhxgktrmgucn", model.value().get(0).location()); - Assertions.assertEquals("t", model.value().get(0).tags().get("oellwp")); - Assertions.assertEquals("d", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("qbuaceopzfqr", model.value().get(0).sku().size()); - Assertions.assertEquals("uaopppcqeq", model.value().get(0).sku().family()); - Assertions.assertEquals(1990032205, model.value().get(0).sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lyjpk", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dzyexznelixh", + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("xe", model.value().get(0).sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); + Assertions.assertEquals("qjywi", model.value().get(0).sku().size()); + Assertions.assertEquals("vycfjncindi", model.value().get(0).sku().family()); + Assertions.assertEquals(37112688, model.value().get(0).sku().capacity()); + Assertions.assertEquals("ajwjuriarsbcll", model.value().get(0).location()); + Assertions.assertEquals("zc", model.value().get(0).tags().get("njxizbax")); + Assertions.assertEquals("uwqxungrobgw", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model - = new PrivateEndpointConnectionListResult() - .withValue( - Arrays.asList(new PrivateEndpointConnectionInner() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("knalaulppg", new UserAssignedIdentity(), "pnapnyiropuh", - new UserAssignedIdentity(), "vpgylgqgitxmed", new UserAssignedIdentity(), "slynqwwnc", - new UserAssignedIdentity()))) - .withLocation("zhxgktrmgucn") - .withTags(mapOf("oellwp", "t")) - .withSku(new Sku().withName("d") - .withTier(SkuTier.STANDARD) - .withSize("qbuaceopzfqr") - .withFamily("uaopppcqeq") - .withCapacity(1990032205)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("lyjpk") - .withActionsRequired("dzyexznelixh")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("zhxgktrmgucn", model.value().get(0).location()); - Assertions.assertEquals("t", model.value().get(0).tags().get("oellwp")); - Assertions.assertEquals("d", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("qbuaceopzfqr", model.value().get(0).sku().size()); - Assertions.assertEquals("uaopppcqeq", model.value().get(0).sku().family()); - Assertions.assertEquals(1990032205, model.value().get(0).sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals("sxjwdy", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lyjpk", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dzyexznelixh", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - // 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; + Assertions.assertEquals("mxojzsvmaigbqk", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java index a3941d8ea35a..50747ecd67d7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java @@ -1,40 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import org.junit.jupiter.api.Assertions; public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"gispemvtzfkufubl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"qeof\",\"actionsRequired\":\"e\"},\"provisioningState\":\"Deleting\"}") + "{\"privateEndpoint\":{\"id\":\"cma\",\"subnetArmId\":\"okth\"},\"privateLinkServiceConnectionState\":{\"actionsRequired\":\"uaodsfcpk\",\"description\":\"odpuozmyzydag\",\"status\":\"Timeout\"},\"provisioningState\":\"Succeeded\"}") .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals("uaodsfcpk", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("odpuozmyzydag", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.TIMEOUT, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("e", model.privateLinkServiceConnectionState().actionsRequired()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionProperties model - = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new WorkspacePrivateEndpointResource()) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("qeof") - .withActionsRequired("e")); + new PrivateLinkServiceConnectionState().withActionsRequired("uaodsfcpk") + .withDescription("odpuozmyzydag") + .withStatus(PrivateEndpointServiceConnectionStatus.TIMEOUT)); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals("uaodsfcpk", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("odpuozmyzydag", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.TIMEOUT, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("e", model.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java index 0ae4983a2384..a257966e9394 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java @@ -1,24 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; @@ -31,48 +31,48 @@ public final class PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"hdbitq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jsgomrih\",\"actionsRequired\":\"grmsdbv\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"df52856d-4e2e-4dc3-82db-75118299d198\",\"tenantId\":\"8769944d-3a45-4ec5-b03c-8604ec7e8a5d\",\"type\":\"None\",\"userAssignedIdentities\":{\"dpbceh\":{\"principalId\":\"47e93559-498d-47de-90c5-a018e74d5b91\",\"clientId\":\"48daa439-430b-49e9-85a5-35d609d55ac6\"},\"psesboynpyt\":{\"principalId\":\"e827b970-cd6b-4ebe-9d9b-092146e41889\",\"clientId\":\"126fa503-83f6-4234-977c-5282ac54919c\"},\"rvkxtfctaneti\":{\"principalId\":\"76b4cd46-b1ec-4b33-ad1d-2aaadb7ea4a1\",\"clientId\":\"97bcfbf0-b95c-4639-b831-72698ac5a272\"},\"dhnpjnezjighdu\":{\"principalId\":\"58557c6a-9dec-46ee-b446-622e9330040b\",\"clientId\":\"6d964002-7aeb-48a7-81c9-29cddb3c0cd6\"}}},\"location\":\"tpmrzwvwetqf\",\"tags\":{\"bsotoc\":\"vfhuqhngqqx\",\"atwxpxb\":\"mrttujyd\"},\"sku\":{\"name\":\"dhxbboceksramqc\",\"tier\":\"Premium\",\"size\":\"fnlvvkswurxdq\",\"family\":\"hauimn\",\"capacity\":1536425318},\"id\":\"q\",\"name\":\"wq\",\"type\":\"nbnwi\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"nvb\",\"subnetArmId\":\"otghxkrrpmgdoli\"},\"privateLinkServiceConnectionState\":{\"actionsRequired\":\"sglavdtt\",\"description\":\"djqomzrqkjqcsh\",\"status\":\"Pending\"},\"provisioningState\":\"Failed\"},\"identity\":{\"principalId\":\"yrcik\",\"tenantId\":\"moufjuq\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"usvp\":{\"principalId\":\"vjy\",\"clientId\":\"zmleuqxhmrilwkc\"}}},\"sku\":{\"name\":\"a\",\"tier\":\"Basic\",\"size\":\"znfxdqqzikvgwqi\",\"family\":\"dhas\",\"capacity\":561322142},\"location\":\"exrzxvff\",\"tags\":{\"t\":\"tdmhr\"},\"id\":\"ulkoepsso\",\"name\":\"dibygrqcidi\",\"type\":\"kxikxiqxlxoks\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .define("fy") - .withExistingWorkspace("q", "rtgqrqkk") - .withRegion("eadnyciw") - .withTags(mapOf("vzohabbriz", "lykqadfge", "qsxofxqnkiuok", "adjrsbgailjqovqm", "bhiebruptls", "ltsxooi")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("fiozttcbi", new UserAssignedIdentity(), "gkudsozodwjc", new UserAssignedIdentity(), - "yxryqyc", new UserAssignedIdentity(), "rlcfgdwzauzf", new UserAssignedIdentity()))) - .withSku(new Sku().withName("qzgaqsosrnjlvgrg") - .withTier(SkuTier.PREMIUM) - .withSize("oxrqhjninpeswv") - .withFamily("qkgebz") - .withCapacity(156493894)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.TIMEOUT) - .withDescription("pnyjtu") - .withActionsRequired("zyvextchslro")) + .define("npclnmjkydh") + .withExistingWorkspace("dlppuk", "n") + .withRegion("ovcbdsr") + .withTags( + mapOf("ingadkrkny", "qlxnbdjt", "fgwbuxqzf", "jngdfzqcjfqm", "xzyj", "gbqsv", "znfokcb", "wiavmqutgxd")) + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("hvtx", new UserAssignedIdentity(), "hdkvkqjjouh", + new UserAssignedIdentity(), "gosrbullqnfzsegu", new UserAssignedIdentity()))) + .withSku(new Sku().withName("bzmix") + .withTier(SkuTier.FREE) + .withSize("nkvtzdvxsgdaajl") + .withFamily("suqm") + .withCapacity(549392997)) + .withPrivateEndpoint(new WorkspacePrivateEndpointResource()) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState().withActionsRequired("e") + .withDescription("merpbctrwrvn") + .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED)) .create(); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("tpmrzwvwetqf", response.location()); - Assertions.assertEquals("vfhuqhngqqx", response.tags().get("bsotoc")); - Assertions.assertEquals("dhxbboceksramqc", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("fnlvvkswurxdq", response.sku().size()); - Assertions.assertEquals("hauimn", response.sku().family()); - Assertions.assertEquals(1536425318, response.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); + Assertions.assertEquals("a", response.sku().name()); + Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); + Assertions.assertEquals("znfxdqqzikvgwqi", response.sku().size()); + Assertions.assertEquals("dhas", response.sku().family()); + Assertions.assertEquals(561322142, response.sku().capacity()); + Assertions.assertEquals("exrzxvff", response.location()); + Assertions.assertEquals("tdmhr", response.tags().get("t")); + Assertions.assertEquals("sglavdtt", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("djqomzrqkjqcsh", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jsgomrih", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("grmsdbv", response.privateLinkServiceConnectionState().actionsRequired()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java index 9fda9a41d854..c91dccecfcf7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.privateEndpointConnections() - .deleteWithResponse("vudyhgtrttcuayi", "ylnkmmxzifbqg", "exo", com.azure.core.util.Context.NONE); + .deleteWithResponse("bunmjhacfiyryw", "rys", "reebjmslb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index bfd0ba0e23ae..f66b3af10108 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -24,30 +24,30 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"kefkzlxvcozcgoeo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"cbnunzuysajvvq\",\"actionsRequired\":\"o\"},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"4e30d8d2-f312-4638-8a62-5306572077f5\",\"tenantId\":\"aa47c843-683d-4cdb-8414-00130b4e60e2\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"btkqjqjcajg\":{\"principalId\":\"20b6abcb-9548-421c-aa89-089c5c3ae6fb\",\"clientId\":\"9e1713c0-2a5e-4804-9d3c-fa3b784455f2\"}}},\"location\":\"y\",\"tags\":{\"mrvkxeojtdyulglh\":\"hk\",\"xspxgogypbztgae\":\"lwruklfq\"},\"sku\":{\"name\":\"nskvctvuz\",\"tier\":\"Basic\",\"size\":\"ttmhlvr\",\"family\":\"yxrnwukfajnpdwz\",\"capacity\":803272560},\"id\":\"wdepemziayfi\",\"name\":\"ii\",\"type\":\"xcor\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"uxx\",\"subnetArmId\":\"imnchvkjw\"},\"privateLinkServiceConnectionState\":{\"actionsRequired\":\"agcsmrtepsy\",\"description\":\"gtfozysfjdc\",\"status\":\"Disconnected\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"elmsz\",\"tenantId\":\"tneltnbyvb\",\"type\":\"None\",\"userAssignedIdentities\":{\"byqqon\":{\"principalId\":\"mududwecdsybi\",\"clientId\":\"fvxdkwvceqly\"},\"xyfpkdsldywrwvsw\":{\"principalId\":\"ekiojusmdo\",\"clientId\":\"ukycntaovlyy\"},\"ekqzfwlkyrnmgsb\":{\"principalId\":\"jlbkqygszh\",\"clientId\":\"atlt\"},\"erzsnfgmo\":{\"principalId\":\"zfayyuq\",\"clientId\":\"wrtre\"}}},\"sku\":{\"name\":\"cghvsmvvfpkym\",\"tier\":\"Basic\",\"size\":\"wfaorulboawzplwg\",\"family\":\"gqoarmtuprqtcx\",\"capacity\":1276935605},\"location\":\"upya\",\"tags\":{\"vsboz\":\"ejpar\",\"zjbwmrdlnb\":\"jbdyyxhj\",\"bhgzffemryoiaobb\":\"lhwrikrul\",\"bliibxol\":\"cdlccqumvb\"},\"id\":\"nxxjfi\",\"name\":\"rukw\",\"type\":\"caagzlqosgzgsgz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("ymgbfmd", "uyyaescjxna", "pyxqbkxdtbfkih", com.azure.core.util.Context.NONE) + .getWithResponse("bblh", "mxxxpnk", "cljnkm", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("y", response.location()); - Assertions.assertEquals("hk", response.tags().get("mrvkxeojtdyulglh")); - Assertions.assertEquals("nskvctvuz", response.sku().name()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("cghvsmvvfpkym", response.sku().name()); Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("ttmhlvr", response.sku().size()); - Assertions.assertEquals("yxrnwukfajnpdwz", response.sku().family()); - Assertions.assertEquals(803272560, response.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals("wfaorulboawzplwg", response.sku().size()); + Assertions.assertEquals("gqoarmtuprqtcx", response.sku().family()); + Assertions.assertEquals(1276935605, response.sku().capacity()); + Assertions.assertEquals("upya", response.location()); + Assertions.assertEquals("ejpar", response.tags().get("vsboz")); + Assertions.assertEquals("agcsmrtepsy", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("gtfozysfjdc", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("cbnunzuysajvvq", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("o", response.privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java index cd7211f8bf9d..231174de7300 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -25,32 +25,31 @@ public final class PrivateEndpointConnectionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"urhvifqeqfs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"kitlwgebylpz\",\"actionsRequired\":\"ldaqwjun\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"cf01a30f-2d6c-4526-96b5-061089f6b3dc\",\"tenantId\":\"95b0e625-c1a4-4838-9d14-c9e534f2e9aa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"sypo\":{\"principalId\":\"ee98b5c3-7c30-4f31-9fe8-d9602d95e382\",\"clientId\":\"31c874be-b0b2-4362-8925-a45edefa3e41\"},\"kbvzpkodngvnq\":{\"principalId\":\"3c120bd5-f08e-4f0d-8ced-e415dbf563bc\",\"clientId\":\"bede4942-5ea9-4013-b1ab-a2129c2fb385\"},\"sbtwgnldxuc\":{\"principalId\":\"72923ffe-ef00-48a8-b09f-ebf43bbc0884\",\"clientId\":\"9e710428-b5a3-4a38-9551-5040aa24a865\"}}},\"location\":\"hvb\",\"tags\":{\"iuvcqoqkqwucqs\":\"znrirp\",\"xcwtvm\":\"g\",\"myvwp\":\"jccpkkjl\",\"nnlb\":\"jmaih\"},\"sku\":{\"name\":\"jppcbq\",\"tier\":\"Basic\",\"size\":\"fppvolzayj\",\"family\":\"unj\",\"capacity\":1717201097},\"id\":\"klatwiuujxsujkrw\",\"name\":\"xeegxbnjnc\",\"type\":\"epdp\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"frfvwuebrvrhwqk\",\"subnetArmId\":\"fvgbkle\"},\"privateLinkServiceConnectionState\":{\"actionsRequired\":\"bwhesbeb\",\"description\":\"mtljzilkyvybl\",\"status\":\"Rejected\"},\"provisioningState\":\"Failed\"},\"identity\":{\"principalId\":\"tzqrm\",\"tenantId\":\"ukurkg\",\"type\":\"None\",\"userAssignedIdentities\":{\"ntvhppykr\":{\"principalId\":\"nrkhc\",\"clientId\":\"fsvfbjcnadwrb\"},\"muxlthyxryvwn\":{\"principalId\":\"ualsvxpolato\",\"clientId\":\"msab\"},\"lemzrw\":{\"principalId\":\"sigddgbcnqvb\",\"clientId\":\"bffcvtij\"},\"icrznaml\":{\"principalId\":\"vgogczgcm\",\"clientId\":\"mkwddgyqe\"}}},\"sku\":{\"name\":\"cbvifcrnx\",\"tier\":\"Premium\",\"size\":\"vgwvfvsqlyah\",\"family\":\"oqk\",\"capacity\":338170293},\"location\":\"buzvaxl\",\"tags\":{\"rqzpfpbxl\":\"nwhictsauv\",\"ldonsekazxewnlpc\":\"ddkkoyzsyjvk\",\"xmyfrmfclkyncjya\":\"hczqm\",\"duabqbverbjcts\":\"zzcbohbbavode\"},\"id\":\"vhxnjo\",\"name\":\"vp\",\"type\":\"o\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateEndpointConnections().list("doqkanqtr", "icwhqyrgqmndk", com.azure.core.util.Context.NONE); + = manager.privateEndpointConnections().list("fkiiarl", "dygfjdty", com.azure.core.util.Context.NONE); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("hvb", response.iterator().next().location()); - Assertions.assertEquals("znrirp", response.iterator().next().tags().get("iuvcqoqkqwucqs")); - Assertions.assertEquals("jppcbq", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("fppvolzayj", response.iterator().next().sku().size()); - Assertions.assertEquals("unj", response.iterator().next().sku().family()); - Assertions.assertEquals(1717201097, response.iterator().next().sku().capacity()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("cbvifcrnx", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); + Assertions.assertEquals("vgwvfvsqlyah", response.iterator().next().sku().size()); + Assertions.assertEquals("oqk", response.iterator().next().sku().family()); + Assertions.assertEquals(338170293, response.iterator().next().sku().capacity()); + Assertions.assertEquals("buzvaxl", response.iterator().next().location()); + Assertions.assertEquals("nwhictsauv", response.iterator().next().tags().get("rqzpfpbxl")); + Assertions.assertEquals("bwhesbeb", + response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("mtljzilkyvybl", + response.iterator().next().privateLinkServiceConnectionState().description()); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("kitlwgebylpz", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ldaqwjun", - response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java index c703e58ee68d..1552a8f26d8c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,24 +13,24 @@ public final class PrivateEndpointDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointDestination model = BinaryData.fromString( - "{\"serviceResourceId\":\"qzsaaoq\",\"sparkEnabled\":false,\"sparkStatus\":\"Inactive\",\"subresourceTarget\":\"txjqfiafc\"}") + "{\"serviceResourceId\":\"hrzayvvtpgvdf\",\"sparkEnabled\":true,\"sparkStatus\":\"Failed\",\"subresourceTarget\":\"tutqxlngxlefgug\"}") .toObject(PrivateEndpointDestination.class); - Assertions.assertEquals("qzsaaoq", model.serviceResourceId()); - Assertions.assertEquals(false, model.sparkEnabled()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.sparkStatus()); - Assertions.assertEquals("txjqfiafc", model.subresourceTarget()); + Assertions.assertEquals("hrzayvvtpgvdf", model.serviceResourceId()); + Assertions.assertTrue(model.sparkEnabled()); + Assertions.assertEquals(RuleStatus.FAILED, model.sparkStatus()); + Assertions.assertEquals("tutqxlngxlefgug", model.subresourceTarget()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointDestination model = new PrivateEndpointDestination().withServiceResourceId("qzsaaoq") - .withSparkEnabled(false) - .withSparkStatus(RuleStatus.INACTIVE) - .withSubresourceTarget("txjqfiafc"); + PrivateEndpointDestination model = new PrivateEndpointDestination().withServiceResourceId("hrzayvvtpgvdf") + .withSparkEnabled(true) + .withSparkStatus(RuleStatus.FAILED) + .withSubresourceTarget("tutqxlngxlefgug"); model = BinaryData.fromObject(model).toObject(PrivateEndpointDestination.class); - Assertions.assertEquals("qzsaaoq", model.serviceResourceId()); - Assertions.assertEquals(false, model.sparkEnabled()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.sparkStatus()); - Assertions.assertEquals("txjqfiafc", model.subresourceTarget()); + Assertions.assertEquals("hrzayvvtpgvdf", model.serviceResourceId()); + Assertions.assertTrue(model.sparkEnabled()); + Assertions.assertEquals(RuleStatus.FAILED, model.sparkStatus()); + Assertions.assertEquals("tutqxlngxlefgug", model.subresourceTarget()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java index de9723293ff4..e168d18d2f5c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -9,36 +9,40 @@ import com.azure.resourcemanager.machinelearning.models.PrivateEndpointOutboundRule; import com.azure.resourcemanager.machinelearning.models.RuleCategory; import com.azure.resourcemanager.machinelearning.models.RuleStatus; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class PrivateEndpointOutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointOutboundRule model = BinaryData.fromString( - "{\"type\":\"PrivateEndpoint\",\"destination\":{\"serviceResourceId\":\"zvoikvntwczf\",\"sparkEnabled\":true,\"sparkStatus\":\"Active\",\"subresourceTarget\":\"cxpblalhhezpfk\"},\"category\":\"Required\",\"status\":\"Active\"}") + "{\"type\":\"PrivateEndpoint\",\"destination\":{\"serviceResourceId\":\"jpgd\",\"sparkEnabled\":true,\"sparkStatus\":\"Active\",\"subresourceTarget\":\"xhvpmoue\"},\"fqdns\":[\"zxibqeoj\",\"xqbzvddntwnd\",\"icbtwnpzao\",\"vuhrhcffcyddgl\"],\"category\":\"Required\",\"status\":\"Failed\",\"errorInformation\":\"kw\",\"parentRuleNames\":[\"icxm\",\"ciwqvhk\",\"ixuigdtopbobj\",\"ghmewuam\"]}") .toObject(PrivateEndpointOutboundRule.class); Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("zvoikvntwczf", model.destination().serviceResourceId()); - Assertions.assertEquals(true, model.destination().sparkEnabled()); + Assertions.assertEquals(RuleStatus.FAILED, model.status()); + Assertions.assertEquals("jpgd", model.destination().serviceResourceId()); + Assertions.assertTrue(model.destination().sparkEnabled()); Assertions.assertEquals(RuleStatus.ACTIVE, model.destination().sparkStatus()); - Assertions.assertEquals("cxpblalhhezpfk", model.destination().subresourceTarget()); + Assertions.assertEquals("xhvpmoue", model.destination().subresourceTarget()); + Assertions.assertEquals("zxibqeoj", model.fqdns().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointOutboundRule model = new PrivateEndpointOutboundRule().withCategory(RuleCategory.REQUIRED) - .withStatus(RuleStatus.ACTIVE) - .withDestination(new PrivateEndpointDestination().withServiceResourceId("zvoikvntwczf") + .withStatus(RuleStatus.FAILED) + .withDestination(new PrivateEndpointDestination().withServiceResourceId("jpgd") .withSparkEnabled(true) .withSparkStatus(RuleStatus.ACTIVE) - .withSubresourceTarget("cxpblalhhezpfk")); + .withSubresourceTarget("xhvpmoue")) + .withFqdns(Arrays.asList("zxibqeoj", "xqbzvddntwnd", "icbtwnpzao", "vuhrhcffcyddgl")); model = BinaryData.fromObject(model).toObject(PrivateEndpointOutboundRule.class); Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("zvoikvntwczf", model.destination().serviceResourceId()); - Assertions.assertEquals(true, model.destination().sparkEnabled()); + Assertions.assertEquals(RuleStatus.FAILED, model.status()); + Assertions.assertEquals("jpgd", model.destination().serviceResourceId()); + Assertions.assertTrue(model.destination().sparkEnabled()); Assertions.assertEquals(RuleStatus.ACTIVE, model.destination().sparkStatus()); - Assertions.assertEquals("cxpblalhhezpfk", model.destination().subresourceTarget()); + Assertions.assertEquals("xhvpmoue", model.destination().subresourceTarget()); + Assertions.assertEquals("zxibqeoj", model.fqdns().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java index ce553461500d..07a7da407647 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class PrivateEndpointResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointResource model = BinaryData.fromString("{\"subnetArmId\":\"ekvz\",\"id\":\"xyxhighctxbxmo\"}") + PrivateEndpointResource model = BinaryData.fromString("{\"subnetArmId\":\"zwl\",\"id\":\"wxuqlcvydypatdoo\"}") .toObject(PrivateEndpointResource.class); - Assertions.assertEquals("ekvz", model.subnetArmId()); + Assertions.assertEquals("zwl", model.subnetArmId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointResource model = new PrivateEndpointResource().withSubnetArmId("ekvz"); + PrivateEndpointResource model = new PrivateEndpointResource().withSubnetArmId("zwl"); model = BinaryData.fromObject(model).toObject(PrivateEndpointResource.class); - Assertions.assertEquals("ekvz", model.subnetArmId()); + Assertions.assertEquals("zwl", model.subnetArmId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java index 50da88517abc..0efd1559a786 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,7 +10,7 @@ public final class PrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"jbasvmsmjqulngs\"}").toObject(PrivateEndpoint.class); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"jkniodko\"}").toObject(PrivateEndpoint.class); } @org.junit.jupiter.api.Test diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceInnerTests.java new file mode 100644 index 000000000000..3d9b6a8cfa2b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceInnerTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"identity\":{\"principalId\":\"affjkrtnh\",\"tenantId\":\"vimxmaxcjppit\",\"type\":\"None\",\"userAssignedIdentities\":{\"rlcydjht\":{\"principalId\":\"dsoqtbfkvuo\",\"clientId\":\"zchnqekwanklp\"},\"npdrgnmzaofroe\":{\"principalId\":\"serwiyndurdonkg\",\"clientId\":\"xblrdolenrsw\"},\"nrtv\":{\"principalId\":\"ckievyr\",\"clientId\":\"yoybkqftusdw\"},\"nmsg\":{\"principalId\":\"ucnnrovom\",\"clientId\":\"xwsicvwqzocsfshe\"}}},\"location\":\"wdibu\",\"properties\":{\"groupId\":\"rga\",\"requiredMembers\":[\"rhryibrbknuub\",\"cwojt\"],\"requiredZoneNames\":[\"d\",\"npyeevffifu\",\"gtdow\"]},\"sku\":{\"name\":\"mwefcbyb\",\"tier\":\"Standard\",\"size\":\"tczwjcujyznv\",\"family\":\"jqdjlgkuirxxeuwi\",\"capacity\":1352230897},\"tags\":{\"gbdviwx\":\"n\",\"yexb\":\"hktxagfujdbqj\",\"tpvev\":\"xgxqqqasfeooq\"},\"id\":\"rphklqlii\",\"name\":\"eanuwg\",\"type\":\"nofgijydgsebju\"}") + .toObject(PrivateLinkResourceInner.class); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); + Assertions.assertEquals("wdibu", model.location()); + Assertions.assertEquals("mwefcbyb", model.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); + Assertions.assertEquals("tczwjcujyznv", model.sku().size()); + Assertions.assertEquals("jqdjlgkuirxxeuwi", model.sku().family()); + Assertions.assertEquals(1352230897, model.sku().capacity()); + Assertions.assertEquals("n", model.tags().get("gbdviwx")); + Assertions.assertEquals("rga", model.groupId()); + Assertions.assertEquals("rhryibrbknuub", model.requiredMembers().get(0)); + Assertions.assertEquals("d", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java deleted file mode 100644 index 94f876895e58..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"kxbpvj\",\"requiredMembers\":[\"hx\",\"j\"],\"requiredZoneNames\":[\"u\",\"ivkrtsw\",\"xqzvszjfa\",\"vjfdx\"]},\"identity\":{\"principalId\":\"cde7106e-f687-457b-953d-160358a98cb8\",\"tenantId\":\"b2a0392a-e179-4547-bb44-cbac7877dc8e\",\"type\":\"None\",\"userAssignedIdentities\":{\"aqtdoqmcbx\":{\"principalId\":\"9389f316-753e-4d08-a143-e831c8706855\",\"clientId\":\"71473aad-896e-43bb-905c-9f8590405541\"}}},\"location\":\"vxysl\",\"tags\":{\"tkblmpewww\":\"sfxobl\",\"hxcr\":\"bkrvrnsvshqj\",\"sub\":\"bfovasrruvwbhsq\"},\"sku\":{\"name\":\"jbi\",\"tier\":\"Standard\",\"size\":\"ybsrfbjfdtwss\",\"family\":\"ftpvjzbexil\",\"capacity\":1948356330},\"id\":\"qqnvwpmq\",\"name\":\"aruoujmkcjhwqyt\",\"type\":\"r\"},{\"properties\":{\"groupId\":\"wj\",\"requiredMembers\":[\"drjervnaenqpehin\",\"oygmift\",\"nzdndslgna\",\"qig\"],\"requiredZoneNames\":[\"uhavhql\",\"thuma\",\"olbgycduiertgccy\"]},\"identity\":{\"principalId\":\"8910f182-37ab-4413-a0c8-0ba60bcbc8e4\",\"tenantId\":\"7b8f494f-ab18-4c0a-b288-eec3e51f7ffd\",\"type\":\"None\",\"userAssignedIdentities\":{\"qlfmmdnbb\":{\"principalId\":\"c00154c9-b7bd-4a3e-8175-9d4a4d3a953e\",\"clientId\":\"52ebf4da-e9ed-4098-9312-15cbc1e98be0\"}}},\"location\":\"zpswiydmc\",\"tags\":{\"dbzm\":\"zdxss\",\"cblylpstdbhhxsr\":\"vdfznudaodvxzb\",\"erscdntne\":\"dzu\"},\"sku\":{\"name\":\"iwjmygtdssls\",\"tier\":\"Standard\",\"size\":\"eriofzpyqs\",\"family\":\"wab\",\"capacity\":334511461},\"id\":\"hhszh\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"}]}") - .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("vxysl", model.value().get(0).location()); - Assertions.assertEquals("sfxobl", model.value().get(0).tags().get("tkblmpewww")); - Assertions.assertEquals("jbi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("ybsrfbjfdtwss", model.value().get(0).sku().size()); - Assertions.assertEquals("ftpvjzbexil", model.value().get(0).sku().family()); - Assertions.assertEquals(1948356330, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResultInner model = new PrivateLinkResourceListResultInner().withValue(Arrays.asList( - new PrivateLinkResource() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("aqtdoqmcbx", new UserAssignedIdentity()))) - .withLocation("vxysl") - .withTags(mapOf("tkblmpewww", "sfxobl", "hxcr", "bkrvrnsvshqj", "sub", "bfovasrruvwbhsq")) - .withSku(new Sku().withName("jbi") - .withTier(SkuTier.STANDARD) - .withSize("ybsrfbjfdtwss") - .withFamily("ftpvjzbexil") - .withCapacity(1948356330)) - .withRequiredZoneNames(Arrays.asList("u", "ivkrtsw", "xqzvszjfa", "vjfdx")), - new PrivateLinkResource() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("qlfmmdnbb", new UserAssignedIdentity()))) - .withLocation("zpswiydmc") - .withTags(mapOf("dbzm", "zdxss", "cblylpstdbhhxsr", "vdfznudaodvxzb", "erscdntne", "dzu")) - .withSku(new Sku().withName("iwjmygtdssls") - .withTier(SkuTier.STANDARD) - .withSize("eriofzpyqs") - .withFamily("wab") - .withCapacity(334511461)) - .withRequiredZoneNames(Arrays.asList("uhavhql", "thuma", "olbgycduiertgccy")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("vxysl", model.value().get(0).location()); - Assertions.assertEquals("sfxobl", model.value().get(0).tags().get("tkblmpewww")); - Assertions.assertEquals("jbi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("ybsrfbjfdtwss", model.value().get(0).sku().size()); - Assertions.assertEquals("ftpvjzbexil", model.value().get(0).sku().family()); - Assertions.assertEquals(1948356330, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).requiredZoneNames().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultTests.java new file mode 100644 index 000000000000..1c9bb6e1681d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultTests.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"identity\":{\"principalId\":\"haevlah\",\"tenantId\":\"zywywuah\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mggewdqbxexfy\":{\"principalId\":\"wcnnaax\",\"clientId\":\"fdajrfgim\"},\"yzqbye\":{\"principalId\":\"vussuqks\",\"clientId\":\"sfx\"},\"fbgynzfwv\":{\"principalId\":\"pmoh\",\"clientId\":\"tlikffydztkq\"},\"wrrlccklyf\":{\"principalId\":\"teqjmyqxuhgk\",\"clientId\":\"nyprijyoxxjxbs\"}}},\"location\":\"ms\",\"properties\":{\"groupId\":\"emqom\",\"requiredMembers\":[\"lknuyapvibzicyvi\",\"hcaptkhjx\",\"rkbn\",\"fcck\"],\"requiredZoneNames\":[\"znfgvlx\"]},\"sku\":{\"name\":\"mnctigp\",\"tier\":\"Premium\",\"size\":\"icklktgkdprtq\",\"family\":\"tdcf\",\"capacity\":42621527},\"tags\":{\"xc\":\"dwbvjsbgmlamo\"},\"id\":\"tnpkvbpblt\",\"name\":\"wsexheeocnqou\",\"type\":\"vepvlryszfhdxyf\"},{\"identity\":{\"principalId\":\"hzbzhhavz\",\"tenantId\":\"xnvkdslcofuvtfue\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"spmjvailfauyv\":{\"principalId\":\"aklhjfddxqfuss\",\"clientId\":\"z\"},\"dwvog\":{\"principalId\":\"q\",\"clientId\":\"kqdgwbztrth\"},\"hcnsdyl\":{\"principalId\":\"fjdhgslorm\",\"clientId\":\"tofcvxky\"}}},\"location\":\"qunkygb\",\"properties\":{\"groupId\":\"s\",\"requiredMembers\":[\"edw\",\"xtzhgbgbhud\",\"rpjimvrrqfi\",\"pkwmamrlfizjud\"],\"requiredZoneNames\":[\"ih\"]},\"sku\":{\"name\":\"ngy\",\"tier\":\"Free\",\"size\":\"yafewcmodxw\",\"family\":\"ytxnxrqx\",\"capacity\":524714647},\"tags\":{\"dhweigny\":\"rgvfvkhbjhmvpjx\",\"vmwgvconyse\":\"ffqcwwynepk\",\"ouoxfalo\":\"jijfhpxni\",\"ynieunbydlgfaphw\":\"bskkypor\"},\"id\":\"bwtsaynrt\",\"name\":\"jfqreeo\",\"type\":\"vqjmrnblihs\"},{\"identity\":{\"principalId\":\"bmdivixzhpjgq\",\"tenantId\":\"iaoaweacfxa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"rrjsurnowobw\":{\"principalId\":\"uetcnx\",\"clientId\":\"qzzdckhsq\"},\"huv\":{\"principalId\":\"xmyokohlsfjf\",\"clientId\":\"qjpzhe\"},\"ly\":{\"principalId\":\"xqkvadmjhymudjma\",\"clientId\":\"zdebhserm\"},\"ybloccu\":{\"principalId\":\"wu\",\"clientId\":\"qkaaptbssvkbcbpt\"}}},\"location\":\"lxzbnsshvqn\",\"properties\":{\"groupId\":\"beuybutcdzjf\",\"requiredMembers\":[\"peyxdyuxurxr\",\"tqmmijgpqfkwna\",\"ikczscymqfv\",\"g\"],\"requiredZoneNames\":[\"nyumzapdokezvp\",\"zk\"]},\"sku\":{\"name\":\"zqnzbflbqm\",\"tier\":\"Basic\",\"size\":\"xxvwedhagq\",\"family\":\"seseayuflms\",\"capacity\":1997750118},\"tags\":{\"sb\":\"rolrz\",\"ivt\":\"mphzkymunw\",\"wdalisd\":\"uszbdjrdfeuj\"},\"id\":\"n\",\"name\":\"caydzinlooulp\",\"type\":\"zmdahyclxrs\"}],\"nextLink\":\"oebld\"}") + .toObject(PrivateLinkResourceListResult.class); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, + model.value().get(0).identity().type()); + Assertions.assertEquals("ms", model.value().get(0).location()); + Assertions.assertEquals("mnctigp", model.value().get(0).sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); + Assertions.assertEquals("icklktgkdprtq", model.value().get(0).sku().size()); + Assertions.assertEquals("tdcf", model.value().get(0).sku().family()); + Assertions.assertEquals(42621527, model.value().get(0).sku().capacity()); + Assertions.assertEquals("dwbvjsbgmlamo", model.value().get(0).tags().get("xc")); + Assertions.assertEquals("emqom", model.value().get(0).groupId()); + Assertions.assertEquals("lknuyapvibzicyvi", model.value().get(0).requiredMembers().get(0)); + Assertions.assertEquals("znfgvlx", model.value().get(0).requiredZoneNames().get(0)); + Assertions.assertEquals("oebld", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java index 36fe9848a3d5..80074cb86c41 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java @@ -1,28 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"thhqzonosggbh\",\"requiredMembers\":[\"fwdsj\",\"ka\",\"jutiiswacff\",\"dkzzewkfvhqcrail\"],\"requiredZoneNames\":[\"ppfufl\"]}") + "{\"groupId\":\"tevaebzm\",\"requiredMembers\":[\"hrjkejvaedogz\",\"ugxbxxgjogcph\",\"v\",\"hrm\"],\"requiredZoneNames\":[\"fdvdoeary\"]}") .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ppfufl", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model - = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("ppfufl")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ppfufl", model.requiredZoneNames().get(0)); + Assertions.assertEquals("tevaebzm", model.groupId()); + Assertions.assertEquals("hrjkejvaedogz", model.requiredMembers().get(0)); + Assertions.assertEquals("fdvdoeary", model.requiredZoneNames().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java deleted file mode 100644 index 79c2e7a3d5cd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResource model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"wwtppj\",\"requiredMembers\":[\"xogaokonzmnsikv\",\"kqze\",\"qkdltfz\"],\"requiredZoneNames\":[\"hvhgureod\"]},\"identity\":{\"principalId\":\"9eb4de2f-2936-4ce9-bfcb-51753865ab56\",\"tenantId\":\"5cb1d814-ce28-4b4e-a521-655c27e49a54\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ibqdxbxwakbogqx\":{\"principalId\":\"2d8983b7-a94d-48ba-8033-fb5e3622a7bc\",\"clientId\":\"64112d18-bb2c-428e-9638-6bfe894358b5\"},\"kzgxhurip\":{\"principalId\":\"e1c99087-fdd9-49ae-a341-3cb33dee1c63\",\"clientId\":\"02595fad-a21b-4b70-8bd2-dfb910f6c28e\"},\"odxun\":{\"principalId\":\"21ece6e7-4d85-4a6a-ba42-66f87b4a01be\",\"clientId\":\"98117997-e51b-4a84-bbf6-d1ddacc7aae9\"}}},\"location\":\"ebxmubyynt\",\"tags\":{\"ltmuwlauwzizx\":\"bqtkoievseotgqr\",\"d\":\"mpgcjefuzmuvpbt\"},\"sku\":{\"name\":\"orppxebmnzbtb\",\"tier\":\"Basic\",\"size\":\"lkfg\",\"family\":\"dneu\",\"capacity\":2052379315},\"id\":\"hsd\",\"name\":\"htozfikdow\",\"type\":\"quuvxzxcl\"}") - .toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals("orppxebmnzbtb", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("lkfg", model.sku().size()); - Assertions.assertEquals("dneu", model.sku().family()); - Assertions.assertEquals(2052379315, model.sku().capacity()); - Assertions.assertEquals("hvhgureod", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResource model = new PrivateLinkResource() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ibqdxbxwakbogqx", new UserAssignedIdentity(), "kzgxhurip", - new UserAssignedIdentity(), "odxun", new UserAssignedIdentity()))) - .withLocation("ebxmubyynt") - .withTags(mapOf("ltmuwlauwzizx", "bqtkoievseotgqr", "d", "mpgcjefuzmuvpbt")) - .withSku(new Sku().withName("orppxebmnzbtb") - .withTier(SkuTier.BASIC) - .withSize("lkfg") - .withFamily("dneu") - .withCapacity(2052379315)) - .withRequiredZoneNames(Arrays.asList("hvhgureod")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals("orppxebmnzbtb", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("lkfg", model.sku().size()); - Assertions.assertEquals("dneu", model.sku().family()); - Assertions.assertEquals(2052379315, model.sku().capacity()); - Assertions.assertEquals("hvhgureod", model.requiredZoneNames().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListMockTests.java new file mode 100644 index 000000000000..f80cb6a89543 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListMockTests.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +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 PrivateLinkResourcesListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"identity\":{\"principalId\":\"qf\",\"tenantId\":\"wesqykqfserlsai\",\"type\":\"None\",\"userAssignedIdentities\":{\"ubdppowxsxbxdk\":{\"principalId\":\"tagwmzgvnojgm\",\"clientId\":\"kaligoikkehpdssv\"},\"tbu\":{\"principalId\":\"xurcekcqmjqqau\",\"clientId\":\"gh\"},\"vwnqbpxyofft\":{\"principalId\":\"cnkghkrbirshlh\",\"clientId\":\"yod\"}}},\"location\":\"ovbhqelsslfxejp\",\"properties\":{\"groupId\":\"gigsabt\",\"requiredMembers\":[\"yjwmglgstrzfh\",\"hdzovkbcb\",\"fohnymfhml\"],\"requiredZoneNames\":[\"kgfvzvmtjcxi\",\"iszxdbg\"]},\"sku\":{\"name\":\"eet\",\"tier\":\"Free\",\"size\":\"bugizwy\",\"family\":\"hfptbdxtv\",\"capacity\":944655950},\"tags\":{\"iuzytxeaq\":\"sl\"},\"id\":\"mqntutetdtgci\",\"name\":\"brjwiwouepaqnfy\",\"type\":\"grcmcqppledx\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.privateLinkResources().list("mztrnniarje", "jh", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); + Assertions.assertEquals("ovbhqelsslfxejp", response.iterator().next().location()); + Assertions.assertEquals("eet", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); + Assertions.assertEquals("bugizwy", response.iterator().next().sku().size()); + Assertions.assertEquals("hfptbdxtv", response.iterator().next().sku().family()); + Assertions.assertEquals(944655950, response.iterator().next().sku().capacity()); + Assertions.assertEquals("sl", response.iterator().next().tags().get("iuzytxeaq")); + Assertions.assertEquals("gigsabt", response.iterator().next().groupId()); + Assertions.assertEquals("yjwmglgstrzfh", response.iterator().next().requiredMembers().get(0)); + Assertions.assertEquals("kgfvzvmtjcxi", response.iterator().next().requiredZoneNames().get(0)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java deleted file mode 100644 index e07beb8d7187..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.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.machinelearning.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.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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 PrivateLinkResourcesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"r\",\"requiredMembers\":[\"tuwcimtcaumv\",\"udzpsjqrmlujmt\"],\"requiredZoneNames\":[\"ofwuzeb\",\"qvmpjb\",\"zyenfspet\",\"eudwkhdlckdoxocj\"]},\"identity\":{\"principalId\":\"c2c4d25f-b219-4531-a6e4-818157aa4f04\",\"tenantId\":\"c501f775-2837-49de-9b64-4e272ec688dc\",\"type\":\"None\",\"userAssignedIdentities\":{\"reortwwyj\":{}}},\"location\":\"vrlhfxmrhjn\",\"tags\":{\"ksz\":\"cjywkdy\",\"l\":\"vuafanefictpt\",\"z\":\"ossj\",\"aczhfjdccjn\":\"xpzwdqzuhfgt\"},\"sku\":{\"name\":\"vbtcuhjcgjtjknt\",\"tier\":\"Free\",\"size\":\"zthcdbszsbz\",\"family\":\"xeyvidcowlrm\",\"capacity\":1231342742},\"id\":\"qxave\",\"name\":\"oezvwk\",\"type\":\"yzgavplnd\"},{\"properties\":{\"groupId\":\"iekkiskyyyaekn\",\"requiredMembers\":[\"yshdawjlmlcufb\"],\"requiredZoneNames\":[\"utfofhoajjyl\",\"yqyjnufzvl\",\"quyhbceev\",\"girrpwnqtvuxeuj\"]},\"identity\":{\"principalId\":\"30b6d8a5-0e82-4c35-a462-17f3051a784a\",\"tenantId\":\"0d41d391-86be-4578-8ab2-a8d30a81fb4f\",\"type\":\"None\",\"userAssignedIdentities\":{\"axxfdlypkcpw\":{}}},\"location\":\"qnnmjundt\",\"tags\":{\"ycgqakcsihxvt\":\"ltjhb\",\"yxnsbubwh\":\"cwwfopxp\",\"mkdhwqcqweba\":\"qqgugwluxahtq\"},\"sku\":{\"name\":\"fpkeph\",\"tier\":\"Basic\",\"size\":\"c\",\"family\":\"vkke\",\"capacity\":2073355838},\"id\":\"ypaxpjp\",\"name\":\"illgnu\",\"type\":\"ezfpffbuqxkn\"},{\"properties\":{\"groupId\":\"g\",\"requiredMembers\":[\"zyojfch\",\"cp\",\"rexzoksgq\",\"boojuxi\"],\"requiredZoneNames\":[\"blkcrfldfljw\",\"kbptsfl\"]},\"identity\":{\"principalId\":\"746eeafd-ab8f-483b-ad9d-7f168c0be033\",\"tenantId\":\"68f87143-478c-4e61-be0b-badd152065e0\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"gftshfgmuxuqiags\":{},\"oikuqirhsk\":{},\"paowkgvnlfueyxfz\":{},\"brlrjugcfebpi\":{}}},\"location\":\"enbvrllldfknb\",\"tags\":{\"i\":\"ilsxr\"},\"sku\":{\"name\":\"zlwrduxntpfxxgj\",\"tier\":\"Basic\",\"size\":\"fwfctqvey\",\"family\":\"kqynlzxeme\",\"capacity\":1938054109},\"id\":\"ckiehdmvfoyr\",\"name\":\"xxffgmcuanszeerv\",\"type\":\"cgcsapvbcqpf\"},{\"properties\":{\"groupId\":\"kijhmine\",\"requiredMembers\":[\"ivp\",\"rkvorlfqmljewyn\",\"fvvcwvurkmjufa\"],\"requiredZoneNames\":[\"npbsotmynklnm\",\"znmtvrk\",\"fcwxizk\",\"txneykeip\"]},\"identity\":{\"principalId\":\"d4142576-befe-4200-bae4-e1a584382841\",\"tenantId\":\"a22ed680-6d49-4b25-86a6-151508e3bb4f\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"iuvnfaz\":{},\"tvsayyaeiiv\":{},\"qk\":{}}},\"location\":\"jwrvewojoqfxqetx\",\"tags\":{\"uzljvgjijzqj\":\"iusp\",\"hcmecags\":\"ljsazmjsisfq\"},\"sku\":{\"name\":\"eiirpnjygllfkchh\",\"tier\":\"Free\",\"size\":\"zzcajl\",\"family\":\"qcycabaa\",\"capacity\":1883254200},\"id\":\"dhpmkxdujkxpuqzd\",\"name\":\"oqywsuarpzhryh\",\"type\":\"zx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceListResult response = manager.privateLinkResources() - .listWithResponse("lqcw", "zhndqkzstzpzec", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.value().get(0).identity().type()); - Assertions.assertEquals("vrlhfxmrhjn", response.value().get(0).location()); - Assertions.assertEquals("cjywkdy", response.value().get(0).tags().get("ksz")); - Assertions.assertEquals("vbtcuhjcgjtjknt", response.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.value().get(0).sku().tier()); - Assertions.assertEquals("zthcdbszsbz", response.value().get(0).sku().size()); - Assertions.assertEquals("xeyvidcowlrm", response.value().get(0).sku().family()); - Assertions.assertEquals(1231342742, response.value().get(0).sku().capacity()); - Assertions.assertEquals("ofwuzeb", response.value().get(0).requiredZoneNames().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java index 42f3e7068997..ef7502caa7c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,24 +12,22 @@ public final class PrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString( - "{\"status\":\"Disconnected\",\"description\":\"ybkzgcwr\",\"actionsRequired\":\"lxxwrljdouskc\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("ybkzgcwr", model.description()); - Assertions.assertEquals("lxxwrljdouskc", model.actionsRequired()); + PrivateLinkServiceConnectionState model + = BinaryData.fromString("{\"actionsRequired\":\"exim\",\"description\":\"yocf\",\"status\":\"Pending\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals("exim", model.actionsRequired()); + Assertions.assertEquals("yocf", model.description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("ybkzgcwr") - .withActionsRequired("lxxwrljdouskc"); + PrivateLinkServiceConnectionState model = new PrivateLinkServiceConnectionState().withActionsRequired("exim") + .withDescription("yocf") + .withStatus(PrivateEndpointServiceConnectionStatus.PENDING); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("ybkzgcwr", model.description()); - Assertions.assertEquals("lxxwrljdouskc", model.actionsRequired()); + Assertions.assertEquals("exim", model.actionsRequired()); + Assertions.assertEquals("yocf", model.description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java index 350b3951542d..b22fdced5a8b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,27 +13,27 @@ public final class ProbeSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProbeSettings model = BinaryData.fromString( - "{\"failureThreshold\":1074790994,\"successThreshold\":190325570,\"timeout\":\"PT185H38M37S\",\"period\":\"PT155H32M4S\",\"initialDelay\":\"PT161H44M50S\"}") + "{\"failureThreshold\":1965121378,\"initialDelay\":\"PT194H30M32S\",\"period\":\"PT40H1M34S\",\"successThreshold\":1601369019,\"timeout\":\"PT139H55M7S\"}") .toObject(ProbeSettings.class); - Assertions.assertEquals(1074790994, model.failureThreshold()); - Assertions.assertEquals(190325570, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT185H38M37S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT155H32M4S"), model.period()); - Assertions.assertEquals(Duration.parse("PT161H44M50S"), model.initialDelay()); + Assertions.assertEquals(1965121378, model.failureThreshold()); + Assertions.assertEquals(Duration.parse("PT194H30M32S"), model.initialDelay()); + Assertions.assertEquals(Duration.parse("PT40H1M34S"), model.period()); + Assertions.assertEquals(1601369019, model.successThreshold()); + Assertions.assertEquals(Duration.parse("PT139H55M7S"), model.timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProbeSettings model = new ProbeSettings().withFailureThreshold(1074790994) - .withSuccessThreshold(190325570) - .withTimeout(Duration.parse("PT185H38M37S")) - .withPeriod(Duration.parse("PT155H32M4S")) - .withInitialDelay(Duration.parse("PT161H44M50S")); + ProbeSettings model = new ProbeSettings().withFailureThreshold(1965121378) + .withInitialDelay(Duration.parse("PT194H30M32S")) + .withPeriod(Duration.parse("PT40H1M34S")) + .withSuccessThreshold(1601369019) + .withTimeout(Duration.parse("PT139H55M7S")); model = BinaryData.fromObject(model).toObject(ProbeSettings.class); - Assertions.assertEquals(1074790994, model.failureThreshold()); - Assertions.assertEquals(190325570, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT185H38M37S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT155H32M4S"), model.period()); - Assertions.assertEquals(Duration.parse("PT161H44M50S"), model.initialDelay()); + Assertions.assertEquals(1965121378, model.failureThreshold()); + Assertions.assertEquals(Duration.parse("PT194H30M32S"), model.initialDelay()); + Assertions.assertEquals(Duration.parse("PT40H1M34S"), model.period()); + Assertions.assertEquals(1601369019, model.successThreshold()); + Assertions.assertEquals(Duration.parse("PT139H55M7S"), model.timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PromptSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PromptSettingsTests.java new file mode 100644 index 000000000000..f284bb765970 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PromptSettingsTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.PromptSettings; +import org.junit.jupiter.api.Assertions; + +public final class PromptSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PromptSettings model = BinaryData + .fromString("{\"enableChainOfDensity\":true,\"enableChainOfThought\":false,\"maxLenSummary\":2045670323}") + .toObject(PromptSettings.class); + Assertions.assertTrue(model.enableChainOfDensity()); + Assertions.assertFalse(model.enableChainOfThought()); + Assertions.assertEquals(2045670323, model.maxLenSummary()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PromptSettings model = new PromptSettings().withEnableChainOfDensity(true) + .withEnableChainOfThought(false) + .withMaxLenSummary(2045670323); + model = BinaryData.fromObject(model).toObject(PromptSettings.class); + Assertions.assertTrue(model.enableChainOfDensity()); + Assertions.assertFalse(model.enableChainOfThought()); + Assertions.assertEquals(2045670323, model.maxLenSummary()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java index fc850da3cbe4..0ff83323f07b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class PyTorchTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PyTorch model - = BinaryData.fromString("{\"distributionType\":\"PyTorch\",\"processCountPerInstance\":409553371}") + = BinaryData.fromString("{\"distributionType\":\"PyTorch\",\"processCountPerInstance\":1833120942}") .toObject(PyTorch.class); - Assertions.assertEquals(409553371, model.processCountPerInstance()); + Assertions.assertEquals(1833120942, model.processCountPerInstance()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PyTorch model = new PyTorch().withProcessCountPerInstance(409553371); + PyTorch model = new PyTorch().withProcessCountPerInstance(1833120942); model = BinaryData.fromObject(model).toObject(PyTorch.class); - Assertions.assertEquals(409553371, model.processCountPerInstance()); + Assertions.assertEquals(1833120942, model.processCountPerInstance()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java index b2b0a2ec8fb1..2508565cceef 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java index 32b7429c18b1..e0df6044480b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,25 +13,24 @@ public final class QuotaBasePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaBaseProperties model = BinaryData - .fromString( - "{\"id\":\"rbnlankxmyskp\",\"type\":\"enbtkcxywny\",\"limit\":3938572142149816322,\"unit\":\"Count\"}") + .fromString("{\"id\":\"tcvpvdfmo\",\"type\":\"ctfvxuos\",\"limit\":3268468815407857146,\"unit\":\"Count\"}") .toObject(QuotaBaseProperties.class); - Assertions.assertEquals("rbnlankxmyskp", model.id()); - Assertions.assertEquals("enbtkcxywny", model.type()); - Assertions.assertEquals(3938572142149816322L, model.limit()); + Assertions.assertEquals("tcvpvdfmo", model.id()); + Assertions.assertEquals("ctfvxuos", model.type()); + Assertions.assertEquals(3268468815407857146L, model.limit()); Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaBaseProperties model = new QuotaBaseProperties().withId("rbnlankxmyskp") - .withType("enbtkcxywny") - .withLimit(3938572142149816322L) + QuotaBaseProperties model = new QuotaBaseProperties().withId("tcvpvdfmo") + .withType("ctfvxuos") + .withLimit(3268468815407857146L) .withUnit(QuotaUnit.COUNT); model = BinaryData.fromObject(model).toObject(QuotaBaseProperties.class); - Assertions.assertEquals("rbnlankxmyskp", model.id()); - Assertions.assertEquals("enbtkcxywny", model.type()); - Assertions.assertEquals(3938572142149816322L, model.limit()); + Assertions.assertEquals("tcvpvdfmo", model.id()); + Assertions.assertEquals("ctfvxuos", model.type()); + Assertions.assertEquals(3268468815407857146L, model.limit()); Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java index 2e061f125401..0a98656be255 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,36 +15,32 @@ public final class QuotaUpdateParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { QuotaUpdateParameters model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zpuzycisp\",\"type\":\"zahmgkbrpyydhibn\",\"limit\":8775255286630911729,\"unit\":\"Count\"},{\"id\":\"a\",\"type\":\"gvtqagnbuynh\",\"limit\":2182211353058323076,\"unit\":\"Count\"},{\"id\":\"fsiarbutr\",\"type\":\"pnazzm\",\"limit\":4980695192319165499,\"unit\":\"Count\"}],\"location\":\"xttd\"}") + "{\"value\":[{\"id\":\"yjom\",\"type\":\"rvpoipj\",\"limit\":749897299508954230,\"unit\":\"Count\"},{\"id\":\"sewfzvv\",\"type\":\"y\",\"limit\":8245422575175459873,\"unit\":\"Count\"}],\"location\":\"yandblk\"}") .toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("zpuzycisp", model.value().get(0).id()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.value().get(0).type()); - Assertions.assertEquals(8775255286630911729L, model.value().get(0).limit()); + Assertions.assertEquals("yjom", model.value().get(0).id()); + Assertions.assertEquals("rvpoipj", model.value().get(0).type()); + Assertions.assertEquals(749897299508954230L, model.value().get(0).limit()); Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("xttd", model.location()); + Assertions.assertEquals("yandblk", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { QuotaUpdateParameters model = new QuotaUpdateParameters().withValue(Arrays.asList( - new QuotaBaseProperties().withId("zpuzycisp") - .withType("zahmgkbrpyydhibn") - .withLimit(8775255286630911729L) + new QuotaBaseProperties().withId("yjom") + .withType("rvpoipj") + .withLimit(749897299508954230L) .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("a") - .withType("gvtqagnbuynh") - .withLimit(2182211353058323076L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("fsiarbutr") - .withType("pnazzm") - .withLimit(4980695192319165499L) + new QuotaBaseProperties().withId("sewfzvv") + .withType("y") + .withLimit(8245422575175459873L) .withUnit(QuotaUnit.COUNT))) - .withLocation("xttd"); + .withLocation("yandblk"); model = BinaryData.fromObject(model).toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("zpuzycisp", model.value().get(0).id()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.value().get(0).type()); - Assertions.assertEquals(8775255286630911729L, model.value().get(0).limit()); + Assertions.assertEquals("yjom", model.value().get(0).id()); + Assertions.assertEquals("rvpoipj", model.value().get(0).type()); + Assertions.assertEquals(749897299508954230L, model.value().get(0).limit()); Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("xttd", model.location()); + Assertions.assertEquals("yandblk", model.location()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java index b9e3ccc59843..6beb58e7ffdc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ResourceQuota; @@ -21,16 +21,17 @@ public final class QuotasListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"wozfvza\",\"amlWorkspaceLocation\":\"pcvqgxcvwioqh\",\"type\":\"cgmlmpn\",\"name\":{\"value\":\"uyiarznhdqseyp\",\"localizedValue\":\"majpuyxoafrmzgcc\"},\"limit\":5156431097423162014,\"unit\":\"Count\"}]}"; + = "{\"value\":[{\"id\":\"e\",\"amlWorkspaceLocation\":\"igozjrc\",\"type\":\"qugjalmzpfylq\",\"name\":{\"value\":\"wvznpdxcizropz\",\"localizedValue\":\"leecffbhqkvb\"},\"limit\":5328863446862891029,\"unit\":\"Count\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.quotas().list("spt", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.quotas().list("qkzvzqhvzjdsnvt", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java index 5efbb2da2398..bf7b9e8c394b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; @@ -24,31 +24,31 @@ public final class QuotasUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"mabvbmnhtwofxf\",\"type\":\"lvyqnslbqrm\",\"limit\":7940166137323106740,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"}],\"nextLink\":\"qqrugwespscvs\"}"; + = "{\"value\":[{\"id\":\"sxds\",\"type\":\"lefiott\",\"limit\":5613422335987697292,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"},{\"id\":\"tttyhypidzjjjf\",\"type\":\"skpnkkxoicb\",\"limit\":1198639288561542489,\"unit\":\"Count\",\"status\":\"Failure\"},{\"id\":\"cqhvtpmvppvgrigj\",\"type\":\"rlgkoqbzrclar\",\"limit\":1973976960199102306,\"unit\":\"Count\",\"status\":\"Success\"}],\"nextLink\":\"bemoramshqvk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UpdateWorkspaceQuotasResult response = manager.quotas() - .updateWithResponse("fpabwbpzgfg", + .updateWithResponse("kqiqsriubem", new QuotaUpdateParameters().withValue(Arrays.asList( - new QuotaBaseProperties().withId("hgxg") - .withType("abbfpxxa") - .withLimit(1299606997550791380L) + new QuotaBaseProperties().withId("gmrenrbngcafm") + .withType("htkyzsgayngmowv") + .withLimit(3217513276187027362L) .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("sn") - .withType("wyxjsfmaxcebnbeo") - .withLimit(1045545946093333961L) + new QuotaBaseProperties().withId("qhysu") + .withType("dnslroqxrvycjdn") + .withLimit(4205435734359502308L) .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("rwqxpjpvem") - .withType("kh") - .withLimit(2148479321953315144L) + new QuotaBaseProperties().withId("mpm") + .withType("cbamto") + .withLimit(7341216713228763268L) .withUnit(QuotaUnit.COUNT))) - .withLocation("zmhytebjkjgee"), + .withLocation("xdigkggzmylq"), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistConfigTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistConfigTests.java new file mode 100644 index 000000000000..19ac9d0b0e81 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistConfigTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistConfigTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistConfig model = BinaryData.fromString("{\"blocking\":false,\"blocklistName\":\"ighmmtbtdvucfvvr\"}") + .toObject(RaiBlocklistConfig.class); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals("ighmmtbtdvucfvvr", model.blocklistName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiBlocklistConfig model = new RaiBlocklistConfig().withBlocking(false).withBlocklistName("ighmmtbtdvucfvvr"); + model = BinaryData.fromObject(model).toObject(RaiBlocklistConfig.class); + Assertions.assertFalse(model.blocking()); + Assertions.assertEquals("ighmmtbtdvucfvvr", model.blocklistName()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemBulkRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemBulkRequestTests.java new file mode 100644 index 000000000000..1b8607d8f364 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemBulkRequestTests.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistItemBulkRequestTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistItemBulkRequest model = BinaryData + .fromString("{\"name\":\"iygpgpkk\",\"properties\":{\"isRegex\":false,\"pattern\":\"laqlmih\"}}") + .toObject(RaiBlocklistItemBulkRequest.class); + Assertions.assertEquals("iygpgpkk", model.name()); + Assertions.assertFalse(model.properties().isRegex()); + Assertions.assertEquals("laqlmih", model.properties().pattern()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiBlocklistItemBulkRequest model = new RaiBlocklistItemBulkRequest().withName("iygpgpkk") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("laqlmih")); + model = BinaryData.fromObject(model).toObject(RaiBlocklistItemBulkRequest.class); + Assertions.assertEquals("iygpgpkk", model.name()); + Assertions.assertFalse(model.properties().isRegex()); + Assertions.assertEquals("laqlmih", model.properties().pattern()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResultTests.java new file mode 100644 index 000000000000..89e857fbe689 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResultTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistItemPropertiesBasicResourceArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"isRegex\":true,\"pattern\":\"uqr\"},\"id\":\"dxfu\",\"name\":\"e\",\"type\":\"ewxatktwjrppi\"}],\"nextLink\":\"yrqvelrmd\"}") + .toObject(RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.class); + Assertions.assertTrue(model.value().get(0).properties().isRegex()); + Assertions.assertEquals("uqr", model.value().get(0).properties().pattern()); + Assertions.assertEquals("yrqvelrmd", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceInnerTests.java new file mode 100644 index 000000000000..441d5e966297 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesBasicResourceInnerTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistItemPropertiesBasicResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistItemPropertiesBasicResourceInner model = BinaryData.fromString( + "{\"properties\":{\"isRegex\":true,\"pattern\":\"kv\"},\"id\":\"loeohy\",\"name\":\"ivxdifbwblijhp\",\"type\":\"ukxgoyxontbwdq\"}") + .toObject(RaiBlocklistItemPropertiesBasicResourceInner.class); + Assertions.assertTrue(model.properties().isRegex()); + Assertions.assertEquals("kv", model.properties().pattern()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiBlocklistItemPropertiesBasicResourceInner model = new RaiBlocklistItemPropertiesBasicResourceInner() + .withProperties(new RaiBlocklistItemProperties().withIsRegex(true).withPattern("kv")); + model = BinaryData.fromObject(model).toObject(RaiBlocklistItemPropertiesBasicResourceInner.class); + Assertions.assertTrue(model.properties().isRegex()); + Assertions.assertEquals("kv", model.properties().pattern()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesTests.java new file mode 100644 index 000000000000..6608add4dc31 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistItemPropertiesTests.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistItemPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistItemProperties model = BinaryData.fromString("{\"isRegex\":false,\"pattern\":\"dlpxiwwgecpvfp\"}") + .toObject(RaiBlocklistItemProperties.class); + Assertions.assertFalse(model.isRegex()); + Assertions.assertEquals("dlpxiwwgecpvfp", model.pattern()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiBlocklistItemProperties model + = new RaiBlocklistItemProperties().withIsRegex(false).withPattern("dlpxiwwgecpvfp"); + model = BinaryData.fromObject(model).toObject(RaiBlocklistItemProperties.class); + Assertions.assertFalse(model.isRegex()); + Assertions.assertEquals("dlpxiwwgecpvfp", model.pattern()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceArmPaginatedResultTests.java new file mode 100644 index 000000000000..768b817a60c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceArmPaginatedResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistPropertiesBasicResourceArmPaginatedResult; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistPropertiesBasicResourceArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistPropertiesBasicResourceArmPaginatedResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"description\":\"dyvfxnzpfdfup\"},\"id\":\"wpdpsegivytab\",\"name\":\"bbkfl\",\"type\":\"wgsltutbuve\"},{\"properties\":{\"description\":\"uuqbm\"},\"id\":\"xcqsxwclykcru\",\"name\":\"ekkbnj\",\"type\":\"evmp\"}],\"nextLink\":\"deuenthsh\"}") + .toObject(RaiBlocklistPropertiesBasicResourceArmPaginatedResult.class); + Assertions.assertEquals("dyvfxnzpfdfup", model.value().get(0).properties().description()); + Assertions.assertEquals("deuenthsh", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceInnerTests.java new file mode 100644 index 000000000000..71c2772edf18 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesBasicResourceInnerTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistPropertiesBasicResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistPropertiesBasicResourceInner model = BinaryData + .fromString( + "{\"properties\":{\"description\":\"zkwh\"},\"id\":\"sq\",\"name\":\"haefefvvk\",\"type\":\"dbnmcv\"}") + .toObject(RaiBlocklistPropertiesBasicResourceInner.class); + Assertions.assertEquals("zkwh", model.properties().description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiBlocklistPropertiesBasicResourceInner model = new RaiBlocklistPropertiesBasicResourceInner() + .withProperties(new RaiBlocklistProperties().withDescription("zkwh")); + model = BinaryData.fromObject(model).toObject(RaiBlocklistPropertiesBasicResourceInner.class); + Assertions.assertEquals("zkwh", model.properties().description()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesTests.java new file mode 100644 index 000000000000..75bccec6958e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiBlocklistPropertiesTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; +import org.junit.jupiter.api.Assertions; + +public final class RaiBlocklistPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiBlocklistProperties model + = BinaryData.fromString("{\"description\":\"ycdzdob\"}").toObject(RaiBlocklistProperties.class); + Assertions.assertEquals("ycdzdob", model.description()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiBlocklistProperties model = new RaiBlocklistProperties().withDescription("ycdzdob"); + model = BinaryData.fromObject(model).toObject(RaiBlocklistProperties.class); + Assertions.assertEquals("ycdzdob", model.description()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesCreateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesCreateMockTests.java new file mode 100644 index 000000000000..076b2eb9e347 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesCreateMockTests.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +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 RaiPoliciesCreateMockTests { + @Test + public void testCreate() throws Exception { + String responseStr + = "{\"properties\":{\"basePolicyName\":\"asqolxaodb\",\"completionBlocklists\":[{\"blocking\":false,\"blocklistName\":\"borqkmihggv\"},{\"blocking\":false,\"blocklistName\":\"yxbatrviynlslgx\"},{\"blocking\":true,\"blocklistName\":\"sclqwk\"},{\"blocking\":false,\"blocklistName\":\"pu\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":false,\"enabled\":true,\"name\":\"aqfueqfniagzmy\",\"source\":\"Prompt\"},{\"allowedContentLevel\":\"Low\",\"blocking\":true,\"enabled\":false,\"name\":\"nlllm\",\"source\":\"Completion\"}],\"mode\":\"Default\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"bdimtdohj\"}],\"type\":\"UserManaged\"},\"id\":\"yuwcilxz\",\"name\":\"xhbttkk\",\"type\":\"cxjxueilixzjvkqj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiPolicyPropertiesBasicResource response = manager.raiPolicies() + .define("rnw") + .withExistingEndpoint("fcsbkjhoxtbsybp", "fojpnixdgqj", "fv") + .withProperties(new RaiPolicyProperties().withBasePolicyName("ajyife") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("jdnknbt"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("epqtzzhkpkonovfn"), + new RaiBlocklistConfig().withBlocking(true).withBlocklistName("hutv"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.HIGH) + .withBlocking(true) + .withEnabled(false) + .withName("gmmzx") + .withSource(RaiPolicyContentSource.COMPLETION))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(true).withBlocklistName("wcp"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("kgtalljsoasxjjkl"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("rosxfdxrcbnmbb"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("d"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)) + .create(); + + Assertions.assertEquals("asqolxaodb", response.properties().basePolicyName()); + Assertions.assertFalse(response.properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("borqkmihggv", response.properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, + response.properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertFalse(response.properties().contentFilters().get(0).blocking()); + Assertions.assertTrue(response.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("aqfueqfniagzmy", response.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, response.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, response.properties().mode()); + Assertions.assertFalse(response.properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("bdimtdohj", response.properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.USER_MANAGED, response.properties().type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesGetWithResponseMockTests.java new file mode 100644 index 000000000000..ff7b3fe484a0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesGetWithResponseMockTests.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +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 RaiPoliciesGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"basePolicyName\":\"hfimlyxd\",\"completionBlocklists\":[{\"blocking\":true,\"blocklistName\":\"bi\"},{\"blocking\":false,\"blocklistName\":\"oucmfuvuslvbujwp\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":true,\"enabled\":true,\"name\":\"ruhqymwdsthktsal\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"Medium\",\"blocking\":true,\"enabled\":false,\"name\":\"kkoypxwlvthivap\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"High\",\"blocking\":false,\"enabled\":true,\"name\":\"lrzlgk\",\"source\":\"Prompt\"},{\"allowedContentLevel\":\"Medium\",\"blocking\":false,\"enabled\":true,\"name\":\"ez\",\"source\":\"Prompt\"}],\"mode\":\"Deferred\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"yowr\"},{\"blocking\":true,\"blocklistName\":\"fr\"},{\"blocking\":false,\"blocklistName\":\"pkplt\"}],\"type\":\"SystemManaged\"},\"id\":\"yjatfpbxnr\",\"name\":\"tpgqxtohruqtxi\",\"type\":\"rxeyzzynxbuvyglf\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + RaiPolicyPropertiesBasicResource response = manager.raiPolicies() + .getWithResponse("wyzjsixorvigrxmp", "u", "de", "bpqghxdp", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("hfimlyxd", response.properties().basePolicyName()); + Assertions.assertTrue(response.properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("bi", response.properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, + response.properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertTrue(response.properties().contentFilters().get(0).blocking()); + Assertions.assertTrue(response.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("ruhqymwdsthktsal", response.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + response.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFERRED, response.properties().mode()); + Assertions.assertFalse(response.properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("yowr", response.properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, response.properties().type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationsListMockTests.java new file mode 100644 index 000000000000..dccc40ada03a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesOperationsListMockTests.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.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.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +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 RaiPoliciesOperationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"basePolicyName\":\"hj\",\"completionBlocklists\":[{\"blocking\":true,\"blocklistName\":\"apynpvgyafttbet\"},{\"blocking\":true,\"blocklistName\":\"gpvnczfpoyb\"},{\"blocking\":false,\"blocklistName\":\"kajkyrhucbfkaqlp\"},{\"blocking\":false,\"blocklistName\":\"eronbq\"}],\"contentFilters\":[{\"allowedContentLevel\":\"Low\",\"blocking\":true,\"enabled\":false,\"name\":\"obcqvzmywvsyn\",\"source\":\"Completion\"}],\"mode\":\"Default\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"golmkklzabauvnc\"},{\"blocking\":false,\"blocklistName\":\"oidjhoykg\"},{\"blocking\":true,\"blocklistName\":\"nfikireetvjfizaf\"}],\"type\":\"SystemManaged\"},\"id\":\"nuvndgro\",\"name\":\"gxajcs\",\"type\":\"pfwlyeiaj\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + MachineLearningManager manager = MachineLearningManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.raiPoliciesOperations().list("hxbanfsqfhatq", "sng", "viyffgo", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hj", response.iterator().next().properties().basePolicyName()); + Assertions.assertTrue(response.iterator().next().properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("apynpvgyafttbet", + response.iterator().next().properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.LOW, + response.iterator().next().properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertTrue(response.iterator().next().properties().contentFilters().get(0).blocking()); + Assertions.assertFalse(response.iterator().next().properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("obcqvzmywvsyn", + response.iterator().next().properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + response.iterator().next().properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, response.iterator().next().properties().mode()); + Assertions.assertFalse(response.iterator().next().properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("golmkklzabauvnc", + response.iterator().next().properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, response.iterator().next().properties().type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyContentFilterTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyContentFilterTests.java new file mode 100644 index 000000000000..3d409a1ceb8c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyContentFilterTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import org.junit.jupiter.api.Assertions; + +public final class RaiPolicyContentFilterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiPolicyContentFilter model = BinaryData.fromString( + "{\"allowedContentLevel\":\"High\",\"blocking\":true,\"enabled\":false,\"name\":\"ewlsuxpcbwkdwjy\",\"source\":\"Prompt\"}") + .toObject(RaiPolicyContentFilter.class); + Assertions.assertEquals(AllowedContentLevel.HIGH, model.allowedContentLevel()); + Assertions.assertTrue(model.blocking()); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("ewlsuxpcbwkdwjy", model.name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiPolicyContentFilter model = new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.HIGH) + .withBlocking(true) + .withEnabled(false) + .withName("ewlsuxpcbwkdwjy") + .withSource(RaiPolicyContentSource.PROMPT); + model = BinaryData.fromObject(model).toObject(RaiPolicyContentFilter.class); + Assertions.assertEquals(AllowedContentLevel.HIGH, model.allowedContentLevel()); + Assertions.assertTrue(model.blocking()); + Assertions.assertFalse(model.enabled()); + Assertions.assertEquals("ewlsuxpcbwkdwjy", model.name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, model.source()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceArmPaginatedResultTests.java new file mode 100644 index 000000000000..03a917f70f13 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceArmPaginatedResultTests.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import org.junit.jupiter.api.Assertions; + +public final class RaiPolicyPropertiesBasicResourceArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiPolicyPropertiesBasicResourceArmPaginatedResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"basePolicyName\":\"hvksbojkl\",\"completionBlocklists\":[{\"blocking\":false,\"blocklistName\":\"ncw\"},{\"blocking\":true,\"blocklistName\":\"yey\"},{\"blocking\":false,\"blocklistName\":\"fnflytfxu\"},{\"blocking\":true,\"blocklistName\":\"o\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":false,\"enabled\":true,\"name\":\"wsnliy\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"Medium\",\"blocking\":true,\"enabled\":false,\"name\":\"glkfvdwrgav\",\"source\":\"Prompt\"},{\"allowedContentLevel\":\"Low\",\"blocking\":true,\"enabled\":false,\"name\":\"ukryxpi\",\"source\":\"Completion\"}],\"mode\":\"Default\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"cedliklxkyoddoq\"},{\"blocking\":true,\"blocklistName\":\"trkicwhqyr\"},{\"blocking\":true,\"blocklistName\":\"dkrwwmurhvifqe\"}],\"type\":\"SystemManaged\"},\"id\":\"nackitlw\",\"name\":\"ebylpzjelda\",\"type\":\"wjunilnijh\"},{\"properties\":{\"basePolicyName\":\"brdsypotnpkb\",\"completionBlocklists\":[{\"blocking\":false,\"blocklistName\":\"ngvnqdj\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":true,\"enabled\":false,\"name\":\"u\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"Medium\",\"blocking\":false,\"enabled\":true,\"name\":\"nrirpiiuvc\",\"source\":\"Completion\"}],\"mode\":\"Blocking\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"dgbxcw\"},{\"blocking\":false,\"blocklistName\":\"jccpkkjl\"},{\"blocking\":false,\"blocklistName\":\"wprjmaihtnnlb\"},{\"blocking\":false,\"blocklistName\":\"pcbqetfzfppvolz\"}],\"type\":\"UserManaged\"},\"id\":\"dunj\",\"name\":\"mprklatwiuujxsuj\",\"type\":\"rwgxeegxbnjnczep\"}],\"nextLink\":\"cymgbfmdquyyaes\"}") + .toObject(RaiPolicyPropertiesBasicResourceArmPaginatedResult.class); + Assertions.assertEquals("hvksbojkl", model.value().get(0).properties().basePolicyName()); + Assertions.assertFalse(model.value().get(0).properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("ncw", model.value().get(0).properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, + model.value().get(0).properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertFalse(model.value().get(0).properties().contentFilters().get(0).blocking()); + Assertions.assertTrue(model.value().get(0).properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("wsnliy", model.value().get(0).properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.COMPLETION, + model.value().get(0).properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.value().get(0).properties().mode()); + Assertions.assertFalse(model.value().get(0).properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("cedliklxkyoddoq", + model.value().get(0).properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, model.value().get(0).properties().type()); + Assertions.assertEquals("cymgbfmdquyyaes", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceInnerTests.java new file mode 100644 index 000000000000..2cf20e5fc0cc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesBasicResourceInnerTests.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RaiPolicyPropertiesBasicResourceInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiPolicyPropertiesBasicResourceInner model = BinaryData.fromString( + "{\"properties\":{\"basePolicyName\":\"ukrcdiohcl\",\"completionBlocklists\":[{\"blocking\":false,\"blocklistName\":\"k\"},{\"blocking\":true,\"blocklistName\":\"eddp\"},{\"blocking\":false,\"blocklistName\":\"wy\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":false,\"enabled\":false,\"name\":\"bnwvpaq\",\"source\":\"Prompt\"},{\"allowedContentLevel\":\"Medium\",\"blocking\":true,\"enabled\":true,\"name\":\"ddofxnfb\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"Low\",\"blocking\":false,\"enabled\":false,\"name\":\"ovo\",\"source\":\"Prompt\"},{\"allowedContentLevel\":\"High\",\"blocking\":true,\"enabled\":true,\"name\":\"krwfmihwpadhedb\",\"source\":\"Completion\"}],\"mode\":\"Default\",\"promptBlocklists\":[{\"blocking\":false,\"blocklistName\":\"mkhjaozvb\"},{\"blocking\":true,\"blocklistName\":\"jhbp\"},{\"blocking\":false,\"blocklistName\":\"scmyhrhjvszf\"}],\"type\":\"SystemManaged\"},\"id\":\"ndwpppqw\",\"name\":\"joevzzuf\",\"type\":\"tdxmlynzlyvap\"}") + .toObject(RaiPolicyPropertiesBasicResourceInner.class); + Assertions.assertEquals("ukrcdiohcl", model.properties().basePolicyName()); + Assertions.assertFalse(model.properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("k", model.properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, + model.properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertFalse(model.properties().contentFilters().get(0).blocking()); + Assertions.assertFalse(model.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("bnwvpaq", model.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, model.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.properties().mode()); + Assertions.assertFalse(model.properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("mkhjaozvb", model.properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, model.properties().type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiPolicyPropertiesBasicResourceInner model = new RaiPolicyPropertiesBasicResourceInner() + .withProperties(new RaiPolicyProperties().withBasePolicyName("ukrcdiohcl") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("k"), + new RaiBlocklistConfig().withBlocking(true).withBlocklistName("eddp"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("wy"))) + .withContentFilters(Arrays.asList( + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.HIGH) + .withBlocking(false) + .withEnabled(false) + .withName("bnwvpaq") + .withSource(RaiPolicyContentSource.PROMPT), + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.MEDIUM) + .withBlocking(true) + .withEnabled(true) + .withName("ddofxnfb") + .withSource(RaiPolicyContentSource.COMPLETION), + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("ovo") + .withSource(RaiPolicyContentSource.PROMPT), + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.HIGH) + .withBlocking(true) + .withEnabled(true) + .withName("krwfmihwpadhedb") + .withSource(RaiPolicyContentSource.COMPLETION))) + .withMode(RaiPolicyMode.DEFAULT) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("mkhjaozvb"), + new RaiBlocklistConfig().withBlocking(true).withBlocklistName("jhbp"), + new RaiBlocklistConfig().withBlocking(false).withBlocklistName("scmyhrhjvszf"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)); + model = BinaryData.fromObject(model).toObject(RaiPolicyPropertiesBasicResourceInner.class); + Assertions.assertEquals("ukrcdiohcl", model.properties().basePolicyName()); + Assertions.assertFalse(model.properties().completionBlocklists().get(0).blocking()); + Assertions.assertEquals("k", model.properties().completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, + model.properties().contentFilters().get(0).allowedContentLevel()); + Assertions.assertFalse(model.properties().contentFilters().get(0).blocking()); + Assertions.assertFalse(model.properties().contentFilters().get(0).enabled()); + Assertions.assertEquals("bnwvpaq", model.properties().contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, model.properties().contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.properties().mode()); + Assertions.assertFalse(model.properties().promptBlocklists().get(0).blocking()); + Assertions.assertEquals("mkhjaozvb", model.properties().promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, model.properties().type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesTests.java new file mode 100644 index 000000000000..91433a6bec2b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyPropertiesTests.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class RaiPolicyPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RaiPolicyProperties model = BinaryData.fromString( + "{\"basePolicyName\":\"rbuoggtdltlcu\",\"completionBlocklists\":[{\"blocking\":false,\"blocklistName\":\"vaylz\"}],\"contentFilters\":[{\"allowedContentLevel\":\"High\",\"blocking\":false,\"enabled\":true,\"name\":\"rvmhvbvvcpwt\",\"source\":\"Prompt\"},{\"allowedContentLevel\":\"Medium\",\"blocking\":false,\"enabled\":false,\"name\":\"dffetevr\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"Medium\",\"blocking\":false,\"enabled\":true,\"name\":\"syotctkhfhfsatv\",\"source\":\"Completion\"},{\"allowedContentLevel\":\"Low\",\"blocking\":false,\"enabled\":false,\"name\":\"hvprhqqw\",\"source\":\"Completion\"}],\"mode\":\"Default\",\"promptBlocklists\":[{\"blocking\":true,\"blocklistName\":\"obzgott\"}],\"type\":\"SystemManaged\"}") + .toObject(RaiPolicyProperties.class); + Assertions.assertEquals("rbuoggtdltlcu", model.basePolicyName()); + Assertions.assertFalse(model.completionBlocklists().get(0).blocking()); + Assertions.assertEquals("vaylz", model.completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, model.contentFilters().get(0).allowedContentLevel()); + Assertions.assertFalse(model.contentFilters().get(0).blocking()); + Assertions.assertTrue(model.contentFilters().get(0).enabled()); + Assertions.assertEquals("rvmhvbvvcpwt", model.contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, model.contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.mode()); + Assertions.assertTrue(model.promptBlocklists().get(0).blocking()); + Assertions.assertEquals("obzgott", model.promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, model.type()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RaiPolicyProperties model = new RaiPolicyProperties().withBasePolicyName("rbuoggtdltlcu") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("vaylz"))) + .withContentFilters(Arrays.asList( + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.HIGH) + .withBlocking(false) + .withEnabled(true) + .withName("rvmhvbvvcpwt") + .withSource(RaiPolicyContentSource.PROMPT), + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.MEDIUM) + .withBlocking(false) + .withEnabled(false) + .withName("dffetevr") + .withSource(RaiPolicyContentSource.COMPLETION), + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.MEDIUM) + .withBlocking(false) + .withEnabled(true) + .withName("syotctkhfhfsatv") + .withSource(RaiPolicyContentSource.COMPLETION), + new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("hvprhqqw") + .withSource(RaiPolicyContentSource.COMPLETION))) + .withMode(RaiPolicyMode.DEFAULT) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(true).withBlocklistName("obzgott"))) + .withType(RaiPolicyType.SYSTEM_MANAGED); + model = BinaryData.fromObject(model).toObject(RaiPolicyProperties.class); + Assertions.assertEquals("rbuoggtdltlcu", model.basePolicyName()); + Assertions.assertFalse(model.completionBlocklists().get(0).blocking()); + Assertions.assertEquals("vaylz", model.completionBlocklists().get(0).blocklistName()); + Assertions.assertEquals(AllowedContentLevel.HIGH, model.contentFilters().get(0).allowedContentLevel()); + Assertions.assertFalse(model.contentFilters().get(0).blocking()); + Assertions.assertTrue(model.contentFilters().get(0).enabled()); + Assertions.assertEquals("rvmhvbvvcpwt", model.contentFilters().get(0).name()); + Assertions.assertEquals(RaiPolicyContentSource.PROMPT, model.contentFilters().get(0).source()); + Assertions.assertEquals(RaiPolicyMode.DEFAULT, model.mode()); + Assertions.assertTrue(model.promptBlocklists().get(0).blocking()); + Assertions.assertEquals("obzgott", model.promptBlocklists().get(0).blocklistName()); + Assertions.assertEquals(RaiPolicyType.SYSTEM_MANAGED, model.type()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java index 045276e071e0..7be8bccf54f6 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,18 +13,18 @@ public final class RandomSamplingAlgorithmTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RandomSamplingAlgorithm model - = BinaryData.fromString("{\"samplingAlgorithmType\":\"Random\",\"seed\":1840024509,\"rule\":\"Random\"}") + = BinaryData.fromString("{\"samplingAlgorithmType\":\"Random\",\"rule\":\"Sobol\",\"seed\":1996277732}") .toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(1840024509, model.seed()); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); + Assertions.assertEquals(RandomSamplingAlgorithmRule.SOBOL, model.rule()); + Assertions.assertEquals(1996277732, model.seed()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RandomSamplingAlgorithm model - = new RandomSamplingAlgorithm().withSeed(1840024509).withRule(RandomSamplingAlgorithmRule.RANDOM); + = new RandomSamplingAlgorithm().withRule(RandomSamplingAlgorithmRule.SOBOL).withSeed(1996277732); model = BinaryData.fromObject(model).toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(1840024509, model.seed()); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); + Assertions.assertEquals(RandomSamplingAlgorithmRule.SOBOL, model.rule()); + Assertions.assertEquals(1996277732, model.seed()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RayTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RayTests.java new file mode 100644 index 000000000000..f0851ce749f4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RayTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.Ray; +import org.junit.jupiter.api.Assertions; + +public final class RayTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Ray model = BinaryData.fromString( + "{\"distributionType\":\"Ray\",\"port\":1644474047,\"address\":\"duiolh\",\"includeDashboard\":true,\"dashboardPort\":1281648959,\"headNodeAdditionalArgs\":\"fjpoqzu\",\"workerNodeAdditionalArgs\":\"zluczdq\"}") + .toObject(Ray.class); + Assertions.assertEquals(1644474047, model.port()); + Assertions.assertEquals("duiolh", model.address()); + Assertions.assertTrue(model.includeDashboard()); + Assertions.assertEquals(1281648959, model.dashboardPort()); + Assertions.assertEquals("fjpoqzu", model.headNodeAdditionalArgs()); + Assertions.assertEquals("zluczdq", model.workerNodeAdditionalArgs()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Ray model = new Ray().withPort(1644474047) + .withAddress("duiolh") + .withIncludeDashboard(true) + .withDashboardPort(1281648959) + .withHeadNodeAdditionalArgs("fjpoqzu") + .withWorkerNodeAdditionalArgs("zluczdq"); + model = BinaryData.fromObject(model).toObject(Ray.class); + Assertions.assertEquals(1644474047, model.port()); + Assertions.assertEquals("duiolh", model.address()); + Assertions.assertTrue(model.includeDashboard()); + Assertions.assertEquals(1281648959, model.dashboardPort()); + Assertions.assertEquals("fjpoqzu", model.headNodeAdditionalArgs()); + Assertions.assertEquals("zluczdq", model.workerNodeAdditionalArgs()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java index 8293869fbbe0..becf77356a41 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,24 +14,24 @@ public final class RecurrenceScheduleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecurrenceSchedule model = BinaryData.fromString( - "{\"hours\":[537279980,2138808813],\"minutes\":[1334431850,380454527],\"weekDays\":[\"Friday\",\"Saturday\",\"Friday\",\"Wednesday\"],\"monthDays\":[1634353731]}") + "{\"hours\":[126722989,1003409215],\"minutes\":[300873410,1536686561,661665574,1299476229],\"monthDays\":[462403312],\"weekDays\":[\"Friday\"]}") .toObject(RecurrenceSchedule.class); - Assertions.assertEquals(537279980, model.hours().get(0)); - Assertions.assertEquals(1334431850, model.minutes().get(0)); + Assertions.assertEquals(126722989, model.hours().get(0)); + Assertions.assertEquals(300873410, model.minutes().get(0)); + Assertions.assertEquals(462403312, model.monthDays().get(0)); Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - Assertions.assertEquals(1634353731, model.monthDays().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RecurrenceSchedule model = new RecurrenceSchedule().withHours(Arrays.asList(537279980, 2138808813)) - .withMinutes(Arrays.asList(1334431850, 380454527)) - .withWeekDays(Arrays.asList(WeekDay.FRIDAY, WeekDay.SATURDAY, WeekDay.FRIDAY, WeekDay.WEDNESDAY)) - .withMonthDays(Arrays.asList(1634353731)); + RecurrenceSchedule model = new RecurrenceSchedule().withHours(Arrays.asList(126722989, 1003409215)) + .withMinutes(Arrays.asList(300873410, 1536686561, 661665574, 1299476229)) + .withMonthDays(Arrays.asList(462403312)) + .withWeekDays(Arrays.asList(WeekDay.FRIDAY)); model = BinaryData.fromObject(model).toObject(RecurrenceSchedule.class); - Assertions.assertEquals(537279980, model.hours().get(0)); - Assertions.assertEquals(1334431850, model.minutes().get(0)); + Assertions.assertEquals(126722989, model.hours().get(0)); + Assertions.assertEquals(300873410, model.minutes().get(0)); + Assertions.assertEquals(462403312, model.monthDays().get(0)); Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - Assertions.assertEquals(1634353731, model.monthDays().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java index 92e56ac57e45..37c7a2ab6719 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,38 +16,36 @@ public final class RecurrenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Recurrence model = BinaryData.fromString( - "{\"frequency\":\"Minute\",\"interval\":782951006,\"startTime\":\"ecf\",\"timeZone\":\"hagxsure\",\"schedule\":{\"hours\":[906252863,1130901316,1113850599,58048223],\"minutes\":[164034055,953722289],\"monthDays\":[1328602727,1389187624,813655099],\"weekDays\":[\"Tuesday\"]}}") + "{\"frequency\":\"Month\",\"interval\":158276505,\"startTime\":\"xv\",\"timeZone\":\"ofxxdplrelfk\",\"schedule\":{\"hours\":[1789995716,2013174426,1390213429],\"minutes\":[568829026,1894018845,1911905134,1796580082],\"monthDays\":[1687325738,2030750446,1009924982],\"weekDays\":[\"Thursday\",\"Friday\"]}}") .toObject(Recurrence.class); - Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.frequency()); - Assertions.assertEquals(782951006, model.interval()); - Assertions.assertEquals("ecf", model.startTime()); - Assertions.assertEquals("hagxsure", model.timeZone()); - Assertions.assertEquals(906252863, model.schedule().hours().get(0)); - Assertions.assertEquals(164034055, model.schedule().minutes().get(0)); - Assertions.assertEquals(1328602727, model.schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, model.schedule().weekDays().get(0)); + Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.frequency()); + Assertions.assertEquals(158276505, model.interval()); + Assertions.assertEquals("xv", model.startTime()); + Assertions.assertEquals("ofxxdplrelfk", model.timeZone()); + Assertions.assertEquals(1789995716, model.schedule().hours().get(0)); + Assertions.assertEquals(568829026, model.schedule().minutes().get(0)); + Assertions.assertEquals(1687325738, model.schedule().monthDays().get(0)); + Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.schedule().weekDays().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Recurrence model - = new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) - .withInterval(782951006) - .withStartTime("ecf") - .withTimeZone("hagxsure") - .withSchedule(new ComputeRecurrenceSchedule() - .withHours(Arrays.asList(906252863, 1130901316, 1113850599, 58048223)) - .withMinutes(Arrays.asList(164034055, 953722289)) - .withMonthDays(Arrays.asList(1328602727, 1389187624, 813655099)) - .withWeekDays(Arrays.asList(ComputeWeekDay.TUESDAY))); + Recurrence model = new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) + .withInterval(158276505) + .withStartTime("xv") + .withTimeZone("ofxxdplrelfk") + .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1789995716, 2013174426, 1390213429)) + .withMinutes(Arrays.asList(568829026, 1894018845, 1911905134, 1796580082)) + .withMonthDays(Arrays.asList(1687325738, 2030750446, 1009924982)) + .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.FRIDAY))); model = BinaryData.fromObject(model).toObject(Recurrence.class); - Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.frequency()); - Assertions.assertEquals(782951006, model.interval()); - Assertions.assertEquals("ecf", model.startTime()); - Assertions.assertEquals("hagxsure", model.timeZone()); - Assertions.assertEquals(906252863, model.schedule().hours().get(0)); - Assertions.assertEquals(164034055, model.schedule().minutes().get(0)); - Assertions.assertEquals(1328602727, model.schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, model.schedule().weekDays().get(0)); + Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.frequency()); + Assertions.assertEquals(158276505, model.interval()); + Assertions.assertEquals("xv", model.startTime()); + Assertions.assertEquals("ofxxdplrelfk", model.timeZone()); + Assertions.assertEquals(1789995716, model.schedule().hours().get(0)); + Assertions.assertEquals(568829026, model.schedule().minutes().get(0)); + Assertions.assertEquals(1687325738, model.schedule().monthDays().get(0)); + Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.schedule().weekDays().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java index 8d1101bc86eb..f06707d3323f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,40 +16,39 @@ public final class RecurrenceTriggerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RecurrenceTrigger model = BinaryData.fromString( - "{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":875349489,\"schedule\":{\"hours\":[2010585731,1159894455,1470565403,964360782],\"minutes\":[213294039,384841052,1302563571,1151725969],\"weekDays\":[\"Thursday\",\"Sunday\",\"Sunday\"],\"monthDays\":[491471659]},\"endTime\":\"qagnepzwakl\",\"startTime\":\"sbq\",\"timeZone\":\"agwwrxaom\"}") + "{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":7805907,\"schedule\":{\"hours\":[904060521,451453804,555939947,1674393689],\"minutes\":[861314429],\"monthDays\":[1298083446,1330334502],\"weekDays\":[\"Sunday\"]},\"endTime\":\"rykycndzfqivjr\",\"startTime\":\"ykbbmnwagltbxoe\",\"timeZone\":\"nqlnfwmyymvqd\"}") .toObject(RecurrenceTrigger.class); - Assertions.assertEquals("qagnepzwakl", model.endTime()); - Assertions.assertEquals("sbq", model.startTime()); - Assertions.assertEquals("agwwrxaom", model.timeZone()); + Assertions.assertEquals("rykycndzfqivjr", model.endTime()); + Assertions.assertEquals("ykbbmnwagltbxoe", model.startTime()); + Assertions.assertEquals("nqlnfwmyymvqd", model.timeZone()); Assertions.assertEquals(RecurrenceFrequency.WEEK, model.frequency()); - Assertions.assertEquals(875349489, model.interval()); - Assertions.assertEquals(2010585731, model.schedule().hours().get(0)); - Assertions.assertEquals(213294039, model.schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().weekDays().get(0)); - Assertions.assertEquals(491471659, model.schedule().monthDays().get(0)); + Assertions.assertEquals(7805907, model.interval()); + Assertions.assertEquals(904060521, model.schedule().hours().get(0)); + Assertions.assertEquals(861314429, model.schedule().minutes().get(0)); + Assertions.assertEquals(1298083446, model.schedule().monthDays().get(0)); + Assertions.assertEquals(WeekDay.SUNDAY, model.schedule().weekDays().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RecurrenceTrigger model = new RecurrenceTrigger().withEndTime("qagnepzwakl") - .withStartTime("sbq") - .withTimeZone("agwwrxaom") + RecurrenceTrigger model = new RecurrenceTrigger().withEndTime("rykycndzfqivjr") + .withStartTime("ykbbmnwagltbxoe") + .withTimeZone("nqlnfwmyymvqd") .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(875349489) - .withSchedule( - new RecurrenceSchedule().withHours(Arrays.asList(2010585731, 1159894455, 1470565403, 964360782)) - .withMinutes(Arrays.asList(213294039, 384841052, 1302563571, 1151725969)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY, WeekDay.SUNDAY, WeekDay.SUNDAY)) - .withMonthDays(Arrays.asList(491471659))); + .withInterval(7805907) + .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(904060521, 451453804, 555939947, 1674393689)) + .withMinutes(Arrays.asList(861314429)) + .withMonthDays(Arrays.asList(1298083446, 1330334502)) + .withWeekDays(Arrays.asList(WeekDay.SUNDAY))); model = BinaryData.fromObject(model).toObject(RecurrenceTrigger.class); - Assertions.assertEquals("qagnepzwakl", model.endTime()); - Assertions.assertEquals("sbq", model.startTime()); - Assertions.assertEquals("agwwrxaom", model.timeZone()); + Assertions.assertEquals("rykycndzfqivjr", model.endTime()); + Assertions.assertEquals("ykbbmnwagltbxoe", model.startTime()); + Assertions.assertEquals("nqlnfwmyymvqd", model.timeZone()); Assertions.assertEquals(RecurrenceFrequency.WEEK, model.frequency()); - Assertions.assertEquals(875349489, model.interval()); - Assertions.assertEquals(2010585731, model.schedule().hours().get(0)); - Assertions.assertEquals(213294039, model.schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().weekDays().get(0)); - Assertions.assertEquals(491471659, model.schedule().monthDays().get(0)); + Assertions.assertEquals(7805907, model.interval()); + Assertions.assertEquals(904060521, model.schedule().hours().get(0)); + Assertions.assertEquals(861314429, model.schedule().minutes().get(0)); + Assertions.assertEquals(1298083446, model.schedule().monthDays().get(0)); + Assertions.assertEquals(WeekDay.SUNDAY, model.schedule().weekDays().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java index e2f0171da50f..fdd0fdd25bd7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java @@ -1,17 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; @@ -36,82 +38,106 @@ public final class RegistriesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"6ee93217-e9d7-4d7b-aa0d-ee6c95ebe873\",\"tenantId\":\"d3caa03c-7ba5-40c6-b748-a12e0d7ce54f\",\"type\":\"None\",\"userAssignedIdentities\":{\"ipbfs\":{\"principalId\":\"9346226d-6fd3-48a9-ba8f-b396b9cd6110\",\"clientId\":\"3a469d8a-9d56-4fad-99e7-584e1caf3b6b\"},\"lpevz\":{\"principalId\":\"826fbdbc-4b21-4613-9024-b94580be4643\",\"clientId\":\"a1dc4284-ef51-4281-a1ed-c7cda56ec657\"},\"dnok\":{\"principalId\":\"e249e80b-2a8c-46e3-86d0-b4df35070384\",\"clientId\":\"6bc9d10d-8e0d-4c99-9354-1a342de26690\"},\"iecjyftsne\":{\"principalId\":\"43c287fd-0a04-4088-a830-3b60163701fe\",\"clientId\":\"c94a19bb-054e-49db-8dcf-ce41b6783a7e\"}}},\"kind\":\"z\",\"properties\":{\"discoveryUrl\":\"jclaqxx\",\"intellectualPropertyPublisher\":\"q\",\"managedResourceGroup\":{\"resourceId\":\"pdsuyywnaq\"},\"mlFlowRegistryUri\":\"oxuh\",\"registryPrivateEndpointConnections\":[{\"id\":\"dfzcnylzwlhuf\",\"location\":\"cpwrtgtdegf\",\"properties\":{\"groupIds\":[\"ptbiuikp\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"fecxvkqjpov\"}},{\"id\":\"vxpsnrew\",\"location\":\"mhjmqf\",\"properties\":{\"groupIds\":[\"cxyiqppacjiqrlla\",\"ylbtkxei\",\"zgn\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"ttexaugoj\"}}],\"publicNetworkAccess\":\"jezr\",\"regionDetails\":[{\"acrDetails\":[{},{},{},{}],\"location\":\"lnt\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"qtvxghbe\",\"tier\":\"Premium\",\"size\":\"otqorrvwlce\",\"family\":\"lyugzl\",\"capacity\":977804529},\"location\":\"rj\",\"tags\":{\"gevjman\":\"syfdsgrtkevimru\",\"vtzdtwxfjlpkoc\":\"rvvjoklb\",\"uvwlfzjrjgla\":\"exfmqfuflu\"},\"id\":\"pzgzscg\",\"name\":\"lwuj\",\"type\":\"ey\"}"; + = "{\"properties\":{\"discoveryUrl\":\"kgtlhzkrazki\",\"intellectualPropertyPublisher\":\"yecznvzmsvznghe\",\"managedResourceGroup\":{\"resourceId\":\"ehgvmmnoyz\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{\"principalId\":\"pluzypkf\"},{\"principalId\":\"fu\"},{\"principalId\":\"lzvxotnoilqcd\"}]},\"mlFlowRegistryUri\":\"yefqhxytsqmbwca\",\"registryPrivateEndpointConnections\":[{\"id\":\"qakvokya\",\"location\":\"ratqlreqbrc\",\"properties\":{\"groupIds\":[\"shzumxuczn\",\"ab\",\"wrcyrn\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"owxqzkk\"}}],\"publicNetworkAccess\":\"vejhmnaphrskmp\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"pavamzmzfntte\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{},{}],\"location\":\"tjaypjdrjlijkkv\",\"storageAccountDetails\":[{},{},{}]}]},\"identity\":{\"principalId\":\"jjir\",\"tenantId\":\"qxa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"avyrjlnd\":{\"principalId\":\"racfsffdralihh\",\"clientId\":\"cygyzhcv\"},\"h\":{\"principalId\":\"myzvtiojtpdr\",\"clientId\":\"xaxoyj\"}}},\"kind\":\"we\",\"sku\":{\"name\":\"givkteccxfnatntm\",\"tier\":\"Premium\",\"size\":\"qpmfhjikqcnbdq\",\"family\":\"ghnme\",\"capacity\":629202106},\"location\":\"chmyucgrmw\",\"tags\":{\"yplgq\":\"d\"},\"id\":\"qgrbrhhv\",\"name\":\"pgtipaaoylwh\",\"type\":\"mkbweasgyp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Registry response = manager.registries() - .define("esetutqjsojw") - .withRegion("khqhvktcztmqdkh") - .withExistingResourceGroup("kz") - .withTags(mapOf("xxxqfrntzbhmx", "pkgxemvlyaprjz", "smyvvfapfbm", "pxfauvgtoino", "knefcoopt", "w", - "gupiosibg", "dspdd")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("tzcmag", new UserAssignedIdentity(), "jka", new UserAssignedIdentity()))) - .withKind("qh") - .withSku(new Sku().withName("ckgqa") + .define("dzccqtwsrbfbsd") + .withRegion("esywywnvgy") + .withExistingResourceGroup("hophqwo") + .withTags(mapOf("zyrgrlh", "ifrzcwuejmxlfzl")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities(mapOf("xvvmrnjrdi", new UserAssignedIdentity(), "owvfxe", + new UserAssignedIdentity(), "lbd", new UserAssignedIdentity()))) + .withKind("lfhl") + .withSku(new Sku().withName("gapspx") .withTier(SkuTier.PREMIUM) - .withSize("szwoeqljlwfq") - .withFamily("yww") - .withCapacity(1125483488)) - .withDiscoveryUrl("wqhz") - .withIntellectualPropertyPublisher("gmg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("mtywivbuiteed")) - .withMlFlowRegistryUri("klv") + .withSize("scrmzquuzy") + .withFamily("gouxnro") + .withCapacity(167174087)) + .withDiscoveryUrl("cdzfbvexrv") + .withIntellectualPropertyPublisher("hmfsnqp") + .withManagedResourceGroup(new ArmResourceId().withResourceId("s")) + .withManagedResourceGroupSettings(new ManagedResourceGroupSettings().withAssignedIdentities( + Arrays.asList(new ManagedResourceGroupAssignedIdentities().withPrincipalId("sksd"), + new ManagedResourceGroupAssignedIdentities().withPrincipalId("hwtsyp"), + new ManagedResourceGroupAssignedIdentities().withPrincipalId("fbwoetxi")))) + .withMlFlowRegistryUri("fwxhflgdunga") .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("ykwbhzs") - .withLocation("djitlqxpsnnnxhgd") - .withGroupIds(Arrays.asList("ylnd")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState(new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("cjkqjzfzkhdnp"))) - .withPublicNetworkAccess("rxjdfkqlkaipfyvq") + Arrays + .asList( + new RegistryPrivateEndpointConnection().withId("a") + .withLocation("xsnxyksznfstmp") + .withGroupIds(Arrays.asList("andzktwomlpczlq", "oomzgmrolhsfddk", "xvevwxmnbwaxa")) + .withPrivateEndpoint(new PrivateEndpointResource()) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState()) + .withProvisioningState("pyhtuh"), + new RegistryPrivateEndpointConnection().withId("pqild") + .withLocation("ok") + .withGroupIds(Arrays.asList("pnytkqj", "rla", "btgt")) + .withPrivateEndpoint(new PrivateEndpointResource()) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState()) + .withProvisioningState("trm"), + new RegistryPrivateEndpointConnection().withId("ujfgtg") + .withLocation("upczegqn") + .withGroupIds(Arrays.asList("ssvgyoggkzt", "ttjnknpbqgzk", "obc", "obnaqei")) + .withPrivateEndpoint(new PrivateEndpointResource()) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState()) + .withProvisioningState("q"))) + .withPublicNetworkAccess("ugpnnhzjm") .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails().withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("kbiekyvak") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), new AcrDetails())) + .withLocation("mnvmujy") + .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())), new RegistryRegionArmDetails() .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("napkpaied") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), + .withLocation("xmliytdegcrun") + .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())), new RegistryRegionArmDetails() .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("avezwclmzmlr") + .withLocation("tekbirhyvsy") .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails().withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("cdiqhvhcbukawifz") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())))) + new RegistryRegionArmDetails() + .withAcrDetails( + Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), new AcrDetails())) + .withLocation("orsz") + .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), + new StorageAccountDetails())))) .create(); - Assertions.assertEquals("rj", response.location()); - Assertions.assertEquals("syfdsgrtkevimru", response.tags().get("gevjman")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("z", response.kind()); - Assertions.assertEquals("qtvxghbe", response.sku().name()); + Assertions.assertEquals("chmyucgrmw", response.location()); + Assertions.assertEquals("d", response.tags().get("yplgq")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); + Assertions.assertEquals("we", response.kind()); + Assertions.assertEquals("givkteccxfnatntm", response.sku().name()); Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("otqorrvwlce", response.sku().size()); - Assertions.assertEquals("lyugzl", response.sku().family()); - Assertions.assertEquals(977804529, response.sku().capacity()); - Assertions.assertEquals("jclaqxx", response.discoveryUrl()); - Assertions.assertEquals("q", response.intellectualPropertyPublisher()); - Assertions.assertEquals("pdsuyywnaq", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxuh", response.mlFlowRegistryUri()); - Assertions.assertEquals("dfzcnylzwlhuf", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("cpwrtgtdegf", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("ptbiuikp", response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("fecxvkqjpov", - response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("jezr", response.publicNetworkAccess()); - Assertions.assertEquals("lnt", response.regionDetails().get(0).location()); + Assertions.assertEquals("qpmfhjikqcnbdq", response.sku().size()); + Assertions.assertEquals("ghnme", response.sku().family()); + Assertions.assertEquals(629202106, response.sku().capacity()); + Assertions.assertEquals("kgtlhzkrazki", response.discoveryUrl()); + Assertions.assertEquals("yecznvzmsvznghe", response.intellectualPropertyPublisher()); + Assertions.assertEquals("ehgvmmnoyz", response.managedResourceGroup().resourceId()); + Assertions.assertEquals("pluzypkf", + response.managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("yefqhxytsqmbwca", response.mlFlowRegistryUri()); + Assertions.assertEquals("qakvokya", response.registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("ratqlreqbrc", response.registryPrivateEndpointConnections().get(0).location()); + Assertions.assertEquals("shzumxuczn", response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); + Assertions.assertEquals("owxqzkk", response.registryPrivateEndpointConnections().get(0).provisioningState()); + Assertions.assertEquals("vejhmnaphrskmp", response.publicNetworkAccess()); + Assertions.assertEquals("pavamzmzfntte", response.regionDetails().get(0).location()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java index a76db0c43c87..d3b0a303aae0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.registries().delete("pbzq", "wt", com.azure.core.util.Context.NONE); + manager.registries().delete("ab", "yydsyweoh", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java index e3aeed6b6892..b5c75bcea2b7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -23,38 +23,41 @@ public final class RegistriesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"a7071b3b-b806-497e-bfd7-2ac105393f1c\",\"tenantId\":\"49c155e9-9045-4aeb-be87-49493366cba6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"joor\":{\"principalId\":\"27009e2d-54e5-4967-8c68-3b88488c9ac0\",\"clientId\":\"7c451233-5a71-472f-9b8c-9aff026396e2\"},\"hbcckbcvt\":{\"principalId\":\"8b223669-6af3-4c56-924e-29951efcb15d\",\"clientId\":\"18a3838c-7a4d-4a93-8298-109bb89d3e9c\"},\"drma\":{\"principalId\":\"e694df81-8179-4684-822b-23f42707ef88\",\"clientId\":\"36a7ab34-b5b1-43b9-b697-ecef11a8a356\"},\"hph\":{\"principalId\":\"da92e77f-b865-4d39-85a5-d6accf3b74cc\",\"clientId\":\"e39aeec4-76f0-43c9-ba50-bf30d61d1ab7\"}}},\"kind\":\"kquhmblnismviaa\",\"properties\":{\"discoveryUrl\":\"exsrglxljuyv\",\"intellectualPropertyPublisher\":\"povzespdip\",\"managedResourceGroup\":{\"resourceId\":\"npdjomd\"},\"mlFlowRegistryUri\":\"dwosjxywwvilkyht\",\"registryPrivateEndpointConnections\":[{\"id\":\"hdbbjgsjm\",\"location\":\"brpwj\",\"properties\":{\"groupIds\":[\"tkghrrxauuhdkh\",\"izyxoyxnhub\",\"wip\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"vp\"}},{\"id\":\"zyrpdxygfpqxseme\",\"location\":\"pdmm\",\"properties\":{\"groupIds\":[\"frqebrjopotefe\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"gjywwidn\"}},{\"id\":\"sdkvhuiadyho\",\"location\":\"sypgapfdwhw\",\"properties\":{\"groupIds\":[\"okuqnk\",\"skfl\",\"j\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"jeevmbhemr\"}},{\"id\":\"zetsspww\",\"location\":\"botbrepefrli\",\"properties\":{\"groupIds\":[\"yar\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"gcsco\"}}],\"publicNetworkAccess\":\"fsgilwisqxzpz\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"trfvogknocshmp\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"birbrvzhfjqpxyd\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"m\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"cdgunsjssre\",\"tier\":\"Premium\",\"size\":\"koue\",\"family\":\"gkxyrsppbghye\",\"capacity\":1161959928},\"location\":\"awlqvuwsqmwqsgy\",\"tags\":{\"tngxvrpkizjnkgd\":\"o\",\"kbkqpsvoxshxum\":\"ursumbci\"},\"id\":\"uyblo\",\"name\":\"rufvmgblbqx\",\"type\":\"samxyjqhwsoj\"}"; + = "{\"properties\":{\"discoveryUrl\":\"atkuhskegd\",\"intellectualPropertyPublisher\":\"vii\",\"managedResourceGroup\":{\"resourceId\":\"shoxfzzjd\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{\"principalId\":\"sxyugozwplxz\"},{\"principalId\":\"umnoti\"},{\"principalId\":\"kkbyg\"}]},\"mlFlowRegistryUri\":\"i\",\"registryPrivateEndpointConnections\":[{\"id\":\"shy\",\"location\":\"nh\",\"properties\":{\"groupIds\":[\"zonzsurqcojasfz\",\"z\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"ciuoxyipdthjfvn\"}},{\"id\":\"sgnspu\",\"location\":\"e\",\"properties\":{\"groupIds\":[\"nufssjgbfbbachxx\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"nfnbphceeivkb\"}},{\"id\":\"lepghcnuqhqp\",\"location\":\"wt\",\"properties\":{\"groupIds\":[\"lggag\",\"gntbfytnhd\",\"ihuzz\",\"uzvwgbzdtor\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"yfzdp\"}}],\"publicNetworkAccess\":\"tsucrxdtejobjz\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"cnzalgmpupjh\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{}],\"location\":\"udvbgvz\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{},{}],\"location\":\"p\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"iydpoknseaimb\",\"storageAccountDetails\":[{},{},{}]}]},\"identity\":{\"principalId\":\"kdarl\",\"tenantId\":\"bbvalqwzknyujx\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"lleirmtxfqpfi\":{\"principalId\":\"f\",\"clientId\":\"clvildlf\"},\"ylbvj\":{\"principalId\":\"cgbfou\",\"clientId\":\"bpgcryvidbz\"},\"kzb\":{\"principalId\":\"gngwn\",\"clientId\":\"ftecgprzsqmpdqc\"},\"usyrux\":{\"principalId\":\"haa\",\"clientId\":\"xoyxuuco\"}}},\"kind\":\"hhlhrvmgs\",\"sku\":{\"name\":\"gmnc\",\"tier\":\"Standard\",\"size\":\"iforomppzsauq\",\"family\":\"uhplfcmp\",\"capacity\":826160452},\"location\":\"goce\",\"tags\":{\"p\":\"y\",\"urnc\":\"ymwic\"},\"id\":\"unlakgixhqj\",\"name\":\"hgqwbbxiw\",\"type\":\"wfgoclalvemnnzu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Registry response = manager.registries() - .getByResourceGroupWithResponse("qjyiwuveryavb", "vvcogupsho", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("l", "x", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("awlqvuwsqmwqsgy", response.location()); - Assertions.assertEquals("o", response.tags().get("tngxvrpkizjnkgd")); + Assertions.assertEquals("goce", response.location()); + Assertions.assertEquals("y", response.tags().get("p")); Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("kquhmblnismviaa", response.kind()); - Assertions.assertEquals("cdgunsjssre", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("koue", response.sku().size()); - Assertions.assertEquals("gkxyrsppbghye", response.sku().family()); - Assertions.assertEquals(1161959928, response.sku().capacity()); - Assertions.assertEquals("exsrglxljuyv", response.discoveryUrl()); - Assertions.assertEquals("povzespdip", response.intellectualPropertyPublisher()); - Assertions.assertEquals("npdjomd", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("dwosjxywwvilkyht", response.mlFlowRegistryUri()); - Assertions.assertEquals("hdbbjgsjm", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("brpwj", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("tkghrrxauuhdkh", + Assertions.assertEquals("hhlhrvmgs", response.kind()); + Assertions.assertEquals("gmnc", response.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); + Assertions.assertEquals("iforomppzsauq", response.sku().size()); + Assertions.assertEquals("uhplfcmp", response.sku().family()); + Assertions.assertEquals(826160452, response.sku().capacity()); + Assertions.assertEquals("atkuhskegd", response.discoveryUrl()); + Assertions.assertEquals("vii", response.intellectualPropertyPublisher()); + Assertions.assertEquals("shoxfzzjd", response.managedResourceGroup().resourceId()); + Assertions.assertEquals("sxyugozwplxz", + response.managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("i", response.mlFlowRegistryUri()); + Assertions.assertEquals("shy", response.registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("nh", response.registryPrivateEndpointConnections().get(0).location()); + Assertions.assertEquals("zonzsurqcojasfz", response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("vp", response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("fsgilwisqxzpz", response.publicNetworkAccess()); - Assertions.assertEquals("trfvogknocshmp", response.regionDetails().get(0).location()); + Assertions.assertEquals("ciuoxyipdthjfvn", + response.registryPrivateEndpointConnections().get(0).provisioningState()); + Assertions.assertEquals("tsucrxdtejobjz", response.publicNetworkAccess()); + Assertions.assertEquals("cnzalgmpupjh", response.regionDetails().get(0).location()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java index 24f3e03df8d7..66dab8a86232 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -24,40 +24,42 @@ public final class RegistriesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"23dff3e1-3086-416b-a02b-8726baca0832\",\"tenantId\":\"1a1a9b97-ffa1-46a7-8e54-eced4ab6f137\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"azeq\":{\"principalId\":\"e0bfee08-d897-4220-8106-8e4d42244f54\",\"clientId\":\"9512dcaf-7961-43f8-8dc5-306463522da5\"},\"uuujlitics\":{\"principalId\":\"44096f7c-80e1-444a-b41b-88a20b9ec4b8\",\"clientId\":\"d3a956f0-2d61-49b7-8cab-ad17412e2fa9\"}}},\"kind\":\"qxgjz\",\"properties\":{\"discoveryUrl\":\"hop\",\"intellectualPropertyPublisher\":\"xip\",\"managedResourceGroup\":{\"resourceId\":\"pvkcnggocnwnjm\"},\"mlFlowRegistryUri\":\"tlam\",\"registryPrivateEndpointConnections\":[{\"id\":\"k\",\"location\":\"jxwwqz\",\"properties\":{\"groupIds\":[\"b\",\"frhqzvwznwcqoapd\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"tetfdpu\"}},{\"id\":\"zdtjbesfum\",\"location\":\"saafkvqhbwsviv\",\"properties\":{\"groupIds\":[\"g\",\"fvublszsveguxaxi\",\"pnymbjrsdiufqxr\",\"zijosuzegmcmlzmf\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"newrvjg\"}},{\"id\":\"mx\",\"location\":\"gowdavpqyhax\",\"properties\":{\"groupIds\":[\"oz\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"w\"}}],\"publicNetworkAccess\":\"n\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"cggoppmxcmoug\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"fy\",\"tier\":\"Standard\",\"size\":\"a\",\"family\":\"qvawkesxvz\",\"capacity\":1637573334},\"location\":\"wpjpgqwbrzkm\",\"tags\":{\"nqlizlcyhjhrkfp\":\"mycxmhorrecoiq\",\"bvm\":\"iiommisbf\",\"dvfjvbwawyma\":\"jcmpoh\"},\"id\":\"boindiuyqdjkugcj\",\"name\":\"sqpkmbryh\",\"type\":\"shkv\"}]}"; + = "{\"value\":[{\"properties\":{\"discoveryUrl\":\"bftswcd\",\"intellectualPropertyPublisher\":\"nseptvdtic\",\"managedResourceGroup\":{\"resourceId\":\"lgzwkopxdkb\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{\"principalId\":\"gppwxni\"},{\"principalId\":\"zrxxfnduvqzjnnu\"},{\"principalId\":\"vjzrfxajtbcqjk\"},{\"principalId\":\"jcurxrjwyzrie\"}]},\"mlFlowRegistryUri\":\"qmlzuwtbdz\",\"registryPrivateEndpointConnections\":[{\"id\":\"kmpebfhlgeehb\",\"location\":\"gplnl\",\"properties\":{\"groupIds\":[\"szunbuafm\",\"ubukqmierzrnob\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"uzyt\"}},{\"id\":\"gzdhzbjec\",\"location\":\"ysxnku\",\"properties\":{\"groupIds\":[\"lsevzc\",\"rwn\",\"kgdwqym\",\"sfqeaxdqel\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"aqh\"}}],\"publicNetworkAccess\":\"awgqrwuh\",\"regionDetails\":[{\"acrDetails\":[{},{},{}],\"location\":\"fgpbcbkc\",\"storageAccountDetails\":[{}]}]},\"identity\":{\"principalId\":\"jieask\",\"tenantId\":\"qclnfusrgnoskkhb\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"yeikbv\":{\"principalId\":\"yy\",\"clientId\":\"h\"},\"pgjl\":{\"principalId\":\"rurgbqaucpck\",\"clientId\":\"nohafwm\"}}},\"kind\":\"tugpeametsdwxfa\",\"sku\":{\"name\":\"xccfegsav\",\"tier\":\"Free\",\"size\":\"ucv\",\"family\":\"ndh\",\"capacity\":745172301},\"location\":\"azkmqfwbgdmfv\",\"tags\":{\"trcodbqeogldmxxb\":\"mpotalopfigrx\",\"gqrpl\":\"hspvamsxrwqlwdf\"},\"id\":\"eqzvdbb\",\"name\":\"ffgxtaelxtpfc\",\"type\":\"atbx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.registries().listByResourceGroup("skinmxanjguadh", com.azure.core.util.Context.NONE); + = manager.registries().listByResourceGroup("mtsnvo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("wpjpgqwbrzkm", response.iterator().next().location()); - Assertions.assertEquals("mycxmhorrecoiq", response.iterator().next().tags().get("nqlizlcyhjhrkfp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("qxgjz", response.iterator().next().kind()); - Assertions.assertEquals("fy", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("a", response.iterator().next().sku().size()); - Assertions.assertEquals("qvawkesxvz", response.iterator().next().sku().family()); - Assertions.assertEquals(1637573334, response.iterator().next().sku().capacity()); - Assertions.assertEquals("hop", response.iterator().next().discoveryUrl()); - Assertions.assertEquals("xip", response.iterator().next().intellectualPropertyPublisher()); - Assertions.assertEquals("pvkcnggocnwnjm", response.iterator().next().managedResourceGroup().resourceId()); - Assertions.assertEquals("tlam", response.iterator().next().mlFlowRegistryUri()); - Assertions.assertEquals("k", response.iterator().next().registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("jxwwqz", + Assertions.assertEquals("azkmqfwbgdmfv", response.iterator().next().location()); + Assertions.assertEquals("mpotalopfigrx", response.iterator().next().tags().get("trcodbqeogldmxxb")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("tugpeametsdwxfa", response.iterator().next().kind()); + Assertions.assertEquals("xccfegsav", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); + Assertions.assertEquals("ucv", response.iterator().next().sku().size()); + Assertions.assertEquals("ndh", response.iterator().next().sku().family()); + Assertions.assertEquals(745172301, response.iterator().next().sku().capacity()); + Assertions.assertEquals("bftswcd", response.iterator().next().discoveryUrl()); + Assertions.assertEquals("nseptvdtic", response.iterator().next().intellectualPropertyPublisher()); + Assertions.assertEquals("lgzwkopxdkb", response.iterator().next().managedResourceGroup().resourceId()); + Assertions.assertEquals("gppwxni", + response.iterator().next().managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("qmlzuwtbdz", response.iterator().next().mlFlowRegistryUri()); + Assertions.assertEquals("kmpebfhlgeehb", + response.iterator().next().registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("gplnl", response.iterator().next().registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("b", + Assertions.assertEquals("szunbuafm", response.iterator().next().registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("tetfdpu", + Assertions.assertEquals("uzyt", response.iterator().next().registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("n", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("cggoppmxcmoug", response.iterator().next().regionDetails().get(0).location()); + Assertions.assertEquals("awgqrwuh", response.iterator().next().publicNetworkAccess()); + Assertions.assertEquals("fgpbcbkc", response.iterator().next().regionDetails().get(0).location()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java index ad2c22cf7ab4..6e4ba13bee4a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -24,39 +24,40 @@ public final class RegistriesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"9434c079-d0ae-4331-9b62-bec292ff8172\",\"tenantId\":\"1e7e30fe-64f3-4a09-bd77-1caf731760aa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"trbq\":{\"principalId\":\"99cfc218-6b07-4dc8-940b-3bd958de9722\",\"clientId\":\"164a1e67-fb20-4e86-8758-81b0629b5065\"},\"kliop\":{\"principalId\":\"843da938-0b4a-45f1-acb0-d3ffba09fff6\",\"clientId\":\"4590e8db-037f-49bc-821c-c48784efef99\"},\"katccetyyv\":{\"principalId\":\"f6ac3e80-e019-4680-8cac-f0bfb771a1cc\",\"clientId\":\"5bf7e090-b85b-4155-814b-45e160d3eed0\"}}},\"kind\":\"wobbwns\",\"properties\":{\"discoveryUrl\":\"yirt\",\"intellectualPropertyPublisher\":\"zkpjeegzhhfn\",\"managedResourceGroup\":{\"resourceId\":\"lepcklowuthf\"},\"mlFlowRegistryUri\":\"hnmllbljehwhxxu\",\"registryPrivateEndpointConnections\":[{\"id\":\"a\",\"location\":\"hzkvna\",\"properties\":{\"groupIds\":[\"qwsddxaov\",\"bfllfkeub\",\"iibuab\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"hvnjcbuzu\"}},{\"id\":\"qoeoukvinkgb\",\"location\":\"q\",\"properties\":{\"groupIds\":[\"hdyasklmyfh\",\"lxwedetawl\",\"atvfddqspd\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"jtszqexcqcwbxx\"}},{\"id\":\"vekqjdrumlvk\",\"location\":\"wq\",\"properties\":{\"groupIds\":[\"vmw\",\"yarswsvtzotmwxqd\",\"bdanfexlawkeqjhz\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"mjsk\"}},{\"id\":\"enjnady\",\"location\":\"vounbyv\",\"properties\":{\"groupIds\":[\"rrgxqbknoxj\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"hmmwbvr\"}}],\"publicNetworkAccess\":\"jbiigxxr\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"wigif\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"tlpshxjhanskooal\",\"storageAccountDetails\":[{},{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"qvfyoksstalji\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"j\",\"tier\":\"Basic\",\"size\":\"mnaaqhscaanddlv\",\"family\":\"uv\",\"capacity\":1190877470},\"location\":\"lsb\",\"tags\":{\"teklgs\":\"djvyclasdprknup\",\"oaol\":\"pvqczpk\",\"wcs\":\"h\",\"euimtxmd\":\"ebtjg\"},\"id\":\"exar\",\"name\":\"ukoir\",\"type\":\"ivftl\"}]}"; + = "{\"value\":[{\"properties\":{\"discoveryUrl\":\"rvyvtkmxvztshn\",\"intellectualPropertyPublisher\":\"fbpeigkflvovriq\",\"managedResourceGroup\":{\"resourceId\":\"wbkqcgzygtdjhtb\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{\"principalId\":\"ur\"}]},\"mlFlowRegistryUri\":\"oyyumhzps\",\"registryPrivateEndpointConnections\":[{\"id\":\"acvt\",\"location\":\"hpbilnszyjbuwuu\",\"properties\":{\"groupIds\":[\"scizvkayioxp\",\"gq\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"lefeombodvdgf\"}},{\"id\":\"kqsjymcfvvzceuyu\",\"location\":\"tc\",\"properties\":{\"groupIds\":[\"p\",\"fnxr\",\"ncmlzvvrme\",\"fhqsa\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"revfwcbawapn\"}},{\"id\":\"tq\",\"location\":\"kmzv\",\"properties\":{\"groupIds\":[\"fblsxyfqgtodg\",\"llefmizdcsrv\",\"bnasgfyxhsxcg\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"bpqcnx\"}}],\"publicNetworkAccess\":\"ehojvmazu\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"ufhpdncokq\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"mn\",\"storageAccountDetails\":[{},{},{},{}]}]},\"identity\":{\"principalId\":\"hbjfnmmibg\",\"tenantId\":\"duyrg\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"aagwkrxjkcge\":{\"principalId\":\"mqeobrwre\",\"clientId\":\"gsawhamigsqzmfk\"}}},\"kind\":\"ubrfk\",\"sku\":{\"name\":\"kxnwtz\",\"tier\":\"Premium\",\"size\":\"qcrjvcjskqsfnmi\",\"family\":\"pdunhd\",\"capacity\":761120148},\"location\":\"zmt\",\"tags\":{\"tjk\":\"nh\",\"zlvkcm\":\"ibxl\",\"aunlodincf\":\"u\",\"psvax\":\"aoboiahk\"},\"id\":\"ksaxyeedvpmodkt\",\"name\":\"utydvvg\",\"type\":\"mor\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registries().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("lsb", response.iterator().next().location()); - Assertions.assertEquals("djvyclasdprknup", response.iterator().next().tags().get("teklgs")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("wobbwns", response.iterator().next().kind()); - Assertions.assertEquals("j", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("mnaaqhscaanddlv", response.iterator().next().sku().size()); - Assertions.assertEquals("uv", response.iterator().next().sku().family()); - Assertions.assertEquals(1190877470, response.iterator().next().sku().capacity()); - Assertions.assertEquals("yirt", response.iterator().next().discoveryUrl()); - Assertions.assertEquals("zkpjeegzhhfn", response.iterator().next().intellectualPropertyPublisher()); - Assertions.assertEquals("lepcklowuthf", response.iterator().next().managedResourceGroup().resourceId()); - Assertions.assertEquals("hnmllbljehwhxxu", response.iterator().next().mlFlowRegistryUri()); - Assertions.assertEquals("a", response.iterator().next().registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("hzkvna", + Assertions.assertEquals("zmt", response.iterator().next().location()); + Assertions.assertEquals("nh", response.iterator().next().tags().get("tjk")); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("ubrfk", response.iterator().next().kind()); + Assertions.assertEquals("kxnwtz", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); + Assertions.assertEquals("qcrjvcjskqsfnmi", response.iterator().next().sku().size()); + Assertions.assertEquals("pdunhd", response.iterator().next().sku().family()); + Assertions.assertEquals(761120148, response.iterator().next().sku().capacity()); + Assertions.assertEquals("rvyvtkmxvztshn", response.iterator().next().discoveryUrl()); + Assertions.assertEquals("fbpeigkflvovriq", response.iterator().next().intellectualPropertyPublisher()); + Assertions.assertEquals("wbkqcgzygtdjhtb", response.iterator().next().managedResourceGroup().resourceId()); + Assertions.assertEquals("ur", + response.iterator().next().managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("oyyumhzps", response.iterator().next().mlFlowRegistryUri()); + Assertions.assertEquals("acvt", response.iterator().next().registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("hpbilnszyjbuwuu", response.iterator().next().registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("qwsddxaov", + Assertions.assertEquals("scizvkayioxp", response.iterator().next().registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("hvnjcbuzu", + Assertions.assertEquals("lefeombodvdgf", response.iterator().next().registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("jbiigxxr", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("wigif", response.iterator().next().regionDetails().get(0).location()); + Assertions.assertEquals("ehojvmazu", response.iterator().next().publicNetworkAccess()); + Assertions.assertEquals("ufhpdncokq", response.iterator().next().regionDetails().get(0).location()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java index 66981a507e0f..1f087c5f93c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java @@ -1,18 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; @@ -37,83 +39,82 @@ public final class RegistriesRemoveRegionsMockTests { @Test public void testRemoveRegions() throws Exception { String responseStr - = "{\"identity\":{\"principalId\":\"e98eb1f4-78b4-4ccc-bbf7-3df0dcf73381\",\"tenantId\":\"ab07c3b1-ab20-4753-aaf8-10b832ae959b\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"jxdrgxpuxpzslmf\":{\"principalId\":\"5263d61b-b20a-44f1-b1ec-aa5982634523\",\"clientId\":\"1296c499-c356-4dd9-ad7c-8e76c83dab8e\"}}},\"kind\":\"pzrycchqz\",\"properties\":{\"discoveryUrl\":\"gesdzgszjhe\",\"intellectualPropertyPublisher\":\"mdhchi\",\"managedResourceGroup\":{\"resourceId\":\"rhgpityeuv\"},\"mlFlowRegistryUri\":\"sbmebfgbzn\",\"registryPrivateEndpointConnections\":[{\"id\":\"kupaeywy\",\"location\":\"vyzuyqzjfvbn\",\"properties\":{\"groupIds\":[\"zlscyzvvsxmyz\",\"sgb\",\"cqheixazebmmjaig\",\"xwqiparctsheggt\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"kxx\"}},{\"id\":\"whoosrsolhhv\",\"location\":\"oejbgiqhjpe\",\"properties\":{\"groupIds\":[\"ifie\",\"xxorsdvuirqfk\",\"jllfgmdoaihl\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"ci\"}}],\"publicNetworkAccess\":\"irybwgaccvwky\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"tbynxshcawexge\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"zxxkojjphbobu\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"wnpcxdkmtvparyub\",\"tier\":\"Standard\",\"size\":\"lpz\",\"family\":\"votuc\",\"capacity\":489805159},\"location\":\"ocumqzf\",\"tags\":{\"qsgert\":\"emzdnvnooklgren\",\"bd\":\"icemgsnc\",\"slbnunpxswmcc\":\"kphaed\"},\"id\":\"k\",\"name\":\"viaaep\",\"type\":\"lxbofdchboacf\"}"; + = "{\"properties\":{\"discoveryUrl\":\"pjbblukgctv\",\"intellectualPropertyPublisher\":\"pjvsyydjlhduk\",\"managedResourceGroup\":{\"resourceId\":\"vyeegx\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{\"principalId\":\"wumfjd\"},{\"principalId\":\"eqvnxpfyxdj\"},{\"principalId\":\"nonxemhqpz\"},{\"principalId\":\"atwvgcm\"}]},\"mlFlowRegistryUri\":\"djlwwefevtwllq\",\"registryPrivateEndpointConnections\":[{\"id\":\"coyvf\",\"location\":\"kzuhkshxjkckwbq\",\"properties\":{\"groupIds\":[\"mmkwahrooy\",\"hob\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"epacoerohex\"}},{\"id\":\"gukfkbsycbdymb\",\"location\":\"eenlqtqyvlfb\",\"properties\":{\"groupIds\":[\"dvfjd\",\"qephtoshqt\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"wgujrcn\"}},{\"id\":\"e\",\"location\":\"yqoizfyasyddqbws\",\"properties\":{\"groupIds\":[\"yeomiflrvfeow\",\"tshwfrhhasabva\",\"znwwu\",\"kbpgci\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"p\"}},{\"id\":\"j\",\"location\":\"fwuqprpdgitenyu\",\"properties\":{\"groupIds\":[\"zmpnxghamrplanch\",\"otmmxlmxejwyv\",\"z\",\"jwvtuekbbypqsm\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"qieiuxhj\"}}],\"publicNetworkAccess\":\"ndalnj\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"jpcpihlzyxvtaj\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{},{}],\"location\":\"dnekurdgcpz\",\"storageAccountDetails\":[{}]}]},\"identity\":{\"principalId\":\"engnpuelrnanbrpk\",\"tenantId\":\"uxfbageg\",\"type\":\"None\",\"userAssignedIdentities\":{\"einvzsodm\":{\"principalId\":\"ckiwxggfagijxm\",\"clientId\":\"oefnhxhahu\"},\"jkot\":{\"principalId\":\"rq\",\"clientId\":\"sgkq\"},\"bofprsmivapesb\":{\"principalId\":\"cjxhyzzlocjhz\",\"clientId\":\"dbrbmc\"},\"leuo\":{\"principalId\":\"llejrw\",\"clientId\":\"fvtghqxtmblmf\"}}},\"kind\":\"lvsprbxjtezujtou\",\"sku\":{\"name\":\"de\",\"tier\":\"Basic\",\"size\":\"ssrjciex\",\"family\":\"emt\",\"capacity\":189711822},\"location\":\"bymmcgsksc\",\"tags\":{\"hgwakptb\":\"ehaxicjojxolkn\"},\"id\":\"mbglmnlbnatln\",\"name\":\"hzzcdkxortdzzvhb\",\"type\":\"jk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Registry response = manager.registries() - .removeRegions("bbbgvm", "wyzxqhuhmldhnz", new RegistryInner().withLocation("jqsshu") - .withTags(mapOf("rqza", "ttnurkm", "qvvtjwdlduvim", "uwome", "rmxoxtap", "tce", "bkj", "fbj")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("o", new UserAssignedIdentity(), "tqhq", - new UserAssignedIdentity(), "uaermawwlnsdaz", new UserAssignedIdentity()))) - .withKind("emcotwfuot") - .withSku(new Sku().withName("znyjqbwxp") - .withTier(SkuTier.STANDARD) - .withSize("isloquttkbzwgju") - .withFamily("bdqm") - .withCapacity(310451773)) - .withDiscoveryUrl("sxzhik") - .withIntellectualPropertyPublisher("fszxbupsxqo") - .withManagedResourceGroup(new ArmResourceId().withResourceId("xcgqkhyvtajwkr")) - .withMlFlowRegistryUri("zlmwfncwlwov") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("mjbyssprkbzraljw") - .withLocation("csa") - .withGroupIds(Arrays.asList("pgzmxrg")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("jdmjunnt"), - new RegistryPrivateEndpointConnection().withId("g") - .withLocation("vnwrziminet") - .withGroupIds(Arrays.asList("fuxdtpjcsqkedlcl")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("yfftqombdsgqxa"))) - .withPublicNetworkAccess("duo") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("byfdfuajnhpy") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails( - Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("iw") + .removeRegions("pcjes", "yvuz", + new RegistryInner().withLocation("tupmrslwknrdv") + .withTags(mapOf("kdeetnne", "jerndzzywxqraqx", "szuxjmrzsxwas", "putl")) + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("mocbxh", new UserAssignedIdentity(), "uugdykg", new UserAssignedIdentity(), + "ebcrelue", new UserAssignedIdentity(), "oxdjklf", new UserAssignedIdentity()))) + .withKind("ntk") + .withSku(new Sku().withName("y") + .withTier(SkuTier.BASIC) + .withSize("slwnlgjdlh") + .withFamily("spybnnnlpqdn") + .withCapacity(1755180349)) + .withDiscoveryUrl("svmshkkgygfohrm") + .withIntellectualPropertyPublisher("hlclpkr") + .withManagedResourceGroup(new ArmResourceId().withResourceId("bmjjv")) + .withManagedResourceGroupSettings(new ManagedResourceGroupSettings().withAssignedIdentities( + Arrays.asList(new ManagedResourceGroupAssignedIdentities().withPrincipalId("rfnztxtmrmgf"), + new ManagedResourceGroupAssignedIdentities().withPrincipalId("viilohlgrjcxhhf")))) + .withMlFlowRegistryUri("nsjxwfogb") + .withRegistryPrivateEndpointConnections(Arrays.asList( + new RegistryPrivateEndpointConnection().withId("yumbweprln") + .withLocation("msxhdk") + .withGroupIds(Arrays.asList("x", "ahap", "snbyoullyfzm", "xrmxxjv")) + .withPrivateEndpoint(new PrivateEndpointResource()) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState()) + .withProvisioningState("jgzkmwfwzlm"), + new RegistryPrivateEndpointConnection().withId("fmdjsiomm") + .withLocation("ph") + .withGroupIds(Arrays.asList("r")) + .withPrivateEndpoint(new PrivateEndpointResource()) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState()) + .withProvisioningState("pfcghdtt"))) + .withPublicNetworkAccess("qxxcpbzxpzloov") + .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() + .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) + .withLocation("tcvzuzp") .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())))), + Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())))), com.azure.core.util.Context.NONE); - Assertions.assertEquals("ocumqzf", response.location()); - Assertions.assertEquals("emzdnvnooklgren", response.tags().get("qsgert")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("pzrycchqz", response.kind()); - Assertions.assertEquals("wnpcxdkmtvparyub", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("lpz", response.sku().size()); - Assertions.assertEquals("votuc", response.sku().family()); - Assertions.assertEquals(489805159, response.sku().capacity()); - Assertions.assertEquals("gesdzgszjhe", response.discoveryUrl()); - Assertions.assertEquals("mdhchi", response.intellectualPropertyPublisher()); - Assertions.assertEquals("rhgpityeuv", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("sbmebfgbzn", response.mlFlowRegistryUri()); - Assertions.assertEquals("kupaeywy", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("vyzuyqzjfvbn", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("zlscyzvvsxmyz", - response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("kxx", response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("irybwgaccvwky", response.publicNetworkAccess()); - Assertions.assertEquals("tbynxshcawexge", response.regionDetails().get(0).location()); + Assertions.assertEquals("bymmcgsksc", response.location()); + Assertions.assertEquals("ehaxicjojxolkn", response.tags().get("hgwakptb")); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("lvsprbxjtezujtou", response.kind()); + Assertions.assertEquals("de", response.sku().name()); + Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); + Assertions.assertEquals("ssrjciex", response.sku().size()); + Assertions.assertEquals("emt", response.sku().family()); + Assertions.assertEquals(189711822, response.sku().capacity()); + Assertions.assertEquals("pjbblukgctv", response.discoveryUrl()); + Assertions.assertEquals("pjvsyydjlhduk", response.intellectualPropertyPublisher()); + Assertions.assertEquals("vyeegx", response.managedResourceGroup().resourceId()); + Assertions.assertEquals("wumfjd", + response.managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("djlwwefevtwllq", response.mlFlowRegistryUri()); + Assertions.assertEquals("coyvf", response.registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("kzuhkshxjkckwbq", response.registryPrivateEndpointConnections().get(0).location()); + Assertions.assertEquals("mmkwahrooy", response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); + Assertions.assertEquals("epacoerohex", + response.registryPrivateEndpointConnections().get(0).provisioningState()); + Assertions.assertEquals("ndalnj", response.publicNetworkAccess()); + Assertions.assertEquals("jpcpihlzyxvtaj", response.regionDetails().get(0).location()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java index faec9d02becb..2a9976b31b24 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; @@ -25,28 +25,28 @@ public final class RegistryCodeContainersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"putocr\",\"nextVersion\":\"gqicmdrgcuzjmvkr\",\"description\":\"jcqhgcmljzksqim\",\"tags\":{\"qpvhszopeukufds\":\"jvfiomhc\",\"fsjbpwjwz\":\"bsskgqjemosq\"},\"properties\":{\"zkhxfp\":\"pdzy\",\"ibweua\":\"cuudqhadxjvvl\"}},\"id\":\"txlz\",\"name\":\"coqxtvytzqlyldj\",\"type\":\"zmxyrazzstjvcs\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"us\",\"nextVersion\":\"xbzmpvue\",\"description\":\"rnnwgrxzcn\",\"properties\":{\"mgqzqlsnyc\":\"ezxluimkwb\",\"cfvinjxciun\":\"hpcjztziuuuyv\",\"zbp\":\"tcxgdgqkletlwav\",\"drqgionm\":\"xxvft\"},\"tags\":{\"qlcak\":\"jmtdnymbeeysk\"}},\"id\":\"sjg\",\"name\":\"dhgezyhpha\",\"type\":\"kh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CodeContainer response = manager.registryCodeContainers() - .createOrUpdate("btd", "zhixccnkf", "og", - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("ev") + .createOrUpdate("oc", "aetctjhpgm", "azsjsuevf", + new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("eki") + .withProperties(mapOf("bxldl", "qldilmxsvzwbktal", "kalpqlnn", "thmibqgldht")) .withTags( - mapOf("wukfjvqglaxseisv", "ddpwmgw", "phheove", "vg", "h", "kpalecztl", "fssrgrq", "tzpu")) - .withProperties(mapOf("louurmuzembqq", "quo", "oxlorxgsl", "ehdhjofywwna", "u", "c")) + mapOf("xlewlwbxufqf", "jea", "lfqvo", "kkvij", "fldaq", "zowdqv", "rmfee", "aopzqpfwnjdyoxf")) .withIsArchived(true)), com.azure.core.util.Context.NONE); - Assertions.assertEquals("jcqhgcmljzksqim", response.properties().description()); - Assertions.assertEquals("jvfiomhc", response.properties().tags().get("qpvhszopeukufds")); - Assertions.assertEquals("pdzy", response.properties().properties().get("zkhxfp")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("rnnwgrxzcn", response.properties().description()); + Assertions.assertEquals("ezxluimkwb", response.properties().properties().get("mgqzqlsnyc")); + Assertions.assertEquals("jmtdnymbeeysk", response.properties().tags().get("qlcak")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java index b1a0331bd4c3..37e8222241f3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.registryCodeContainers().delete("gnmfakeqnitroml", "svktfps", "ows", com.azure.core.util.Context.NONE); + manager.registryCodeContainers().delete("qm", "gg", "kqitpbynetyxuxo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java index 15722bd5391f..b3207f3caa82 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.CodeContainer; @@ -21,22 +21,22 @@ public final class RegistryCodeContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"iri\",\"nextVersion\":\"mqtr\",\"description\":\"doxdegacdedpkw\",\"tags\":{\"mn\":\"bpgdcidpdaqe\"},\"properties\":{\"dureevivk\":\"irqqclsaqife\",\"fpxeswctlfytb\":\"glioklsu\"}},\"id\":\"ytvnpbgcesfd\",\"name\":\"fclmowur\",\"type\":\"fofkbcjzzwweob\"}"; + = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"ovhjkwfolpjre\",\"nextVersion\":\"hvoiranxqnzssv\",\"description\":\"dtqykz\",\"properties\":{\"trnqxi\":\"oqrej\",\"alvchfumlf\":\"yozryoxmfrxfxycj\"},\"tags\":{\"qlrt\":\"zxxkokipklfwnhfk\",\"jitbnhglrvlarozs\":\"fswqdkv\",\"abgsdxtwqqukgo\":\"mucr\",\"ksltunrwxsqvx\":\"lvjgsk\"}},\"id\":\"pccfwq\",\"name\":\"souqyzx\",\"type\":\"jehdklvqtm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CodeContainer response = manager.registryCodeContainers() - .getWithResponse("vfxjtxlawmv", "yqabjropxfqd", "llznyjyuwqlzw", com.azure.core.util.Context.NONE) + .getWithResponse("cwyltslfccy", "vysfmndr", "qqjkegbmldkcih", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("doxdegacdedpkw", response.properties().description()); - Assertions.assertEquals("bpgdcidpdaqe", response.properties().tags().get("mn")); - Assertions.assertEquals("irqqclsaqife", response.properties().properties().get("dureevivk")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("dtqykz", response.properties().description()); + Assertions.assertEquals("oqrej", response.properties().properties().get("trnqxi")); + Assertions.assertEquals("zxxkokipklfwnhfk", response.properties().tags().get("qlrt")); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java index 6fe21069c33f..8309f360824a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.CodeContainer; @@ -22,22 +22,22 @@ public final class RegistryCodeContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"clclf\",\"nextVersion\":\"vyjommw\",\"description\":\"poipjylxtebvse\",\"tags\":{\"lkbntcvpvdfmo\":\"vvpaysqwhzdcyand\",\"sqpffapjpjmsbzz\":\"qctfvxu\",\"iubeqk\":\"snyfowyjzuak\"},\"properties\":{\"h\":\"lrglhxsoang\",\"reneggpdtyz\":\"nhogse\",\"dupe\":\"xlitwkejmgem\"}},\"id\":\"kvsd\",\"name\":\"vhr\",\"type\":\"pezammpkapvnpeu\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"hm\",\"nextVersion\":\"ccnkgiusrvswcp\",\"description\":\"aoxigpdioupp\",\"properties\":{\"bogxkidbcxbgfw\":\"smglutnlynplxx\",\"ganmopcmetdruu\":\"cfwlwn\",\"miy\":\"imviefbje\"},\"tags\":{\"wnajbbpxqsvaxv\":\"juuepnju\",\"bwiwhtjoxx\":\"wisdwtugadxupipg\",\"nnwmwwxyawxkd\":\"lhkz\",\"p\":\"evhyuuih\"}},\"id\":\"mcvu\",\"name\":\"ekubljnizwztlcr\",\"type\":\"fiiif\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.registryCodeContainers() - .list("sphtraitrmsukxtu", "tgcptctxpoeg", "ckm", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.registryCodeContainers().list("oclef", "gg", "g", com.azure.core.util.Context.NONE); - Assertions.assertEquals("poipjylxtebvse", response.iterator().next().properties().description()); - Assertions.assertEquals("vvpaysqwhzdcyand", - response.iterator().next().properties().tags().get("lkbntcvpvdfmo")); - Assertions.assertEquals("lrglhxsoang", response.iterator().next().properties().properties().get("h")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("aoxigpdioupp", response.iterator().next().properties().description()); + Assertions.assertEquals("smglutnlynplxx", + response.iterator().next().properties().properties().get("bogxkidbcxbgfw")); + Assertions.assertEquals("juuepnju", response.iterator().next().properties().tags().get("wnajbbpxqsvaxv")); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java index d21e98f6c2d8..56749672c87c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.registryCodeVersions() - .delete("hcxwwwvun", "nsgvxhxrm", "atrtcqyfjvifbmo", "tehqyoytrcoufkq", com.azure.core.util.Context.NONE); + .delete("xvsytbxcjubad", "lmjqu", "iov", "cnnthluzeyv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java index be53f387fa8b..cdaad8a15fd3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; @@ -25,27 +25,28 @@ public final class RegistryComponentContainersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"cuuuexsmnteevfg\",\"nextVersion\":\"fezraqs\",\"description\":\"kodkgxq\",\"tags\":{\"glwdzfss\":\"rxgmzz\"},\"properties\":{\"ddkkraj\":\"gaok\"}},\"id\":\"uklx\",\"name\":\"el\",\"type\":\"zpyqbwhuecx\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"wsxnyockpcssus\",\"nextVersion\":\"gzmmrzw\",\"description\":\"btkcvola\",\"properties\":{\"u\":\"kgov\",\"xiyhmjwsnwk\":\"ndcqox\"},\"tags\":{\"gbouvzjodi\":\"vaeqi\",\"ajbenf\":\"gudarc\",\"ikffczwaew\":\"uufvo\"}},\"id\":\"lsuhsghdovcp\",\"name\":\"wfnapgagvhsix\",\"type\":\"cdaukhtw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentContainer response = manager.registryComponentContainers() - .createOrUpdate("fxnwcgzuoxixtxxx", "jsehbknnrnk", "jfawpcbsogz", new ComponentContainerInner() - .withProperties(new ComponentContainerProperties().withDescription("tvbmyzuqfdqdktr") - .withTags(mapOf("mxlffqgdodnkq", "qszhhqngjndkv")) - .withProperties(mapOf("dazmdzesimeft", "gkmj", "xiefcorzbidaeb", "drfzjlflzagvdava", "e", "zni")) - .withIsArchived(true)), + .createOrUpdate("byqxeyzq", "upsipc", "xvaovssibn", + new ComponentContainerInner().withProperties(new ComponentContainerProperties().withDescription("iyo") + .withProperties(mapOf("ndwcfmzmqmgdlg", "ualrixzdbntopba", "pstwcyigrhf", "xkyboysquygok", + "hhvoowr", "vxypqukcojy")) + .withTags(mapOf("otawyiq", "u", "bhzukrpfbhihddi", "jnxzvjnmpvsblud", "yfku", "uexy")) + .withIsArchived(false)), com.azure.core.util.Context.NONE); - Assertions.assertEquals("kodkgxq", response.properties().description()); - Assertions.assertEquals("rxgmzz", response.properties().tags().get("glwdzfss")); - Assertions.assertEquals("gaok", response.properties().properties().get("ddkkraj")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("btkcvola", response.properties().description()); + Assertions.assertEquals("kgov", response.properties().properties().get("u")); + Assertions.assertEquals("vaeqi", response.properties().tags().get("gbouvzjodi")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java index 53430a11e763..e421d36bb3ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.registryComponentContainers() - .delete("ahktxvcbicfecth", "tbkjw", "ztpxj", com.azure.core.util.Context.NONE); + manager.registryComponentContainers().delete("hsc", "omfo", "jkerdujfnb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java index fc749e8aa256..cff523b042bf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentContainer; @@ -21,22 +21,22 @@ public final class RegistryComponentContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"kgbtqq\",\"nextVersion\":\"bsynne\",\"description\":\"onjqhdheosx\",\"tags\":{\"tcwgpdbbgla\":\"udmpfhwypphtjt\",\"ds\":\"cctokfspvj\",\"ftyptwjwiyyeo\":\"kvrmp\"},\"properties\":{\"fzzi\":\"cmdjmvphwfnugsl\"}},\"id\":\"bgomvue\",\"name\":\"r\",\"type\":\"m\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"dzxyojzv\",\"nextVersion\":\"kfjgakay\",\"description\":\"kydqy\",\"properties\":{\"eabfyjam\":\"mfwrqzizggvmuotc\",\"p\":\"vwxlkhprltx\"},\"tags\":{\"wxbowcjkargg\":\"rbyqh\",\"wgylolvxw\":\"yu\",\"tgtlansykvlxsyc\":\"qlugnbudjypli\"}},\"id\":\"doxooxu\",\"name\":\"ufqoobwxctkv\",\"type\":\"qvpedwmhqcjreryp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentContainer response = manager.registryComponentContainers() - .getWithResponse("twk", "jdpayx", "pqiwuzr", com.azure.core.util.Context.NONE) + .getWithResponse("enrcqickhvps", "duiuvingm", "nq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("onjqhdheosx", response.properties().description()); - Assertions.assertEquals("udmpfhwypphtjt", response.properties().tags().get("tcwgpdbbgla")); - Assertions.assertEquals("cmdjmvphwfnugsl", response.properties().properties().get("fzzi")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("kydqy", response.properties().description()); + Assertions.assertEquals("mfwrqzizggvmuotc", response.properties().properties().get("eabfyjam")); + Assertions.assertEquals("rbyqh", response.properties().tags().get("wxbowcjkargg")); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java index 870a40bde9c6..e00a9ffff9b4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentContainer; @@ -22,21 +22,21 @@ public final class RegistryComponentContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"uljgxotu\",\"nextVersion\":\"mkiyaosthulzug\",\"description\":\"gspxldlnoc\",\"tags\":{\"wm\":\"gimizlukj\",\"mspppoeszthjt\":\"ksr\"},\"properties\":{\"gzzuqi\":\"skdiy\",\"gvmxwbohxd\":\"psybqo\",\"brhgnaka\":\"koe\",\"umqeu\":\"wscmneev\"}},\"id\":\"yyh\",\"name\":\"gqaeiv\",\"type\":\"qutxrbgbzgfhzd\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"lph\",\"nextVersion\":\"sqcubyjrnsllite\",\"description\":\"aheecsfttsub\",\"properties\":{\"z\":\"hjnmdcyr\"},\"tags\":{\"dxtwyxpkwwdkkvd\":\"qgvt\",\"iluexvml\":\"vdvkeyqxjchdnlx\",\"lbqkguchd\":\"xqpsqpfxjwt\"}},\"id\":\"rjjdjikiqtzub\",\"name\":\"ddkujvqzcuqc\",\"type\":\"lwnxryyqtjcrpax\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryComponentContainers() - .list("gdpftfcb", "tsrdplqdyzaci", "sfzrguzliyvsbfsi", com.azure.core.util.Context.NONE); + .list("a", "roadutogbkdc", "sgval", com.azure.core.util.Context.NONE); - Assertions.assertEquals("gspxldlnoc", response.iterator().next().properties().description()); - Assertions.assertEquals("gimizlukj", response.iterator().next().properties().tags().get("wm")); - Assertions.assertEquals("skdiy", response.iterator().next().properties().properties().get("gzzuqi")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("aheecsfttsub", response.iterator().next().properties().description()); + Assertions.assertEquals("hjnmdcyr", response.iterator().next().properties().properties().get("z")); + Assertions.assertEquals("qgvt", response.iterator().next().properties().tags().get("dxtwyxpkwwdkkvd")); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java index c6706592a161..4338857308cc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; @@ -25,30 +25,31 @@ public final class RegistryComponentVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"componentSpec\":\"dataurmrfyyqj\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ddcuqddldaoyvf\",\"tags\":{\"joj\":\"ew\",\"zzw\":\"sxjht\",\"trgu\":\"ocygoyineuaxpmez\",\"oyxfoafzdypzlx\":\"lw\"},\"properties\":{\"qxa\":\"dhgwhlbpjuaj\",\"yy\":\"mitnwlyhbujysvd\",\"tjtnnrjewih\":\"dbhatmabtpgn\"}},\"id\":\"gaahmdfsp\",\"name\":\"dnxq\",\"type\":\"z\"}"; + = "{\"properties\":{\"componentSpec\":\"\\\"dataqxejjnti\\\"\",\"provisioningState\":\"Succeeded\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"o\",\"properties\":{\"zacw\":\"crbroeomuf\"},\"tags\":{\"hw\":\"wpbsspexe\"}},\"id\":\"j\",\"name\":\"oucjzbovuvmdzdqt\",\"type\":\"rguajsrdecbowkhm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentVersion response = manager.registryComponentVersions() - .createOrUpdate("oqatdjka", "dp", "e", "smxfzynfemqy", - new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("nl") - .withTags(mapOf("jwdzpvirzyudrqu", "dsqx", "n", "rxhxmlfouqpskv", "h", "bpmr")) - .withProperties(mapOf("acz", "cq", "tt", "vwae", "qlyyslg", "jqyfy")) - .withIsArchived(false) + .createOrUpdate("naokxouknz", "mzassr", "qzuk", "btxtdmutdrrqq", + new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("wfnom") + .withProperties(mapOf("u", "humngihfndsj", "offckejx", "lfvrpbcgdptf", "qwxxynttrn", "mng", + "xuyzrnngnmfhmw", "svximgnsiy")) + .withTags(mapOf("o", "mm")) .withIsAnonymous(true) - .withComponentSpec("datakpgwgssd")), + .withIsArchived(true) + .withComponentSpec("\"datahklttliuwdrtwq\"")), com.azure.core.util.Context.NONE); - Assertions.assertEquals("ddcuqddldaoyvf", response.properties().description()); - Assertions.assertEquals("ew", response.properties().tags().get("joj")); - Assertions.assertEquals("dhgwhlbpjuaj", response.properties().properties().get("qxa")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); + Assertions.assertEquals("o", response.properties().description()); + Assertions.assertEquals("crbroeomuf", response.properties().properties().get("zacw")); + Assertions.assertEquals("wpbsspexe", response.properties().tags().get("hw")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java index 7e1f5043ec34..01d955047293 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,11 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.registryComponentVersions().delete("wxqd", "oqzh", "wdjox", "kbd", com.azure.core.util.Context.NONE); + manager.registryComponentVersions() + .delete("ffllpdnnsujxoueq", "jzkhncaeyk", "eatztnprnshl", "iahvlzgsqwiubgbl", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java index 61bc43ec2de4..63dcbe69a0de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentVersion; @@ -21,23 +21,23 @@ public final class RegistryComponentVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"componentSpec\":\"datafzqyugtkxnc\",\"provisioningState\":\"Creating\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"cmwbejywwwvn\",\"tags\":{\"dfyziruqvgnjxi\":\"krmqevrhhafqf\",\"gikyluyu\":\"kgyjmzbm\",\"c\":\"mbrdcvoloxtv\"},\"properties\":{\"okkyankxvcptf\":\"yhmmglvnbenkps\",\"gazhlrdxpc\":\"fbhnkxasomaf\"}},\"id\":\"utfz\",\"name\":\"trcdzytrtffvpkd\",\"type\":\"cyuwenbqvpraw\"}"; + = "{\"properties\":{\"componentSpec\":\"\\\"datao\\\"\",\"provisioningState\":\"Canceled\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"obrtaevqafdhpki\",\"properties\":{\"vdtqhrtn\":\"yrobckelowsm\"},\"tags\":{\"skitok\":\"qynu\"}},\"id\":\"amefzzgwjoau\",\"name\":\"dmdpndouylf\",\"type\":\"fgq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ComponentVersion response = manager.registryComponentVersions() - .getWithResponse("sobvcnsb", "oeznl", "hn", "z", com.azure.core.util.Context.NONE) + .getWithResponse("xlfxsetvdz", "dldm", "fqftywbbanzhd", "iuxotbvflgkkiu", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cmwbejywwwvn", response.properties().description()); - Assertions.assertEquals("krmqevrhhafqf", response.properties().tags().get("dfyziruqvgnjxi")); - Assertions.assertEquals("yhmmglvnbenkps", response.properties().properties().get("okkyankxvcptf")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); + Assertions.assertEquals("obrtaevqafdhpki", response.properties().description()); + Assertions.assertEquals("yrobckelowsm", response.properties().properties().get("vdtqhrtn")); + Assertions.assertEquals("qynu", response.properties().tags().get("skitok")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java index 96c4d78ccf7f..103744633f7c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ComponentVersion; @@ -22,23 +22,22 @@ public final class RegistryComponentVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"componentSpec\":\"datakz\",\"provisioningState\":\"Deleting\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"plslfc\",\"tags\":{\"lkyqfnjo\":\"ksuowt\",\"nrtc\":\"rhnxzmfvmw\"},\"properties\":{\"vwnbu\":\"wwhyxfshmbyd\",\"mpshaezcldkckrn\":\"sodtevzshqyke\"}},\"id\":\"qdmhcejstfs\",\"name\":\"a\",\"type\":\"jakgk\"}]}"; + = "{\"value\":[{\"properties\":{\"componentSpec\":\"\\\"datatmxq\\\"\",\"provisioningState\":\"Deleting\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"apfwusfbrnjvz\",\"properties\":{\"ubs\":\"vjemp\",\"u\":\"wzntbi\",\"fift\":\"fg\"},\"tags\":{\"hcfndijz\":\"puukpswwutdu\",\"mxtijssytdp\":\"vckhbu\"}},\"id\":\"jtwibwcd\",\"name\":\"ymnswxq\",\"type\":\"mhffca\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryComponentVersions() - .list("gsingmhpavsfg", "rvqrwwbdrwroqk", "jnzpqhqqsa", "kyu", 2097989242, "ameaasjqen", - com.azure.core.util.Context.NONE); + .list("jyisjscuwy", "uktzc", "x", "xaih", 709399278, "guxrziryxrpj", com.azure.core.util.Context.NONE); - Assertions.assertEquals("plslfc", response.iterator().next().properties().description()); - Assertions.assertEquals("ksuowt", response.iterator().next().properties().tags().get("lkyqfnjo")); - Assertions.assertEquals("wwhyxfshmbyd", response.iterator().next().properties().properties().get("vwnbu")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); + Assertions.assertEquals("apfwusfbrnjvz", response.iterator().next().properties().description()); + Assertions.assertEquals("vjemp", response.iterator().next().properties().properties().get("ubs")); + Assertions.assertEquals("puukpswwutdu", response.iterator().next().properties().tags().get("hcfndijz")); + Assertions.assertFalse(response.iterator().next().properties().isAnonymous()); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java index 6deceebf956a..9ce340c587a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; @@ -26,30 +26,29 @@ public final class RegistryDataContainersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"zfmnpbdrcibjxnn\",\"nextVersion\":\"ztnhvdtuoamqobq\",\"description\":\"spshtis\",\"tags\":{\"wckzeb\":\"eoctrzjwn\"},\"properties\":{\"qzlmln\":\"wdxgyypm\",\"ilyeshox\":\"rcatkuhskegdkvv\",\"jdmu\":\"z\",\"xzgzum\":\"busxyugozwp\"}},\"id\":\"tiixkkbygbgi\",\"name\":\"kwyshybbn\",\"type\":\"ttyizonzsurqcoja\"}"; + = "{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"abbyfhzyb\",\"nextVersion\":\"xenpk\",\"description\":\"nlbrcydwrcjta\",\"properties\":{\"ilzgpghjak\":\"xhlqioqhoxcgfyzl\",\"slwmjlpbxv\":\"mnxjnqma\"},\"tags\":{\"ojrwpoxuy\":\"up\",\"gtxwyqkkdumxdrg\":\"qyoyjptkyfrk\",\"ovfundk\":\"msioffyboon\"}},\"id\":\"myxmsbtq\",\"name\":\"hgnugcbjx\",\"type\":\"judg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataContainer response = manager.registryDataContainers() - .createOrUpdate("uijtickzo", "guzprpxhhboigzxk", "pqlrzhtocjzfppex", - new DataContainerInner().withProperties(new DataContainerProperties().withDescription("joypplodaqrbk") - .withTags(mapOf("valcrqaxlmbrtvtg", "ffsobg")) - .withProperties( - mapOf("oysxaqq", "lplgtlayyxhxj", "njc", "hdfhfaob", "qwssyd", "bozvc", "ywo", "wrybi")) + .createOrUpdate("b", "bmjbmtxbi", "f", + new DataContainerInner().withProperties(new DataContainerProperties().withDescription("yvtrsgfdmtfn") + .withProperties(mapOf("cd", "xqqlbmiqbdiahj", "yn", "pdlxwsfddyqp", "lj", "owmjsur")) + .withTags(mapOf("zqvgad", "jhhruw")) .withIsArchived(true) - .withDataType(DataType.URI_FILE)), + .withDataType(DataType.URI_FOLDER)), com.azure.core.util.Context.NONE); - Assertions.assertEquals("spshtis", response.properties().description()); - Assertions.assertEquals("eoctrzjwn", response.properties().tags().get("wckzeb")); - Assertions.assertEquals("wdxgyypm", response.properties().properties().get("qzlmln")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); + Assertions.assertEquals("nlbrcydwrcjta", response.properties().description()); + Assertions.assertEquals("xhlqioqhoxcgfyzl", response.properties().properties().get("ilzgpghjak")); + Assertions.assertEquals("up", response.properties().tags().get("ojrwpoxuy")); + Assertions.assertFalse(response.properties().isArchived()); + Assertions.assertEquals(DataType.MLTABLE, response.properties().dataType()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java index 5cf9319d1588..380bc54ef325 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.registryDataContainers().delete("xhwis", "so", "db", com.azure.core.util.Context.NONE); + manager.registryDataContainers() + .delete("wrjuiuzlf", "hzihlzljqcmmgsm", "ujunqwkjfmt", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java index 08126f6d05c1..edd8af6eae0f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataContainer; @@ -22,23 +22,23 @@ public final class RegistryDataContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"ywab\",\"nextVersion\":\"tnipaptgv\",\"description\":\"qyjukkajn\",\"tags\":{\"femiwfhhawbabhz\":\"ltonop\",\"qnxyd\":\"fcdi\",\"zsuspaywvslq\":\"zfoi\"},\"properties\":{\"kxfmu\":\"nzea\",\"v\":\"dbvytq\",\"axgbiwpgop\":\"uymkdeuqxlvzpfd\"}},\"id\":\"ktthbmrrmtrx\",\"name\":\"jmpdvrjzwaw\",\"type\":\"ewajccsdjuz\"}"; + = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"gcpwn\",\"nextVersion\":\"pbiuwnxhqeljmf\",\"description\":\"qdikuvjclspdh\",\"properties\":{\"n\":\"fl\",\"plqnilozf\":\"pbawtpwnkiwx\",\"dmlie\":\"gvsfafcar\",\"fc\":\"dwocufcsh\"},\"tags\":{\"ofwqdro\":\"x\",\"egilbkzctqbvntl\":\"k\"}},\"id\":\"gj\",\"name\":\"exqoydyislepdbs\",\"type\":\"klntspfnumpyy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataContainer response = manager.registryDataContainers() - .getWithResponse("wjsba", "xaxtuxirppbiichl", "gkvuixwonkr", com.azure.core.util.Context.NONE) + .getWithResponse("vrd", "dlgxmggh", "tlhsz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("qyjukkajn", response.properties().description()); - Assertions.assertEquals("ltonop", response.properties().tags().get("femiwfhhawbabhz")); - Assertions.assertEquals("nzea", response.properties().properties().get("kxfmu")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("qdikuvjclspdh", response.properties().description()); + Assertions.assertEquals("fl", response.properties().properties().get("n")); + Assertions.assertEquals("x", response.properties().tags().get("ofwqdro")); + Assertions.assertFalse(response.properties().isArchived()); Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java index 8e068fb69d93..bd52d38eb1a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataContainer; @@ -24,22 +24,23 @@ public final class RegistryDataContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"ghaknklt\",\"nextVersion\":\"wppvihbmwrv\",\"description\":\"drohu\",\"tags\":{\"nygtixkgyob\":\"kabhvxjuaivxzni\",\"xzpqditudcltf\":\"kphvdlo\",\"kehldopjsxvbbwsg\":\"ieileemw\",\"d\":\"kkmibnmdp\"},\"properties\":{\"qa\":\"tgzwmzhcmrl\",\"nmbj\":\"styzavkyjjlu\",\"optythctoxo\":\"bngzldvvd\"}},\"id\":\"mqnerwh\",\"name\":\"mvidsssfzsgzgusp\",\"type\":\"jomeq\"}]}"; + = "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"koicpkoamqf\",\"nextVersion\":\"baobj\",\"description\":\"fkcvhh\",\"properties\":{\"jvdxenxjvapdqgf\":\"kuuikrsielrw\",\"acf\":\"ygrfyyknx\",\"urocryf\":\"bynlcimj\"},\"tags\":{\"tbbfweozkb\":\"tcyzuzvbqbroyrw\"}},\"id\":\"ffsup\",\"name\":\"cslzca\",\"type\":\"odcvf\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryDataContainers() - .list("tertnzrrwsc", "clhdwienvtol", "jy", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); + .list("ybdz", "xbckxen", "zowguirhexjpwy", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); - Assertions.assertEquals("drohu", response.iterator().next().properties().description()); - Assertions.assertEquals("kabhvxjuaivxzni", response.iterator().next().properties().tags().get("nygtixkgyob")); - Assertions.assertEquals("tgzwmzhcmrl", response.iterator().next().properties().properties().get("qa")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.iterator().next().properties().dataType()); + Assertions.assertEquals("fkcvhh", response.iterator().next().properties().description()); + Assertions.assertEquals("kuuikrsielrw", + response.iterator().next().properties().properties().get("jvdxenxjvapdqgf")); + Assertions.assertEquals("tcyzuzvbqbroyrw", response.iterator().next().properties().tags().get("tbbfweozkb")); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); + Assertions.assertEquals(DataType.URI_FILE, response.iterator().next().properties().dataType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java index 0449f6fcf9f5..3bc2dd596590 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; @@ -25,31 +25,31 @@ public final class RegistryDataVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"ymxsfqeaxdqelu\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"viawg\",\"tags\":{\"zfz\":\"uhv\"},\"properties\":{\"djieask\":\"pbcbkcpym\",\"noskkhbmj\":\"kqclnfusr\",\"yeikbv\":\"hlyyuah\"}},\"id\":\"rurgbqaucpck\",\"name\":\"jnohafwm\",\"type\":\"pgjl\"}"; + = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"wltozxdzoldwv\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"terjjuzarege\",\"properties\":{\"uggdh\":\"zpuda\",\"keculxvkuxvccpda\":\"ttg\"},\"tags\":{\"swjwbhtawb\":\"sidityvvgxejhq\"}},\"id\":\"ybneuzueikadhusg\",\"name\":\"kbgljcywyr\",\"type\":\"xipxhlxxkviyjruq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataVersionBase response = manager.registryDataVersions() - .createOrUpdate("ppwxnikfz", "xxfnduv", "zjnnuwwv", "zrfxajtbcqj", - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("wyzrieitqml") - .withTags(mapOf("kmpebfhlgeehb", "tbdzqaj", "buafmoubukqmier", "jgplnlxrfeszu")) - .withProperties(mapOf("zytapgzdhzb", "obvveq")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("bkj")), + .createOrUpdate("jcwuzanpoyrqjoni", "nyhzestt", "cloq", "gzdbonep", + new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("zyto") + .withProperties(mapOf("qafnvjgix", "cthgqyvaoazfkykk", "inpyekslllzsqolc", "j", "bnnhwp", "whgn")) + .withTags(mapOf("ohfvxavhfhlx", "ifxz")) + .withIsAnonymous(true) + .withIsArchived(false) + .withDataUri("hfmzeufjzqaqeqc")), com.azure.core.util.Context.NONE); - Assertions.assertEquals("viawg", response.properties().description()); - Assertions.assertEquals("uhv", response.properties().tags().get("zfz")); - Assertions.assertEquals("pbcbkcpym", response.properties().properties().get("djieask")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("ymxsfqeaxdqelu", response.properties().dataUri()); + Assertions.assertEquals("terjjuzarege", response.properties().description()); + Assertions.assertEquals("zpuda", response.properties().properties().get("uggdh")); + Assertions.assertEquals("sidityvvgxejhq", response.properties().tags().get("swjwbhtawb")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("wltozxdzoldwv", response.properties().dataUri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java index 6f4d222b065d..bdd3ee4d18af 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.registryDataVersions() - .delete("vclfjyclvi", "dlff", "leirmtxfqpfildcg", "fouzfbpg", com.azure.core.util.Context.NONE); + .delete("ejyavxg", "ogcnwxkqqx", "njqtzdahv", "thnlceggyqlvn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java index fc248a2a444f..6c5c9fcdad75 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataVersionBase; @@ -21,24 +21,24 @@ public final class RegistryDataVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"akzbyqha\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"x\",\"tags\":{\"gsbpgmncrvtp\":\"olusyruxrzhhlhrv\",\"a\":\"foromppz\",\"plfcmpua\":\"qmeu\",\"iccu\":\"ugoceqtlyspjym\"},\"properties\":{\"nla\":\"f\",\"iwtwfgoc\":\"gixhqjqhgqwbb\",\"zugabkyy\":\"alvemn\",\"bftswcd\":\"syweohlmtsnvon\"}},\"id\":\"nseptvdtic\",\"name\":\"af\",\"type\":\"gzwkopxdkbtwoqh\"}"; + = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"cist\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"uajk\",\"properties\":{\"xd\":\"zqtgsaz\",\"asjbuhzucdljqjs\":\"aask\",\"undkjphv\":\"ncjwzeatezlt\"},\"tags\":{\"uxmcjythxe\":\"ivsh\",\"do\":\"rlpnajjticl\"}},\"id\":\"xbungmpnry\",\"name\":\"gucdfxglrcj\",\"type\":\"goazzy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DataVersionBase response = manager.registryDataVersions() - .getWithResponse("ryvidbzdylb", "jatgngwn", "jftecgprzsqmp", "q", com.azure.core.util.Context.NONE) + .getWithResponse("kpup", "sgfn", "txlkioviklxsgstu", "sa", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("x", response.properties().description()); - Assertions.assertEquals("olusyruxrzhhlhrv", response.properties().tags().get("gsbpgmncrvtp")); - Assertions.assertEquals("f", response.properties().properties().get("nla")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("akzbyqha", response.properties().dataUri()); + Assertions.assertEquals("uajk", response.properties().description()); + Assertions.assertEquals("zqtgsaz", response.properties().properties().get("xd")); + Assertions.assertEquals("ivsh", response.properties().tags().get("uxmcjythxe")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("cist", response.properties().dataUri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java index be9c4ed38eee..6fbadedbccc7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.DataVersionBase; @@ -23,24 +23,24 @@ public final class RegistryDataVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"czzunfnbphceeiv\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"pghcnuqhqpvt\",\"tags\":{\"ga\":\"fscl\",\"zjuzvw\":\"ygntbfytnhdnihu\"},\"properties\":{\"biwny\":\"dto\",\"objzr\":\"zdpxctsucrxdte\",\"ltyl\":\"wtidcnzalgmpupj\",\"p\":\"uudvbgvzlzjsb\"}},\"id\":\"tzaziydpoknseaim\",\"name\":\"dqraokdarluobbva\",\"type\":\"qwzknyujxy\"}]}"; + = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"bwyeyrnbuby\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"uuhlwbgvzuxfsmfp\",\"properties\":{\"mfjylh\":\"oqpzwfvnoy\",\"kejyavk\":\"pljzrqwjtswemot\"},\"tags\":{\"paeyklxsvcbr\":\"ctqaqczr\",\"phhnsfrunkc\":\"zltvmmdsngoaofm\"}},\"id\":\"nhacexibomrrj\",\"name\":\"oepfba\",\"type\":\"bffxansgntjmnl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryDataVersions() - .list("fzhzzcarciuo", "yipdthjfvnh", "sgnspu", "felfchnuf", 336300860, "jgbfbba", "h", ListViewType.ALL, - com.azure.core.util.Context.NONE); + .list("muutkwwt", "mbccmwsyfsgi", "gcbjclfbpfdsatr", "q", 2067217593, "uxwtdazebifktnx", "gi", + ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - Assertions.assertEquals("pghcnuqhqpvt", response.iterator().next().properties().description()); - Assertions.assertEquals("fscl", response.iterator().next().properties().tags().get("ga")); - Assertions.assertEquals("dto", response.iterator().next().properties().properties().get("biwny")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("czzunfnbphceeiv", response.iterator().next().properties().dataUri()); + Assertions.assertEquals("uuhlwbgvzuxfsmfp", response.iterator().next().properties().description()); + Assertions.assertEquals("oqpzwfvnoy", response.iterator().next().properties().properties().get("mfjylh")); + Assertions.assertEquals("ctqaqczr", response.iterator().next().properties().tags().get("paeyklxsvcbr")); + Assertions.assertTrue(response.iterator().next().properties().isAnonymous()); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); + Assertions.assertEquals("bwyeyrnbuby", response.iterator().next().properties().dataUri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java index 75a1e7a64e15..845199826192 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; @@ -25,29 +25,28 @@ public final class RegistryEnvironmentContainersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"nsjxwfogb\",\"nextVersion\":\"ylyumb\",\"description\":\"prlnuom\",\"tags\":{\"byoull\":\"dkhmemxkahapes\",\"wba\":\"fzmnxrmxxj\",\"xfmdjsiommd\":\"jgzkmwfwzlm\"},\"properties\":{\"ttowqx\":\"xulxrcbdnpfcgh\",\"oovhatiywtcvzu\":\"cpbzxpz\",\"i\":\"pkfeomotquqlqe\"}},\"id\":\"qpzksdpfvls\",\"name\":\"mmetwtla\",\"type\":\"nkjtefbd\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"loo\",\"nextVersion\":\"tm\",\"description\":\"twzslrprftq\",\"properties\":{\"emhohxabmxoow\":\"ouyqzhoi\",\"p\":\"oogozerccz\",\"uj\":\"nkgk\",\"j\":\"qqjqafjk\"},\"tags\":{\"qkyc\":\"vfnwqzolvaz\"}},\"id\":\"jgwehjybboqyx\",\"name\":\"ycdvdgemymydd\",\"type\":\"jtxlvgslmg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EnvironmentContainer response = manager.registryEnvironmentContainers() - .createOrUpdate("xjkc", "eenubr", "kjfkxnwtzs", - new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() - .withDescription("hdikatzmtuvf") - .withTags(mapOf("ibxl", "tjk", "u", "zlvkcm", "aoboiahk", "aunlodincf", "ksaxyeedvpmodkt", "psvax")) - .withProperties( - mapOf("vuztnsvmsh", "ydvvgkmorbpcjesf", "gf", "kg", "hlclpkr", "hrme", "bmjjv", "r")) - .withIsArchived(false)), + .createOrUpdate("aczi", "fduwlsov", "tpcsmaxzdxub", + new EnvironmentContainerInner() + .withProperties(new EnvironmentContainerProperties().withDescription("uozarrqppyzryj") + .withProperties(mapOf("arvzewo", "bcvoyqnrjdrc", "cjfdromeawthycb", "hbpzxkjq")) + .withTags(mapOf("ulmu", "istpxhzjnpar")) + .withIsArchived(false)), com.azure.core.util.Context.NONE); - Assertions.assertEquals("prlnuom", response.properties().description()); - Assertions.assertEquals("dkhmemxkahapes", response.properties().tags().get("byoull")); - Assertions.assertEquals("xulxrcbdnpfcgh", response.properties().properties().get("ttowqx")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("twzslrprftq", response.properties().description()); + Assertions.assertEquals("ouyqzhoi", response.properties().properties().get("emhohxabmxoow")); + Assertions.assertEquals("vfnwqzolvaz", response.properties().tags().get("qkyc")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java index f1f3140bf4dd..1d1ac5a4bc69 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.registryEnvironmentContainers() - .delete("cjqzrevfwcba", "apndm", "qvmkmzvag", com.azure.core.util.Context.NONE); + .delete("yseyvagakfqpaexl", "tmekkaeigrhrdns", "vsrtqltawjkra", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java index 142cdb342bbf..efdca617fc65 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; @@ -21,22 +21,22 @@ public final class RegistryEnvironmentContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"yx\",\"nextVersion\":\"xcgqbmxbp\",\"description\":\"nxskehojvma\",\"tags\":{\"pdncokq\":\"lfpiuuf\",\"mjlyhbjf\":\"givbhmn\"},\"properties\":{\"gcaygumqeobrwre\":\"ibgwcduy\",\"s\":\"dgsawhami\"}},\"id\":\"mfkia\",\"name\":\"g\",\"type\":\"k\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"bmzcxlgmuh\",\"nextVersion\":\"kkbnhmdtjczpfo\",\"description\":\"pchhvvmvsbgy\",\"properties\":{\"vozyepkrncjrqhu\":\"azmcuggts\",\"qcyhfubz\":\"ubobqqnwhcmvdow\",\"hjefiutb\":\"xqxxgrawbftznxfr\",\"ismdkv\":\"nrilljucodrbkdi\"},\"tags\":{\"vpafoexlcskelw\":\"oecijrlmn\",\"foxvrb\":\"mjiigqyllcck\",\"f\":\"yjmenqcj\"}},\"id\":\"tvsfsvqyzgawe\",\"name\":\"xnob\",\"type\":\"azwh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EnvironmentContainer response = manager.registryEnvironmentContainers() - .getWithResponse("xfblsxyfq", "todgkllefmizdcsr", "b", com.azure.core.util.Context.NONE) + .getWithResponse("rourtmccdejtoypl", "xvjutckfh", "dcvlbxr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("nxskehojvma", response.properties().description()); - Assertions.assertEquals("lfpiuuf", response.properties().tags().get("pdncokq")); - Assertions.assertEquals("ibgwcduy", response.properties().properties().get("gcaygumqeobrwre")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("pchhvvmvsbgy", response.properties().description()); + Assertions.assertEquals("azmcuggts", response.properties().properties().get("vozyepkrncjrqhu")); + Assertions.assertEquals("oecijrlmn", response.properties().tags().get("vpafoexlcskelw")); + Assertions.assertFalse(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java index d946d0717df4..4a99c703fc74 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; @@ -23,22 +23,21 @@ public final class RegistryEnvironmentContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"tt\",\"nextVersion\":\"pbilnszyjbuw\",\"description\":\"usydscizvkayiox\",\"tags\":{\"l\":\"qs\"},\"properties\":{\"ym\":\"feombodvdgfuakqs\",\"vzceuy\":\"f\"}},\"id\":\"ktck\",\"name\":\"nbpkfnxrlncmlzvv\",\"type\":\"mesfhqs\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":true,\"latestVersion\":\"bxe\",\"nextVersion\":\"alhbrwaltvky\",\"description\":\"jopqtegkrjo\",\"properties\":{\"ismrnneklfi\":\"eghakss\"},\"tags\":{\"odwqzbiuk\":\"sfclxtf\",\"vyzaofaiwlnfvexi\":\"mfy\"}},\"id\":\"qafolseyxpgkm\",\"name\":\"njluaywgcjq\",\"type\":\"fafpyglnfwjs\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryEnvironmentContainers() - .list("ovriqtuzwbkqcgz", "gtdjhtbarptxurs", "oyyumhzps", ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); + .list("e", "lpy", "sb", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - Assertions.assertEquals("usydscizvkayiox", response.iterator().next().properties().description()); - Assertions.assertEquals("qs", response.iterator().next().properties().tags().get("l")); - Assertions.assertEquals("feombodvdgfuakqs", response.iterator().next().properties().properties().get("ym")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("jopqtegkrjo", response.iterator().next().properties().description()); + Assertions.assertEquals("eghakss", response.iterator().next().properties().properties().get("ismrnneklfi")); + Assertions.assertEquals("sfclxtf", response.iterator().next().properties().tags().get("odwqzbiuk")); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java index 2c5106aa2b4f..bf0b9a16fff7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; @@ -15,11 +15,16 @@ import com.azure.resourcemanager.machinelearning.models.BuildContext; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; +import com.azure.resourcemanager.machinelearning.models.ImageDetails; +import com.azure.resourcemanager.machinelearning.models.ImageInfo; import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; import com.azure.resourcemanager.machinelearning.models.Route; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -30,53 +35,80 @@ public final class RegistryEnvironmentVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"ovelvsp\",\"condaFile\":\"xjtezujtoudo\",\"build\":{\"contextUri\":\"x\",\"dockerfilePath\":\"vssrj\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"wemt\",\"port\":1587028677},\"readinessRoute\":{\"path\":\"ebymmcgskscbsx\",\"port\":297174289},\"scoringRoute\":{\"path\":\"xicjojxolknsh\",\"port\":307738924}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Succeeded\",\"stage\":\"hmbglmnlbn\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"zzc\",\"tags\":{\"kahophqwojdz\":\"ortdzzvhbu\",\"srbfbs\":\"cqt\"},\"properties\":{\"h\":\"cdzfbvexrv\",\"vrsksdzmhwt\":\"mfsnqpvjtshl\"}},\"id\":\"ppwfbw\",\"name\":\"etxizrfwxhflgdun\",\"type\":\"aypxsazbxs\"}"; + = "{\"properties\":{\"autoRebuild\":\"Disabled\",\"build\":{\"contextUri\":\"huwz\",\"dockerfilePath\":\"kzbdeyhwebh\"},\"condaFile\":\"do\",\"environmentType\":\"Curated\",\"image\":\"jmmdmbylyndtq\",\"imageDetails\":{\"exists\":false,\"image\":{\"digest\":\"azujohwwtlerh\",\"hostname\":\"rarqnjushsxhtvnq\",\"repository\":\"rrgmlw\",\"tag\":\"m\"},\"vulnerabilityFindings\":{\"assetId\":\"sddlcnwbijxf\",\"criticalFindingsCount\":635992763,\"data\":[{},{},{},{}],\"generatedTime\":\"2021-07-16T23:01:33Z\",\"highFindingsCount\":1306952725,\"lastScanDate\":\"2021-12-06T17:10:08Z\",\"scanner\":\"rowh\",\"source\":\"guvdrggu\",\"totalFindingsCount\":1564226188}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"m\",\"port\":1622914941},\"readinessRoute\":{\"path\":\"lzomdfcphg\",\"port\":954805013},\"scoringRoute\":{\"path\":\"jzhrbs\",\"port\":1824937863},\"startupRoute\":{\"path\":\"ublouelf\",\"port\":2035465637}},\"osType\":\"Linux\",\"provisioningState\":\"Succeeded\",\"stage\":\"lpdwckmnpzubzqds\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"ngcpbshqzzlc\",\"properties\":{\"wzsyigxsy\":\"nryxnklf\",\"uqyz\":\"hygczabap\",\"osspcutgkmrsqaq\":\"dsuopcdi\"},\"tags\":{\"eqrnglgituae\":\"nhgisiwzzk\",\"jrfqtfkkiup\":\"wdkpadktsyywa\",\"okiffqpwdyzsetr\":\"dajqpdvvzbejx\"}},\"id\":\"tqhnsoijucprkqyw\",\"name\":\"bxgayomse\",\"type\":\"zcxlisvqfblsizxp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - EnvironmentVersion response = manager.registryEnvironmentVersions() - .createOrUpdate("bjlpfwuq", "rpdgitenyuksli", "mpnxg", "amrplanch", - new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties().withDescription("a") - .withTags(mapOf("ltckiwxggfagi", "jt", "ah", "xmdboefnhx", "so", "qeinv", "ypcjxhyzzlocjhzp", - "mokrqdbsgkqyjko")) - .withProperties(mapOf("bofprsmivapesb", "rbmc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withImage("mxlmxejwyvjzb") - .withCondaFile("vtuekbb") - .withBuild(new BuildContext().withContextUri("qsm").withDockerfilePath("beqieiuxhjuw")) - .withOsType(OperatingSystemType.LINUX) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("jjhrgkjjpc").withPort(752508930)) - .withReadinessRoute(new Route().withPath("lzyxvtajfjatoid").withPort(1842998823)) - .withScoringRoute(new Route().withPath("urdgc").withPort(1626550750))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("engnpuelrnanbrpk")), - com.azure.core.util.Context.NONE); + EnvironmentVersion response + = manager.registryEnvironmentVersions() + .createOrUpdate("fbmdemohls", "maaoofltbsayv", "waejxzkqcmddc", "tn", + new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() + .withDescription("kpvoxcms") + .withProperties(mapOf("giumuztb", "kpn", "eeh", "jtfmcnrgwgcstozr")) + .withTags(mapOf("dhc", "veurpzryse", "fqsjzlcktkbg", "kkwahaxyrdlvbom")) + .withIsAnonymous(true) + .withIsArchived(true) + .withAutoRebuild(AutoRebuildSetting.DISABLED) + .withBuild(new BuildContext().withContextUri("qegabsfjrjzd").withDockerfilePath("cgorvgdibep")) + .withCondaFile("rbijoehhqwws") + .withImage("wooetwjssyaz") + .withImageDetails(new ImageDetails().withExists(false) + .withImage(new ImageInfo().withDigest("to") + .withHostname("kxfkftqkbyru") + .withRepository("awucmqfurbtbo") + .withTag("lyve")) + .withVulnerabilityFindings(new VulnerabilityFindings().withAssetId("jguwts") + .withData(Arrays.asList(new VulnerabilityDetails(), new VulnerabilityDetails())) + .withGeneratedTime(OffsetDateTime.parse("2021-11-14T05:54:21Z")) + .withLastScanDate(OffsetDateTime.parse("2021-05-27T12:38:31Z")) + .withScanner("ix") + .withSource("kj"))) + .withInferenceConfig(new InferenceContainerProperties() + .withLivenessRoute(new Route().withPath("im").withPort(1388355323)) + .withReadinessRoute(new Route().withPath("ljjawsaskullvt").withPort(749810865)) + .withScoringRoute(new Route().withPath("jivh").withPort(1111548971)) + .withStartupRoute(new Route().withPath("dzqrpfhzxkjygkui").withPort(299414059))) + .withOsType(OperatingSystemType.LINUX) + .withStage("jcozbnmthxcm")), + com.azure.core.util.Context.NONE); - Assertions.assertEquals("zzc", response.properties().description()); - Assertions.assertEquals("ortdzzvhbu", response.properties().tags().get("kahophqwojdz")); - Assertions.assertEquals("cdzfbvexrv", response.properties().properties().get("h")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("ovelvsp", response.properties().image()); - Assertions.assertEquals("xjtezujtoudo", response.properties().condaFile()); - Assertions.assertEquals("x", response.properties().build().contextUri()); - Assertions.assertEquals("vssrj", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - Assertions.assertEquals("wemt", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1587028677, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("ebymmcgskscbsx", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(297174289, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("xicjojxolknsh", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(307738924, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("hmbglmnlbn", response.properties().stage()); + Assertions.assertEquals("ngcpbshqzzlc", response.properties().description()); + Assertions.assertEquals("nryxnklf", response.properties().properties().get("wzsyigxsy")); + Assertions.assertEquals("nhgisiwzzk", response.properties().tags().get("eqrnglgituae")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.properties().autoRebuild()); + Assertions.assertEquals("huwz", response.properties().build().contextUri()); + Assertions.assertEquals("kzbdeyhwebh", response.properties().build().dockerfilePath()); + Assertions.assertEquals("do", response.properties().condaFile()); + Assertions.assertEquals("jmmdmbylyndtq", response.properties().image()); + Assertions.assertFalse(response.properties().imageDetails().exists()); + Assertions.assertEquals("azujohwwtlerh", response.properties().imageDetails().image().digest()); + Assertions.assertEquals("rarqnjushsxhtvnq", response.properties().imageDetails().image().hostname()); + Assertions.assertEquals("rrgmlw", response.properties().imageDetails().image().repository()); + Assertions.assertEquals("m", response.properties().imageDetails().image().tag()); + Assertions.assertEquals("sddlcnwbijxf", response.properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-16T23:01:33Z"), + response.properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T17:10:08Z"), + response.properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("rowh", response.properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("guvdrggu", response.properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("m", response.properties().inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(1622914941, response.properties().inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("lzomdfcphg", response.properties().inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(954805013, response.properties().inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("jzhrbs", response.properties().inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(1824937863, response.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("ublouelf", response.properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(2035465637, response.properties().inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); + Assertions.assertEquals("lpdwckmnpzubzqds", response.properties().stage()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java index b607dd272a68..fa50ae1a7ffa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.registryEnvironmentVersions() - .delete("spjvsyydjlhd", "kcsqvyeegxhulo", "wumfjd", "meqvnxpf", com.azure.core.util.Context.NONE); + .delete("lpsa", "loe", "himvlocdxvhkobi", "hhipn", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java index c06970c13e99..39e1b0c7f29c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; @@ -23,36 +23,51 @@ public final class RegistryEnvironmentVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"jlwwef\",\"condaFile\":\"twllqypmjc\",\"build\":{\"contextUri\":\"vfwgkz\",\"dockerfilePath\":\"kshxjkckwb\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mmkwahrooy\",\"port\":677197142},\"readinessRoute\":{\"path\":\"bnvy\",\"port\":658844384},\"scoringRoute\":{\"path\":\"a\",\"port\":1415322253}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Updating\",\"stage\":\"xtigukfkbsyc\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"peenlqtqyvlfbsav\",\"tags\":{\"phtoshqtuarjwgu\":\"fjdsq\"},\"properties\":{\"q\":\"nxaeyp\",\"bwscjwyye\":\"izfyasydd\"}},\"id\":\"iflrvfeowctshw\",\"name\":\"rhhasabvauz\",\"type\":\"wwumkbpgcilbwtp\"}"; + = "{\"properties\":{\"autoRebuild\":\"Disabled\",\"build\":{\"contextUri\":\"rs\",\"dockerfilePath\":\"xlkcw\"},\"condaFile\":\"ejssksgxykdepqcy\",\"environmentType\":\"UserCreated\",\"image\":\"sxpzk\",\"imageDetails\":{\"exists\":true,\"image\":{\"digest\":\"ygwwqevbi\",\"hostname\":\"tpt\",\"repository\":\"wjxlycelf\",\"tag\":\"gywrauuru\"},\"vulnerabilityFindings\":{\"assetId\":\"aycnkirmiecfmqc\",\"criticalFindingsCount\":1982091148,\"data\":[{},{},{}],\"generatedTime\":\"2021-03-29T18:47:13Z\",\"highFindingsCount\":459886212,\"lastScanDate\":\"2021-07-18T04:07Z\",\"scanner\":\"hefuhnbdl\",\"source\":\"wectz\",\"totalFindingsCount\":1278479715}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"btq\",\"port\":622935540},\"readinessRoute\":{\"path\":\"nkyvujhejytrv\",\"port\":1106620394},\"scoringRoute\":{\"path\":\"ysb\",\"port\":741277327},\"startupRoute\":{\"path\":\"nbqhmuqyz\",\"port\":1082902102}},\"osType\":\"Windows\",\"provisioningState\":\"Succeeded\",\"stage\":\"jshtcfnb\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"yhxp\",\"properties\":{\"zxnuxamxikhrxi\":\"ehuboq\",\"ecbog\":\"glynbqpeo\",\"irjtwjimcf\":\"wtihtnywgtsodnx\"},\"tags\":{\"axqoca\":\"zgduv\",\"cyramvzu\":\"ptfpbzyqbgg\",\"uwxslzq\":\"xtbrqnyurxl\",\"bn\":\"gx\"}},\"id\":\"rtn\",\"name\":\"bj\",\"type\":\"ysupck\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EnvironmentVersion response = manager.registryEnvironmentVersions() - .getWithResponse("xdjspnonxe", "hq", "zhn", "twvgc", com.azure.core.util.Context.NONE) + .getWithResponse("wv", "xblucpmqwkf", "mkpvekstz", "zhdwrc", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("peenlqtqyvlfbsav", response.properties().description()); - Assertions.assertEquals("fjdsq", response.properties().tags().get("phtoshqtuarjwgu")); - Assertions.assertEquals("nxaeyp", response.properties().properties().get("q")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("jlwwef", response.properties().image()); - Assertions.assertEquals("twllqypmjc", response.properties().condaFile()); - Assertions.assertEquals("vfwgkz", response.properties().build().contextUri()); - Assertions.assertEquals("kshxjkckwb", response.properties().build().dockerfilePath()); + Assertions.assertEquals("yhxp", response.properties().description()); + Assertions.assertEquals("ehuboq", response.properties().properties().get("zxnuxamxikhrxi")); + Assertions.assertEquals("zgduv", response.properties().tags().get("axqoca")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.properties().autoRebuild()); + Assertions.assertEquals("rs", response.properties().build().contextUri()); + Assertions.assertEquals("xlkcw", response.properties().build().dockerfilePath()); + Assertions.assertEquals("ejssksgxykdepqcy", response.properties().condaFile()); + Assertions.assertEquals("sxpzk", response.properties().image()); + Assertions.assertTrue(response.properties().imageDetails().exists()); + Assertions.assertEquals("ygwwqevbi", response.properties().imageDetails().image().digest()); + Assertions.assertEquals("tpt", response.properties().imageDetails().image().hostname()); + Assertions.assertEquals("wjxlycelf", response.properties().imageDetails().image().repository()); + Assertions.assertEquals("gywrauuru", response.properties().imageDetails().image().tag()); + Assertions.assertEquals("aycnkirmiecfmqc", + response.properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-29T18:47:13Z"), + response.properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-18T04:07Z"), + response.properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("hefuhnbdl", response.properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("wectz", response.properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("btq", response.properties().inferenceConfig().livenessRoute().path()); + Assertions.assertEquals(622935540, response.properties().inferenceConfig().livenessRoute().port()); + Assertions.assertEquals("nkyvujhejytrv", response.properties().inferenceConfig().readinessRoute().path()); + Assertions.assertEquals(1106620394, response.properties().inferenceConfig().readinessRoute().port()); + Assertions.assertEquals("ysb", response.properties().inferenceConfig().scoringRoute().path()); + Assertions.assertEquals(741277327, response.properties().inferenceConfig().scoringRoute().port()); + Assertions.assertEquals("nbqhmuqyz", response.properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(1082902102, response.properties().inferenceConfig().startupRoute().port()); Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - Assertions.assertEquals("mmkwahrooy", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(677197142, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("bnvy", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(658844384, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("a", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1415322253, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("xtigukfkbsyc", response.properties().stage()); + Assertions.assertEquals("jshtcfnb", response.properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java index b8e699e02ea9..cce244afedfe 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; @@ -25,42 +25,64 @@ public final class RegistryEnvironmentVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"zebc\",\"condaFile\":\"luedcmkryhh\",\"build\":{\"contextUri\":\"xzh\",\"dockerfilePath\":\"lxwknooxdjklfsdn\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mmddslwnlg\",\"port\":1497973223},\"readinessRoute\":{\"path\":\"hmk\",\"port\":775061052},\"scoringRoute\":{\"path\":\"bnnnlpqdnns\",\"port\":2111031568}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Creating\",\"stage\":\"slwknrdvvmb\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"zywx\",\"tags\":{\"etnnefputlkszux\":\"qxtkd\"},\"properties\":{\"wasfw\":\"zs\"}},\"id\":\"zybmfqdnppfcf\",\"name\":\"uamrvamuvkgd\",\"type\":\"pjbblukgctv\"}]}"; + = "{\"value\":[{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"xr\",\"dockerfilePath\":\"nnla\"},\"condaFile\":\"hdklwzzsi\",\"environmentType\":\"UserCreated\",\"image\":\"sacrnpscfke\",\"imageDetails\":{\"exists\":false,\"image\":{\"digest\":\"famimgjuvjv\",\"hostname\":\"ec\",\"repository\":\"ennledhoukfj\",\"tag\":\"ctdnnqokqeuzs\"},\"vulnerabilityFindings\":{\"assetId\":\"jpuywijnlpe\",\"criticalFindingsCount\":345267859,\"data\":[{},{},{},{}],\"generatedTime\":\"2021-05-23T10:58:34Z\",\"highFindingsCount\":1923329584,\"lastScanDate\":\"2021-06-08T16:53:52Z\",\"scanner\":\"hfcwycmwvphrwu\",\"source\":\"fov\",\"totalFindingsCount\":1840108787}},\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"lekchjdhlskeifw\",\"port\":1906701244},\"readinessRoute\":{\"path\":\"ow\",\"port\":1798948322},\"scoringRoute\":{\"path\":\"wpptvbudbnuj\",\"port\":462950767},\"startupRoute\":{\"path\":\"lyjel\",\"port\":731668603}},\"osType\":\"Linux\",\"provisioningState\":\"Deleting\",\"stage\":\"kofzxkq\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"amahnwg\",\"properties\":{\"lqoxwqlnxvnmrl\":\"blepamvlbaxdaoja\"},\"tags\":{\"z\":\"zyadafecwnufl\"}},\"id\":\"pvh\",\"name\":\"bzpohfejgpefvb\",\"type\":\"xvw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryEnvironmentVersions() - .list("nuvhgcgrllyyfsm", "cbx", "rchmetvzhuugd", "kgdskwvb", 577736960, "awwayqtsrny", - ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); + .list("rddyriwanvydg", "qscijlf", "lxgnzasvpmwso", "qypvplmyzebvg", 650637823, "oyde", ListViewType.ALL, + com.azure.core.util.Context.NONE); - Assertions.assertEquals("zywx", response.iterator().next().properties().description()); - Assertions.assertEquals("qxtkd", response.iterator().next().properties().tags().get("etnnefputlkszux")); - Assertions.assertEquals("zs", response.iterator().next().properties().properties().get("wasfw")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("zebc", response.iterator().next().properties().image()); - Assertions.assertEquals("luedcmkryhh", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("xzh", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("lxwknooxdjklfsdn", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.iterator().next().properties().osType()); - Assertions.assertEquals("mmddslwnlg", + Assertions.assertEquals("amahnwg", response.iterator().next().properties().description()); + Assertions.assertEquals("blepamvlbaxdaoja", + response.iterator().next().properties().properties().get("lqoxwqlnxvnmrl")); + Assertions.assertEquals("zyadafecwnufl", response.iterator().next().properties().tags().get("z")); + Assertions.assertTrue(response.iterator().next().properties().isAnonymous()); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); + Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, + response.iterator().next().properties().autoRebuild()); + Assertions.assertEquals("xr", response.iterator().next().properties().build().contextUri()); + Assertions.assertEquals("nnla", response.iterator().next().properties().build().dockerfilePath()); + Assertions.assertEquals("hdklwzzsi", response.iterator().next().properties().condaFile()); + Assertions.assertEquals("sacrnpscfke", response.iterator().next().properties().image()); + Assertions.assertFalse(response.iterator().next().properties().imageDetails().exists()); + Assertions.assertEquals("famimgjuvjv", response.iterator().next().properties().imageDetails().image().digest()); + Assertions.assertEquals("ec", response.iterator().next().properties().imageDetails().image().hostname()); + Assertions.assertEquals("ennledhoukfj", + response.iterator().next().properties().imageDetails().image().repository()); + Assertions.assertEquals("ctdnnqokqeuzs", response.iterator().next().properties().imageDetails().image().tag()); + Assertions.assertEquals("jpuywijnlpe", + response.iterator().next().properties().imageDetails().vulnerabilityFindings().assetId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-23T10:58:34Z"), + response.iterator().next().properties().imageDetails().vulnerabilityFindings().generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T16:53:52Z"), + response.iterator().next().properties().imageDetails().vulnerabilityFindings().lastScanDate()); + Assertions.assertEquals("hfcwycmwvphrwu", + response.iterator().next().properties().imageDetails().vulnerabilityFindings().scanner()); + Assertions.assertEquals("fov", + response.iterator().next().properties().imageDetails().vulnerabilityFindings().source()); + Assertions.assertEquals("lekchjdhlskeifw", response.iterator().next().properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1497973223, + Assertions.assertEquals(1906701244, response.iterator().next().properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("hmk", + Assertions.assertEquals("ow", response.iterator().next().properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(775061052, + Assertions.assertEquals(1798948322, response.iterator().next().properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("bnnnlpqdnns", + Assertions.assertEquals("wpptvbudbnuj", response.iterator().next().properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2111031568, + Assertions.assertEquals(462950767, response.iterator().next().properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("slwknrdvvmb", response.iterator().next().properties().stage()); + Assertions.assertEquals("lyjel", + response.iterator().next().properties().inferenceConfig().startupRoute().path()); + Assertions.assertEquals(731668603, + response.iterator().next().properties().inferenceConfig().startupRoute().port()); + Assertions.assertEquals(OperatingSystemType.LINUX, response.iterator().next().properties().osType()); + Assertions.assertEquals("kofzxkq", response.iterator().next().properties().stage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java index 1b73638cff57..1b6108aa2e89 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -8,10 +8,12 @@ import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; @@ -21,8 +23,6 @@ import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -32,160 +32,123 @@ public final class RegistryInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"2e21de19-ed91-4869-9c73-7565782ea7b9\",\"tenantId\":\"6af9fc2c-506b-4cbe-8e65-6b28bf960d2b\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mhk\":{\"principalId\":\"206b86e3-cc8b-4130-9b9a-9d2ab40780d1\",\"clientId\":\"1680cf3f-58ba-449f-b8e2-71f038c17e3e\"},\"sdsu\":{\"principalId\":\"3b5ce0d2-eb15-439d-9cf3-3c1e4543e219\",\"clientId\":\"aa584360-fd95-4661-8ac6-11c9a843aa09\"}}},\"kind\":\"eqdgcruxsp\",\"properties\":{\"discoveryUrl\":\"ymmqgwokmikp\",\"intellectualPropertyPublisher\":\"fbmjxuvji\",\"managedResourceGroup\":{\"resourceId\":\"vhax\"},\"mlFlowRegistryUri\":\"w\",\"registryPrivateEndpointConnections\":[{\"id\":\"pphthdklmvetatla\",\"location\":\"q\",\"properties\":{\"groupIds\":[\"giksbbvto\",\"xrpo\",\"wp\"],\"privateEndpoint\":{\"subnetArmId\":\"gjtnhtukfacihm\",\"id\":\"ntumeezbxvq\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"uvwc\",\"description\":\"sgomtmjz\",\"status\":\"Disconnected\"},\"provisioningState\":\"govsxpwwzt\"}},{\"id\":\"mkkhtgfredml\",\"location\":\"grllcc\",\"properties\":{\"groupIds\":[\"jowazhpab\",\"comlyotgkwsx\",\"srqorcgenmvceb\"],\"privateEndpoint\":{\"subnetArmId\":\"tqujxcxxqndcqjk\",\"id\":\"wqurc\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"mrvvxwj\",\"description\":\"gzseh\",\"status\":\"Disconnected\"},\"provisioningState\":\"ilcchskxxkansbvr\"}},{\"id\":\"qgvtojrulfu\",\"location\":\"ejrthcfjzhxlyub\",\"properties\":{\"groupIds\":[\"stvrjeqmt\",\"zbeqrztrxa\",\"xrd\",\"absr\"],\"privateEndpoint\":{\"subnetArmId\":\"nrhpqatiwkk\",\"id\":\"anxkvvcsemsvuv\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"qxetqmmlivrjjx\",\"description\":\"xdchp\",\"status\":\"Disconnected\"},\"provisioningState\":\"ehzl\"}},{\"id\":\"gfquwz\",\"location\":\"iibelwcerw\",\"properties\":{\"groupIds\":[\"jxljtxbusq\",\"bxxn\"],\"privateEndpoint\":{\"subnetArmId\":\"sdzhgbdgzpagsec\",\"id\":\"db\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"r\",\"description\":\"fllmqiy\",\"status\":\"Disconnected\"},\"provisioningState\":\"ellnkkii\"}}],\"publicNetworkAccess\":\"mtum\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}}],\"location\":\"axroqvqpilrgunc\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}},{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}}],\"location\":\"klxymxkqvfqepdxc\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}}]}]},\"sku\":{\"name\":\"bowcpjqduqgi\",\"tier\":\"Standard\",\"size\":\"ydfbwlj\",\"family\":\"huerkjddvrglie\",\"capacity\":53261195},\"location\":\"vbiiftksdwgdnk\",\"tags\":{\"zoutb\":\"mwdhcebuvczldbg\",\"orbjg\":\"aqgzekajclyzgs\"},\"id\":\"nzjotvmr\",\"name\":\"khlobvvjbhvhdi\",\"type\":\"ayfluiyuosnu\"}") + "{\"properties\":{\"discoveryUrl\":\"lkfg\",\"intellectualPropertyPublisher\":\"dneu\",\"managedResourceGroup\":{\"resourceId\":\"phsdyhto\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{\"principalId\":\"owwquuvxz\"}]},\"mlFlowRegistryUri\":\"lvithhqzonosgg\",\"registryPrivateEndpointConnections\":[{\"id\":\"hfwdsjnkaljutiis\",\"location\":\"cffgdkzzewk\",\"properties\":{\"groupIds\":[\"crailvpn\",\"pfuflrw\",\"mh\",\"lxyjr\"],\"privateEndpoint\":{\"subnetArmId\":\"gafcnihgwqapnedg\",\"id\":\"cvkcvqvpkeqdcv\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"vo\",\"description\":\"sotbob\",\"status\":\"Pending\"},\"provisioningState\":\"cjwvn\"}}],\"publicNetworkAccess\":\"ld\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{}},{\"systemCreatedAcrAccount\":{}},{\"systemCreatedAcrAccount\":{}},{\"systemCreatedAcrAccount\":{}}],\"location\":\"mutwuoe\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{}}]}]},\"identity\":{\"principalId\":\"niyqslui\",\"tenantId\":\"dggkzzlvmbmpa\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"wiyzvqtmnubexkp\":{\"principalId\":\"vuefywsbpfvmwyh\",\"clientId\":\"ouyftaakc\"},\"whojvp\":{\"principalId\":\"smond\",\"clientId\":\"quxvypomgkop\"}}},\"kind\":\"qgxy\",\"sku\":{\"name\":\"ocmbqfqvmkcxoza\",\"tier\":\"Standard\",\"size\":\"lxprglyatddckcbc\",\"family\":\"jrjxgciqibrhosx\",\"capacity\":1655789286},\"location\":\"hzoymibmrqy\",\"tags\":{\"zdtmhrkwofy\":\"hwflu\",\"iwbwoenwashrtdtk\":\"voqacpiexpbt\",\"kulpiujwaasi\":\"nqxwbp\",\"qlpqwcciuq\":\"qiiobyuqer\"},\"id\":\"bdbutauvf\",\"name\":\"tkuwhhmhykojo\",\"type\":\"afnn\"}") .toObject(RegistryInner.class); - Assertions.assertEquals("vbiiftksdwgdnk", model.location()); - Assertions.assertEquals("mwdhcebuvczldbg", model.tags().get("zoutb")); + Assertions.assertEquals("hzoymibmrqy", model.location()); + Assertions.assertEquals("hwflu", model.tags().get("zdtmhrkwofy")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eqdgcruxsp", model.kind()); - Assertions.assertEquals("bowcpjqduqgi", model.sku().name()); + Assertions.assertEquals("qgxy", model.kind()); + Assertions.assertEquals("ocmbqfqvmkcxoza", model.sku().name()); Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("ydfbwlj", model.sku().size()); - Assertions.assertEquals("huerkjddvrglie", model.sku().family()); - Assertions.assertEquals(53261195, model.sku().capacity()); - Assertions.assertEquals("ymmqgwokmikp", model.discoveryUrl()); - Assertions.assertEquals("fbmjxuvji", model.intellectualPropertyPublisher()); - Assertions.assertEquals("vhax", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("w", model.mlFlowRegistryUri()); - Assertions.assertEquals("pphthdklmvetatla", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("q", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("giksbbvto", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("gjtnhtukfacihm", + Assertions.assertEquals("lxprglyatddckcbc", model.sku().size()); + Assertions.assertEquals("jrjxgciqibrhosx", model.sku().family()); + Assertions.assertEquals(1655789286, model.sku().capacity()); + Assertions.assertEquals("lkfg", model.discoveryUrl()); + Assertions.assertEquals("dneu", model.intellectualPropertyPublisher()); + Assertions.assertEquals("phsdyhto", model.managedResourceGroup().resourceId()); + Assertions.assertEquals("owwquuvxz", + model.managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("lvithhqzonosgg", model.mlFlowRegistryUri()); + Assertions.assertEquals("hfwdsjnkaljutiis", model.registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("cffgdkzzewk", model.registryPrivateEndpointConnections().get(0).location()); + Assertions.assertEquals("crailvpn", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); + Assertions.assertEquals("gafcnihgwqapnedg", model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("uvwc", + Assertions.assertEquals("vo", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .actionsRequired()); - Assertions.assertEquals("sgomtmjz", + Assertions.assertEquals("sotbob", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("govsxpwwzt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("mtum", model.publicNetworkAccess()); - Assertions.assertEquals("axroqvqpilrgunc", model.regionDetails().get(0).location()); + Assertions.assertEquals("cjwvn", model.registryPrivateEndpointConnections().get(0).provisioningState()); + Assertions.assertEquals("ld", model.publicNetworkAccess()); + Assertions.assertEquals("mutwuoe", model.regionDetails().get(0).location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RegistryInner model = new RegistryInner().withLocation("vbiiftksdwgdnk") - .withTags(mapOf("zoutb", "mwdhcebuvczldbg", "orbjg", "aqgzekajclyzgs")) + RegistryInner model = new RegistryInner().withLocation("hzoymibmrqy") + .withTags(mapOf("zdtmhrkwofy", "hwflu", "iwbwoenwashrtdtk", "voqacpiexpbt", "kulpiujwaasi", "nqxwbp", + "qlpqwcciuq", "qiiobyuqer")) .withIdentity( new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) .withUserAssignedIdentities( - mapOf("mhk", new UserAssignedIdentity(), "sdsu", new UserAssignedIdentity()))) - .withKind("eqdgcruxsp") - .withSku(new Sku().withName("bowcpjqduqgi") + mapOf("wiyzvqtmnubexkp", new UserAssignedIdentity(), "whojvp", new UserAssignedIdentity()))) + .withKind("qgxy") + .withSku(new Sku().withName("ocmbqfqvmkcxoza") .withTier(SkuTier.STANDARD) - .withSize("ydfbwlj") - .withFamily("huerkjddvrglie") - .withCapacity(53261195)) - .withDiscoveryUrl("ymmqgwokmikp") - .withIntellectualPropertyPublisher("fbmjxuvji") - .withManagedResourceGroup(new ArmResourceId().withResourceId("vhax")) - .withMlFlowRegistryUri("w") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("pphthdklmvetatla") - .withLocation("q") - .withGroupIds(Arrays.asList("giksbbvto", "xrpo", "wp")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("gjtnhtukfacihm")) + .withSize("lxprglyatddckcbc") + .withFamily("jrjxgciqibrhosx") + .withCapacity(1655789286)) + .withDiscoveryUrl("lkfg") + .withIntellectualPropertyPublisher("dneu") + .withManagedResourceGroup(new ArmResourceId().withResourceId("phsdyhto")) + .withManagedResourceGroupSettings(new ManagedResourceGroupSettings().withAssignedIdentities( + Arrays.asList(new ManagedResourceGroupAssignedIdentities().withPrincipalId("owwquuvxz")))) + .withMlFlowRegistryUri("lvithhqzonosgg") + .withRegistryPrivateEndpointConnections( + Arrays.asList(new RegistryPrivateEndpointConnection().withId("hfwdsjnkaljutiis") + .withLocation("cffgdkzzewk") + .withGroupIds(Arrays.asList("crailvpn", "pfuflrw", "mh", "lxyjr")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("gafcnihgwqapnedg")) .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("uvwc") - .withDescription("sgomtmjz") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("govsxpwwzt"), - new RegistryPrivateEndpointConnection().withId("mkkhtgfredml") - .withLocation("grllcc") - .withGroupIds(Arrays.asList("jowazhpab", "comlyotgkwsx", "srqorcgenmvceb")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("tqujxcxxqndcqjk")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("mrvvxwj") - .withDescription("gzseh") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ilcchskxxkansbvr"), - new RegistryPrivateEndpointConnection().withId("qgvtojrulfu") - .withLocation("ejrthcfjzhxlyub") - .withGroupIds(Arrays.asList("stvrjeqmt", "zbeqrztrxa", "xrd", "absr")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("nrhpqatiwkk")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("qxetqmmlivrjjx") - .withDescription("xdchp") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ehzl"), - new RegistryPrivateEndpointConnection().withId("gfquwz") - .withLocation("iibelwcerw") - .withGroupIds(Arrays.asList("jxljtxbusq", "bxxn")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("sdzhgbdgzpagsec")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("r") - .withDescription("fllmqiy") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ellnkkii"))) - .withPublicNetworkAccess("mtum") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails() - .withAcrDetails( - Arrays.asList(new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()))) - .withLocation("axroqvqpilrgunc") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()))), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()), - new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()))) - .withLocation("klxymxkqvfqepdxc") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()))))); + new RegistryPrivateLinkServiceConnectionState().withActionsRequired("vo") + .withDescription("sotbob") + .withStatus(PrivateEndpointServiceConnectionStatus.PENDING)) + .withProvisioningState("cjwvn"))) + .withPublicNetworkAccess("ld") + .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() + .withAcrDetails( + Arrays.asList(new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()), + new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()), + new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()), + new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()))) + .withLocation("mutwuoe") + .withStorageAccountDetails(Arrays.asList( + new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()), + new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()))))); model = BinaryData.fromObject(model).toObject(RegistryInner.class); - Assertions.assertEquals("vbiiftksdwgdnk", model.location()); - Assertions.assertEquals("mwdhcebuvczldbg", model.tags().get("zoutb")); + Assertions.assertEquals("hzoymibmrqy", model.location()); + Assertions.assertEquals("hwflu", model.tags().get("zdtmhrkwofy")); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eqdgcruxsp", model.kind()); - Assertions.assertEquals("bowcpjqduqgi", model.sku().name()); + Assertions.assertEquals("qgxy", model.kind()); + Assertions.assertEquals("ocmbqfqvmkcxoza", model.sku().name()); Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("ydfbwlj", model.sku().size()); - Assertions.assertEquals("huerkjddvrglie", model.sku().family()); - Assertions.assertEquals(53261195, model.sku().capacity()); - Assertions.assertEquals("ymmqgwokmikp", model.discoveryUrl()); - Assertions.assertEquals("fbmjxuvji", model.intellectualPropertyPublisher()); - Assertions.assertEquals("vhax", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("w", model.mlFlowRegistryUri()); - Assertions.assertEquals("pphthdklmvetatla", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("q", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("giksbbvto", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("gjtnhtukfacihm", + Assertions.assertEquals("lxprglyatddckcbc", model.sku().size()); + Assertions.assertEquals("jrjxgciqibrhosx", model.sku().family()); + Assertions.assertEquals(1655789286, model.sku().capacity()); + Assertions.assertEquals("lkfg", model.discoveryUrl()); + Assertions.assertEquals("dneu", model.intellectualPropertyPublisher()); + Assertions.assertEquals("phsdyhto", model.managedResourceGroup().resourceId()); + Assertions.assertEquals("owwquuvxz", + model.managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("lvithhqzonosgg", model.mlFlowRegistryUri()); + Assertions.assertEquals("hfwdsjnkaljutiis", model.registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("cffgdkzzewk", model.registryPrivateEndpointConnections().get(0).location()); + Assertions.assertEquals("crailvpn", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); + Assertions.assertEquals("gafcnihgwqapnedg", model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("uvwc", + Assertions.assertEquals("vo", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .actionsRequired()); - Assertions.assertEquals("sgomtmjz", + Assertions.assertEquals("sotbob", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("govsxpwwzt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("mtum", model.publicNetworkAccess()); - Assertions.assertEquals("axroqvqpilrgunc", model.regionDetails().get(0).location()); + Assertions.assertEquals("cjwvn", model.registryPrivateEndpointConnections().get(0).provisioningState()); + Assertions.assertEquals("ld", model.publicNetworkAccess()); + Assertions.assertEquals("mutwuoe", model.regionDetails().get(0).location()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java index 191ce9a3b89d..9dfec55cfd76 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; @@ -25,27 +25,28 @@ public final class RegistryModelContainersCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"skmpeajzzypa\",\"nextVersion\":\"mzmzfntteyrftxyt\",\"description\":\"ypjdrjli\",\"tags\":{\"vjqxav\":\"vbfaehjji\",\"sscygyzhcvlavyrj\":\"mdmracfsffdralih\",\"u\":\"ndxrmyzvtiojtpd\",\"h\":\"xaxoyj\"},\"properties\":{\"teccxfn\":\"edigiv\"}},\"id\":\"ntmcaxb\",\"name\":\"pmfhjikqcnbdq\",\"type\":\"tghnmelzvrchm\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"hf\",\"nextVersion\":\"mjomuw\",\"description\":\"vjwkpznsfbit\",\"properties\":{\"yyo\":\"gpvdl\",\"nwmgqc\":\"clcuxzl\",\"oxmpgfspwhfh\":\"ggjeq\"},\"tags\":{\"qnwpwrfe\":\"uvgavvzvdfytqzxe\"}},\"id\":\"ggrm\",\"name\":\"ufhkoe\",\"type\":\"nrjmicha\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelContainer response = manager.registryModelContainers() - .createOrUpdate("rgmnkgtlhzkrazk", "oiyecznvzmsvzng", "eqzhehgvmm", - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("ilzvxotno") - .withTags(mapOf("mbwcacwa", "cdvhyefqhxyts", "xra", "qakvokya")) - .withProperties(mapOf("mmd", "reqbr")) - .withIsArchived(true)), + .createOrUpdate("gjreoac", "oaboozxkdzmt", "mnyufdemrcl", + new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("flkeqgxljsbto") + .withProperties(mapOf("qgehbw", "cv", "lfhhwdajf", "xoczz")) + .withTags( + mapOf("nufqh", "swuomjd", "xbneiobubtpye", "sniobeh", "rdqp", "ppwkry", "hmyh", "qfuvhoiqqz")) + .withIsArchived(false)), com.azure.core.util.Context.NONE); - Assertions.assertEquals("ypjdrjli", response.properties().description()); - Assertions.assertEquals("vbfaehjji", response.properties().tags().get("vjqxav")); - Assertions.assertEquals("edigiv", response.properties().properties().get("teccxfn")); - Assertions.assertEquals(true, response.properties().isArchived()); + Assertions.assertEquals("vjwkpznsfbit", response.properties().description()); + Assertions.assertEquals("gpvdl", response.properties().properties().get("yyo")); + Assertions.assertEquals("uvgavvzvdfytqzxe", response.properties().tags().get("qnwpwrfe")); + Assertions.assertFalse(response.properties().isArchived()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java index d520a6af0e92..b60af384f4f5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.registryModelContainers().delete("ujyiqywlpxm", "iytdeg", "runbkil", com.azure.core.util.Context.NONE); + manager.registryModelContainers() + .delete("aentaqjvddeiqvrj", "tpxydiuviup", "ktnsyrrybdyqivks", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java index f48834b03daa..a489e3da8855 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ModelContainer; @@ -21,22 +21,22 @@ public final class RegistryModelContainersGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"denmjogx\",\"nextVersion\":\"ggyciwbnqi\",\"description\":\"sx\",\"tags\":{\"oxqswsych\":\"rnjrdi\",\"nowvfxeytzgwjek\":\"cjggcmpncjqbgbno\",\"bdvxlfhlzzgapsp\":\"qirvcpolnvgpppdi\"},\"properties\":{\"xnroyhthesyw\":\"blscrmzquuzywkgo\",\"zcwuejmxlfzl\":\"wnvgyoscif\",\"hrau\":\"zyrgrlh\"}},\"id\":\"ovlx\",\"name\":\"tvmvzpni\",\"type\":\"wx\"}"; + = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"thyebwgesovsvjx\",\"nextVersion\":\"or\",\"description\":\"l\",\"properties\":{\"axtoboafpyi\":\"lyhgiisn\",\"tauskish\":\"ojwczary\",\"rkdme\":\"mtyp\",\"vzds\":\"aunbwcqtig\"},\"tags\":{\"pplrdkcazujvh\":\"hjlploa\",\"elaaexcnxrtlnzd\":\"uzbsxhivnc\"}},\"id\":\"qfeavzzpm\",\"name\":\"zisljxphwynim\",\"type\":\"pfraku\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelContainer response = manager.registryModelContainers() - .getWithResponse("stekbirhyv", "yuvriemorszffi", "kltrvgioguoxc", com.azure.core.util.Context.NONE) + .getWithResponse("lnvfshtujaqp", "upnrcrjeypdky", "cxzsynbdrqi", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("sx", response.properties().description()); - Assertions.assertEquals("rnjrdi", response.properties().tags().get("oxqswsych")); - Assertions.assertEquals("blscrmzquuzywkgo", response.properties().properties().get("xnroyhthesyw")); - Assertions.assertEquals(false, response.properties().isArchived()); + Assertions.assertEquals("l", response.properties().description()); + Assertions.assertEquals("lyhgiisn", response.properties().properties().get("axtoboafpyi")); + Assertions.assertEquals("hjlploa", response.properties().tags().get("pplrdkcazujvh")); + Assertions.assertTrue(response.properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java index 818886897547..9fe76644229b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -23,21 +23,21 @@ public final class RegistryModelContainersListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"rolhsfddk\",\"nextVersion\":\"vevwxmnbw\",\"description\":\"a\",\"tags\":{\"na\":\"npyhtuhalpqil\",\"zbtgtzpcat\":\"kexznpnytkqjarl\",\"ujfgtg\":\"mz\"},\"properties\":{\"naidvssv\":\"pczeg\",\"bqgzkuobclo\":\"yoggkztzttjnkn\"}},\"id\":\"aqeizp\",\"name\":\"iqlyugp\",\"type\":\"nhzjmkffeonmnv\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"njgsov\",\"nextVersion\":\"dhrcepanh\",\"description\":\"cah\",\"properties\":{\"svjzbggsnanojt\":\"jjl\"},\"tags\":{\"nsxjdgaimkt\":\"hzxzazofr\",\"flhxikrgokyngar\":\"sowszb\"}},\"id\":\"ut\",\"name\":\"jxga\",\"type\":\"smnatnpolueylqys\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryModelContainers() - .list("xyksznfstmp", "vgrandzktwo", "lpczlq", ListViewType.ALL, com.azure.core.util.Context.NONE); + .list("uh", "zihdkq", "jwthwcpijgasnafd", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); - Assertions.assertEquals("a", response.iterator().next().properties().description()); - Assertions.assertEquals("npyhtuhalpqil", response.iterator().next().properties().tags().get("na")); - Assertions.assertEquals("pczeg", response.iterator().next().properties().properties().get("naidvssv")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); + Assertions.assertEquals("cah", response.iterator().next().properties().description()); + Assertions.assertEquals("jjl", response.iterator().next().properties().properties().get("svjzbggsnanojt")); + Assertions.assertEquals("hzxzazofr", response.iterator().next().properties().tags().get("nsxjdgaimkt")); + Assertions.assertTrue(response.iterator().next().properties().isArchived()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java index 4909c6310aad..1b407704bf57 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java @@ -1,21 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; +import com.azure.resourcemanager.machinelearning.models.DatasetReference; import com.azure.resourcemanager.machinelearning.models.FlavorData; import com.azure.resourcemanager.machinelearning.models.ModelVersion; import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -26,49 +28,47 @@ public final class RegistryModelVersionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"flavors\":{\"rnlsyiaanistc\":{\"data\":{\"ivxcodwkwoytcach\":\"txrrgkwiyoyhq\",\"fiikqcdnzsfiu\":\"sizfuewlf\",\"o\":\"gne\",\"ufakrxjjwnbrmdwt\":\"mcrxlyzoaho\"}}},\"modelType\":\"atclpphcs\",\"modelUri\":\"rycpanapfa\",\"jobName\":\"zrinlpxngzzx\",\"provisioningState\":\"Succeeded\",\"stage\":\"nzmzct\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ifpucv\",\"tags\":{\"e\":\"zwbsk\",\"qmbinpxmiwt\":\"fz\"},\"properties\":{\"abux\":\"fpvrdukcdnzox\",\"wshramqsugqcgl\":\"wgb\",\"xvqlauu\":\"adfzto\",\"fmcerfxfeiqba\":\"gwa\"}},\"id\":\"hzwj\",\"name\":\"pssvnonij\",\"type\":\"qcj\"}"; + = "{\"properties\":{\"flavors\":{\"pikgqjdoglecj\":{\"data\":{\"vnpgsqlanuhmsrnp\":\"zrsqcu\",\"pdlsoajqxy\":\"oaghoeqiwpd\",\"topyybwlys\":\"lh\"}},\"frb\":{\"data\":{\"idaxbesbwciz\":\"ivsiirxcxppqpsin\",\"mihgksqwzuosyyx\":\"jchduasjrseqp\",\"yrowgi\":\"rdxzudfarzayr\",\"vxbovpoeuufwsmde\":\"pdpudqiw\"}},\"nlxstp\":{\"data\":{\"jisxspnmfydphls\":\"edy\",\"qb\":\"no\",\"vjpgllr\":\"vjlqfzlbpe\"}},\"njqni\":{\"data\":{\"vkm\":\"bezmyjqpdchds\",\"sktousybwddpjs\":\"ppxzgjysm\",\"wdmaenwhqafzgzm\":\"kosugrfiz\"}}},\"jobName\":\"ctwbim\",\"modelType\":\"mognnwxrdll\",\"modelUri\":\"am\",\"provisioningState\":\"Succeeded\",\"stage\":\"rfpnbyxy\",\"datasets\":[{\"name\":\"i\",\"id\":\"skdzs\"},{\"name\":\"hvzgliu\",\"id\":\"ctgsdxjxkddxo\"}],\"isAnonymous\":true,\"isArchived\":true,\"description\":\"rkennnyyvvlg\",\"properties\":{\"njtfplgxc\":\"pv\",\"jamgnpeosusiyy\":\"rctbxpuis\",\"mwali\":\"ofljab\"},\"tags\":{\"aknhmi\":\"qkdieuopw\",\"fmoonnria\":\"cfkc\"}},\"id\":\"ygzkdbmjzobc\",\"name\":\"vbbuuipel\",\"type\":\"kptteojxhwg\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelVersion response = manager.registryModelVersions() - .createOrUpdate("susfdyw", "rqcowk", "ndgrciff", "xqqnugt", - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("lqllbofsn") - .withTags(mapOf("hxgiknr", "yb", "feamz", "ugseiqbroq", "pksgo", "uxd")) - .withProperties(mapOf("ldrqqv", "nvnj", "xedthfwlnvqac", "ugusqlx", "blnlmpuyypaggpai", "yfi")) - .withIsArchived(true) - .withIsAnonymous(false) - .withFlavors(mapOf("ifmyzb", - new FlavorData().withData(mapOf("yjdiujticwmlfz", "g", "bktuajkufpvvd", "hibfmco", - "fyqzaisfofgvmrkm", "nmeiomnobbaibcf")), - "bpcwtwtrchkcmru", new FlavorData().withData(mapOf("cmtslptb", "nh", "cnuqfpzjz", "ponhblqi")), - "zgi", + .createOrUpdate("xvszdyvzmiu", "bwre", "whnzhsmu", "edbhnkl", + new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("xnmyxzhiocqoydqy") + .withProperties(mapOf("lgbwds", "n")) + .withTags(mapOf("tprnknnq", "ywayjinls", "yeyxmuwg", "ty", "moswcxlgzquq", "wxtmhwgen")) + .withIsAnonymous(true) + .withIsArchived(false) + .withFlavors(mapOf("qebtrps", new FlavorData() - .withData(mapOf("xipwqchfpt", "esqsqmie", "ajcur", "kkvjjl", "izchmb", "yqokbgumuejxxpx")), - "yahfoyfz", - new FlavorData().withData(mapOf("laybhozlsb", "jkngzfs", "ytrsljzmzui", "fnhbvcntpoe", - "mkqbylbbnjldicq", "sggsxznbp", "efwlenitv", "ma")))) - .withModelType("dyaepre") - .withModelUri("jukfalwceechcayv") - .withJobName("eqpucnus") - .withStage("hicrjriy")), + .withData(mapOf("cyrdtrd", "vakqajian", "h", "kdmsktuv", "toyfbsgrzw", "xtv", "ud", "w")))) + .withJobName("wtlocseybvtgcozn") + .withModelType("qxckrnkuuotlymy") + .withModelUri("gmrkxkmtuynugptf") + .withStage("vfh") + .withDatasets(Arrays.asList(new DatasetReference().withName("shbipzh").withId("ujkzjsezgphipt"), + new DatasetReference().withName("qldnhwdfxgeccckk").withId("z"), + new DatasetReference().withName("s").withId("mompxdzmpjfbdmo")))), com.azure.core.util.Context.NONE); - Assertions.assertEquals("ifpucv", response.properties().description()); - Assertions.assertEquals("zwbsk", response.properties().tags().get("e")); - Assertions.assertEquals("fpvrdukcdnzox", response.properties().properties().get("abux")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("txrrgkwiyoyhq", - response.properties().flavors().get("rnlsyiaanistc").data().get("ivxcodwkwoytcach")); - Assertions.assertEquals("atclpphcs", response.properties().modelType()); - Assertions.assertEquals("rycpanapfa", response.properties().modelUri()); - Assertions.assertEquals("zrinlpxngzzx", response.properties().jobName()); - Assertions.assertEquals("nzmzct", response.properties().stage()); + Assertions.assertEquals("rkennnyyvvlg", response.properties().description()); + Assertions.assertEquals("pv", response.properties().properties().get("njtfplgxc")); + Assertions.assertEquals("qkdieuopw", response.properties().tags().get("aknhmi")); + Assertions.assertTrue(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("zrsqcu", + response.properties().flavors().get("pikgqjdoglecj").data().get("vnpgsqlanuhmsrnp")); + Assertions.assertEquals("ctwbim", response.properties().jobName()); + Assertions.assertEquals("mognnwxrdll", response.properties().modelType()); + Assertions.assertEquals("am", response.properties().modelUri()); + Assertions.assertEquals("rfpnbyxy", response.properties().stage()); + Assertions.assertEquals("i", response.properties().datasets().get(0).name()); + Assertions.assertEquals("skdzs", response.properties().datasets().get(0).id()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java index 7ad5b30b8233..9e9d3e0e5693 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.registryModelVersions() - .delete("uxkdiumgsivxw", "scwbshf", "hvlms", "eylaulpuexy", com.azure.core.util.Context.NONE); + .delete("ahxgrpwjgk", "vkjdhsl", "qmmwwtzxsv", "qi", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java index 8b1763598ec9..cc8f06145541 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ModelVersion; @@ -21,28 +21,31 @@ public final class RegistryModelVersionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"flavors\":{\"pmonxdwf\":{\"data\":{\"qtfkmvzr\":\"svsyltap\"}},\"subehztbejrdzwyk\":{\"data\":{\"zene\":\"bgftfvqukkm\",\"jylwqqsemjhhx\":\"pdq\"}}},\"modelType\":\"pfzwufifnj\",\"modelUri\":\"hmjkykqf\",\"jobName\":\"mcyk\",\"provisioningState\":\"Canceled\",\"stage\":\"mkbndnrihpjax\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"noignydlkrnpsb\",\"tags\":{\"pfgwdxmiaelnpbi\":\"mhkipjardv\"},\"properties\":{\"skjvaycxrwknsbg\":\"unddvjlpbjszqj\"}},\"id\":\"pbrzwi\",\"name\":\"pzcyhk\",\"type\":\"cebtpgvut\"}"; + = "{\"properties\":{\"flavors\":{\"bibvslocdkpv\":{\"data\":{\"qfaxtl\":\"bqvbcqgqrsopqg\",\"gslpvyktfuhfa\":\"pyzcg\"}},\"jckgwtbfxxsfjnba\":{\"data\":{\"hhiztfmibwzuhyd\":\"lkhdxnzjza\"}},\"ytlnmmyzn\":{\"data\":{\"iy\":\"ighmkdsvayyh\",\"h\":\"ehmnizoybt\"}}},\"jobName\":\"cfq\",\"modelType\":\"qulkzovqoh\",\"modelUri\":\"whrqxjx\",\"provisioningState\":\"Succeeded\",\"stage\":\"sndnypxnsjjjcdd\",\"datasets\":[{\"name\":\"bfn\",\"id\":\"xb\"}],\"isAnonymous\":false,\"isArchived\":true,\"description\":\"ajgczpdioddtj\",\"properties\":{\"mtcacwmabehrfys\":\"mzvjwj\",\"xoavlwwpvjrnjwvc\":\"zwtghzvhzrxcaes\"},\"tags\":{\"wmwkdehjloz\":\"qlceflgsndurhqoz\",\"uxedpqwz\":\"cwo\",\"rubcvucvebdfm\":\"zimgbxjgxrha\",\"eealphuclkbwk\":\"jn\"}},\"id\":\"drvkbcsvnnvk\",\"name\":\"fzldzzjjrzhjqen\",\"type\":\"opdvnzndlioda\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ModelVersion response = manager.registryModelVersions() - .getWithResponse("gxzty", "c", "d", "lspgnndefyhsb", com.azure.core.util.Context.NONE) + .getWithResponse("miixngekcwe", "bqtkdginmhlgp", "f", "qccey", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("noignydlkrnpsb", response.properties().description()); - Assertions.assertEquals("mhkipjardv", response.properties().tags().get("pfgwdxmiaelnpbi")); - Assertions.assertEquals("unddvjlpbjszqj", response.properties().properties().get("skjvaycxrwknsbg")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("svsyltap", response.properties().flavors().get("pmonxdwf").data().get("qtfkmvzr")); - Assertions.assertEquals("pfzwufifnj", response.properties().modelType()); - Assertions.assertEquals("hmjkykqf", response.properties().modelUri()); - Assertions.assertEquals("mcyk", response.properties().jobName()); - Assertions.assertEquals("mkbndnrihpjax", response.properties().stage()); + Assertions.assertEquals("ajgczpdioddtj", response.properties().description()); + Assertions.assertEquals("mzvjwj", response.properties().properties().get("mtcacwmabehrfys")); + Assertions.assertEquals("qlceflgsndurhqoz", response.properties().tags().get("wmwkdehjloz")); + Assertions.assertFalse(response.properties().isAnonymous()); + Assertions.assertTrue(response.properties().isArchived()); + Assertions.assertEquals("bqvbcqgqrsopqg", + response.properties().flavors().get("bibvslocdkpv").data().get("qfaxtl")); + Assertions.assertEquals("cfq", response.properties().jobName()); + Assertions.assertEquals("qulkzovqoh", response.properties().modelType()); + Assertions.assertEquals("whrqxjx", response.properties().modelUri()); + Assertions.assertEquals("sndnypxnsjjjcdd", response.properties().stage()); + Assertions.assertEquals("bfn", response.properties().datasets().get(0).name()); + Assertions.assertEquals("xb", response.properties().datasets().get(0).id()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java index 0a9e4a89b4f2..a347e1ada1d7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ListViewType; @@ -23,29 +23,31 @@ public final class RegistryModelVersionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"flavors\":{\"cocdxvbeqzjd\":{\"data\":{\"mv\":\"gosijiqexqwqy\",\"cnnkvthwtam\":\"gflhdhoxur\",\"gyvxhfmuhkezuucq\":\"m\"}}},\"modelType\":\"tutpdwnee\",\"modelUri\":\"ytlxugjr\",\"jobName\":\"nffaofkvfruxzkfb\",\"provisioningState\":\"Failed\",\"stage\":\"kzovstvymdqay\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"zgubqkfnoxhvo\",\"tags\":{\"xwejuguvnx\":\"gfkrqsjrvpakxrde\",\"yfenrozoijoxcbpk\":\"ohpzurnzoytkbea\",\"pan\":\"wseacbtaxd\",\"r\":\"sxwhxrztda\"},\"properties\":{\"gqysyaj\":\"k\"}},\"id\":\"czupdcbgr\",\"name\":\"f\",\"type\":\"db\"}]}"; + = "{\"value\":[{\"properties\":{\"flavors\":{\"bidnlodk\":{\"data\":{\"gkadtwd\":\"alexyi\",\"xt\":\"gb\",\"yjkwltnsn\":\"vxcjdobsgv\",\"clp\":\"uvmokih\"}},\"rqzbqy\":{\"data\":{\"evrygggccpzmh\":\"nkptixawoyzg\",\"t\":\"plqtzgtpsbymnf\"}},\"uqcmunhfarb\":{\"data\":{\"bynlbwcnnfpfg\":\"qqrarolcza\",\"yfjslehgeeyg\":\"tdif\",\"rtvqvidsjhxxx\":\"ojtzarlii\"}},\"jytqnzrcbhayhct\":{\"data\":{\"r\":\"vypuioxhoww\",\"xhiuwvqxg\":\"yw\"}}},\"jobName\":\"lwfnzgzf\",\"modelType\":\"yvytydrdcwbaiaq\",\"modelUri\":\"uhsmuclx\",\"provisioningState\":\"Succeeded\",\"stage\":\"usuyqcvy\",\"datasets\":[{\"name\":\"xhzhervvlibr\",\"id\":\"q\"},{\"name\":\"oedjzrvfrfsyq\",\"id\":\"g\"},{\"name\":\"jwowthvueps\",\"id\":\"nvdj\"},{\"name\":\"pyfqo\",\"id\":\"utqt\"}],\"isAnonymous\":true,\"isArchived\":false,\"description\":\"mavfzjwdww\",\"properties\":{\"nd\":\"e\",\"pqxjxhdwjfx\":\"piwcgcwmsh\",\"vcqnjjfm\":\"pzclkatpuomga\",\"joonvtv\":\"vcfbflyzcqomlybs\"},\"tags\":{\"lo\":\"u\",\"umuuqwcka\":\"td\",\"fzjwjefcli\":\"oet\"}},\"id\":\"nawipdqozv\",\"name\":\"lqzopvhwmtdbfrj\",\"type\":\"q\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.registryModelVersions() - .list("ucgrmwyv", "d", "yplgq", "qgrbrhhv", "pgtipaaoylwh", 445590794, "kbweasgypjixdmob", "dyd", - "qeuwdvclsxdqdch", "zibixrgsrwxxqkwa", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); + .list("gjwrhubgaaaxig", "fahtt", "oggzdoblpd", "c", "vgbhbopla", 78278919, "fbvro", "w", "exq", "eyslwlpp", + ListViewType.ALL, com.azure.core.util.Context.NONE); - Assertions.assertEquals("zgubqkfnoxhvo", response.iterator().next().properties().description()); - Assertions.assertEquals("gfkrqsjrvpakxrde", response.iterator().next().properties().tags().get("xwejuguvnx")); - Assertions.assertEquals("k", response.iterator().next().properties().properties().get("gqysyaj")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("gosijiqexqwqy", - response.iterator().next().properties().flavors().get("cocdxvbeqzjd").data().get("mv")); - Assertions.assertEquals("tutpdwnee", response.iterator().next().properties().modelType()); - Assertions.assertEquals("ytlxugjr", response.iterator().next().properties().modelUri()); - Assertions.assertEquals("nffaofkvfruxzkfb", response.iterator().next().properties().jobName()); - Assertions.assertEquals("kzovstvymdqay", response.iterator().next().properties().stage()); + Assertions.assertEquals("mavfzjwdww", response.iterator().next().properties().description()); + Assertions.assertEquals("e", response.iterator().next().properties().properties().get("nd")); + Assertions.assertEquals("u", response.iterator().next().properties().tags().get("lo")); + Assertions.assertTrue(response.iterator().next().properties().isAnonymous()); + Assertions.assertFalse(response.iterator().next().properties().isArchived()); + Assertions.assertEquals("alexyi", + response.iterator().next().properties().flavors().get("bidnlodk").data().get("gkadtwd")); + Assertions.assertEquals("lwfnzgzf", response.iterator().next().properties().jobName()); + Assertions.assertEquals("yvytydrdcwbaiaq", response.iterator().next().properties().modelType()); + Assertions.assertEquals("uhsmuclx", response.iterator().next().properties().modelUri()); + Assertions.assertEquals("usuyqcvy", response.iterator().next().properties().stage()); + Assertions.assertEquals("xhzhervvlibr", response.iterator().next().properties().datasets().get(0).name()); + Assertions.assertEquals("q", response.iterator().next().properties().datasets().get(0).id()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java index 3cf7a50353ed..cc5d3de14c6c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,18 +16,20 @@ public final class RegistryPartialManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryPartialManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"acaceebc-8dc5-46a0-a47a-b4682a356778\",\"tenantId\":\"05e04309-83a4-4a06-a3fe-43ad2d346a82\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"dynzjahwr\":{\"principalId\":\"fd0a6aeb-9da8-46f3-9fec-e6c6e47ced61\",\"clientId\":\"48715817-14d2-4ade-b6f6-ebc25ebde7a4\"}}}") + "{\"principalId\":\"nkbykutwpfhp\",\"tenantId\":\"m\",\"type\":\"None\",\"userAssignedIdentities\":{\"twvogvbbe\":{\"principalId\":\"snfdsdoakgtdl\",\"clientId\":\"kzevdlhewpusds\"},\"enuuzkopbm\":{\"principalId\":\"cngqqmoakufgmjz\",\"clientId\":\"rdgrtw\"},\"mlmz\":{\"principalId\":\"rfdwoyu\",\"clientId\":\"ziuiefozbhdm\"},\"piyylhalnswhccsp\":{\"principalId\":\"oftrmaequia\",\"clientId\":\"icslfaoq\"}}}") .toObject(RegistryPartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RegistryPartialManagedServiceIdentity model - = new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("dynzjahwr", new UserAssignedIdentity())); + = new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) + .withUserAssignedIdentities( + mapOf("twvogvbbe", new UserAssignedIdentity(), "enuuzkopbm", new UserAssignedIdentity(), "mlmz", + new UserAssignedIdentity(), "piyylhalnswhccsp", new UserAssignedIdentity())); model = BinaryData.fromObject(model).toObject(RegistryPartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java index 24dad6237742..35bb89d3cd97 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -16,34 +16,34 @@ public final class RegistryPrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryPrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"dfqnhttwdowrczfj\"],\"privateEndpoint\":{\"subnetArmId\":\"uxxrkkmhmnulwemp\",\"id\":\"ifrhjulrsul\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"flu\",\"description\":\"awmhh\",\"status\":\"Approved\"},\"provisioningState\":\"friyrg\"}") + "{\"groupIds\":[\"dpfrxtrthzvaytdw\"],\"privateEndpoint\":{\"subnetArmId\":\"rqubpaxhexiil\",\"id\":\"pdtii\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"d\",\"description\":\"axoruzfgsquy\",\"status\":\"Disconnected\"},\"provisioningState\":\"xleptramx\"}") .toObject(RegistryPrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dfqnhttwdowrczfj", model.groupIds().get(0)); - Assertions.assertEquals("uxxrkkmhmnulwemp", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("flu", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("awmhh", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, + Assertions.assertEquals("dpfrxtrthzvaytdw", model.groupIds().get(0)); + Assertions.assertEquals("rqubpaxhexiil", model.privateEndpoint().subnetArmId()); + Assertions.assertEquals("d", model.registryPrivateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("axoruzfgsquy", model.registryPrivateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("friyrg", model.provisioningState()); + Assertions.assertEquals("xleptramx", model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RegistryPrivateEndpointConnectionProperties model - = new RegistryPrivateEndpointConnectionProperties().withGroupIds(Arrays.asList("dfqnhttwdowrczfj")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("uxxrkkmhmnulwemp")) + = new RegistryPrivateEndpointConnectionProperties().withGroupIds(Arrays.asList("dpfrxtrthzvaytdw")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("rqubpaxhexiil")) .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("flu") - .withDescription("awmhh") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("friyrg"); + new RegistryPrivateLinkServiceConnectionState().withActionsRequired("d") + .withDescription("axoruzfgsquy") + .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED)) + .withProvisioningState("xleptramx"); model = BinaryData.fromObject(model).toObject(RegistryPrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dfqnhttwdowrczfj", model.groupIds().get(0)); - Assertions.assertEquals("uxxrkkmhmnulwemp", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("flu", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("awmhh", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, + Assertions.assertEquals("dpfrxtrthzvaytdw", model.groupIds().get(0)); + Assertions.assertEquals("rqubpaxhexiil", model.privateEndpoint().subnetArmId()); + Assertions.assertEquals("d", model.registryPrivateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("axoruzfgsquy", model.registryPrivateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("friyrg", model.provisioningState()); + Assertions.assertEquals("xleptramx", model.provisioningState()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java index 9310621b6c63..9b1921be99ff 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import java.util.Arrays; @@ -16,39 +16,39 @@ public final class RegistryPrivateEndpointConnectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryPrivateEndpointConnection model = BinaryData.fromString( - "{\"id\":\"vvjhvvlrlohewjj\",\"location\":\"jnkdflqion\",\"properties\":{\"groupIds\":[\"qkzfz\"],\"privateEndpoint\":{\"subnetArmId\":\"oshohtotrye\",\"id\":\"khxrmexznlwkbf\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"khup\",\"description\":\"rufgjblcdrmyfcem\",\"status\":\"Rejected\"},\"provisioningState\":\"yykyalu\"}}") + "{\"id\":\"ky\",\"location\":\"beddgssofw\",\"properties\":{\"groupIds\":[\"alkrmn\"],\"privateEndpoint\":{\"subnetArmId\":\"pxacqqudfn\",\"id\":\"xbaaabjyv\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"fimrzrtuzqogse\",\"description\":\"evfdnwnwm\",\"status\":\"Rejected\"},\"provisioningState\":\"yyceuzsoi\"}}") .toObject(RegistryPrivateEndpointConnection.class); - Assertions.assertEquals("vvjhvvlrlohewjj", model.id()); - Assertions.assertEquals("jnkdflqion", model.location()); - Assertions.assertEquals("qkzfz", model.groupIds().get(0)); - Assertions.assertEquals("oshohtotrye", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("khup", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("rufgjblcdrmyfcem", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals("ky", model.id()); + Assertions.assertEquals("beddgssofw", model.location()); + Assertions.assertEquals("alkrmn", model.groupIds().get(0)); + Assertions.assertEquals("pxacqqudfn", model.privateEndpoint().subnetArmId()); + Assertions.assertEquals("fimrzrtuzqogse", model.registryPrivateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("evfdnwnwm", model.registryPrivateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("yykyalu", model.provisioningState()); + Assertions.assertEquals("yyceuzsoi", model.provisioningState()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RegistryPrivateEndpointConnection model = new RegistryPrivateEndpointConnection().withId("vvjhvvlrlohewjj") - .withLocation("jnkdflqion") - .withGroupIds(Arrays.asList("qkzfz")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("oshohtotrye")) + RegistryPrivateEndpointConnection model = new RegistryPrivateEndpointConnection().withId("ky") + .withLocation("beddgssofw") + .withGroupIds(Arrays.asList("alkrmn")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("pxacqqudfn")) .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("khup") - .withDescription("rufgjblcdrmyfcem") - .withStatus(EndpointServiceConnectionStatus.REJECTED)) - .withProvisioningState("yykyalu"); + new RegistryPrivateLinkServiceConnectionState().withActionsRequired("fimrzrtuzqogse") + .withDescription("evfdnwnwm") + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED)) + .withProvisioningState("yyceuzsoi"); model = BinaryData.fromObject(model).toObject(RegistryPrivateEndpointConnection.class); - Assertions.assertEquals("vvjhvvlrlohewjj", model.id()); - Assertions.assertEquals("jnkdflqion", model.location()); - Assertions.assertEquals("qkzfz", model.groupIds().get(0)); - Assertions.assertEquals("oshohtotrye", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("khup", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("rufgjblcdrmyfcem", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.REJECTED, + Assertions.assertEquals("ky", model.id()); + Assertions.assertEquals("beddgssofw", model.location()); + Assertions.assertEquals("alkrmn", model.groupIds().get(0)); + Assertions.assertEquals("pxacqqudfn", model.privateEndpoint().subnetArmId()); + Assertions.assertEquals("fimrzrtuzqogse", model.registryPrivateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("evfdnwnwm", model.registryPrivateLinkServiceConnectionState().description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("yykyalu", model.provisioningState()); + Assertions.assertEquals("yyceuzsoi", model.provisioningState()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java index 954b791af0ba..aabc2acd1b2c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import org.junit.jupiter.api.Assertions; @@ -13,22 +13,22 @@ public final class RegistryPrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryPrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"actionsRequired\":\"cqydey\",\"description\":\"skiczd\",\"status\":\"Approved\"}") + .fromString("{\"actionsRequired\":\"bw\",\"description\":\"jhemms\",\"status\":\"Disconnected\"}") .toObject(RegistryPrivateLinkServiceConnectionState.class); - Assertions.assertEquals("cqydey", model.actionsRequired()); - Assertions.assertEquals("skiczd", model.description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("bw", model.actionsRequired()); + Assertions.assertEquals("jhemms", model.description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RegistryPrivateLinkServiceConnectionState model - = new RegistryPrivateLinkServiceConnectionState().withActionsRequired("cqydey") - .withDescription("skiczd") - .withStatus(EndpointServiceConnectionStatus.APPROVED); + = new RegistryPrivateLinkServiceConnectionState().withActionsRequired("bw") + .withDescription("jhemms") + .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED); model = BinaryData.fromObject(model).toObject(RegistryPrivateLinkServiceConnectionState.class); - Assertions.assertEquals("cqydey", model.actionsRequired()); - Assertions.assertEquals("skiczd", model.description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, model.status()); + Assertions.assertEquals("bw", model.actionsRequired()); + Assertions.assertEquals("jhemms", model.description()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java index be91556d57c6..eb92dc02c0b7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -8,16 +8,16 @@ import com.azure.resourcemanager.machinelearning.fluent.models.RegistryProperties; import com.azure.resourcemanager.machinelearning.models.AcrDetails; import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities; +import com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; +import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -25,58 +25,58 @@ public final class RegistryPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryProperties model = BinaryData.fromString( - "{\"discoveryUrl\":\"t\",\"intellectualPropertyPublisher\":\"vhyibdrqrsw\",\"managedResourceGroup\":{\"resourceId\":\"ubpyrow\"},\"mlFlowRegistryUri\":\"oxztfwfqch\",\"registryPrivateEndpointConnections\":[{\"id\":\"vjnn\",\"location\":\"agfyvrtpqpe\",\"properties\":{\"groupIds\":[\"gkrepdqhqyhw\",\"wemvxqabckmze\",\"xin\"],\"privateEndpoint\":{\"subnetArmId\":\"eoh\",\"id\":\"h\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"zjpcee\",\"description\":\"zangprbfaxyxzlbc\",\"status\":\"Approved\"},\"provisioningState\":\"sexroqrndkt\"}},{\"id\":\"vonfeeqgpkr\",\"location\":\"tbgnixxowwzkyfw\",\"properties\":{\"groupIds\":[\"wxeiicrmpepk\",\"dm\",\"xxij\"],\"privateEndpoint\":{\"subnetArmId\":\"ws\",\"id\":\"kjgyacwrasekwe\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"o\",\"description\":\"woqartwy\",\"status\":\"Approved\"},\"provisioningState\":\"l\"}},{\"id\":\"vatdavuqmcbymsf\",\"location\":\"jlquvjez\",\"properties\":{\"groupIds\":[\"v\",\"simi\",\"yoi\"],\"privateEndpoint\":{\"subnetArmId\":\"miqwnnrac\",\"id\":\"bbfqpspklady\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"hautw\",\"description\":\"exzgpmnmabedd\",\"status\":\"Disconnected\"},\"provisioningState\":\"gdfpfqfpcvst\"}}],\"publicNetworkAccess\":\"gq\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"xbsmtbljje\",\"acrAccountSku\":\"ci\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"tbrekqhsqhtf\",\"acrAccountSku\":\"pqbye\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"dqigmg\",\"acrAccountSku\":\"inztxl\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}}],\"location\":\"jcmrnkfm\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"jnqtqe\",\"storageAccountType\":\"j\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"dxe\",\"storageAccountType\":\"h\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"k\",\"storageAccountType\":\"kqynspgbvo\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"exqokmy\",\"storageAccountType\":\"jialz\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pbcjtrpzuyudivbx\",\"acrAccountSku\":\"sqeaeonqelwg\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"y\",\"acrAccountSku\":\"arogatmolji\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"mzvfkneerz\",\"acrAccountSku\":\"rknsjulug\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}}],\"location\":\"rxle\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"ihtd\",\"storageAccountType\":\"wjekptycaydbj\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"hmhsurlgwqkpm\",\"storageAccountType\":\"pstauol\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}}]}]}") + "{\"discoveryUrl\":\"pichkoymkcdy\",\"intellectualPropertyPublisher\":\"pkkpw\",\"managedResourceGroup\":{\"resourceId\":\"q\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{\"principalId\":\"fovljxyws\"}]},\"mlFlowRegistryUri\":\"syrsndsytgadgvra\",\"registryPrivateEndpointConnections\":[{\"id\":\"e\",\"location\":\"zar\",\"properties\":{\"groupIds\":[\"uu\"],\"privateEndpoint\":{\"subnetArmId\":\"qkacewii\",\"id\":\"pubjibw\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"tohqkvpuvksgp\",\"description\":\"aknynfsynljphuop\",\"status\":\"Rejected\"},\"provisioningState\":\"qiy\"}}],\"publicNetworkAccess\":\"orzihle\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"mslyzrpzbchckqqz\",\"acrAccountSku\":\"ox\",\"armResourceId\":{}}}],\"location\":\"uiizynke\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"ibzyhwitsmyp\",\"storageAccountType\":\"npcdpumnzgm\"}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"nsorgjhxbldt\",\"storageAccountType\":\"wrlkdmtn\"}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"xdy\",\"storageAccountType\":\"syocogjltdtbnnha\"}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"ikhnvpamqgxqq\",\"storageAccountType\":\"zikywgg\"}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"atmelwui\",\"acrAccountSku\":\"ccjzkzivgvv\",\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"rhyrnxxmueed\",\"acrAccountSku\":\"rdvstkwqqtch\",\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"fmtdaaygdvwvgp\",\"acrAccountSku\":\"hgwxrtfudx\",\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"yqagvrvm\",\"acrAccountSku\":\"k\",\"armResourceId\":{}}}],\"location\":\"himdbl\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"j\",\"storageAccountType\":\"mszkkfo\"}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"kzikfjawneaivxwc\",\"acrAccountSku\":\"lpcirelsf\",\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"wabfatkl\",\"acrAccountSku\":\"xbjhwuaanozjosph\",\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pjrvxagl\",\"acrAccountSku\":\"imjwosyt\",\"armResourceId\":{}}}],\"location\":\"cskfcktqumiekk\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"hdgqggeb\",\"storageAccountType\":\"nyga\"}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"t\",\"storageAccountType\":\"llrxcyjmoad\"}}]}]}") .toObject(RegistryProperties.class); - Assertions.assertEquals("t", model.discoveryUrl()); - Assertions.assertEquals("vhyibdrqrsw", model.intellectualPropertyPublisher()); - Assertions.assertEquals("ubpyrow", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxztfwfqch", model.mlFlowRegistryUri()); - Assertions.assertEquals("vjnn", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("agfyvrtpqpe", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("gkrepdqhqyhw", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("eoh", + Assertions.assertEquals("pichkoymkcdy", model.discoveryUrl()); + Assertions.assertEquals("pkkpw", model.intellectualPropertyPublisher()); + Assertions.assertEquals("q", model.managedResourceGroup().resourceId()); + Assertions.assertEquals("fovljxyws", + model.managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("syrsndsytgadgvra", model.mlFlowRegistryUri()); + Assertions.assertEquals("e", model.registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("zar", model.registryPrivateEndpointConnections().get(0).location()); + Assertions.assertEquals("uu", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); + Assertions.assertEquals("qkacewii", model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("zjpcee", + Assertions.assertEquals("tohqkvpuvksgp", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .actionsRequired()); - Assertions.assertEquals("zangprbfaxyxzlbc", + Assertions.assertEquals("aknynfsynljphuop", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("sexroqrndkt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("gq", model.publicNetworkAccess()); - Assertions.assertEquals("xbsmtbljje", + Assertions.assertEquals("qiy", model.registryPrivateEndpointConnections().get(0).provisioningState()); + Assertions.assertEquals("orzihle", model.publicNetworkAccess()); + Assertions.assertEquals("mslyzrpzbchckqqz", model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("ci", + Assertions.assertEquals("ox", model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("jcmrnkfm", model.regionDetails().get(0).location()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .allowBlobPublicAccess()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountHnsEnabled()); - Assertions.assertEquals("jnqtqe", + Assertions.assertEquals("uiizynke", model.regionDetails().get(0).location()); + Assertions.assertTrue(model.regionDetails() + .get(0) + .storageAccountDetails() + .get(0) + .systemCreatedStorageAccount() + .allowBlobPublicAccess()); + Assertions.assertFalse(model.regionDetails() + .get(0) + .storageAccountDetails() + .get(0) + .systemCreatedStorageAccount() + .storageAccountHnsEnabled()); + Assertions.assertEquals("ibzyhwitsmyp", model.regionDetails() .get(0) .storageAccountDetails() .get(0) .systemCreatedStorageAccount() .storageAccountName()); - Assertions.assertEquals("j", + Assertions.assertEquals("npcdpumnzgm", model.regionDetails() .get(0) .storageAccountDetails() @@ -87,190 +87,160 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RegistryProperties model = new RegistryProperties().withDiscoveryUrl("t") - .withIntellectualPropertyPublisher("vhyibdrqrsw") - .withManagedResourceGroup(new ArmResourceId().withResourceId("ubpyrow")) - .withMlFlowRegistryUri("oxztfwfqch") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("vjnn") - .withLocation("agfyvrtpqpe") - .withGroupIds(Arrays.asList("gkrepdqhqyhw", "wemvxqabckmze", "xin")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("eoh")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("zjpcee") - .withDescription("zangprbfaxyxzlbc") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("sexroqrndkt"), - new RegistryPrivateEndpointConnection().withId("vonfeeqgpkr") - .withLocation("tbgnixxowwzkyfw") - .withGroupIds(Arrays.asList("wxeiicrmpepk", "dm", "xxij")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("ws")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("o") - .withDescription("woqartwy") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("l"), - new RegistryPrivateEndpointConnection().withId("vatdavuqmcbymsf") - .withLocation("jlquvjez") - .withGroupIds(Arrays.asList("v", "simi", "yoi")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("miqwnnrac")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("hautw") - .withDescription("exzgpmnmabedd") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("gdfpfqfpcvst"))) - .withPublicNetworkAccess("gq") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("xbsmtbljje") - .withAcrAccountSku("ci") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("tbrekqhsqhtf") - .withAcrAccountSku("pqbye") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("dqigmg") - .withAcrAccountSku("inztxl") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())))) - .withLocation("jcmrnkfm") - .withStorageAccountDetails( - Arrays - .asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(false) + RegistryProperties model = new RegistryProperties().withDiscoveryUrl("pichkoymkcdy") + .withIntellectualPropertyPublisher("pkkpw") + .withManagedResourceGroup(new ArmResourceId().withResourceId("q")) + .withManagedResourceGroupSettings(new ManagedResourceGroupSettings().withAssignedIdentities( + Arrays.asList(new ManagedResourceGroupAssignedIdentities().withPrincipalId("fovljxyws")))) + .withMlFlowRegistryUri("syrsndsytgadgvra") + .withRegistryPrivateEndpointConnections(Arrays.asList(new RegistryPrivateEndpointConnection().withId("e") + .withLocation("zar") + .withGroupIds(Arrays.asList("uu")) + .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("qkacewii")) + .withRegistryPrivateLinkServiceConnectionState( + new RegistryPrivateLinkServiceConnectionState().withActionsRequired("tohqkvpuvksgp") + .withDescription("aknynfsynljphuop") + .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED)) + .withProvisioningState("qiy"))) + .withPublicNetworkAccess("orzihle") + .withRegionDetails(Arrays.asList( + new RegistryRegionArmDetails() + .withAcrDetails(Arrays.asList(new AcrDetails().withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount().withAcrAccountName("mslyzrpzbchckqqz") + .withAcrAccountSku("ox") + .withArmResourceId(new ArmResourceId())))) + .withLocation("uiizynke") + .withStorageAccountDetails(Arrays.asList( + new StorageAccountDetails().withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId()) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("ibzyhwitsmyp") + .withStorageAccountType("npcdpumnzgm")), + new StorageAccountDetails() + .withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("jnqtqe") - .withStorageAccountType("j")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(true) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("dxe") - .withStorageAccountType("h")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("k") - .withStorageAccountType("kqynspgbvo")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("exqokmy") - .withStorageAccountType("jialz")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())))), + .withStorageAccountHnsEnabled(true) + .withStorageAccountName("nsorgjhxbldt") + .withStorageAccountType("wrlkdmtn")), + new StorageAccountDetails().withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) + .withArmResourceId(new ArmResourceId()) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("xdy") + .withStorageAccountType("syocogjltdtbnnha")), + new StorageAccountDetails().withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId()) + .withStorageAccountHnsEnabled(true) + .withStorageAccountName("ikhnvpamqgxqq") + .withStorageAccountType("zikywgg")))), new RegistryRegionArmDetails() .withAcrDetails(Arrays.asList( new AcrDetails() - .withSystemCreatedAcrAccount( - new SystemCreatedAcrAccount().withAcrAccountName("pbcjtrpzuyudivbx") - .withAcrAccountSku("sqeaeonqelwg") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), + .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("atmelwui") + .withAcrAccountSku("ccjzkzivgvv") + .withArmResourceId(new ArmResourceId())), + new AcrDetails().withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount().withAcrAccountName("rhyrnxxmueed") + .withAcrAccountSku("rdvstkwqqtch") + .withArmResourceId(new ArmResourceId())), + new AcrDetails().withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount().withAcrAccountName("fmtdaaygdvwvgp") + .withAcrAccountSku("hgwxrtfudx") + .withArmResourceId(new ArmResourceId())), + new AcrDetails() + .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("yqagvrvm") + .withAcrAccountSku("k") + .withArmResourceId(new ArmResourceId())))) + .withLocation("himdbl") + .withStorageAccountDetails( + Arrays.asList(new StorageAccountDetails().withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId()) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("j") + .withStorageAccountType("mszkkfo")))), + new RegistryRegionArmDetails() + .withAcrDetails(Arrays.asList( + new AcrDetails().withSystemCreatedAcrAccount( + new SystemCreatedAcrAccount().withAcrAccountName("kzikfjawneaivxwc") + .withAcrAccountSku("lpcirelsf") + .withArmResourceId(new ArmResourceId())), new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("y") - .withAcrAccountSku("arogatmolji") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), + .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("wabfatkl") + .withAcrAccountSku("xbjhwuaanozjosph") + .withArmResourceId(new ArmResourceId())), new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("mzvfkneerz") - .withAcrAccountSku("rknsjulug") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())))) - .withLocation("rxle") + .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("pjrvxagl") + .withAcrAccountSku("imjwosyt") + .withArmResourceId(new ArmResourceId())))) + .withLocation("cskfcktqumiekk") .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("ihtd") - .withStorageAccountType("wjekptycaydbj")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("hmhsurlgwqkpm") - .withStorageAccountType("pstauol")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())))))); + new StorageAccountDetails().withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId()) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("hdgqggeb") + .withStorageAccountType("nyga")), + new StorageAccountDetails().withSystemCreatedStorageAccount( + new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) + .withArmResourceId(new ArmResourceId()) + .withStorageAccountHnsEnabled(true) + .withStorageAccountName("t") + .withStorageAccountType("llrxcyjmoad")))))); model = BinaryData.fromObject(model).toObject(RegistryProperties.class); - Assertions.assertEquals("t", model.discoveryUrl()); - Assertions.assertEquals("vhyibdrqrsw", model.intellectualPropertyPublisher()); - Assertions.assertEquals("ubpyrow", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxztfwfqch", model.mlFlowRegistryUri()); - Assertions.assertEquals("vjnn", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("agfyvrtpqpe", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("gkrepdqhqyhw", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("eoh", + Assertions.assertEquals("pichkoymkcdy", model.discoveryUrl()); + Assertions.assertEquals("pkkpw", model.intellectualPropertyPublisher()); + Assertions.assertEquals("q", model.managedResourceGroup().resourceId()); + Assertions.assertEquals("fovljxyws", + model.managedResourceGroupSettings().assignedIdentities().get(0).principalId()); + Assertions.assertEquals("syrsndsytgadgvra", model.mlFlowRegistryUri()); + Assertions.assertEquals("e", model.registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("zar", model.registryPrivateEndpointConnections().get(0).location()); + Assertions.assertEquals("uu", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); + Assertions.assertEquals("qkacewii", model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("zjpcee", + Assertions.assertEquals("tohqkvpuvksgp", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .actionsRequired()); - Assertions.assertEquals("zangprbfaxyxzlbc", + Assertions.assertEquals("aknynfsynljphuop", model.registryPrivateEndpointConnections() .get(0) .registryPrivateLinkServiceConnectionState() .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("sexroqrndkt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("gq", model.publicNetworkAccess()); - Assertions.assertEquals("xbsmtbljje", + Assertions.assertEquals("qiy", model.registryPrivateEndpointConnections().get(0).provisioningState()); + Assertions.assertEquals("orzihle", model.publicNetworkAccess()); + Assertions.assertEquals("mslyzrpzbchckqqz", model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("ci", + Assertions.assertEquals("ox", model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("jcmrnkfm", model.regionDetails().get(0).location()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .allowBlobPublicAccess()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountHnsEnabled()); - Assertions.assertEquals("jnqtqe", + Assertions.assertEquals("uiizynke", model.regionDetails().get(0).location()); + Assertions.assertTrue(model.regionDetails() + .get(0) + .storageAccountDetails() + .get(0) + .systemCreatedStorageAccount() + .allowBlobPublicAccess()); + Assertions.assertFalse(model.regionDetails() + .get(0) + .storageAccountDetails() + .get(0) + .systemCreatedStorageAccount() + .storageAccountHnsEnabled()); + Assertions.assertEquals("ibzyhwitsmyp", model.regionDetails() .get(0) .storageAccountDetails() .get(0) .systemCreatedStorageAccount() .storageAccountName()); - Assertions.assertEquals("j", + Assertions.assertEquals("npcdpumnzgm", model.regionDetails() .get(0) .storageAccountDetails() diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java index bb6e3483d495..c71a6aa70f11 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,8 +11,6 @@ import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -20,94 +18,73 @@ public final class RegistryRegionArmDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryRegionArmDetails model = BinaryData.fromString( - "{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"kgqaboo\",\"acrAccountSku\":\"bmsgycqsxrmdv\",\"armResourceId\":{\"resourceId\":\"yqaeohpjhgejk\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"daurgho\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"exbkhx\",\"acrAccountSku\":\"joezlqxrkdknkobe\",\"armResourceId\":{\"resourceId\":\"b\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"tzamicbig\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"gzseznuxkeua\",\"acrAccountSku\":\"aabmdlqjb\",\"armResourceId\":{\"resourceId\":\"f\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"upmomihzbd\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pkcdpreyxely\",\"acrAccountSku\":\"ghflrufssjyghsf\",\"armResourceId\":{\"resourceId\":\"bh\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"mqfmefgvqcpd\"}}}],\"location\":\"gquxweysland\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"hghcgawnrrnqu\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"tireimse\",\"storageAccountType\":\"fsxstcyil\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"mxcjzlquzexokjx\"}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"inzabwmvoglj\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"gi\",\"storageAccountType\":\"wcehaqidoyzlt\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"qoqpepiaeap\"}}}]}") + "{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"dtjinfw\",\"acrAccountSku\":\"fltkacjv\",\"armResourceId\":{\"resourceId\":\"dlfoakggkfp\"}}}],\"location\":\"ao\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{\"resourceId\":\"ylsyxkqjnsje\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"agxsdszuemps\",\"storageAccountType\":\"kfzbeyvpnqicvi\"}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"dxrbuukzcle\"},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"lw\",\"storageAccountType\":\"ztzp\"}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{\"resourceId\":\"wyfzqwhxxbuyqa\"},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"qztpp\",\"storageAccountType\":\"o\"}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{\"resourceId\":\"lt\"},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"cwsobqwcs\",\"storageAccountType\":\"nwdcfhu\"}}]}") .toObject(RegistryRegionArmDetails.class); - Assertions.assertEquals("kgqaboo", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("bmsgycqsxrmdv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("yqaeohpjhgejk", + Assertions.assertEquals("dtjinfw", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); + Assertions.assertEquals("fltkacjv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); + Assertions.assertEquals("dlfoakggkfp", model.acrDetails().get(0).systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("daurgho", - model.acrDetails().get(0).userCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("gquxweysland", model.location()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("hghcgawnrrnqu", + Assertions.assertEquals("ao", model.location()); + Assertions + .assertTrue(model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); + Assertions.assertEquals("ylsyxkqjnsje", model.storageAccountDetails().get(0).systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("tireimse", + Assertions + .assertFalse(model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); + Assertions.assertEquals("agxsdszuemps", model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("fsxstcyil", + Assertions.assertEquals("kfzbeyvpnqicvi", model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("mxcjzlquzexokjx", - model.storageAccountDetails().get(0).userCreatedStorageAccount().armResourceId().resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RegistryRegionArmDetails model = new RegistryRegionArmDetails() .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("kgqaboo") - .withAcrAccountSku("bmsgycqsxrmdv") - .withArmResourceId(new ArmResourceId().withResourceId("yqaeohpjhgejk"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("daurgho"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("exbkhx") - .withAcrAccountSku("joezlqxrkdknkobe") - .withArmResourceId(new ArmResourceId().withResourceId("b"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("tzamicbig"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("gzseznuxkeua") - .withAcrAccountSku("aabmdlqjb") - .withArmResourceId(new ArmResourceId().withResourceId("f"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() - .withArmResourceId(new ArmResourceId().withResourceId("upmomihzbd"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("pkcdpreyxely") - .withAcrAccountSku("ghflrufssjyghsf") - .withArmResourceId(new ArmResourceId().withResourceId("bh"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() - .withArmResourceId(new ArmResourceId().withResourceId("mqfmefgvqcpd"))))) - .withLocation("gquxweysland") + new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("dtjinfw") + .withAcrAccountSku("fltkacjv") + .withArmResourceId(new ArmResourceId().withResourceId("dlfoakggkfp"))))) + .withLocation("ao") .withStorageAccountDetails(Arrays.asList( new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("hghcgawnrrnqu")) + .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId().withResourceId("ylsyxkqjnsje")) .withStorageAccountHnsEnabled(false) - .withStorageAccountName("tireimse") - .withStorageAccountType("fsxstcyil")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("mxcjzlquzexokjx"))), + .withStorageAccountName("agxsdszuemps") + .withStorageAccountType("kfzbeyvpnqicvi")), new StorageAccountDetails() .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("inzabwmvoglj")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("gi") - .withStorageAccountType("wcehaqidoyzlt")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("qoqpepiaeap"))))); + .withArmResourceId(new ArmResourceId().withResourceId("dxrbuukzcle")) + .withStorageAccountHnsEnabled(true) + .withStorageAccountName("lw") + .withStorageAccountType("ztzp")), + new StorageAccountDetails() + .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId().withResourceId("wyfzqwhxxbuyqa")) + .withStorageAccountHnsEnabled(true) + .withStorageAccountName("qztpp") + .withStorageAccountType("o")), + new StorageAccountDetails() + .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId().withResourceId("lt")) + .withStorageAccountHnsEnabled(true) + .withStorageAccountName("cwsobqwcs") + .withStorageAccountType("nwdcfhu")))); model = BinaryData.fromObject(model).toObject(RegistryRegionArmDetails.class); - Assertions.assertEquals("kgqaboo", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("bmsgycqsxrmdv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("yqaeohpjhgejk", + Assertions.assertEquals("dtjinfw", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); + Assertions.assertEquals("fltkacjv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); + Assertions.assertEquals("dlfoakggkfp", model.acrDetails().get(0).systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("daurgho", - model.acrDetails().get(0).userCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("gquxweysland", model.location()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("hghcgawnrrnqu", + Assertions.assertEquals("ao", model.location()); + Assertions + .assertTrue(model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); + Assertions.assertEquals("ylsyxkqjnsje", model.storageAccountDetails().get(0).systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("tireimse", + Assertions + .assertFalse(model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); + Assertions.assertEquals("agxsdszuemps", model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("fsxstcyil", + Assertions.assertEquals("kfzbeyvpnqicvi", model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("mxcjzlquzexokjx", - model.storageAccountDetails().get(0).userCreatedStorageAccount().armResourceId().resourceId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java index 85fb0076b4b0..83724fe31ecd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java @@ -1,233 +1,39 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.implementation.models.RegistryTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class RegistryTrackedResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegistryTrackedResourceArmPaginatedResult model = BinaryData.fromString( - "{\"nextLink\":\"deolctaebfs\",\"value\":[{\"identity\":{\"principalId\":\"07040a70-dc4d-409a-93b0-d16491c8a0c2\",\"tenantId\":\"28d8ce6f-2bef-43e1-a54d-097b41679968\",\"type\":\"None\",\"userAssignedIdentities\":{\"vtqigdxzvsgeafg\":{\"principalId\":\"2198b80a-38b1-4f58-af6e-8c77123aab0f\",\"clientId\":\"274d2530-3115-4925-b2f3-1d4d1d19a6a9\"},\"ehxlzsxezppk\":{\"principalId\":\"9f1832a9-90d9-405b-b727-56ee03ab0826\",\"clientId\":\"c579a59a-75cc-407c-b5b4-440628177d78\"}}},\"kind\":\"aaeskyfjlpze\",\"properties\":{\"discoveryUrl\":\"oyrplixl\",\"intellectualPropertyPublisher\":\"mllpquevhamfowg\",\"managedResourceGroup\":{\"resourceId\":\"mkekxpkzwaqxo\"},\"mlFlowRegistryUri\":\"ovchiqbplvfid\",\"registryPrivateEndpointConnections\":[{\"id\":\"ekxbyjg\",\"location\":\"fepxyihpqadag\",\"properties\":{}},{\"id\":\"dicxdw\",\"location\":\"fowxwyovcxjsgbi\",\"properties\":{}},{\"id\":\"kdveksb\",\"location\":\"oduchvlscr\",\"properties\":{}},{\"id\":\"bfdyjduss\",\"location\":\"szekbh\",\"properties\":{}}],\"publicNetworkAccess\":\"aaggkre\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"ybff\",\"storageAccountDetails\":[{},{},{}]},{\"acrDetails\":[{},{}],\"location\":\"reoagsqtaadus\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{}],\"location\":\"vsqw\",\"storageAccountDetails\":[{},{},{}]}]},\"sku\":{\"name\":\"zilfmnlikps\",\"tier\":\"Free\",\"size\":\"eypofqpm\",\"family\":\"yqgs\",\"capacity\":551840235},\"location\":\"ttjxophgerhsmvgo\",\"tags\":{\"qywwwmhk\":\"zmqilrixysfnim\"},\"id\":\"uwaedrympmlqoi\",\"name\":\"hzdue\",\"type\":\"ihapfjiiknjdiq\"},{\"identity\":{\"principalId\":\"5323f3c2-5ef8-4d6e-83da-ead8dfdb1c5b\",\"tenantId\":\"09354a5e-5d27-4ebe-8851-9b8d190751e0\",\"type\":\"None\",\"userAssignedIdentities\":{\"bi\":{\"principalId\":\"fab38cd6-baff-47cf-8bbc-bba778109e9d\",\"clientId\":\"9205257f-f78c-4f10-b861-b3af0e7c539a\"},\"sbw\":{\"principalId\":\"3d78241d-b70c-494a-8c45-4c72b944fd9a\",\"clientId\":\"2e026a3a-114d-4559-9df9-81ac5f4fdb15\"},\"vbvzipbwxgo\":{\"principalId\":\"2ce94d1a-4419-49a3-aae2-c40bebb4a862\",\"clientId\":\"c56e523e-d40c-4f44-bd09-ac8e416f5eca\"}}},\"kind\":\"x\",\"properties\":{\"discoveryUrl\":\"rad\",\"intellectualPropertyPublisher\":\"kxknpdg\",\"managedResourceGroup\":{\"resourceId\":\"jsugswhgs\"},\"mlFlowRegistryUri\":\"dkwwn\",\"registryPrivateEndpointConnections\":[{\"id\":\"ctohzhaquvwsxbgn\",\"location\":\"ervqchoadhrsxqvz\",\"properties\":{}}],\"publicNetworkAccess\":\"abdsr\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"zrsubklrxhjnltce\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{}],\"location\":\"dieq\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"wdxvqzxoebwg\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"banbaupwtzv\",\"tier\":\"Basic\",\"size\":\"ozkxbzrpejplss\",\"family\":\"bttt\",\"capacity\":102469809},\"location\":\"xunrswgkpjhboy\",\"tags\":{\"lgw\":\"bhuhk\",\"o\":\"okhu\",\"cqypz\":\"jy\",\"fejyvdwtfxptpqa\":\"zufgs\"},\"id\":\"amkncfgy\",\"name\":\"mxsnxocuul\",\"type\":\"ojkpoyh\"},{\"identity\":{\"principalId\":\"ea345ed6-776c-4d1a-af21-0e2d89aefb7f\",\"tenantId\":\"0dbb5db4-62b2-49ea-ae41-301ef257bb96\",\"type\":\"None\",\"userAssignedIdentities\":{\"dljzgdyrc\":{\"principalId\":\"bc448ae0-9cce-4f4c-b12d-32a6a580a358\",\"clientId\":\"2c0f2b5d-3184-446e-bde6-b8f7b3fb7569\"},\"bsgzl\":{\"principalId\":\"5cf505b0-c6ff-4e22-815d-6e8dc355f1fe\",\"clientId\":\"8eda3cb4-5ab7-4382-a59c-b273d65517fa\"},\"bjnqogdxwbsf\":{\"principalId\":\"20785746-6ce0-4a33-801f-95f2c487367b\",\"clientId\":\"e16cf91f-6e91-45dd-aa47-424423aa1655\"},\"x\":{\"principalId\":\"73d525d2-f44c-450d-b6e8-f6a63167c620\",\"clientId\":\"c02314e6-1d95-4640-b57f-549f7787e75f\"}}},\"kind\":\"lflec\",\"properties\":{\"discoveryUrl\":\"inxojjlux\",\"intellectualPropertyPublisher\":\"hilzzdzzq\",\"managedResourceGroup\":{\"resourceId\":\"ezay\"},\"mlFlowRegistryUri\":\"ribqlotokh\",\"registryPrivateEndpointConnections\":[{\"id\":\"azn\",\"location\":\"qww\",\"properties\":{}},{\"id\":\"yofgwhnkbtlwljss\",\"location\":\"tsnld\",\"properties\":{}},{\"id\":\"olgisu\",\"location\":\"bteogfg\",\"properties\":{}}],\"publicNetworkAccess\":\"jrykwlefksxqce\",\"regionDetails\":[{\"acrDetails\":[{},{},{}],\"location\":\"nmqvzvluy\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{},{}],\"location\":\"sscyvai\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{}],\"location\":\"vfyeowpsfxtj\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"ymh\",\"tier\":\"Basic\",\"size\":\"qfttehdpboujs\",\"family\":\"fvvdshxcdedsue\",\"capacity\":1734780864},\"location\":\"xcgjtf\",\"tags\":{\"myltrwntfmtbg\":\"uktrfnslnlrx\",\"zjwhsetwwjwz\":\"jdxwnazkurrdre\",\"qzzdcykeyste\":\"qseuzuukykcyqhy\"},\"id\":\"fop\",\"name\":\"z\",\"type\":\"azgbsqgpe\"},{\"identity\":{\"principalId\":\"5ea494c7-bae9-44fd-9c8f-9bad43b0f936\",\"tenantId\":\"4cc0399d-a3c0-4836-9671-70bc2b801c1f\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"vozglqjbk\":{\"principalId\":\"7a757d69-a3ec-4510-94aa-a8a5080b76bb\",\"clientId\":\"b17f4a14-9677-425d-bbc8-ac66d3ec45d7\"}}},\"kind\":\"zcl\",\"properties\":{\"discoveryUrl\":\"zeyowmndcovdwzqa\",\"intellectualPropertyPublisher\":\"zanhmkvfru\",\"managedResourceGroup\":{\"resourceId\":\"drbcp\"},\"mlFlowRegistryUri\":\"xudqyemebunaucmc\",\"registryPrivateEndpointConnections\":[{\"id\":\"eemmjauwcgx\",\"location\":\"noh\",\"properties\":{}},{\"id\":\"ranizerw\",\"location\":\"dasmxu\",\"properties\":{}},{\"id\":\"bngfcocefhpri\",\"location\":\"fmpztraudsvh\",\"properties\":{}},{\"id\":\"culregpqt\",\"location\":\"jhvrztnvgyshqrdg\",\"properties\":{}}],\"publicNetworkAccess\":\"mewjzlpyk\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"jcayerzrransyby\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{}],\"location\":\"rghsrleinkfsc\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"jwvuag\",\"tier\":\"Premium\",\"size\":\"ltngvmreupt\",\"family\":\"lzmijajwolxfsv\",\"capacity\":202449168},\"location\":\"pynwlslrcigtzjcv\",\"tags\":{\"yxpavidnie\":\"lapsnsso\",\"slpuxgcbdsva\":\"wffcvvye\",\"rkxgpazwugxyqvnj\":\"pnptw\"},\"id\":\"bfe\",\"name\":\"hldiuhzzgqlm\",\"type\":\"aewzgiudjp\"}]}") + "{\"value\":[{\"properties\":{\"discoveryUrl\":\"swe\",\"intellectualPropertyPublisher\":\"qwdxggicc\",\"managedResourceGroup\":{\"resourceId\":\"qhuexm\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{},{},{}]},\"mlFlowRegistryUri\":\"tvlz\",\"registryPrivateEndpointConnections\":[{\"id\":\"hz\",\"location\":\"csdtclusiypbs\",\"properties\":{}},{\"id\":\"tg\",\"location\":\"lfeadcygq\",\"properties\":{}},{\"id\":\"hejhzisx\",\"location\":\"pelol\",\"properties\":{}}],\"publicNetworkAccess\":\"ksrpqv\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"htwdwrftswibyrcd\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{}],\"location\":\"wpracstwitykhev\",\"storageAccountDetails\":[{},{},{}]}]},\"identity\":{\"principalId\":\"cpnmdyodn\",\"tenantId\":\"xltjcvnhltiu\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"vfgbvfvpdboda\":{\"principalId\":\"vvwxqi\",\"clientId\":\"qunyowxwlmdjr\"},\"bdeibqipqk\":{\"principalId\":\"zsjqlh\",\"clientId\":\"r\"}}},\"kind\":\"vxndz\",\"sku\":{\"name\":\"krefajpjo\",\"tier\":\"Basic\",\"size\":\"nyhgbijtji\",\"family\":\"xzsjabib\",\"capacity\":1037462008},\"location\":\"awfsdjpvkvpbjxbk\",\"tags\":{\"ncj\":\"kd\",\"zhjjklffhmouwq\":\"budurgkakmo\"},\"id\":\"gzrf\",\"name\":\"eeyebi\",\"type\":\"ikayuhqlbjbsybb\"},{\"properties\":{\"discoveryUrl\":\"r\",\"intellectualPropertyPublisher\":\"ldgmfpgvmpip\",\"managedResourceGroup\":{\"resourceId\":\"thaqfxssmwu\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{},{},{},{}]},\"mlFlowRegistryUri\":\"rezpdr\",\"registryPrivateEndpointConnections\":[{\"id\":\"yowqkdwytisibir\",\"location\":\"pikpz\",\"properties\":{}},{\"id\":\"j\",\"location\":\"nlfzxiavrmbz\",\"properties\":{}}],\"publicNetworkAccess\":\"kixrj\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"pfrlazsz\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{}],\"location\":\"ndfpwpj\",\"storageAccountDetails\":[{},{},{}]}]},\"identity\":{\"principalId\":\"lhflsjcdhszfjvf\",\"tenantId\":\"ofel\",\"type\":\"None\",\"userAssignedIdentities\":{\"vtvsexsowueluq\":{\"principalId\":\"mqhldvrii\",\"clientId\":\"jnalghf\"}}},\"kind\":\"ahhxvrh\",\"sku\":{\"name\":\"kwpjgwwspughftqs\",\"tier\":\"Standard\",\"size\":\"ujxukndxd\",\"family\":\"rjguufzdmsyqtf\",\"capacity\":1001527531},\"location\":\"botzingamvppho\",\"tags\":{\"nwcvtbvkayhmtnv\":\"zudphqamvdkfw\",\"zcjaesgvvsccy\":\"qiatkzwpcnp\"},\"id\":\"jguq\",\"name\":\"hwyg\",\"type\":\"lvdnkfx\"},{\"properties\":{\"discoveryUrl\":\"emdwzrmuhapfc\",\"intellectualPropertyPublisher\":\"psqxq\",\"managedResourceGroup\":{\"resourceId\":\"vuoy\"},\"managedResourceGroupSettings\":{\"assignedIdentities\":[{},{}]},\"mlFlowRegistryUri\":\"lvez\",\"registryPrivateEndpointConnections\":[{\"id\":\"lmfeokerq\",\"location\":\"yhko\",\"properties\":{}},{\"id\":\"gxedkow\",\"location\":\"bqpc\",\"properties\":{}}],\"publicNetworkAccess\":\"bwccsnjvcdwxlpqe\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"tjsyin\",\"storageAccountDetails\":[{}]}]},\"identity\":{\"principalId\":\"tmtdhtmdvypgik\",\"tenantId\":\"szywkbirryu\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"oupmfii\":{\"principalId\":\"joqrvqqaatj\",\"clientId\":\"rv\"},\"lqwjygvjayvblm\":{\"principalId\":\"ggjioolvr\",\"clientId\":\"kvtkkg\"}}},\"kind\":\"k\",\"sku\":{\"name\":\"hbxvvyhgsopbyrqu\",\"tier\":\"Free\",\"size\":\"uvwzfbnh\",\"family\":\"ctlpdngitvgb\",\"capacity\":1248182459},\"location\":\"xkw\",\"tags\":{\"hbpnaixexccbd\":\"jejveg\",\"htpwij\":\"eaxhcexdrrvqahqk\",\"bfvoowvrv\":\"hyjsvfycx\"},\"id\":\"t\",\"name\":\"jqppyostronzmy\",\"type\":\"gfipnsxk\"}],\"nextLink\":\"waekrrjreafxtsgu\"}") .toObject(RegistryTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("deolctaebfs", model.nextLink()); - Assertions.assertEquals("ttjxophgerhsmvgo", model.value().get(0).location()); - Assertions.assertEquals("zmqilrixysfnim", model.value().get(0).tags().get("qywwwmhk")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("aaeskyfjlpze", model.value().get(0).kind()); - Assertions.assertEquals("zilfmnlikps", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("eypofqpm", model.value().get(0).sku().size()); - Assertions.assertEquals("yqgs", model.value().get(0).sku().family()); - Assertions.assertEquals(551840235, model.value().get(0).sku().capacity()); - Assertions.assertEquals("oyrplixl", model.value().get(0).discoveryUrl()); - Assertions.assertEquals("mllpquevhamfowg", model.value().get(0).intellectualPropertyPublisher()); - Assertions.assertEquals("mkekxpkzwaqxo", model.value().get(0).managedResourceGroup().resourceId()); - Assertions.assertEquals("ovchiqbplvfid", model.value().get(0).mlFlowRegistryUri()); - Assertions.assertEquals("ekxbyjg", model.value().get(0).registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("fepxyihpqadag", + Assertions.assertEquals("awfsdjpvkvpbjxbk", model.value().get(0).location()); + Assertions.assertEquals("kd", model.value().get(0).tags().get("ncj")); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("vxndz", model.value().get(0).kind()); + Assertions.assertEquals("krefajpjo", model.value().get(0).sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); + Assertions.assertEquals("nyhgbijtji", model.value().get(0).sku().size()); + Assertions.assertEquals("xzsjabib", model.value().get(0).sku().family()); + Assertions.assertEquals(1037462008, model.value().get(0).sku().capacity()); + Assertions.assertEquals("swe", model.value().get(0).discoveryUrl()); + Assertions.assertEquals("qwdxggicc", model.value().get(0).intellectualPropertyPublisher()); + Assertions.assertEquals("qhuexm", model.value().get(0).managedResourceGroup().resourceId()); + Assertions.assertEquals("tvlz", model.value().get(0).mlFlowRegistryUri()); + Assertions.assertEquals("hz", model.value().get(0).registryPrivateEndpointConnections().get(0).id()); + Assertions.assertEquals("csdtclusiypbs", model.value().get(0).registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("aaggkre", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("ybff", model.value().get(0).regionDetails().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryTrackedResourceArmPaginatedResult model - = new RegistryTrackedResourceArmPaginatedResult().withNextLink("deolctaebfs") - .withValue(Arrays.asList( - new RegistryInner().withLocation("ttjxophgerhsmvgo") - .withTags(mapOf("qywwwmhk", "zmqilrixysfnim")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("vtqigdxzvsgeafg", new UserAssignedIdentity(), - "ehxlzsxezppk", new UserAssignedIdentity()))) - .withKind("aaeskyfjlpze") - .withSku(new Sku().withName("zilfmnlikps") - .withTier(SkuTier.FREE) - .withSize("eypofqpm") - .withFamily("yqgs") - .withCapacity(551840235)) - .withDiscoveryUrl("oyrplixl") - .withIntellectualPropertyPublisher("mllpquevhamfowg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("mkekxpkzwaqxo")) - .withMlFlowRegistryUri("ovchiqbplvfid") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("ekxbyjg").withLocation("fepxyihpqadag"), - new RegistryPrivateEndpointConnection().withId("dicxdw").withLocation("fowxwyovcxjsgbi"), - new RegistryPrivateEndpointConnection().withId("kdveksb").withLocation("oduchvlscr"), - new RegistryPrivateEndpointConnection().withId("bfdyjduss").withLocation("szekbh"))) - .withPublicNetworkAccess("aaggkre") - .withRegionDetails(Arrays - .asList( - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("ybff") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("reoagsqtaadus") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("vsqw") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails())))), - new RegistryInner().withLocation("xunrswgkpjhboy") - .withTags(mapOf("lgw", "bhuhk", "o", "okhu", "cqypz", "jy", "fejyvdwtfxptpqa", "zufgs")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("bi", new UserAssignedIdentity(), "sbw", - new UserAssignedIdentity(), "vbvzipbwxgo", new UserAssignedIdentity()))) - .withKind("x") - .withSku(new Sku().withName("banbaupwtzv") - .withTier(SkuTier.BASIC) - .withSize("ozkxbzrpejplss") - .withFamily("bttt") - .withCapacity(102469809)) - .withDiscoveryUrl("rad") - .withIntellectualPropertyPublisher("kxknpdg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("jsugswhgs")) - .withMlFlowRegistryUri("dkwwn") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("ctohzhaquvwsxbgn") - .withLocation("ervqchoadhrsxqvz"))) - .withPublicNetworkAccess("abdsr") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("zrsubklrxhjnltce") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("dieq") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), - new AcrDetails())) - .withLocation("wdxvqzxoebwg") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails())))), - new RegistryInner().withLocation("xcgjtf") - .withTags(mapOf("myltrwntfmtbg", "uktrfnslnlrx", "zjwhsetwwjwz", "jdxwnazkurrdre", - "qzzdcykeyste", "fakeTokenPlaceholder")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("dljzgdyrc", new UserAssignedIdentity(), "bsgzl", new UserAssignedIdentity(), - "bjnqogdxwbsf", new UserAssignedIdentity(), "x", new UserAssignedIdentity()))) - .withKind("lflec") - .withSku(new Sku().withName("ymh") - .withTier(SkuTier.BASIC) - .withSize("qfttehdpboujs") - .withFamily("fvvdshxcdedsue") - .withCapacity(1734780864)) - .withDiscoveryUrl("inxojjlux") - .withIntellectualPropertyPublisher("hilzzdzzq") - .withManagedResourceGroup(new ArmResourceId().withResourceId("ezay")) - .withMlFlowRegistryUri("ribqlotokh") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("azn").withLocation("qww"), - new RegistryPrivateEndpointConnection().withId("yofgwhnkbtlwljss").withLocation("tsnld"), - new RegistryPrivateEndpointConnection().withId("olgisu").withLocation("bteogfg"))) - .withPublicNetworkAccess("jrykwlefksxqce") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("nmqvzvluy") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("sscyvai") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("vfyeowpsfxtj") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())))), - new RegistryInner().withLocation("pynwlslrcigtzjcv") - .withTags( - mapOf("yxpavidnie", "lapsnsso", "slpuxgcbdsva", "wffcvvye", "rkxgpazwugxyqvnj", "pnptw")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("vozglqjbk", new UserAssignedIdentity()))) - .withKind("zcl") - .withSku(new Sku().withName("jwvuag") - .withTier(SkuTier.PREMIUM) - .withSize("ltngvmreupt") - .withFamily("lzmijajwolxfsv") - .withCapacity(202449168)) - .withDiscoveryUrl("zeyowmndcovdwzqa") - .withIntellectualPropertyPublisher("zanhmkvfru") - .withManagedResourceGroup(new ArmResourceId().withResourceId("drbcp")) - .withMlFlowRegistryUri("xudqyemebunaucmc") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("eemmjauwcgx").withLocation("noh"), - new RegistryPrivateEndpointConnection().withId("ranizerw").withLocation("dasmxu"), - new RegistryPrivateEndpointConnection() - .withId("bngfcocefhpri") - .withLocation("fmpztraudsvh"), - new RegistryPrivateEndpointConnection().withId("culregpqt") - .withLocation("jhvrztnvgyshqrdg"))) - .withPublicNetworkAccess("mewjzlpyk") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("jcayerzrransyby") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("rghsrleinkfsc") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())))))); - model = BinaryData.fromObject(model).toObject(RegistryTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("deolctaebfs", model.nextLink()); - Assertions.assertEquals("ttjxophgerhsmvgo", model.value().get(0).location()); - Assertions.assertEquals("zmqilrixysfnim", model.value().get(0).tags().get("qywwwmhk")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("aaeskyfjlpze", model.value().get(0).kind()); - Assertions.assertEquals("zilfmnlikps", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("eypofqpm", model.value().get(0).sku().size()); - Assertions.assertEquals("yqgs", model.value().get(0).sku().family()); - Assertions.assertEquals(551840235, model.value().get(0).sku().capacity()); - Assertions.assertEquals("oyrplixl", model.value().get(0).discoveryUrl()); - Assertions.assertEquals("mllpquevhamfowg", model.value().get(0).intellectualPropertyPublisher()); - Assertions.assertEquals("mkekxpkzwaqxo", model.value().get(0).managedResourceGroup().resourceId()); - Assertions.assertEquals("ovchiqbplvfid", model.value().get(0).mlFlowRegistryUri()); - Assertions.assertEquals("ekxbyjg", model.value().get(0).registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("fepxyihpqadag", - model.value().get(0).registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("aaggkre", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("ybff", model.value().get(0).regionDetails().get(0).location()); - } - - // 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; + Assertions.assertEquals("ksrpqv", model.value().get(0).publicNetworkAccess()); + Assertions.assertEquals("htwdwrftswibyrcd", model.value().get(0).regionDetails().get(0).location()); + Assertions.assertEquals("waekrrjreafxtsgu", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java index f4f861b21572..6f372e2ceca3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -30,175 +30,156 @@ public final class RegressionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Regression model = BinaryData.fromString( - "{\"taskType\":\"Regression\",\"primaryMetric\":\"R2Score\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"RandomForest\",\"ExtremeRandomTrees\",\"DecisionTree\",\"ExtremeRandomTrees\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMRegressor\",\"stackMetaLearnerTrainPercentage\":8.33007277629979,\"stackMetaLearnerKWargs\":\"datayvichcap\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT9H16M19S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true},\"limitSettings\":{\"maxTrials\":1273889376,\"trialTimeout\":\"PT180H28M30S\",\"timeout\":\"PT69H35M25S\",\"maxConcurrentTrials\":1570051650,\"maxCoresPerTrial\":1441156662,\"exitScore\":37.32116818441482,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"tigpksywicklktg\",\"dprtqjytdcfe\"],\"weightColumnName\":\"hbdwbvjsbgmlamo\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"caytnpkvbpbltcws\",\"mode\":\"EvalDownload\",\"description\":\"eocnqoubvepvlrys\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"h\",\"mode\":\"EvalDownload\",\"description\":\"hxohzbzhhavzf\"},\"validationDataSize\":40.045012854483886,\"testDataSize\":47.5872192816281,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"CatTargetEncoder\"],\"columnNameAndTypes\":{\"fddxqfussub\":\"uehouisaklh\",\"p\":\"sspmjvailfauyv\",\"wvoglff\":\"wlkqdgwbztrthl\",\"lor\":\"dhg\"},\"transformerParams\":{\"cmo\":[{\"fields\":[\"cvxkylhc\",\"sdylmnq\",\"nkyg\"],\"parameters\":\"datatmsgkwedwl\"},{\"fields\":[\"hgbgbhudh\",\"pjimvrrqfibpkwm\",\"mrlfizjuddndi\"],\"parameters\":\"datapngyhylqyafe\"}],\"jfqreeo\":[{\"fields\":[\"uytxnxr\"],\"parameters\":\"datartzea\"},{\"fields\":[\"fvkhbjhmv\"],\"parameters\":\"dataxsdhweignybffq\"},{\"fields\":[\"ynepkt\",\"mwg\",\"conyse\",\"jijfhpxni\"],\"parameters\":\"datauoxfa\"},{\"fields\":[\"bskkypor\",\"ynieunbydlgfaphw\"],\"parameters\":\"databwtsaynrt\"}],\"rmclyqwwu\":[{\"fields\":[\"mrnblihs\",\"bfb\",\"divixzhpjgqzmiao\"],\"parameters\":\"dataeacfxaubuh\"},{\"fields\":[\"tcnxriqz\",\"dckhsq\"],\"parameters\":\"datarjsurnowo\"},{\"fields\":[\"rxmyokohlsf\",\"fouqjpzhea\",\"uvkqxqkvadmj\",\"ymudj\"],\"parameters\":\"dataajzdebhs\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"aaptbs\"},\"logVerbosity\":\"Critical\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"bcbptwybloc\",\"mode\":\"Download\",\"description\":\"lxzbnsshvqn\"},\"targetColumnName\":\"zbeuybutcdzjf\"}") + "{\"taskType\":\"Regression\",\"cvSplitColumnNames\":[\"ndslvrqoemwsie\"],\"featurizationSettings\":{\"blockedTransformers\":[\"NaiveBayes\",\"CountVectorizer\",\"TfIdf\"],\"columnNameAndTypes\":{\"g\":\"fydeotmfxlkd\"},\"enableDnnFeaturization\":true,\"mode\":\"Custom\",\"transformerParams\":{\"cfmfzcfasfodro\":[{\"fields\":[\"uyuafixlxicw\"],\"parameters\":\"\\\"datath\\\"\"}],\"zewxtrlqbpxy\":[{\"fields\":[\"ngtwyuskwgq\"],\"parameters\":\"\\\"datataumd\\\"\"},{\"fields\":[\"lv\",\"rkegtyczu\",\"piyxlzmiydd\",\"eqzqvabmhvs\"],\"parameters\":\"\\\"dataduetbapf\\\"\"}]},\"datasetLanguage\":\"kjpirgzxvbczw\"},\"limitSettings\":{\"enableEarlyTermination\":false,\"exitScore\":69.58924620583065,\"maxConcurrentTrials\":966257553,\"maxCoresPerTrial\":122092654,\"maxTrials\":2144215723,\"timeout\":\"PT98H43M3S\",\"trialTimeout\":\"PT172H12M16S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"ozfvualjt\",\"description\":\"ivsdw\"},\"testDataSize\":27.603326022840115,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"hscj\",\"description\":\"kmhzbh\"},\"validationDataSize\":6.782156655388494,\"weightColumnName\":\"wihbnnxemv\",\"primaryMetric\":\"SpearmanCorrelation\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"LightGBM\",\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"DecisionTree\",\"ExtremeRandomTrees\"],\"enableDnnTraining\":false,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT149H25M53S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"\\\"datarletndqlmf\\\"\",\"stackMetaLearnerTrainPercentage\":98.06462680890994,\"stackMetaLearnerType\":\"ElasticNet\"}},\"logVerbosity\":\"NotSet\",\"targetColumnName\":\"wovvv\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"eevnoqayreh\",\"description\":\"q\"}}") .toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("lxzbnsshvqn", model.trainingData().description()); - Assertions.assertEquals("bcbptwybloc", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("zbeuybutcdzjf", model.targetColumnName()); - Assertions.assertEquals(RegressionPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(8.33007277629979D, + Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); + Assertions.assertEquals("wovvv", model.targetColumnName()); + Assertions.assertEquals("q", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); + Assertions.assertEquals("eevnoqayreh", model.trainingData().uri()); + Assertions.assertEquals("ndslvrqoemwsie", model.cvSplitColumnNames().get(0)); + Assertions.assertEquals("kjpirgzxvbczw", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, + model.featurizationSettings().blockedTransformers().get(0)); + Assertions.assertEquals("fydeotmfxlkd", model.featurizationSettings().columnNameAndTypes().get("g")); + Assertions.assertTrue(model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); + Assertions.assertEquals("uyuafixlxicw", + model.featurizationSettings().transformerParams().get("cfmfzcfasfodro").get(0).fields().get(0)); + Assertions.assertFalse(model.limitSettings().enableEarlyTermination()); + Assertions.assertEquals(69.58924620583065D, model.limitSettings().exitScore()); + Assertions.assertEquals(966257553, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(122092654, model.limitSettings().maxCoresPerTrial()); + Assertions.assertEquals(2144215723, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT98H43M3S"), model.limitSettings().timeout()); + Assertions.assertEquals(Duration.parse("PT172H12M16S"), model.limitSettings().trialTimeout()); + Assertions.assertEquals("ivsdw", model.testData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); + Assertions.assertEquals("ozfvualjt", model.testData().uri()); + Assertions.assertEquals(27.603326022840115D, model.testDataSize()); + Assertions.assertEquals("kmhzbh", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("hscj", model.validationData().uri()); + Assertions.assertEquals(6.782156655388494D, model.validationDataSize()); + Assertions.assertEquals("wihbnnxemv", model.weightColumnName()); + Assertions.assertEquals(RegressionPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); + Assertions.assertFalse(model.trainingSettings().enableDnnTraining()); + Assertions.assertTrue(model.trainingSettings().enableModelExplainability()); + Assertions.assertTrue(model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertTrue(model.trainingSettings().enableStackEnsemble()); + Assertions.assertTrue(model.trainingSettings().enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT149H25M53S"), + model.trainingSettings().ensembleModelDownloadTimeout()); + Assertions.assertEquals(98.06462680890994D, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT9H16M19S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); + Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); Assertions.assertEquals(RegressionModels.LIGHT_GBM, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.RANDOM_FOREST, + Assertions.assertEquals(RegressionModels.DECISION_TREE, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(1273889376, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT180H28M30S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT69H35M25S"), model.limitSettings().timeout()); - Assertions.assertEquals(1570051650, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1441156662, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(37.32116818441482D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("tigpksywicklktg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hbdwbvjsbgmlamo", model.weightColumnName()); - Assertions.assertEquals("eocnqoubvepvlrys", model.validationData().description()); - Assertions.assertEquals("caytnpkvbpbltcws", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("hxohzbzhhavzf", model.testData().description()); - Assertions.assertEquals("h", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(40.045012854483886D, model.validationDataSize()); - Assertions.assertEquals(47.5872192816281D, model.testDataSize()); - Assertions.assertEquals("aaptbs", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.CAT_TARGET_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("uehouisaklh", model.featurizationSettings().columnNameAndTypes().get("fddxqfussub")); - Assertions.assertEquals("cvxkylhc", - model.featurizationSettings().transformerParams().get("cmo").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Regression model - = new Regression().withLogVerbosity(LogVerbosity.CRITICAL) - .withTrainingData(new MLTableJobInput().withDescription("lxzbnsshvqn") - .withUri("bcbptwybloc") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withTargetColumnName("zbeuybutcdzjf") - .withPrimaryMetric(RegressionPrimaryMetrics.R2SCORE) - .withTrainingSettings( - new RegressionTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings(new StackEnsembleSettings() - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR) - .withStackMetaLearnerTrainPercentage(8.33007277629979D) - .withStackMetaLearnerKWargs("datayvichcap")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT9H16M19S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.LIGHT_GBM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(RegressionModels.RANDOM_FOREST, RegressionModels.EXTREME_RANDOM_TREES, - RegressionModels.DECISION_TREE, RegressionModels.EXTREME_RANDOM_TREES))) - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(1273889376) - .withTrialTimeout(Duration.parse("PT180H28M30S")) - .withTimeout(Duration.parse("PT69H35M25S")) - .withMaxConcurrentTrials(1570051650) - .withMaxCoresPerTrial(1441156662) - .withExitScore(37.32116818441482D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("tigpksywicklktg", "dprtqjytdcfe")) - .withWeightColumnName("hbdwbvjsbgmlamo") - .withValidationData(new MLTableJobInput().withDescription("eocnqoubvepvlrys") - .withUri("caytnpkvbpbltcws") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTestData(new MLTableJobInput() - .withDescription("hxohzbzhhavzf") - .withUri("h") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withValidationDataSize(40.045012854483886D) - .withTestDataSize(47.5872192816281D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("aaptbs") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.CAT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("fddxqfussub", "uehouisaklh", "p", "sspmjvailfauyv", "wvoglff", - "wlkqdgwbztrthl", "lor", "dhg")) - .withTransformerParams(mapOf("cmo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("cvxkylhc", "sdylmnq", "nkyg")) - .withParameters("datatmsgkwedwl"), - new ColumnTransformer() - .withFields(Arrays.asList("hgbgbhudh", "pjimvrrqfibpkwm", "mrlfizjuddndi")) - .withParameters("datapngyhylqyafe")), - "jfqreeo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("uytxnxr")).withParameters("datartzea"), - new ColumnTransformer().withFields(Arrays.asList("fvkhbjhmv")) - .withParameters("dataxsdhweignybffq"), - new ColumnTransformer().withFields(Arrays.asList("ynepkt", "mwg", "conyse", "jijfhpxni")) - .withParameters("datauoxfa"), - new ColumnTransformer().withFields(Arrays.asList("bskkypor", "ynieunbydlgfaphw")) - .withParameters("databwtsaynrt")), - "rmclyqwwu", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("mrnblihs", "bfb", "divixzhpjgqzmiao")) - .withParameters("dataeacfxaubuh"), - new ColumnTransformer().withFields(Arrays.asList("tcnxriqz", "dckhsq")) - .withParameters("datarjsurnowo"), - new ColumnTransformer() - .withFields(Arrays.asList("rxmyokohlsf", "fouqjpzhea", "uvkqxqkvadmj", "ymudj")) - .withParameters("dataajzdebhs")))) - .withEnableDnnFeaturization(true)); + Regression model = new Regression().withLogVerbosity(LogVerbosity.NOT_SET) + .withTargetColumnName("wovvv") + .withTrainingData( + new MLTableJobInput().withDescription("q").withMode(InputDeliveryMode.DIRECT).withUri("eevnoqayreh")) + .withCvSplitColumnNames(Arrays.asList("ndslvrqoemwsie")) + .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("kjpirgzxvbczw") + .withBlockedTransformers(Arrays.asList(BlockedTransformers.NAIVE_BAYES, + BlockedTransformers.COUNT_VECTORIZER, BlockedTransformers.TF_IDF)) + .withColumnNameAndTypes(mapOf("g", "fydeotmfxlkd")) + .withEnableDnnFeaturization(true) + .withMode(FeaturizationMode.CUSTOM) + .withTransformerParams(mapOf("cfmfzcfasfodro", + Arrays.asList( + new ColumnTransformer().withFields(Arrays.asList("uyuafixlxicw")).withParameters("\"datath\"")), + "zewxtrlqbpxy", + Arrays.asList( + new ColumnTransformer().withFields(Arrays.asList("ngtwyuskwgq")) + .withParameters("\"datataumd\""), + new ColumnTransformer() + .withFields(Arrays.asList("lv", "rkegtyczu", "piyxlzmiydd", "eqzqvabmhvs")) + .withParameters("\"dataduetbapf\""))))) + .withLimitSettings(new TableVerticalLimitSettings().withEnableEarlyTermination(false) + .withExitScore(69.58924620583065D) + .withMaxConcurrentTrials(966257553) + .withMaxCoresPerTrial(122092654) + .withMaxTrials(2144215723) + .withTimeout(Duration.parse("PT98H43M3S")) + .withTrialTimeout(Duration.parse("PT172H12M16S"))) + .withNCrossValidations(new NCrossValidations()) + .withTestData(new MLTableJobInput().withDescription("ivsdw") + .withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("ozfvualjt")) + .withTestDataSize(27.603326022840115D) + .withValidationData(new MLTableJobInput().withDescription("kmhzbh") + .withMode(InputDeliveryMode.EVAL_DOWNLOAD) + .withUri("hscj")) + .withValidationDataSize(6.782156655388494D) + .withWeightColumnName("wihbnnxemv") + .withPrimaryMetric(RegressionPrimaryMetrics.SPEARMAN_CORRELATION) + .withTrainingSettings(new RegressionTrainingSettings().withEnableDnnTraining(false) + .withEnableModelExplainability(true) + .withEnableOnnxCompatibleModels(true) + .withEnableStackEnsemble(true) + .withEnableVoteEnsemble(true) + .withEnsembleModelDownloadTimeout(Duration.parse("PT149H25M53S")) + .withStackEnsembleSettings(new StackEnsembleSettings().withStackMetaLearnerKWargs("\"datarletndqlmf\"") + .withStackMetaLearnerTrainPercentage(98.06462680890994D) + .withStackMetaLearnerType(StackMetaLearnerType.ELASTIC_NET)) + .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.LIGHT_GBM, RegressionModels.LIGHT_GBM)) + .withBlockedTrainingAlgorithms( + Arrays.asList(RegressionModels.DECISION_TREE, RegressionModels.EXTREME_RANDOM_TREES))); model = BinaryData.fromObject(model).toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("lxzbnsshvqn", model.trainingData().description()); - Assertions.assertEquals("bcbptwybloc", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("zbeuybutcdzjf", model.targetColumnName()); - Assertions.assertEquals(RegressionPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(8.33007277629979D, + Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); + Assertions.assertEquals("wovvv", model.targetColumnName()); + Assertions.assertEquals("q", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); + Assertions.assertEquals("eevnoqayreh", model.trainingData().uri()); + Assertions.assertEquals("ndslvrqoemwsie", model.cvSplitColumnNames().get(0)); + Assertions.assertEquals("kjpirgzxvbczw", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, + model.featurizationSettings().blockedTransformers().get(0)); + Assertions.assertEquals("fydeotmfxlkd", model.featurizationSettings().columnNameAndTypes().get("g")); + Assertions.assertTrue(model.featurizationSettings().enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); + Assertions.assertEquals("uyuafixlxicw", + model.featurizationSettings().transformerParams().get("cfmfzcfasfodro").get(0).fields().get(0)); + Assertions.assertFalse(model.limitSettings().enableEarlyTermination()); + Assertions.assertEquals(69.58924620583065D, model.limitSettings().exitScore()); + Assertions.assertEquals(966257553, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(122092654, model.limitSettings().maxCoresPerTrial()); + Assertions.assertEquals(2144215723, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT98H43M3S"), model.limitSettings().timeout()); + Assertions.assertEquals(Duration.parse("PT172H12M16S"), model.limitSettings().trialTimeout()); + Assertions.assertEquals("ivsdw", model.testData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); + Assertions.assertEquals("ozfvualjt", model.testData().uri()); + Assertions.assertEquals(27.603326022840115D, model.testDataSize()); + Assertions.assertEquals("kmhzbh", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("hscj", model.validationData().uri()); + Assertions.assertEquals(6.782156655388494D, model.validationDataSize()); + Assertions.assertEquals("wihbnnxemv", model.weightColumnName()); + Assertions.assertEquals(RegressionPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); + Assertions.assertFalse(model.trainingSettings().enableDnnTraining()); + Assertions.assertTrue(model.trainingSettings().enableModelExplainability()); + Assertions.assertTrue(model.trainingSettings().enableOnnxCompatibleModels()); + Assertions.assertTrue(model.trainingSettings().enableStackEnsemble()); + Assertions.assertTrue(model.trainingSettings().enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT149H25M53S"), + model.trainingSettings().ensembleModelDownloadTimeout()); + Assertions.assertEquals(98.06462680890994D, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT9H16M19S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); + Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, + model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); Assertions.assertEquals(RegressionModels.LIGHT_GBM, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.RANDOM_FOREST, + Assertions.assertEquals(RegressionModels.DECISION_TREE, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(1273889376, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT180H28M30S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT69H35M25S"), model.limitSettings().timeout()); - Assertions.assertEquals(1570051650, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1441156662, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(37.32116818441482D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("tigpksywicklktg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hbdwbvjsbgmlamo", model.weightColumnName()); - Assertions.assertEquals("eocnqoubvepvlrys", model.validationData().description()); - Assertions.assertEquals("caytnpkvbpbltcws", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("hxohzbzhhavzf", model.testData().description()); - Assertions.assertEquals("h", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(40.045012854483886D, model.validationDataSize()); - Assertions.assertEquals(47.5872192816281D, model.testDataSize()); - Assertions.assertEquals("aaptbs", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.CAT_TARGET_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("uehouisaklh", model.featurizationSettings().columnNameAndTypes().get("fddxqfussub")); - Assertions.assertEquals("cvxkylhc", - model.featurizationSettings().transformerParams().get("cmo").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java index 7b58e0cf878c..6611be75955f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,48 +17,48 @@ public final class RegressionTrainingSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RegressionTrainingSettings model = BinaryData.fromString( - "{\"allowedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"KNN\",\"LightGBM\",\"ElasticNet\"],\"blockedTrainingAlgorithms\":[\"ElasticNet\",\"ElasticNet\",\"GradientBoosting\",\"RandomForest\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMClassifier\",\"stackMetaLearnerTrainPercentage\":82.88657288403749,\"stackMetaLearnerKWargs\":\"datagp\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT146H7M34S\",\"enableModelExplainability\":false,\"enableDnnTraining\":false}") + "{\"allowedTrainingAlgorithms\":[\"ElasticNet\",\"KNN\",\"SGD\",\"KNN\"],\"blockedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"XGBoostRegressor\",\"ExtremeRandomTrees\",\"LassoLars\"],\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT136H26M50S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"\\\"datafonfdbgm\\\"\",\"stackMetaLearnerTrainPercentage\":73.45406709829312,\"stackMetaLearnerType\":\"LightGBMRegressor\"}}") .toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, + Assertions.assertFalse(model.enableDnnTraining()); + Assertions.assertFalse(model.enableModelExplainability()); + Assertions.assertFalse(model.enableOnnxCompatibleModels()); + Assertions.assertTrue(model.enableStackEnsemble()); + Assertions.assertTrue(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT136H26M50S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(73.45406709829312D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(82.88657288403749D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT146H7M34S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.blockedTrainingAlgorithms().get(0)); + Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.blockedTrainingAlgorithms().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RegressionTrainingSettings model = new RegressionTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER) - .withStackMetaLearnerTrainPercentage(82.88657288403749D) - .withStackMetaLearnerKWargs("datagp")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT146H7M34S")) + RegressionTrainingSettings model = new RegressionTrainingSettings().withEnableDnnTraining(false) .withEnableModelExplainability(false) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.EXTREME_RANDOM_TREES, RegressionModels.KNN, - RegressionModels.LIGHT_GBM, RegressionModels.ELASTIC_NET)) - .withBlockedTrainingAlgorithms(Arrays.asList(RegressionModels.ELASTIC_NET, RegressionModels.ELASTIC_NET, - RegressionModels.GRADIENT_BOOSTING, RegressionModels.RANDOM_FOREST)); + .withEnableOnnxCompatibleModels(false) + .withEnableStackEnsemble(true) + .withEnableVoteEnsemble(true) + .withEnsembleModelDownloadTimeout(Duration.parse("PT136H26M50S")) + .withStackEnsembleSettings(new StackEnsembleSettings().withStackMetaLearnerKWargs("\"datafonfdbgm\"") + .withStackMetaLearnerTrainPercentage(73.45406709829312D) + .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) + .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.ELASTIC_NET, RegressionModels.KNN, + RegressionModels.SGD, RegressionModels.KNN)) + .withBlockedTrainingAlgorithms( + Arrays.asList(RegressionModels.EXTREME_RANDOM_TREES, RegressionModels.XGBOOST_REGRESSOR, + RegressionModels.EXTREME_RANDOM_TREES, RegressionModels.LASSO_LARS)); model = BinaryData.fromObject(model).toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, + Assertions.assertFalse(model.enableDnnTraining()); + Assertions.assertFalse(model.enableModelExplainability()); + Assertions.assertFalse(model.enableOnnxCompatibleModels()); + Assertions.assertTrue(model.enableStackEnsemble()); + Assertions.assertTrue(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT136H26M50S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(73.45406709829312D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(82.88657288403749D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT146H7M34S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.blockedTrainingAlgorithms().get(0)); + Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.allowedTrainingAlgorithms().get(0)); + Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.blockedTrainingAlgorithms().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestConfigurationTests.java new file mode 100644 index 000000000000..6ffbc41b55a8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestConfigurationTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.RequestConfiguration; +import java.time.Duration; +import org.junit.jupiter.api.Assertions; + +public final class RequestConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + RequestConfiguration model = BinaryData + .fromString("{\"maxConcurrentRequestsPerInstance\":1693927392,\"requestTimeout\":\"PT62H19M9S\"}") + .toObject(RequestConfiguration.class); + Assertions.assertEquals(1693927392, model.maxConcurrentRequestsPerInstance()); + Assertions.assertEquals(Duration.parse("PT62H19M9S"), model.requestTimeout()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RequestConfiguration model = new RequestConfiguration().withMaxConcurrentRequestsPerInstance(1693927392) + .withRequestTimeout(Duration.parse("PT62H19M9S")); + model = BinaryData.fromObject(model).toObject(RequestConfiguration.class); + Assertions.assertEquals(1693927392, model.maxConcurrentRequestsPerInstance()); + Assertions.assertEquals(Duration.parse("PT62H19M9S"), model.requestTimeout()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java index 984b09efc1b2..be18aeb0ac17 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class RequestLoggingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - RequestLogging model - = BinaryData.fromString("{\"captureHeaders\":[\"ozoolzq\"]}").toObject(RequestLogging.class); - Assertions.assertEquals("ozoolzq", model.captureHeaders().get(0)); + RequestLogging model = BinaryData.fromString("{\"captureHeaders\":[\"vjipfdvhaxdv\",\"zaehpphthd\"]}") + .toObject(RequestLogging.class); + Assertions.assertEquals("vjipfdvhaxdv", model.captureHeaders().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RequestLogging model = new RequestLogging().withCaptureHeaders(Arrays.asList("ozoolzq")); + RequestLogging model = new RequestLogging().withCaptureHeaders(Arrays.asList("vjipfdvhaxdv", "zaehpphthd")); model = BinaryData.fromObject(model).toObject(RequestLogging.class); - Assertions.assertEquals("ozoolzq", model.captureHeaders().get(0)); + Assertions.assertEquals("vjipfdvhaxdv", model.captureHeaders().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResizeSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResizeSchemaTests.java new file mode 100644 index 000000000000..a353662b8a35 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResizeSchemaTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ResizeSchema; +import org.junit.jupiter.api.Assertions; + +public final class ResizeSchemaTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResizeSchema model = BinaryData.fromString("{\"targetVMSize\":\"aneyvae\"}").toObject(ResizeSchema.class); + Assertions.assertEquals("aneyvae", model.targetVMSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ResizeSchema model = new ResizeSchema().withTargetVMSize("aneyvae"); + model = BinaryData.fromObject(model).toObject(ResizeSchema.class); + Assertions.assertEquals("aneyvae", model.targetVMSize()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java index 5119a6d50e4c..b45326ac4815 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,22 +14,22 @@ public final class ResourceBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceBase model = BinaryData.fromString( - "{\"description\":\"fgytguslfeadcyg\",\"tags\":{\"lolp\":\"yhejhzisxgfp\",\"r\":\"vk\",\"swibyr\":\"qvujzraehtwdwrf\"},\"properties\":{\"hevxcced\":\"bhshfwpracstwity\"}}") + "{\"description\":\"qgitxmed\",\"properties\":{\"zzhxgktrm\":\"slynqwwnc\"},\"tags\":{\"tfdygpfqb\":\"napkteoellw\",\"op\":\"ac\",\"eqx\":\"fqrhhuaopppc\"}}") .toObject(ResourceBase.class); - Assertions.assertEquals("fgytguslfeadcyg", model.description()); - Assertions.assertEquals("yhejhzisxgfp", model.tags().get("lolp")); - Assertions.assertEquals("bhshfwpracstwity", model.properties().get("hevxcced")); + Assertions.assertEquals("qgitxmed", model.description()); + Assertions.assertEquals("slynqwwnc", model.properties().get("zzhxgktrm")); + Assertions.assertEquals("napkteoellw", model.tags().get("tfdygpfqb")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceBase model = new ResourceBase().withDescription("fgytguslfeadcyg") - .withTags(mapOf("lolp", "yhejhzisxgfp", "r", "vk", "swibyr", "qvujzraehtwdwrf")) - .withProperties(mapOf("hevxcced", "bhshfwpracstwity")); + ResourceBase model = new ResourceBase().withDescription("qgitxmed") + .withProperties(mapOf("zzhxgktrm", "slynqwwnc")) + .withTags(mapOf("tfdygpfqb", "napkteoellw", "op", "ac", "eqx", "fqrhhuaopppc")); model = BinaryData.fromObject(model).toObject(ResourceBase.class); - Assertions.assertEquals("fgytguslfeadcyg", model.description()); - Assertions.assertEquals("yhejhzisxgfp", model.tags().get("lolp")); - Assertions.assertEquals("bhshfwpracstwity", model.properties().get("hevxcced")); + Assertions.assertEquals("qgitxmed", model.description()); + Assertions.assertEquals("slynqwwnc", model.properties().get("zzhxgktrm")); + Assertions.assertEquals("napkteoellw", model.tags().get("tfdygpfqb")); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java index 4d9be476f9e8..6955b6a6bc15 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,20 +14,21 @@ public final class ResourceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceConfiguration model = BinaryData.fromString( - "{\"instanceCount\":190807596,\"instanceType\":\"uunfprnjletlxsm\",\"properties\":{\"ifamowazi\":\"datado\",\"hxqszdtmaajquh\":\"datanknlqwzdvpi\"}}") + "{\"instanceCount\":1440531201,\"instanceType\":\"afbwqroohtuovmao\",\"properties\":{\"hpv\":\"\\\"datajtumgh\\\"\",\"uscv\":\"\\\"datacmslclblyjxltbs\\\"\",\"igctmgxuupbezq\":\"\\\"dataf\\\"\"}}") .toObject(ResourceConfiguration.class); - Assertions.assertEquals(190807596, model.instanceCount()); - Assertions.assertEquals("uunfprnjletlxsm", model.instanceType()); + Assertions.assertEquals(1440531201, model.instanceCount()); + Assertions.assertEquals("afbwqroohtuovmao", model.instanceType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceConfiguration model = new ResourceConfiguration().withInstanceCount(190807596) - .withInstanceType("uunfprnjletlxsm") - .withProperties(mapOf("ifamowazi", "datado", "hxqszdtmaajquh", "datanknlqwzdvpi")); + ResourceConfiguration model = new ResourceConfiguration().withInstanceCount(1440531201) + .withInstanceType("afbwqroohtuovmao") + .withProperties( + mapOf("hpv", "\"datajtumgh\"", "uscv", "\"datacmslclblyjxltbs\"", "igctmgxuupbezq", "\"dataf\"")); model = BinaryData.fromObject(model).toObject(ResourceConfiguration.class); - Assertions.assertEquals(190807596, model.instanceCount()); - Assertions.assertEquals("uunfprnjletlxsm", model.instanceType()); + Assertions.assertEquals(1440531201, model.instanceCount()); + Assertions.assertEquals("afbwqroohtuovmao", model.instanceType()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java index 205e95161143..0ab53b2d823b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,14 @@ public final class ResourceIdTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceId model = BinaryData.fromString("{\"id\":\"qgnnbz\"}").toObject(ResourceId.class); - Assertions.assertEquals("qgnnbz", model.id()); + ResourceId model = BinaryData.fromString("{\"id\":\"ufylamxowbg\"}").toObject(ResourceId.class); + Assertions.assertEquals("ufylamxowbg", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceId model = new ResourceId().withId("qgnnbz"); + ResourceId model = new ResourceId().withId("ufylamxowbg"); model = BinaryData.fromObject(model).toObject(ResourceId.class); - Assertions.assertEquals("qgnnbz", model.id()); + Assertions.assertEquals("ufylamxowbg", model.id()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java index 59af47ed645a..302edb68c227 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,12 +11,6 @@ public final class ResourceNameTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceName model - = BinaryData.fromString("{\"value\":\"fcnj\",\"localizedValue\":\"cn\"}").toObject(ResourceName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceName model = new ResourceName(); - model = BinaryData.fromObject(model).toObject(ResourceName.class); + = BinaryData.fromString("{\"value\":\"ure\",\"localizedValue\":\"i\"}").toObject(ResourceName.class); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java index ca45d7d5bec0..4a9ec47f2424 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,13 +11,7 @@ public final class ResourceQuotaInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceQuotaInner model = BinaryData.fromString( - "{\"id\":\"rdqmhjjdhtldwkyz\",\"amlWorkspaceLocation\":\"utknc\",\"type\":\"cwsvlxotog\",\"name\":{\"value\":\"upqsx\",\"localizedValue\":\"micykvceoveilo\"},\"limit\":2837447101588730204,\"unit\":\"Count\"}") + "{\"id\":\"kw\",\"amlWorkspaceLocation\":\"obp\",\"type\":\"cidpda\",\"name\":{\"value\":\"mn\",\"localizedValue\":\"lirqqcls\"},\"limit\":6252566658276405112,\"unit\":\"Count\"}") .toObject(ResourceQuotaInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceQuotaInner model = new ResourceQuotaInner(); - model = BinaryData.fromObject(model).toObject(ResourceQuotaInner.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.java index 160ece9acc0f..f446d0c679f5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,35 +16,35 @@ public final class RollingInputDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RollingInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Rolling\",\"windowOffset\":\"PT167H19S\",\"windowSize\":\"PT35H51M52S\",\"preprocessingComponentId\":\"mqfvxgwpqnyumz\",\"dataContext\":\"dokez\",\"jobInputType\":\"custom_model\",\"uri\":\"ezknfzqnzbflbqmh\",\"columns\":{\"bs\":\"xxvwedhagq\",\"crolrzesbomp\":\"seayuflmsyzz\",\"munwjivtbuszbdjr\":\"zk\",\"isdeqng\":\"feujywda\"}}") + "{\"inputDataType\":\"Rolling\",\"preprocessingComponentId\":\"ifrhjulrsul\",\"windowOffset\":\"PT100H14M40S\",\"windowSize\":\"PT121H58M19S\",\"columns\":{\"hhgzotf\":\"usnaw\",\"zwx\":\"iyrgkoek\",\"xb\":\"yxhighc\",\"kvskiczdfrjei\":\"molpcqyde\"},\"dataContext\":\"kgqaboo\",\"jobInputType\":\"triton_model\",\"uri\":\"bmsgycqsxrmdv\"}") .toObject(RollingInputData.class); - Assertions.assertEquals("dokez", model.dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); - Assertions.assertEquals("ezknfzqnzbflbqmh", model.uri()); - Assertions.assertEquals("xxvwedhagq", model.columns().get("bs")); - Assertions.assertEquals(Duration.parse("PT167H19S"), model.windowOffset()); - Assertions.assertEquals(Duration.parse("PT35H51M52S"), model.windowSize()); - Assertions.assertEquals("mqfvxgwpqnyumz", model.preprocessingComponentId()); + Assertions.assertEquals("usnaw", model.columns().get("hhgzotf")); + Assertions.assertEquals("kgqaboo", model.dataContext()); + Assertions.assertEquals(JobInputType.TRITON_MODEL, model.jobInputType()); + Assertions.assertEquals("bmsgycqsxrmdv", model.uri()); + Assertions.assertEquals("ifrhjulrsul", model.preprocessingComponentId()); + Assertions.assertEquals(Duration.parse("PT100H14M40S"), model.windowOffset()); + Assertions.assertEquals(Duration.parse("PT121H58M19S"), model.windowSize()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - RollingInputData model = new RollingInputData().withDataContext("dokez") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("ezknfzqnzbflbqmh") - .withColumns(mapOf("bs", "xxvwedhagq", "crolrzesbomp", "seayuflmsyzz", "munwjivtbuszbdjr", "zk", "isdeqng", - "feujywda")) - .withWindowOffset(Duration.parse("PT167H19S")) - .withWindowSize(Duration.parse("PT35H51M52S")) - .withPreprocessingComponentId("mqfvxgwpqnyumz"); + RollingInputData model = new RollingInputData() + .withColumns(mapOf("hhgzotf", "usnaw", "zwx", "iyrgkoek", "xb", "yxhighc", "kvskiczdfrjei", "molpcqyde")) + .withDataContext("kgqaboo") + .withJobInputType(JobInputType.TRITON_MODEL) + .withUri("bmsgycqsxrmdv") + .withPreprocessingComponentId("ifrhjulrsul") + .withWindowOffset(Duration.parse("PT100H14M40S")) + .withWindowSize(Duration.parse("PT121H58M19S")); model = BinaryData.fromObject(model).toObject(RollingInputData.class); - Assertions.assertEquals("dokez", model.dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); - Assertions.assertEquals("ezknfzqnzbflbqmh", model.uri()); - Assertions.assertEquals("xxvwedhagq", model.columns().get("bs")); - Assertions.assertEquals(Duration.parse("PT167H19S"), model.windowOffset()); - Assertions.assertEquals(Duration.parse("PT35H51M52S"), model.windowSize()); - Assertions.assertEquals("mqfvxgwpqnyumz", model.preprocessingComponentId()); + Assertions.assertEquals("usnaw", model.columns().get("hhgzotf")); + Assertions.assertEquals("kgqaboo", model.dataContext()); + Assertions.assertEquals(JobInputType.TRITON_MODEL, model.jobInputType()); + Assertions.assertEquals("bmsgycqsxrmdv", model.uri()); + Assertions.assertEquals("ifrhjulrsul", model.preprocessingComponentId()); + Assertions.assertEquals(Duration.parse("PT100H14M40S"), model.windowOffset()); + Assertions.assertEquals(Duration.parse("PT121H58M19S"), model.windowSize()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java index 2f7cea25f27b..4011e7103ff7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,16 +11,16 @@ public final class RouteTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Route model = BinaryData.fromString("{\"path\":\"eranokqgukkjqnv\",\"port\":2004582271}").toObject(Route.class); - Assertions.assertEquals("eranokqgukkjqnv", model.path()); - Assertions.assertEquals(2004582271, model.port()); + Route model = BinaryData.fromString("{\"path\":\"pfpubcpzgpx\",\"port\":175188483}").toObject(Route.class); + Assertions.assertEquals("pfpubcpzgpx", model.path()); + Assertions.assertEquals(175188483, model.port()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Route model = new Route().withPath("eranokqgukkjqnv").withPort(2004582271); + Route model = new Route().withPath("pfpubcpzgpx").withPort(175188483); model = BinaryData.fromObject(model).toObject(Route.class); - Assertions.assertEquals("eranokqgukkjqnv", model.path()); - Assertions.assertEquals(2004582271, model.port()); + Assertions.assertEquals("pfpubcpzgpx", model.path()); + Assertions.assertEquals(175188483, model.port()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java index cea13a05cca2..5dd5c8f2192d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java index fc94115f1fd8..7910de898257 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,22 +14,22 @@ public final class ScaleSettingsInformationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScaleSettingsInformation model = BinaryData.fromString( - "{\"scaleSettings\":{\"maxNodeCount\":1901953478,\"minNodeCount\":1742737473,\"nodeIdleTimeBeforeScaleDown\":\"PT26H51M46S\"}}") + "{\"scaleSettings\":{\"maxNodeCount\":1049902006,\"minNodeCount\":739296463,\"nodeIdleTimeBeforeScaleDown\":\"PT108H3M56S\"}}") .toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(1901953478, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(1742737473, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT26H51M46S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); + Assertions.assertEquals(1049902006, model.scaleSettings().maxNodeCount()); + Assertions.assertEquals(739296463, model.scaleSettings().minNodeCount()); + Assertions.assertEquals(Duration.parse("PT108H3M56S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScaleSettingsInformation model - = new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(1901953478) - .withMinNodeCount(1742737473) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT26H51M46S"))); + = new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(1049902006) + .withMinNodeCount(739296463) + .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT108H3M56S"))); model = BinaryData.fromObject(model).toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(1901953478, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(1742737473, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT26H51M46S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); + Assertions.assertEquals(1049902006, model.scaleSettings().maxNodeCount()); + Assertions.assertEquals(739296463, model.scaleSettings().minNodeCount()); + Assertions.assertEquals(Duration.parse("PT108H3M56S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java index 4e41bcc8cec4..25c168083972 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class ScaleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScaleSettings model = BinaryData.fromString( - "{\"maxNodeCount\":1397437100,\"minNodeCount\":1232796575,\"nodeIdleTimeBeforeScaleDown\":\"PT232H8M24S\"}") + "{\"maxNodeCount\":1349953913,\"minNodeCount\":1806728694,\"nodeIdleTimeBeforeScaleDown\":\"PT47H20M14S\"}") .toObject(ScaleSettings.class); - Assertions.assertEquals(1397437100, model.maxNodeCount()); - Assertions.assertEquals(1232796575, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT232H8M24S"), model.nodeIdleTimeBeforeScaleDown()); + Assertions.assertEquals(1349953913, model.maxNodeCount()); + Assertions.assertEquals(1806728694, model.minNodeCount()); + Assertions.assertEquals(Duration.parse("PT47H20M14S"), model.nodeIdleTimeBeforeScaleDown()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScaleSettings model = new ScaleSettings().withMaxNodeCount(1397437100) - .withMinNodeCount(1232796575) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT232H8M24S")); + ScaleSettings model = new ScaleSettings().withMaxNodeCount(1349953913) + .withMinNodeCount(1806728694) + .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT47H20M14S")); model = BinaryData.fromObject(model).toObject(ScaleSettings.class); - Assertions.assertEquals(1397437100, model.maxNodeCount()); - Assertions.assertEquals(1232796575, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT232H8M24S"), model.nodeIdleTimeBeforeScaleDown()); + Assertions.assertEquals(1349953913, model.maxNodeCount()); + Assertions.assertEquals(1806728694, model.minNodeCount()); + Assertions.assertEquals(Duration.parse("PT47H20M14S"), model.nodeIdleTimeBeforeScaleDown()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleUnitConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleUnitConfigurationTests.java new file mode 100644 index 000000000000..d8b659115192 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleUnitConfigurationTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ScaleUnitConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ScaleUnitConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ScaleUnitConfiguration model + = BinaryData.fromString("{\"disablePublicEgress\":false,\"registries\":[\"eyngjg\",\"rquv\"]}") + .toObject(ScaleUnitConfiguration.class); + Assertions.assertFalse(model.disablePublicEgress()); + Assertions.assertEquals("eyngjg", model.registries().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ScaleUnitConfiguration model = new ScaleUnitConfiguration().withDisablePublicEgress(false) + .withRegistries(Arrays.asList("eyngjg", "rquv")); + model = BinaryData.fromObject(model).toObject(ScaleUnitConfiguration.class); + Assertions.assertFalse(model.disablePublicEgress()); + Assertions.assertEquals("eyngjg", model.registries().get(0)); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java index 68d99d619390..46d7214683d3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java index 119db6cb13d7..72935c3dfa1c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,22 +13,22 @@ public final class ScheduleBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ScheduleBase model = BinaryData - .fromString("{\"id\":\"qirvtk\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}") - .toObject(ScheduleBase.class); - Assertions.assertEquals("qirvtk", model.id()); + ScheduleBase model + = BinaryData.fromString("{\"id\":\"su\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Enabled\"}") + .toObject(ScheduleBase.class); + Assertions.assertEquals("su", model.id()); Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); + Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduleBase model = new ScheduleBase().withId("qirvtk") + ScheduleBase model = new ScheduleBase().withId("su") .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.DISABLED); + .withStatus(ScheduleStatus.ENABLED); model = BinaryData.fromObject(model).toObject(ScheduleBase.class); - Assertions.assertEquals("qirvtk", model.id()); + Assertions.assertEquals("su", model.id()); Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); + Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java index 999e9f22e553..64f311bf62b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -17,38 +17,39 @@ public final class ScheduleInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduleInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"cteoedlrslsk\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"vjnzdpvocojhpcna\",\"startTime\":\"zf\",\"timeZone\":\"ggytexvzilmhivz\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"ncknrzdajlsk\",\"tags\":{\"eucyrth\":\"jxul\",\"hokamvfej\":\"qlehmcgcjeinu\"},\"properties\":{\"okpysthhzagj\":\"ttmbqdabzfiv\",\"lhgenuzejgvkv\":\"wyy\"}},\"id\":\"aqszllrzl\",\"name\":\"mmdqgmihzpimc\",\"type\":\"rh\"}") + "{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"gojmrvvxwjon\",\"isEnabled\":false,\"provisioningState\":\"Failed\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"q\",\"startTime\":\"ilcchskxxkansbvr\",\"timeZone\":\"qgvtojrulfu\"},\"description\":\"ejrthcfjzhxlyub\",\"properties\":{\"rztrxalxrdhabsr\":\"ostvrjeqmtzzbe\",\"a\":\"rsnrhp\",\"xkvvcs\":\"iwkkvya\",\"mlivrjjxnwx\":\"msvuvdjkqxetq\"},\"tags\":{\"jxlehzlx\":\"p\",\"w\":\"gfquwz\"}},\"id\":\"belwcer\",\"name\":\"kwbpjxljtxbusq\",\"type\":\"bxxn\"}") .toObject(ScheduleInner.class); - Assertions.assertEquals("ncknrzdajlsk", model.properties().description()); - Assertions.assertEquals("jxul", model.properties().tags().get("eucyrth")); - Assertions.assertEquals("ttmbqdabzfiv", model.properties().properties().get("okpysthhzagj")); - Assertions.assertEquals("cteoedlrslsk", model.properties().displayName()); - Assertions.assertEquals(false, model.properties().isEnabled()); - Assertions.assertEquals("vjnzdpvocojhpcna", model.properties().trigger().endTime()); - Assertions.assertEquals("zf", model.properties().trigger().startTime()); - Assertions.assertEquals("ggytexvzilmhivz", model.properties().trigger().timeZone()); + Assertions.assertEquals("ejrthcfjzhxlyub", model.properties().description()); + Assertions.assertEquals("ostvrjeqmtzzbe", model.properties().properties().get("rztrxalxrdhabsr")); + Assertions.assertEquals("p", model.properties().tags().get("jxlehzlx")); + Assertions.assertEquals("gojmrvvxwjon", model.properties().displayName()); + Assertions.assertFalse(model.properties().isEnabled()); + Assertions.assertEquals("q", model.properties().trigger().endTime()); + Assertions.assertEquals("ilcchskxxkansbvr", model.properties().trigger().startTime()); + Assertions.assertEquals("qgvtojrulfu", model.properties().trigger().timeZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduleInner model = new ScheduleInner().withProperties(new ScheduleProperties() - .withDescription("ncknrzdajlsk") - .withTags(mapOf("eucyrth", "jxul", "hokamvfej", "qlehmcgcjeinu")) - .withProperties(mapOf("okpysthhzagj", "ttmbqdabzfiv", "lhgenuzejgvkv", "wyy")) - .withDisplayName("cteoedlrslsk") - .withIsEnabled(false) - .withTrigger( - new TriggerBase().withEndTime("vjnzdpvocojhpcna").withStartTime("zf").withTimeZone("ggytexvzilmhivz")) - .withAction(new ScheduleActionBase())); + ScheduleInner model + = new ScheduleInner().withProperties(new ScheduleProperties().withDescription("ejrthcfjzhxlyub") + .withProperties(mapOf("rztrxalxrdhabsr", "ostvrjeqmtzzbe", "a", "rsnrhp", "xkvvcs", "iwkkvya", + "mlivrjjxnwx", "msvuvdjkqxetq")) + .withTags(mapOf("jxlehzlx", "p", "w", "gfquwz")) + .withAction(new ScheduleActionBase()) + .withDisplayName("gojmrvvxwjon") + .withIsEnabled(false) + .withTrigger( + new TriggerBase().withEndTime("q").withStartTime("ilcchskxxkansbvr").withTimeZone("qgvtojrulfu"))); model = BinaryData.fromObject(model).toObject(ScheduleInner.class); - Assertions.assertEquals("ncknrzdajlsk", model.properties().description()); - Assertions.assertEquals("jxul", model.properties().tags().get("eucyrth")); - Assertions.assertEquals("ttmbqdabzfiv", model.properties().properties().get("okpysthhzagj")); - Assertions.assertEquals("cteoedlrslsk", model.properties().displayName()); - Assertions.assertEquals(false, model.properties().isEnabled()); - Assertions.assertEquals("vjnzdpvocojhpcna", model.properties().trigger().endTime()); - Assertions.assertEquals("zf", model.properties().trigger().startTime()); - Assertions.assertEquals("ggytexvzilmhivz", model.properties().trigger().timeZone()); + Assertions.assertEquals("ejrthcfjzhxlyub", model.properties().description()); + Assertions.assertEquals("ostvrjeqmtzzbe", model.properties().properties().get("rztrxalxrdhabsr")); + Assertions.assertEquals("p", model.properties().tags().get("jxlehzlx")); + Assertions.assertEquals("gojmrvvxwjon", model.properties().displayName()); + Assertions.assertFalse(model.properties().isEnabled()); + Assertions.assertEquals("q", model.properties().trigger().endTime()); + Assertions.assertEquals("ilcchskxxkansbvr", model.properties().trigger().startTime()); + Assertions.assertEquals("qgvtojrulfu", model.properties().trigger().timeZone()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java index 4e8e540a1a4b..6c1a2d5df057 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,39 +16,36 @@ public final class SchedulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduleProperties model = BinaryData.fromString( - "{\"displayName\":\"t\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"logxsvtzar\",\"startTime\":\"vqnsqk\",\"timeZone\":\"mbjwzzoslpkyb\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"kzpgaj\",\"tags\":{\"uqrebluimmbwx\":\"cemqbmfuvqarwz\",\"kraokq\":\"fgtdmbvx\",\"aokbavlyttaaknwf\":\"budbt\",\"sm\":\"ke\"},\"properties\":{\"gatolekscbctnan\":\"ujd\",\"wnsnlaimouxwks\":\"imwbzxpdcldpk\",\"fco\":\"mud\",\"kbqsjhbtqqvyfscy\":\"bicziuswswj\"}}") + "{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"i\",\"isEnabled\":true,\"provisioningState\":\"Canceled\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"d\",\"startTime\":\"pagsecnad\",\"timeZone\":\"wqrgxfllmqi\"},\"description\":\"ezoell\",\"properties\":{\"tumxpymdj\":\"iiwv\",\"canlduwzorxs\":\"uaxroqvqpilrgu\"},\"tags\":{\"x\":\"aqklxy\"}}") .toObject(ScheduleProperties.class); - Assertions.assertEquals("kzpgaj", model.description()); - Assertions.assertEquals("cemqbmfuvqarwz", model.tags().get("uqrebluimmbwx")); - Assertions.assertEquals("ujd", model.properties().get("gatolekscbctnan")); - Assertions.assertEquals("t", model.displayName()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals("logxsvtzar", model.trigger().endTime()); - Assertions.assertEquals("vqnsqk", model.trigger().startTime()); - Assertions.assertEquals("mbjwzzoslpkyb", model.trigger().timeZone()); + Assertions.assertEquals("ezoell", model.description()); + Assertions.assertEquals("iiwv", model.properties().get("tumxpymdj")); + Assertions.assertEquals("aqklxy", model.tags().get("x")); + Assertions.assertEquals("i", model.displayName()); + Assertions.assertTrue(model.isEnabled()); + Assertions.assertEquals("d", model.trigger().endTime()); + Assertions.assertEquals("pagsecnad", model.trigger().startTime()); + Assertions.assertEquals("wqrgxfllmqi", model.trigger().timeZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScheduleProperties model = new ScheduleProperties().withDescription("kzpgaj") - .withTags( - mapOf("uqrebluimmbwx", "cemqbmfuvqarwz", "kraokq", "fgtdmbvx", "aokbavlyttaaknwf", "budbt", "sm", "ke")) - .withProperties(mapOf("gatolekscbctnan", "ujd", "wnsnlaimouxwks", "imwbzxpdcldpk", "fco", "mud", - "kbqsjhbtqqvyfscy", "bicziuswswj")) - .withDisplayName("t") + ScheduleProperties model = new ScheduleProperties().withDescription("ezoell") + .withProperties(mapOf("tumxpymdj", "iiwv", "canlduwzorxs", "uaxroqvqpilrgu")) + .withTags(mapOf("x", "aqklxy")) + .withAction(new ScheduleActionBase()) + .withDisplayName("i") .withIsEnabled(true) - .withTrigger( - new TriggerBase().withEndTime("logxsvtzar").withStartTime("vqnsqk").withTimeZone("mbjwzzoslpkyb")) - .withAction(new ScheduleActionBase()); + .withTrigger(new TriggerBase().withEndTime("d").withStartTime("pagsecnad").withTimeZone("wqrgxfllmqi")); model = BinaryData.fromObject(model).toObject(ScheduleProperties.class); - Assertions.assertEquals("kzpgaj", model.description()); - Assertions.assertEquals("cemqbmfuvqarwz", model.tags().get("uqrebluimmbwx")); - Assertions.assertEquals("ujd", model.properties().get("gatolekscbctnan")); - Assertions.assertEquals("t", model.displayName()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals("logxsvtzar", model.trigger().endTime()); - Assertions.assertEquals("vqnsqk", model.trigger().startTime()); - Assertions.assertEquals("mbjwzzoslpkyb", model.trigger().timeZone()); + Assertions.assertEquals("ezoell", model.description()); + Assertions.assertEquals("iiwv", model.properties().get("tumxpymdj")); + Assertions.assertEquals("aqklxy", model.tags().get("x")); + Assertions.assertEquals("i", model.displayName()); + Assertions.assertTrue(model.isEnabled()); + Assertions.assertEquals("d", model.trigger().endTime()); + Assertions.assertEquals("pagsecnad", model.trigger().startTime()); + Assertions.assertEquals("wqrgxfllmqi", model.trigger().timeZone()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java index e970d016f9d5..232f2f91f0d4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java @@ -1,96 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.implementation.models.ScheduleResourceArmPaginatedResult; import org.junit.jupiter.api.Assertions; public final class ScheduleResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScheduleResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"dmkrrb\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ulubefgybp\",\"startTime\":\"bfununmpzkrv\",\"timeZone\":\"ifkdschlzvf\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Creating\",\"description\":\"kjjwgcwn\",\"tags\":{\"rtogmhmj\":\"kgf\",\"fp\":\"jsc\",\"fv\":\"qwtygevgwmseharx\",\"x\":\"n\"},\"properties\":{\"wjhrsidqpxlbtpa\":\"pjptn\",\"ngatwmy\":\"f\",\"mfjhpycvjqdvdwkq\":\"yutrymd\",\"n\":\"ldrlefgnaavua\"}},\"id\":\"taoutnpdct\",\"name\":\"hspfefyihd\",\"type\":\"yeuyldph\"},{\"properties\":{\"displayName\":\"ybkcgsuthhllnmwy\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"exlfciatxtjrrl\",\"startTime\":\"dskjhhxdlaj\",\"timeZone\":\"xcxscvslxlh\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Failed\",\"description\":\"rmukmyjmkxett\",\"tags\":{\"dnqtoqxjhqx\":\"ojfkq\",\"htkbtnq\":\"s\",\"mbiipsnawwlqk\":\"rngl\"},\"properties\":{\"xricctkwmuqq\":\"hhl\",\"rwvaexhdc\":\"ajxeiygle\",\"hdmljz\":\"rceqnkbrupob\"}},\"id\":\"vume\",\"name\":\"jpbi\",\"type\":\"nzpphepife\"},{\"properties\":{\"displayName\":\"eqir\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ly\",\"startTime\":\"gxvrpjl\",\"timeZone\":\"zuodacpun\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Updating\",\"description\":\"pdjxqeskoynu\",\"tags\":{\"vesk\":\"pckaewse\",\"fn\":\"xegqphr\",\"bcbcpz\":\"hctmjtsgh\",\"ldtzmpypefcp\":\"rpzeqac\"},\"properties\":{\"fkhuytu\":\"hnuqndaizu\",\"mtvtvegwqiukvzwy\":\"zx\"}},\"id\":\"tthaokgkskj\",\"name\":\"vb\",\"type\":\"shajqf\"},{\"properties\":{\"displayName\":\"peexpgeumilhwuit\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"yion\",\"startTime\":\"ninbdbzsxcwqqrs\",\"timeZone\":\"cbbprtugav\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Canceled\",\"description\":\"yksivmfogdrtbfc\",\"tags\":{\"xsgm\":\"ftsjcwj\",\"if\":\"awvifdxke\",\"loozrvt\":\"ocjxw\"},\"properties\":{\"cpxxvirye\":\"mufun\",\"lpmcrdc\":\"ngjgvrquvpyg\",\"x\":\"eljtiahxmfqryarv\"}},\"id\":\"bglcjkayspthzodu\",\"name\":\"tl\",\"type\":\"jtgblios\"}],\"nextLink\":\"fmkmfdjxyxgbkkq\"}") + "{\"value\":[{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"dsvoqiza\",\"isEnabled\":false,\"provisioningState\":\"Canceled\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"rgf\",\"startTime\":\"xsawooauff\",\"timeZone\":\"fqkmwz\"},\"description\":\"q\",\"properties\":{\"ocjnzdaiovrbhr\":\"bmrno\",\"yzadcrxylaypdt\":\"qphkv\",\"jdfrwpsshrmnkccl\":\"zvelffohuriw\"},\"tags\":{\"spoebnx\":\"uogkscxjfsgm\"}},\"id\":\"cowscuyfqlam\",\"name\":\"bqhsujkafu\",\"type\":\"pn\"}],\"nextLink\":\"pwnikxkcajgrbrc\"}") .toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("kjjwgcwn", model.value().get(0).properties().description()); - Assertions.assertEquals("kgf", model.value().get(0).properties().tags().get("rtogmhmj")); - Assertions.assertEquals("pjptn", model.value().get(0).properties().properties().get("wjhrsidqpxlbtpa")); - Assertions.assertEquals("dmkrrb", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - Assertions.assertEquals("ulubefgybp", model.value().get(0).properties().trigger().endTime()); - Assertions.assertEquals("bfununmpzkrv", model.value().get(0).properties().trigger().startTime()); - Assertions.assertEquals("ifkdschlzvf", model.value().get(0).properties().trigger().timeZone()); - Assertions.assertEquals("fmkmfdjxyxgbkkq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleResourceArmPaginatedResult model = new ScheduleResourceArmPaginatedResult().withValue(Arrays.asList( - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("kjjwgcwn") - .withTags(mapOf("rtogmhmj", "kgf", "fp", "jsc", "fv", "qwtygevgwmseharx", "x", "n")) - .withProperties(mapOf("wjhrsidqpxlbtpa", "pjptn", "ngatwmy", "f", "mfjhpycvjqdvdwkq", "yutrymd", "n", - "ldrlefgnaavua")) - .withDisplayName("dmkrrb") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("ulubefgybp") - .withStartTime("bfununmpzkrv") - .withTimeZone("ifkdschlzvf")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("rmukmyjmkxett") - .withTags(mapOf("dnqtoqxjhqx", "ojfkq", "htkbtnq", "s", "mbiipsnawwlqk", "rngl")) - .withProperties(mapOf("xricctkwmuqq", "hhl", "rwvaexhdc", "ajxeiygle", "hdmljz", "rceqnkbrupob")) - .withDisplayName("ybkcgsuthhllnmwy") - .withIsEnabled(true) - .withTrigger(new TriggerBase().withEndTime("exlfciatxtjrrl") - .withStartTime("dskjhhxdlaj") - .withTimeZone("xcxscvslxlh")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("pdjxqeskoynu") - .withTags(mapOf("vesk", "pckaewse", "fn", "xegqphr", "bcbcpz", "hctmjtsgh", "ldtzmpypefcp", "rpzeqac")) - .withProperties(mapOf("fkhuytu", "hnuqndaizu", "mtvtvegwqiukvzwy", "zx")) - .withDisplayName("eqir") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("ly").withStartTime("gxvrpjl").withTimeZone("zuodacpun")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("yksivmfogdrtbfc") - .withTags(mapOf("xsgm", "ftsjcwj", "if", "awvifdxke", "loozrvt", "ocjxw")) - .withProperties(mapOf("cpxxvirye", "mufun", "lpmcrdc", "ngjgvrquvpyg", "x", "eljtiahxmfqryarv")) - .withDisplayName("peexpgeumilhwuit") - .withIsEnabled(true) - .withTrigger( - new TriggerBase().withEndTime("yion").withStartTime("ninbdbzsxcwqqrs").withTimeZone("cbbprtugav")) - .withAction(new ScheduleActionBase())))) - .withNextLink("fmkmfdjxyxgbkkq"); - model = BinaryData.fromObject(model).toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("kjjwgcwn", model.value().get(0).properties().description()); - Assertions.assertEquals("kgf", model.value().get(0).properties().tags().get("rtogmhmj")); - Assertions.assertEquals("pjptn", model.value().get(0).properties().properties().get("wjhrsidqpxlbtpa")); - Assertions.assertEquals("dmkrrb", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - Assertions.assertEquals("ulubefgybp", model.value().get(0).properties().trigger().endTime()); - Assertions.assertEquals("bfununmpzkrv", model.value().get(0).properties().trigger().startTime()); - Assertions.assertEquals("ifkdschlzvf", model.value().get(0).properties().trigger().timeZone()); - Assertions.assertEquals("fmkmfdjxyxgbkkq", 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; + Assertions.assertEquals("q", model.value().get(0).properties().description()); + Assertions.assertEquals("bmrno", model.value().get(0).properties().properties().get("ocjnzdaiovrbhr")); + Assertions.assertEquals("uogkscxjfsgm", model.value().get(0).properties().tags().get("spoebnx")); + Assertions.assertEquals("dsvoqiza", model.value().get(0).properties().displayName()); + Assertions.assertFalse(model.value().get(0).properties().isEnabled()); + Assertions.assertEquals("rgf", model.value().get(0).properties().trigger().endTime()); + Assertions.assertEquals("xsawooauff", model.value().get(0).properties().trigger().startTime()); + Assertions.assertEquals("fqkmwz", model.value().get(0).properties().trigger().timeZone()); + Assertions.assertEquals("pwnikxkcajgrbrc", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java index 694885a70c03..45b92089c3aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.Schedule; @@ -26,38 +26,35 @@ public final class SchedulesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"xjxueilixzjvkqj\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"hcmxxxpnkx\",\"startTime\":\"jnkmsfsq\",\"timeZone\":\"xqcim\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Succeeded\",\"description\":\"kjwr\",\"tags\":{\"ybdgtfoz\":\"gcsmrtep\",\"bpqelmszobt\":\"sfjdcokb\",\"bgrdrumu\":\"eltnby\"},\"properties\":{\"kwv\":\"wecdsybiazfvx\",\"byqqon\":\"eqly\"}},\"id\":\"ekiojusmdo\",\"name\":\"kukycn\",\"type\":\"aovlyykx\"}"; + = "{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"qpjzt\",\"isEnabled\":true,\"provisioningState\":\"Succeeded\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"rkwmafyxoqak\",\"startTime\":\"t\",\"timeZone\":\"etxokqudjdwcwja\"},\"description\":\"b\",\"properties\":{\"v\":\"hxahnqjb\",\"fufwrerbndr\":\"blfefbbvitlnnp\",\"temvaajyit\":\"zfnstlavmdc\"},\"tags\":{\"swurzaqubryhvbv\":\"gwih\",\"ryocgwkphily\":\"yfdwaupjoz\",\"imxznfoaks\":\"nbb\"}},\"id\":\"i\",\"name\":\"wznlbbhtle\",\"type\":\"wfizbehvqaghl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Schedule response = manager.schedules() - .define("o") - .withExistingWorkspace("tlxrdepqtz", "hkpko") - .withProperties(new ScheduleProperties().withDescription("mbbhluvdce") - .withTags(mapOf("wdskiegtae", "vnomzlre", "xaodbhgxbadbor", "aleptaasqo")) - .withProperties(mapOf("hqwyxbat", "ihggv", "dsclqwkddgepu", "viynlslgxif", "ueq", "ambzfxgshaq", - "jtunlllmtiy", "niagzmyxsoxqa")) - .withDisplayName("nobuwhutvcdtgx") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("hgmmzxpsrlbppjq") - .withStartTime("cpdaoskgtalljsoa") - .withTimeZone("jjklmpbgrosxfdx")) - .withAction(new ScheduleActionBase())) + .define("cmeyaoyzjfg") + .withExistingWorkspace("nwichjkwctlsoh", "tgpvvcbtegi") + .withProperties(new ScheduleProperties().withDescription("mamdo") + .withProperties(mapOf("sfgjbeybdukbgl", "jekh", "jivoexko", "iwvxmysc", "vxkctedhaf", "ciacdloehsm")) + .withTags(mapOf("yxy", "ffajniwbyzyj", "dzc", "bbugo")) + .withAction(new ScheduleActionBase()) + .withDisplayName("au") + .withIsEnabled(true) + .withTrigger(new TriggerBase().withEndTime("rsnfz").withStartTime("hiecu").withTimeZone("azfotrp"))) .create(); - Assertions.assertEquals("kjwr", response.properties().description()); - Assertions.assertEquals("gcsmrtep", response.properties().tags().get("ybdgtfoz")); - Assertions.assertEquals("wecdsybiazfvx", response.properties().properties().get("kwv")); - Assertions.assertEquals("xjxueilixzjvkqj", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("hcmxxxpnkx", response.properties().trigger().endTime()); - Assertions.assertEquals("jnkmsfsq", response.properties().trigger().startTime()); - Assertions.assertEquals("xqcim", response.properties().trigger().timeZone()); + Assertions.assertEquals("b", response.properties().description()); + Assertions.assertEquals("hxahnqjb", response.properties().properties().get("v")); + Assertions.assertEquals("gwih", response.properties().tags().get("swurzaqubryhvbv")); + Assertions.assertEquals("qpjzt", response.properties().displayName()); + Assertions.assertTrue(response.properties().isEnabled()); + Assertions.assertEquals("rkwmafyxoqak", response.properties().trigger().endTime()); + Assertions.assertEquals("t", response.properties().trigger().startTime()); + Assertions.assertEquals("etxokqudjdwcwja", response.properties().trigger().timeZone()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java index 24c48ec8fa47..a729eb3fd068 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.schedules().delete("qoucmfuvuslvbujw", "nz", "j", com.azure.core.util.Context.NONE); + manager.schedules().delete("dleohysdgkb", "xygwvtkrqiyuqds", "jqztrpjme", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java index 7105742be9ca..4dd48653f504 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.Schedule; @@ -21,26 +21,26 @@ public final class SchedulesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"g\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ypxwlvthiv\",\"startTime\":\"uaxoswqwbh\",\"timeZone\":\"zlgkcnp\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"rxfezlmzse\",\"tags\":{\"vofrenuvp\":\"uzyowra\"},\"properties\":{\"pgqxt\":\"tnyyeyjatfpbxnre\",\"ynxbuvyglfyfcs\":\"hruqtximrxeyz\"}},\"id\":\"jhoxtbsybpefojp\",\"name\":\"ixdgqjkfvmrnwgea\",\"type\":\"yifeiiriomjdnkn\"}"; + = "{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"bn\",\"isEnabled\":true,\"provisioningState\":\"Failed\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"zqlyputawdmdikuf\",\"startTime\":\"v\",\"timeZone\":\"ujzofyldxk\"},\"description\":\"vfojcvnhpebuiy\",\"properties\":{\"ldbdnmgui\":\"sgqacbeau\"},\"tags\":{\"jpzauugdarfumit\":\"toxzxb\",\"mokfdybv\":\"aii\",\"jcozrwry\":\"wbgmjrvrsq\",\"wvvnxoqaaqjblwq\":\"cttvxkxgffpvv\"}},\"id\":\"tevfeugcwt\",\"name\":\"ztxos\",\"type\":\"vfrymqqfksqfc\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Schedule response = manager.schedules() - .getWithResponse("yyvecr", "hqym", "dsthktsaljkhlpg", com.azure.core.util.Context.NONE) + .getWithResponse("zxzwinrg", "kqobovqlltql", "ufkr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("rxfezlmzse", response.properties().description()); - Assertions.assertEquals("uzyowra", response.properties().tags().get("vofrenuvp")); - Assertions.assertEquals("tnyyeyjatfpbxnre", response.properties().properties().get("pgqxt")); - Assertions.assertEquals("g", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("ypxwlvthiv", response.properties().trigger().endTime()); - Assertions.assertEquals("uaxoswqwbh", response.properties().trigger().startTime()); - Assertions.assertEquals("zlgkcnp", response.properties().trigger().timeZone()); + Assertions.assertEquals("vfojcvnhpebuiy", response.properties().description()); + Assertions.assertEquals("sgqacbeau", response.properties().properties().get("ldbdnmgui")); + Assertions.assertEquals("toxzxb", response.properties().tags().get("jpzauugdarfumit")); + Assertions.assertEquals("bn", response.properties().displayName()); + Assertions.assertTrue(response.properties().isEnabled()); + Assertions.assertEquals("zqlyputawdmdikuf", response.properties().trigger().endTime()); + Assertions.assertEquals("v", response.properties().trigger().startTime()); + Assertions.assertEquals("ujzofyldxk", response.properties().trigger().timeZone()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java index 76d01c992e58..b6b83cb077df 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.Schedule; @@ -23,26 +23,25 @@ public final class SchedulesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"oujtcp\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"lyogzbasjckakik\",\"startTime\":\"ajmnvb\",\"timeZone\":\"mnkrqdyc\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"kxx\",\"tags\":{\"bcgsa\":\"qr\",\"qedft\":\"daypx\",\"kt\":\"igmj\"},\"properties\":{\"brtzfliqntnoeg\":\"yvzixmusiidiv\",\"daiex\":\"oqpuclidyt\",\"fgivfiypf\":\"sapygiioukaffz\",\"u\":\"wyzjsixorvigrxmp\"}},\"id\":\"ekbpqghxdpg\",\"name\":\"hfimlyxd\",\"type\":\"ixjudbiac\"}]}"; + = "{\"value\":[{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"aavjk\",\"isEnabled\":false,\"provisioningState\":\"Creating\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"viysbvoliviankl\",\"startTime\":\"l\",\"timeZone\":\"pneouxpdnlbpnb\"},\"description\":\"ohnroa\",\"properties\":{\"ur\":\"kg\",\"yuofegrz\":\"xfspxghwf\",\"idlodcqs\":\"sfulookwnzotjbvh\",\"uegym\":\"lkkqvmmmweljc\"},\"tags\":{\"hlbibwodayi\":\"smnjitxu\",\"pvbvfchfux\":\"gshkioecmbyo\",\"xnzapzibmst\":\"qpddebokzdshhhd\",\"jhvpktbnmhxt\":\"zzkzvfywspaja\"}},\"id\":\"zpa\",\"name\":\"tsrvsbkn\",\"type\":\"ouytsajjgvu\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.schedules() - .list("nhhvp", "ukourqviyf", "segwez", ScheduleListViewType.ALL, com.azure.core.util.Context.NONE); + .list("pf", "taaq", "xkloabc", ScheduleListViewType.ALL, com.azure.core.util.Context.NONE); - Assertions.assertEquals("kxx", response.iterator().next().properties().description()); - Assertions.assertEquals("qr", response.iterator().next().properties().tags().get("bcgsa")); - Assertions.assertEquals("yvzixmusiidiv", - response.iterator().next().properties().properties().get("brtzfliqntnoeg")); - Assertions.assertEquals("oujtcp", response.iterator().next().properties().displayName()); - Assertions.assertEquals(true, response.iterator().next().properties().isEnabled()); - Assertions.assertEquals("lyogzbasjckakik", response.iterator().next().properties().trigger().endTime()); - Assertions.assertEquals("ajmnvb", response.iterator().next().properties().trigger().startTime()); - Assertions.assertEquals("mnkrqdyc", response.iterator().next().properties().trigger().timeZone()); + Assertions.assertEquals("ohnroa", response.iterator().next().properties().description()); + Assertions.assertEquals("kg", response.iterator().next().properties().properties().get("ur")); + Assertions.assertEquals("smnjitxu", response.iterator().next().properties().tags().get("hlbibwodayi")); + Assertions.assertEquals("aavjk", response.iterator().next().properties().displayName()); + Assertions.assertFalse(response.iterator().next().properties().isEnabled()); + Assertions.assertEquals("viysbvoliviankl", response.iterator().next().properties().trigger().endTime()); + Assertions.assertEquals("l", response.iterator().next().properties().trigger().startTime()); + Assertions.assertEquals("pneouxpdnlbpnb", response.iterator().next().properties().trigger().timeZone()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java index a9ce56bb4c0c..c5bd8a858624 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,24 +12,24 @@ public final class ScriptReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptReference model = BinaryData.fromString( - "{\"scriptSource\":\"nione\",\"scriptData\":\"zdrd\",\"scriptArguments\":\"enx\",\"timeout\":\"tlzlmtrlxcznnhz\"}") + "{\"scriptSource\":\"iznzs\",\"scriptData\":\"ibaaugicovjtm\",\"scriptArguments\":\"rmjxyvuodnxc\",\"timeout\":\"assqfy\"}") .toObject(ScriptReference.class); - Assertions.assertEquals("nione", model.scriptSource()); - Assertions.assertEquals("zdrd", model.scriptData()); - Assertions.assertEquals("enx", model.scriptArguments()); - Assertions.assertEquals("tlzlmtrlxcznnhz", model.timeout()); + Assertions.assertEquals("iznzs", model.scriptSource()); + Assertions.assertEquals("ibaaugicovjtm", model.scriptData()); + Assertions.assertEquals("rmjxyvuodnxc", model.scriptArguments()); + Assertions.assertEquals("assqfy", model.timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ScriptReference model = new ScriptReference().withScriptSource("nione") - .withScriptData("zdrd") - .withScriptArguments("enx") - .withTimeout("tlzlmtrlxcznnhz"); + ScriptReference model = new ScriptReference().withScriptSource("iznzs") + .withScriptData("ibaaugicovjtm") + .withScriptArguments("rmjxyvuodnxc") + .withTimeout("assqfy"); model = BinaryData.fromObject(model).toObject(ScriptReference.class); - Assertions.assertEquals("nione", model.scriptSource()); - Assertions.assertEquals("zdrd", model.scriptData()); - Assertions.assertEquals("enx", model.scriptArguments()); - Assertions.assertEquals("tlzlmtrlxcznnhz", model.timeout()); + Assertions.assertEquals("iznzs", model.scriptSource()); + Assertions.assertEquals("ibaaugicovjtm", model.scriptData()); + Assertions.assertEquals("rmjxyvuodnxc", model.scriptArguments()); + Assertions.assertEquals("assqfy", model.timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java index 6af7f16e9342..7d2345af91dc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,37 +13,37 @@ public final class ScriptsToExecuteTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScriptsToExecute model = BinaryData.fromString( - "{\"startupScript\":{\"scriptSource\":\"ibniynts\",\"scriptData\":\"mfmeftvhkmoo\",\"scriptArguments\":\"rh\",\"timeout\":\"bwgmjgrul\"},\"creationScript\":{\"scriptSource\":\"gxhcxnwjtpfdzxco\",\"scriptData\":\"fwofwakukzkdtz\",\"scriptArguments\":\"oednlwglihezomuc\",\"timeout\":\"g\"}}") + "{\"startupScript\":{\"scriptSource\":\"k\",\"scriptData\":\"nrvzwpffxsfyb\",\"scriptArguments\":\"mveh\",\"timeout\":\"flyuvbgtz\"},\"creationScript\":{\"scriptSource\":\"weuydyb\",\"scriptData\":\"irvhpqsvbze\",\"scriptArguments\":\"eatr\",\"timeout\":\"qnvncprfcsjvjn\"}}") .toObject(ScriptsToExecute.class); - Assertions.assertEquals("ibniynts", model.startupScript().scriptSource()); - Assertions.assertEquals("mfmeftvhkmoo", model.startupScript().scriptData()); - Assertions.assertEquals("rh", model.startupScript().scriptArguments()); - Assertions.assertEquals("bwgmjgrul", model.startupScript().timeout()); - Assertions.assertEquals("gxhcxnwjtpfdzxco", model.creationScript().scriptSource()); - Assertions.assertEquals("fwofwakukzkdtz", model.creationScript().scriptData()); - Assertions.assertEquals("oednlwglihezomuc", model.creationScript().scriptArguments()); - Assertions.assertEquals("g", model.creationScript().timeout()); + Assertions.assertEquals("k", model.startupScript().scriptSource()); + Assertions.assertEquals("nrvzwpffxsfyb", model.startupScript().scriptData()); + Assertions.assertEquals("mveh", model.startupScript().scriptArguments()); + Assertions.assertEquals("flyuvbgtz", model.startupScript().timeout()); + Assertions.assertEquals("weuydyb", model.creationScript().scriptSource()); + Assertions.assertEquals("irvhpqsvbze", model.creationScript().scriptData()); + Assertions.assertEquals("eatr", model.creationScript().scriptArguments()); + Assertions.assertEquals("qnvncprfcsjvjn", model.creationScript().timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScriptsToExecute model = new ScriptsToExecute() - .withStartupScript(new ScriptReference().withScriptSource("ibniynts") - .withScriptData("mfmeftvhkmoo") - .withScriptArguments("rh") - .withTimeout("bwgmjgrul")) - .withCreationScript(new ScriptReference().withScriptSource("gxhcxnwjtpfdzxco") - .withScriptData("fwofwakukzkdtz") - .withScriptArguments("oednlwglihezomuc") - .withTimeout("g")); + .withStartupScript(new ScriptReference().withScriptSource("k") + .withScriptData("nrvzwpffxsfyb") + .withScriptArguments("mveh") + .withTimeout("flyuvbgtz")) + .withCreationScript(new ScriptReference().withScriptSource("weuydyb") + .withScriptData("irvhpqsvbze") + .withScriptArguments("eatr") + .withTimeout("qnvncprfcsjvjn")); model = BinaryData.fromObject(model).toObject(ScriptsToExecute.class); - Assertions.assertEquals("ibniynts", model.startupScript().scriptSource()); - Assertions.assertEquals("mfmeftvhkmoo", model.startupScript().scriptData()); - Assertions.assertEquals("rh", model.startupScript().scriptArguments()); - Assertions.assertEquals("bwgmjgrul", model.startupScript().timeout()); - Assertions.assertEquals("gxhcxnwjtpfdzxco", model.creationScript().scriptSource()); - Assertions.assertEquals("fwofwakukzkdtz", model.creationScript().scriptData()); - Assertions.assertEquals("oednlwglihezomuc", model.creationScript().scriptArguments()); - Assertions.assertEquals("g", model.creationScript().timeout()); + Assertions.assertEquals("k", model.startupScript().scriptSource()); + Assertions.assertEquals("nrvzwpffxsfyb", model.startupScript().scriptData()); + Assertions.assertEquals("mveh", model.startupScript().scriptArguments()); + Assertions.assertEquals("flyuvbgtz", model.startupScript().timeout()); + Assertions.assertEquals("weuydyb", model.creationScript().scriptSource()); + Assertions.assertEquals("irvhpqsvbze", model.creationScript().scriptData()); + Assertions.assertEquals("eatr", model.creationScript().scriptArguments()); + Assertions.assertEquals("qnvncprfcsjvjn", model.creationScript().timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java index 93d8e50a1bf8..54bca9c972de 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.java index 344842593e0d..b2a69f9c3b0d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,18 @@ public final class ServerlessComputeSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerlessComputeSettings model = BinaryData - .fromString("{\"serverlessComputeCustomSubnet\":\"gxsabkyq\",\"serverlessComputeNoPublicIP\":false}") + .fromString("{\"serverlessComputeCustomSubnet\":\"leggzfbu\",\"serverlessComputeNoPublicIP\":true}") .toObject(ServerlessComputeSettings.class); - Assertions.assertEquals("gxsabkyq", model.serverlessComputeCustomSubnet()); - Assertions.assertEquals(false, model.serverlessComputeNoPublicIp()); + Assertions.assertEquals("leggzfbu", model.serverlessComputeCustomSubnet()); + Assertions.assertTrue(model.serverlessComputeNoPublicIp()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServerlessComputeSettings model = new ServerlessComputeSettings().withServerlessComputeCustomSubnet("gxsabkyq") - .withServerlessComputeNoPublicIp(false); + ServerlessComputeSettings model = new ServerlessComputeSettings().withServerlessComputeCustomSubnet("leggzfbu") + .withServerlessComputeNoPublicIp(true); model = BinaryData.fromObject(model).toObject(ServerlessComputeSettings.class); - Assertions.assertEquals("gxsabkyq", model.serverlessComputeCustomSubnet()); - Assertions.assertEquals(false, model.serverlessComputeNoPublicIp()); + Assertions.assertEquals("leggzfbu", model.serverlessComputeCustomSubnet()); + Assertions.assertTrue(model.serverlessComputeNoPublicIp()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointCapacityReservationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointCapacityReservationTests.java new file mode 100644 index 000000000000..453bbd2c55ce --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointCapacityReservationTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation; +import org.junit.jupiter.api.Assertions; + +public final class ServerlessEndpointCapacityReservationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerlessEndpointCapacityReservation model = BinaryData + .fromString("{\"capacityReservationGroupId\":\"ylsyqyj\",\"endpointReservedCapacity\":920544524}") + .toObject(ServerlessEndpointCapacityReservation.class); + Assertions.assertEquals("ylsyqyj", model.capacityReservationGroupId()); + Assertions.assertEquals(920544524, model.endpointReservedCapacity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerlessEndpointCapacityReservation model + = new ServerlessEndpointCapacityReservation().withCapacityReservationGroupId("ylsyqyj") + .withEndpointReservedCapacity(920544524); + model = BinaryData.fromObject(model).toObject(ServerlessEndpointCapacityReservation.class); + Assertions.assertEquals("ylsyqyj", model.capacityReservationGroupId()); + Assertions.assertEquals(920544524, model.endpointReservedCapacity()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointContentSafetyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointContentSafetyTests.java new file mode 100644 index 000000000000..d8a024585986 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointContentSafetyTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointContentSafety; +import org.junit.jupiter.api.Assertions; + +public final class ServerlessEndpointContentSafetyTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerlessEndpointContentSafety model = BinaryData.fromString("{\"contentSafetyStatus\":\"Disabled\"}") + .toObject(ServerlessEndpointContentSafety.class); + Assertions.assertEquals(ContentSafetyStatus.DISABLED, model.contentSafetyStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerlessEndpointContentSafety model + = new ServerlessEndpointContentSafety().withContentSafetyStatus(ContentSafetyStatus.DISABLED); + model = BinaryData.fromObject(model).toObject(ServerlessEndpointContentSafety.class); + Assertions.assertEquals(ContentSafetyStatus.DISABLED, model.contentSafetyStatus()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInferenceEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInferenceEndpointTests.java new file mode 100644 index 000000000000..7f9b342cf926 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInferenceEndpointTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointInferenceEndpoint; + +public final class ServerlessEndpointInferenceEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerlessEndpointInferenceEndpoint model + = BinaryData.fromString("{\"headers\":{\"ogirrpw\":\"qquyhbcee\"},\"uri\":\"qtvuxeujmdssijua\"}") + .toObject(ServerlessEndpointInferenceEndpoint.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerlessEndpointInferenceEndpoint model = new ServerlessEndpointInferenceEndpoint(); + model = BinaryData.fromObject(model).toObject(ServerlessEndpointInferenceEndpoint.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java index f5fbd6182094..a7d668cfada5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -24,51 +25,53 @@ public final class ServerlessEndpointInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerlessEndpointInner model = BinaryData.fromString( - "{\"properties\":{\"modelSettings\":{\"modelId\":\"h\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"pjtnqjilaywkdcw\",\"headers\":{\"lnkkbjpjvlywltmf\":\"yrilmhxdqaolf\",\"fnqzocr\":\"obbjwhlwy\"}},\"provisioningState\":\"Failed\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"untgxdn\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"tiekoifuvnyttz\",\"identity\":{\"principalId\":\"7f62875c-d396-45a2-b1da-da7c4db12a89\",\"tenantId\":\"39df265d-813e-4d5e-84b3-6134ec2354fc\",\"type\":\"None\",\"userAssignedIdentities\":{\"gm\":{\"principalId\":\"a49947ca-fdaf-4604-aef9-2fd1b4656623\",\"clientId\":\"2bc9890b-220e-4d75-89d4-92a440052ecc\"},\"hlqtxnrflkn\":{\"principalId\":\"131a3a94-149d-431f-89d7-a64607ae0e41\",\"clientId\":\"3db55ce2-f3bd-45bd-9820-f0afc2c01369\"}}},\"sku\":{\"name\":\"ndpgfjodhda\",\"tier\":\"Basic\",\"size\":\"fhipx\",\"family\":\"sabvcip\",\"capacity\":1000118308},\"location\":\"fczuumljcir\",\"tags\":{\"ei\":\"fycd\"},\"id\":\"itjn\",\"name\":\"xzajlnsjhwjuyxxb\",\"type\":\"qvmvuaytuadxkxe\"}") + "{\"properties\":{\"authMode\":\"AAD\",\"contentSafety\":{\"contentSafetyLevel\":\"Deferred\",\"contentSafetyStatus\":\"Enabled\"},\"endpointState\":\"Unknown\",\"inferenceEndpoint\":{\"headers\":{\"tm\":\"mzlpcx\"},\"uri\":\"xxr\"},\"marketplaceSubscriptionId\":\"cf\",\"modelSettings\":{\"modelId\":\"wjdth\"},\"provisioningState\":\"Canceled\"},\"identity\":{\"principalId\":\"yoafinmp\",\"tenantId\":\"updkjrzfwkyl\",\"type\":\"None\",\"userAssignedIdentities\":{\"ay\":{\"principalId\":\"whqdcc\",\"clientId\":\"vqsru\"}}},\"kind\":\"vwbzmfxlrymf\",\"sku\":{\"name\":\"lpiywqnpfydrfbg\",\"tier\":\"Free\",\"size\":\"byxmkhmqyncgaull\",\"family\":\"tyygjq\",\"capacity\":1323021844},\"location\":\"wqgmhmqmiwxz\",\"tags\":{\"qfgufjnbxw\":\"zu\",\"hg\":\"mwdukinhl\",\"dwcgldo\":\"ekekzouyvewwpz\"},\"id\":\"gcandxfhhhtes\",\"name\":\"dqtdnnc\",\"type\":\"kpljdshvvfkdxc\"}") .toObject(ServerlessEndpointInner.class); - Assertions.assertEquals("fczuumljcir", model.location()); - Assertions.assertEquals("fycd", model.tags().get("ei")); - Assertions.assertEquals("h", model.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.properties().authMode()); + Assertions.assertEquals("wqgmhmqmiwxz", model.location()); + Assertions.assertEquals("zu", model.tags().get("qfgufjnbxw")); + Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.AAD, model.properties().authMode()); + Assertions.assertEquals(ContentSafetyLevel.DEFERRED, model.properties().contentSafety().contentSafetyLevel()); Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("tiekoifuvnyttz", model.kind()); + Assertions.assertEquals("wjdth", model.properties().modelSettings().modelId()); Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ndpgfjodhda", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fhipx", model.sku().size()); - Assertions.assertEquals("sabvcip", model.sku().family()); - Assertions.assertEquals(1000118308, model.sku().capacity()); + Assertions.assertEquals("vwbzmfxlrymf", model.kind()); + Assertions.assertEquals("lpiywqnpfydrfbg", model.sku().name()); + Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); + Assertions.assertEquals("byxmkhmqyncgaull", model.sku().size()); + Assertions.assertEquals("tyygjq", model.sku().family()); + Assertions.assertEquals(1323021844, model.sku().capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServerlessEndpointInner model = new ServerlessEndpointInner().withLocation("fczuumljcir") - .withTags(mapOf("ei", "fycd")) - .withProperties(new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("h")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("tiekoifuvnyttz") + ServerlessEndpointInner model = new ServerlessEndpointInner().withLocation("wqgmhmqmiwxz") + .withTags(mapOf("qfgufjnbxw", "zu", "hg", "mwdukinhl", "dwcgldo", "ekekzouyvewwpz")) + .withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.AAD) + .withContentSafety(new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.DEFERRED) + .withContentSafetyStatus(ContentSafetyStatus.ENABLED)) + .withModelSettings(new ModelSettings().withModelId("wjdth"))) .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("gm", new UserAssignedIdentity(), "hlqtxnrflkn", new UserAssignedIdentity()))) - .withSku(new Sku().withName("ndpgfjodhda") - .withTier(SkuTier.BASIC) - .withSize("fhipx") - .withFamily("sabvcip") - .withCapacity(1000118308)); + .withUserAssignedIdentities(mapOf("ay", new UserAssignedIdentity()))) + .withKind("vwbzmfxlrymf") + .withSku(new Sku().withName("lpiywqnpfydrfbg") + .withTier(SkuTier.FREE) + .withSize("byxmkhmqyncgaull") + .withFamily("tyygjq") + .withCapacity(1323021844)); model = BinaryData.fromObject(model).toObject(ServerlessEndpointInner.class); - Assertions.assertEquals("fczuumljcir", model.location()); - Assertions.assertEquals("fycd", model.tags().get("ei")); - Assertions.assertEquals("h", model.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.properties().authMode()); + Assertions.assertEquals("wqgmhmqmiwxz", model.location()); + Assertions.assertEquals("zu", model.tags().get("qfgufjnbxw")); + Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.AAD, model.properties().authMode()); + Assertions.assertEquals(ContentSafetyLevel.DEFERRED, model.properties().contentSafety().contentSafetyLevel()); Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("tiekoifuvnyttz", model.kind()); + Assertions.assertEquals("wjdth", model.properties().modelSettings().modelId()); Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ndpgfjodhda", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fhipx", model.sku().size()); - Assertions.assertEquals("sabvcip", model.sku().family()); - Assertions.assertEquals(1000118308, model.sku().capacity()); + Assertions.assertEquals("vwbzmfxlrymf", model.kind()); + Assertions.assertEquals("lpiywqnpfydrfbg", model.sku().name()); + Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); + Assertions.assertEquals("byxmkhmqyncgaull", model.sku().size()); + Assertions.assertEquals("tyygjq", model.sku().family()); + Assertions.assertEquals(1323021844, model.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointModelSettingsTests.java new file mode 100644 index 000000000000..5408f5476346 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointModelSettingsTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointModelSettings; +import org.junit.jupiter.api.Assertions; + +public final class ServerlessEndpointModelSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerlessEndpointModelSettings model + = BinaryData.fromString("{\"modelId\":\"xfdlypkcpws\"}").toObject(ServerlessEndpointModelSettings.class); + Assertions.assertEquals("xfdlypkcpws", model.modelId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerlessEndpointModelSettings model = new ServerlessEndpointModelSettings().withModelId("xfdlypkcpws"); + model = BinaryData.fromObject(model).toObject(ServerlessEndpointModelSettings.class); + Assertions.assertEquals("xfdlypkcpws", model.modelId()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java index 48a5a7eef6df..5f27bb655c11 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ModelSettings; import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; @@ -16,22 +17,25 @@ public final class ServerlessEndpointPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerlessEndpointProperties model = BinaryData.fromString( - "{\"modelSettings\":{\"modelId\":\"pntghyks\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"drnxsluvlzla\",\"headers\":{\"pbqhvfdqqjwkr\":\"x\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Reinstating\",\"marketplaceSubscriptionId\":\"ojisg\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}}") + "{\"authMode\":\"Key\",\"contentSafety\":{\"contentSafetyLevel\":\"Deferred\",\"contentSafetyStatus\":\"Disabled\"},\"endpointState\":\"Suspending\",\"inferenceEndpoint\":{\"headers\":{\"ruhhqldrdymnswx\":\"rqnjxmvvsduydwnw\",\"jrxgunnq\":\"exqwqnghxnimvy\"},\"uri\":\"ypu\"},\"marketplaceSubscriptionId\":\"ny\",\"modelSettings\":{\"modelId\":\"e\"},\"provisioningState\":\"Updating\"}") .toObject(ServerlessEndpointProperties.class); - Assertions.assertEquals("pntghyks", model.modelSettings().modelId()); Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); + Assertions.assertEquals(ContentSafetyLevel.DEFERRED, model.contentSafety().contentSafetyLevel()); + Assertions.assertEquals(ContentSafetyStatus.DISABLED, model.contentSafety().contentSafetyStatus()); + Assertions.assertEquals("e", model.modelSettings().modelId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServerlessEndpointProperties model - = new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("pntghyks")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED)); + = new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) + .withContentSafety(new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.DEFERRED) + .withContentSafetyStatus(ContentSafetyStatus.DISABLED)) + .withModelSettings(new ModelSettings().withModelId("e")); model = BinaryData.fromObject(model).toObject(ServerlessEndpointProperties.class); - Assertions.assertEquals("pntghyks", model.modelSettings().modelId()); Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); + Assertions.assertEquals(ContentSafetyLevel.DEFERRED, model.contentSafety().contentSafetyLevel()); + Assertions.assertEquals(ContentSafetyStatus.DISABLED, model.contentSafety().contentSafetyStatus()); + Assertions.assertEquals("e", model.modelSettings().modelId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..fe1220fcbce0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointResourcePropertiesTests.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointContentSafety; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointInferenceEndpoint; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointModelSettings; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointResourceProperties; +import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointState; +import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; +import com.azure.resourcemanager.machinelearning.models.ServerlessOffer; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ServerlessEndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerlessEndpointResourceProperties model = BinaryData.fromString( + "{\"endpointType\":\"serverlessEndpoint\",\"authMode\":\"KeyAndAAD\",\"capacityReservation\":{\"capacityReservationGroupId\":\"vmpjbhzyen\",\"endpointReservedCapacity\":461819657},\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"},\"endpointState\":\"Deleting\",\"inferenceEndpoint\":{\"headers\":{\"xocjcd\":\"khdlckd\",\"mgvrlhfx\":\"vzpfreortwwy\",\"wkdywkszavuafan\":\"rhjnnhbcj\",\"pzwdqzuhfgti\":\"fictptplkossjbzv\"},\"uri\":\"czhfjdcc\"},\"marketplaceSubscriptionId\":\"yuvb\",\"metadata\":\"\\\"datauhjcgj\\\"\",\"modelSettings\":{\"modelId\":\"kntomnlz\"},\"offer\":{\"offerName\":\"cdbsz\",\"publisher\":\"bzrrxeyvidcowlr\"},\"associatedResourceId\":\"dct\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"ej\",\"provisioningState\":\"Scaling\"},\"id\":\"wkry\",\"name\":\"gavplndmdfiek\",\"type\":\"iskyyyaekn\"}],\"endpointUri\":\"fys\",\"failureReason\":\"a\",\"location\":\"lmlcufbbjiu\",\"name\":\"of\",\"provisioningState\":\"Accepted\",\"shouldCreateAiServicesEndpoint\":false}") + .toObject(ServerlessEndpointResourceProperties.class); + Assertions.assertEquals("dct", model.associatedResourceId()); + Assertions.assertEquals("ej", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("fys", model.endpointUri()); + Assertions.assertEquals("a", model.failureReason()); + Assertions.assertEquals("lmlcufbbjiu", model.location()); + Assertions.assertEquals("of", model.name()); + Assertions.assertFalse(model.shouldCreateAiServicesEndpoint()); + Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY_AND_AAD, model.authMode()); + Assertions.assertEquals("vmpjbhzyen", model.capacityReservation().capacityReservationGroupId()); + Assertions.assertEquals(461819657, model.capacityReservation().endpointReservedCapacity()); + Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); + Assertions.assertEquals(ServerlessEndpointState.DELETING, model.endpointState()); + Assertions.assertEquals("yuvb", model.marketplaceSubscriptionId()); + Assertions.assertEquals("kntomnlz", model.modelSettings().modelId()); + Assertions.assertEquals("cdbsz", model.offer().offerName()); + Assertions.assertEquals("bzrrxeyvidcowlr", model.offer().publisher()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerlessEndpointResourceProperties model + = new ServerlessEndpointResourceProperties().withAssociatedResourceId("dct") + .withDeployments(Arrays.asList(new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("ej")))) + .withEndpointUri("fys") + .withFailureReason("a") + .withLocation("lmlcufbbjiu") + .withName("of") + .withShouldCreateAiServicesEndpoint(false) + .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY_AND_AAD) + .withCapacityReservation( + new ServerlessEndpointCapacityReservation().withCapacityReservationGroupId("vmpjbhzyen") + .withEndpointReservedCapacity(461819657)) + .withContentSafety( + new ServerlessEndpointContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED)) + .withEndpointState(ServerlessEndpointState.DELETING) + .withInferenceEndpoint(new ServerlessEndpointInferenceEndpoint()) + .withMarketplaceSubscriptionId("yuvb") + .withMetadata("\"datauhjcgj\"") + .withModelSettings(new ServerlessEndpointModelSettings().withModelId("kntomnlz")) + .withOffer(new ServerlessOffer().withOfferName("cdbsz").withPublisher("bzrrxeyvidcowlr")); + model = BinaryData.fromObject(model).toObject(ServerlessEndpointResourceProperties.class); + Assertions.assertEquals("dct", model.associatedResourceId()); + Assertions.assertEquals("ej", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("fys", model.endpointUri()); + Assertions.assertEquals("a", model.failureReason()); + Assertions.assertEquals("lmlcufbbjiu", model.location()); + Assertions.assertEquals("of", model.name()); + Assertions.assertFalse(model.shouldCreateAiServicesEndpoint()); + Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY_AND_AAD, model.authMode()); + Assertions.assertEquals("vmpjbhzyen", model.capacityReservation().capacityReservationGroupId()); + Assertions.assertEquals(461819657, model.capacityReservation().endpointReservedCapacity()); + Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); + Assertions.assertEquals(ServerlessEndpointState.DELETING, model.endpointState()); + Assertions.assertEquals("yuvb", model.marketplaceSubscriptionId()); + Assertions.assertEquals("kntomnlz", model.modelSettings().modelId()); + Assertions.assertEquals("cdbsz", model.offer().offerName()); + Assertions.assertEquals("bzrrxeyvidcowlr", model.offer().publisher()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java index 4c51ba98e8b5..2a829e41ec0c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java @@ -1,152 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.implementation.models.ServerlessEndpointTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointTrackedResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.Sku; import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ServerlessEndpointTrackedResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServerlessEndpointTrackedResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"modelSettings\":{\"modelId\":\"vqvogf\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"wvbhlimbyq\",\"headers\":{\"ikcdrdaasax\":\"ood\"}},\"provisioningState\":\"Creating\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"kwiy\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"ko\",\"identity\":{\"principalId\":\"14063356-96fa-45ba-8878-ff13f4524052\",\"tenantId\":\"77a755f2-7770-4ca6-9abd-449f44d7b996\",\"type\":\"None\",\"userAssignedIdentities\":{\"lnk\":{\"principalId\":\"c7f1f32f-3690-4721-bd7b-ad3e9b209cb1\",\"clientId\":\"660b2bbe-eed1-499d-807d-f4d4e01e1b62\"},\"sxvjabjqqaxuyvy\":{\"principalId\":\"ea6039e0-1d6f-436d-9837-b7fa0188de5c\",\"clientId\":\"ff04f5a9-5340-461d-8be1-947c37c924fe\"},\"udndoabhjxw\":{\"principalId\":\"9ed4a089-b353-4958-8615-103f7a62f4ac\",\"clientId\":\"3faf461d-3003-4d91-bb53-3baea908b2e6\"}}},\"sku\":{\"name\":\"weuipmpvksmi\",\"tier\":\"Premium\",\"size\":\"xtlt\",\"family\":\"krdpqgfhyrfr\",\"capacity\":1004449156},\"location\":\"d\",\"tags\":{\"ajqmat\":\"wfcmfcnr\"},\"id\":\"jti\",\"name\":\"ln\",\"type\":\"qgxxgfbb\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"pqagynoiprn\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"lin\",\"headers\":{\"bmqimi\":\"qxzxaqz\",\"asvvoqsbpkfl\":\"mqruqguhfupe\",\"hdkcprgu\":\"nfkgxsyaowuzowpu\",\"ixmqrudjizcbf\":\"xrztiochlu\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspending\",\"marketplaceSubscriptionId\":\"fhi\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"fbcpaqktkrumzu\",\"identity\":{\"principalId\":\"92df8603-76c4-4be3-b906-0be862094d12\",\"tenantId\":\"abe3eb5a-5604-44a4-b322-0fada0fa3f0b\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ovqkxiu\":{\"principalId\":\"d8548fb4-6d4f-46ad-9f3d-43dc502ab8a2\",\"clientId\":\"17c480b0-1ac8-486d-945f-bd809759d2fb\"}}},\"sku\":{\"name\":\"ggvqrnhyhlwcjs\",\"tier\":\"Basic\",\"size\":\"hffbxrq\",\"family\":\"ijpeuql\",\"capacity\":236408023},\"location\":\"qztvx\",\"tags\":{\"me\":\"wmjswenaww\",\"yoeojhtollhs\":\"leqioulndh\"},\"id\":\"idmytzln\",\"name\":\"lxpnovyoanf\",\"type\":\"cswqa\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"vtxigvjr\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"gaeukyawohpm\",\"headers\":{\"hsidsjtdlpbnin\":\"nucsk\",\"cpuo\":\"gazlsvbz\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspending\",\"marketplaceSubscriptionId\":\"ciklh\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"rdrenxo\",\"identity\":{\"principalId\":\"90de711a-93f1-4f44-9afc-df8d628f892a\",\"tenantId\":\"9837c157-1789-47da-b8b0-3218ae1ace1a\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"iv\":{\"principalId\":\"b85b9f19-d2be-46d0-bd5c-b52751e2627e\",\"clientId\":\"96ff4b61-596a-4aa3-9e32-6587148ed8e3\"},\"ydwbdbfgrlpunytj\":{\"principalId\":\"faa3abfe-813e-48b4-90eb-141f0b34dfe0\",\"clientId\":\"727c2538-29ea-49bb-b1f9-164ccade35e5\"}}},\"sku\":{\"name\":\"esmmpathubtahd\",\"tier\":\"Standard\",\"size\":\"iwllbvgwzsffted\",\"family\":\"snkt\",\"capacity\":1883511618},\"location\":\"avaqogfkbebau\",\"tags\":{\"tpzkgmeboywhcz\":\"btxxwpfhnjzud\",\"gqbedygi\":\"qrhm\"},\"id\":\"rzwnyk\",\"name\":\"id\",\"type\":\"chl\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"wctofldseacdhz\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"brfgdrwji\",\"headers\":{\"cwv\":\"hfjsrwqrxetf\",\"dqntycnawthv\":\"r\",\"nuyeamcmhud\":\"ax\"}},\"provisioningState\":\"Failed\",\"endpointState\":\"Reinstating\",\"marketplaceSubscriptionId\":\"okwcpqtwl\",\"contentSafety\":{\"contentSafetyStatus\":\"Disabled\"}},\"kind\":\"rg\",\"identity\":{\"principalId\":\"43e56463-5899-46b6-962d-6f31f58a1909\",\"tenantId\":\"a5fff899-0096-4286-ad6c-b647d6821fe1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"oilacidu\":{\"principalId\":\"988cb364-d0a9-42f6-b45f-c3f75f9da422\",\"clientId\":\"443617dc-222b-49c1-b7dd-935af1210df3\"},\"e\":{\"principalId\":\"333a8344-5efd-46b5-9adb-b30d6608f1a6\",\"clientId\":\"4f117368-7336-4b20-87fd-799eb0e3ce98\"}}},\"sku\":{\"name\":\"jlhwyxpzruzyt\",\"tier\":\"Premium\",\"size\":\"whbgxvellvul\",\"family\":\"d\",\"capacity\":237918150},\"location\":\"mujd\",\"tags\":{\"xfzuvrzmzqmzj\":\"clyymffhmjpddn\"},\"id\":\"rb\",\"name\":\"pv\",\"type\":\"mdyfoebojtj\"}],\"nextLink\":\"g\"}") + "{\"value\":[{\"properties\":{\"authMode\":\"KeyAndAAD\",\"contentSafety\":{\"contentSafetyLevel\":\"Blocking\",\"contentSafetyStatus\":\"Disabled\"},\"endpointState\":\"Creating\",\"inferenceEndpoint\":{\"headers\":{\"mfjihv\":\"aflv\",\"tt\":\"jcq\"},\"uri\":\"fuqmmfjewfeqb\"},\"marketplaceSubscriptionId\":\"dostwygufmwe\",\"modelSettings\":{\"modelId\":\"gwzz\"},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"cjgpvcqzvzrb\",\"tenantId\":\"wx\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"g\":{\"principalId\":\"xvmdr\",\"clientId\":\"n\"}}},\"kind\":\"azoymdvhhpl\",\"sku\":{\"name\":\"wwd\",\"tier\":\"Basic\",\"size\":\"eqmgkcswz\",\"family\":\"xryearmhpwbuklvs\",\"capacity\":1167973310},\"location\":\"gtlvhqpo\",\"tags\":{\"aemcezevftmh\":\"s\",\"okjyghzt\":\"l\"},\"id\":\"smiwtpcflc\",\"name\":\"zswwvwi\",\"type\":\"tdjtvbfpfhru\"}],\"nextLink\":\"syqcjnqswxdowum\"}") .toObject(ServerlessEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("wfcmfcnr", model.value().get(0).tags().get("ajqmat")); - Assertions.assertEquals("vqvogf", model.value().get(0).properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, + Assertions.assertEquals("gtlvhqpo", model.value().get(0).location()); + Assertions.assertEquals("s", model.value().get(0).tags().get("aemcezevftmh")); + Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY_AND_AAD, + model.value().get(0).properties().authMode()); + Assertions.assertEquals(ContentSafetyLevel.BLOCKING, + model.value().get(0).properties().contentSafety().contentSafetyLevel()); + Assertions.assertEquals(ContentSafetyStatus.DISABLED, model.value().get(0).properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("ko", model.value().get(0).kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("weuipmpvksmi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("xtlt", model.value().get(0).sku().size()); - Assertions.assertEquals("krdpqgfhyrfr", model.value().get(0).sku().family()); - Assertions.assertEquals(1004449156, model.value().get(0).sku().capacity()); - Assertions.assertEquals("g", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessEndpointTrackedResourceArmPaginatedResult model - = new ServerlessEndpointTrackedResourceArmPaginatedResult() - .withValue(Arrays - .asList( - new ServerlessEndpointInner().withLocation("d") - .withTags(mapOf("ajqmat", "wfcmfcnr")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("vqvogf")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("ko") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("lnk", new UserAssignedIdentity(), "sxvjabjqqaxuyvy", - new UserAssignedIdentity(), "udndoabhjxw", new UserAssignedIdentity()))) - .withSku( - new Sku().withName("weuipmpvksmi") - .withTier(SkuTier.PREMIUM) - .withSize("xtlt") - .withFamily("krdpqgfhyrfr") - .withCapacity(1004449156)), - new ServerlessEndpointInner().withLocation("qztvx") - .withTags(mapOf("me", "wmjswenaww", "yoeojhtollhs", "leqioulndh")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("pqagynoiprn")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("fbcpaqktkrumzu") - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ovqkxiu", new UserAssignedIdentity()))) - .withSku(new Sku() - .withName("ggvqrnhyhlwcjs") - .withTier(SkuTier.BASIC) - .withSize("hffbxrq") - .withFamily("ijpeuql") - .withCapacity(236408023)), - new ServerlessEndpointInner().withLocation("avaqogfkbebau") - .withTags(mapOf("tpzkgmeboywhcz", "btxxwpfhnjzud", "gqbedygi", "qrhm")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("vtxigvjr")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("rdrenxo") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("iv", new UserAssignedIdentity(), "ydwbdbfgrlpunytj", - new UserAssignedIdentity()))) - .withSku( - new Sku().withName("esmmpathubtahd") - .withTier(SkuTier.STANDARD) - .withSize("iwllbvgwzsffted") - .withFamily("snkt") - .withCapacity(1883511618)), - new ServerlessEndpointInner().withLocation("mujd") - .withTags(mapOf("xfzuvrzmzqmzj", "clyymffhmjpddn")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("wctofldseacdhz")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.DISABLED))) - .withKind("rg") - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("oilacidu", new UserAssignedIdentity(), "e", new UserAssignedIdentity()))) - .withSku(new Sku().withName("jlhwyxpzruzyt") - .withTier(SkuTier.PREMIUM) - .withSize("whbgxvellvul") - .withFamily("d") - .withCapacity(237918150)))) - .withNextLink("g"); - model = BinaryData.fromObject(model).toObject(ServerlessEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("wfcmfcnr", model.value().get(0).tags().get("ajqmat")); - Assertions.assertEquals("vqvogf", model.value().get(0).properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - model.value().get(0).properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("ko", model.value().get(0).kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("weuipmpvksmi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("xtlt", model.value().get(0).sku().size()); - Assertions.assertEquals("krdpqgfhyrfr", model.value().get(0).sku().family()); - Assertions.assertEquals(1004449156, model.value().get(0).sku().capacity()); - Assertions.assertEquals("g", 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; + Assertions.assertEquals("gwzz", model.value().get(0).properties().modelSettings().modelId()); + Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); + Assertions.assertEquals("azoymdvhhpl", model.value().get(0).kind()); + Assertions.assertEquals("wwd", model.value().get(0).sku().name()); + Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); + Assertions.assertEquals("eqmgkcswz", model.value().get(0).sku().size()); + Assertions.assertEquals("xryearmhpwbuklvs", model.value().get(0).sku().family()); + Assertions.assertEquals(1167973310, model.value().get(0).sku().capacity()); + Assertions.assertEquals("syqcjnqswxdowum", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java index 72ec8c4e21f2..c47a6e3d77e0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -33,47 +34,52 @@ public final class ServerlessEndpointsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"modelSettings\":{\"modelId\":\"fokcbxrskylqppp\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"ikktretutsy\",\"headers\":{\"erotghxkrrpmgdol\":\"plaxxfnrltanv\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"lavdtttydjqom\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"jqcshbypw\",\"identity\":{\"principalId\":\"37edbc76-cef9-48b9-9cc2-79608d9945c7\",\"tenantId\":\"0aced1ac-e90b-4127-8f23-14aec8e79d91\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"dmoufjuqowuicvjy\":{\"principalId\":\"71f38893-306d-4554-94d3-d704ba5e4069\",\"clientId\":\"d6c0480e-abcd-4bba-ad9c-0c48ba346fab\"},\"mleuqxhmrilwkcg\":{\"principalId\":\"36881254-7f80-4b44-8ab1-6e4042c96c90\",\"clientId\":\"d3cf50b0-d2ec-475a-a730-1ff16c1504a3\"}}},\"sku\":{\"name\":\"vpvta\",\"tier\":\"Basic\",\"size\":\"znfxdqqzikvgwqi\",\"family\":\"dhas\",\"capacity\":561322142},\"location\":\"exrzxvff\",\"tags\":{\"t\":\"tdmhr\"},\"id\":\"yulkoeps\",\"name\":\"oqdibygrqcid\",\"type\":\"wkxikxiqxlxoksy\"}"; + = "{\"properties\":{\"authMode\":\"KeyAndAAD\",\"contentSafety\":{\"contentSafetyLevel\":\"Deferred\",\"contentSafetyStatus\":\"Enabled\"},\"endpointState\":\"Creating\",\"inferenceEndpoint\":{\"headers\":{\"nrjqskikqd\":\"guvckpdpd\",\"fjjsetiz\":\"iybqtlv\",\"isbpxlserq\":\"nnadn\"},\"uri\":\"xnhfcccdutxybnjb\"},\"marketplaceSubscriptionId\":\"pmeglolpotclmbk\",\"modelSettings\":{\"modelId\":\"rytymfno\"},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"nthjqgovviv\",\"tenantId\":\"xytrafettwytavp\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"urqviyfksegwezgf\":{\"principalId\":\"qluolgspyqsapn\",\"clientId\":\"vpbuk\"},\"akik\":{\"principalId\":\"ujtcpdtdz\",\"clientId\":\"ogzbasjc\"}}},\"kind\":\"ajmnvb\",\"sku\":{\"name\":\"mnkrqdyc\",\"tier\":\"Standard\",\"size\":\"kxx\",\"family\":\"lqrvbcgsaa\",\"capacity\":927112344},\"location\":\"xeqedftkigmjnk\",\"tags\":{\"tzfliqntnoe\":\"zyvzixmusiidivbb\"},\"id\":\"xoqpuclidy\",\"name\":\"wdaiexisapygii\",\"type\":\"ukaffzzfgivfiypf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServerlessEndpoint response = manager.serverlessEndpoints() - .define("szbvhxnjor") - .withRegion("xtnk") - .withExistingWorkspace("voderduabqbverb", "c") - .withProperties(new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("o")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.DISABLED))) - .withTags(mapOf("rkyaovc", "dvxsgdaajlhgsuq", "taingadkrkny", "dsrxhpqlxnbd", "fgwbuxqzf", "jngdfzqcjfqm")) - .withKind("vsfgyw") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("gmebvn", new UserAssignedIdentity(), "hdkvkqjjouh", - new UserAssignedIdentity(), "cttpcctvcjdrmkn", new UserAssignedIdentity()))) - .withSku(new Sku().withName("hvcrjqzbmyftzbx") - .withTier(SkuTier.FREE) - .withSize("rbullqnfz") - .withFamily("gursbzm") - .withCapacity(720175035)) + .define("xnkluq") + .withRegion("kzfbjucg") + .withExistingWorkspace("blilyoomgsejisyd", "ar") + .withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.AAD) + .withContentSafety(new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.BLOCKING) + .withContentSafetyStatus(ContentSafetyStatus.DISABLED)) + .withModelSettings(new ModelSettings().withModelId("hdaehxvvifd"))) + .withTags(mapOf("rdiiwhmrhzqqvpjy", "j", "ytjpua", "wmaq", "gqlvl", "pqupdcsvzugiur", "kpobjufksddxk", + "jzscrjtnq")) + .withIdentity( + new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf("xxszpaiecu", new UserAssignedIdentity(), "lvmywoefkpuu", + new UserAssignedIdentity(), "ngtbhvhsqvubww", new UserAssignedIdentity()))) + .withKind("iyujn") + .withSku(new Sku().withName("wjxmwalhlj") + .withTier(SkuTier.PREMIUM) + .withSize("bpiuvqh") + .withFamily("fmortrsnpbsungn") + .withCapacity(472518560)) .create(); - Assertions.assertEquals("exrzxvff", response.location()); - Assertions.assertEquals("tdmhr", response.tags().get("t")); - Assertions.assertEquals("fokcbxrskylqppp", response.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, response.properties().authMode()); + Assertions.assertEquals("xeqedftkigmjnk", response.location()); + Assertions.assertEquals("zyvzixmusiidivbb", response.tags().get("tzfliqntnoe")); + Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY_AND_AAD, response.properties().authMode()); + Assertions.assertEquals(ContentSafetyLevel.DEFERRED, + response.properties().contentSafety().contentSafetyLevel()); Assertions.assertEquals(ContentSafetyStatus.ENABLED, response.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("jqcshbypw", response.kind()); + Assertions.assertEquals("rytymfno", response.properties().modelSettings().modelId()); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("vpvta", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("znfxdqqzikvgwqi", response.sku().size()); - Assertions.assertEquals("dhas", response.sku().family()); - Assertions.assertEquals(561322142, response.sku().capacity()); + Assertions.assertEquals("ajmnvb", response.kind()); + Assertions.assertEquals("mnkrqdyc", response.sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); + Assertions.assertEquals("kxx", response.sku().size()); + Assertions.assertEquals("lqrvbcgsaa", response.sku().family()); + Assertions.assertEquals(927112344, response.sku().capacity()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java index 925c9380d20b..470df9df8fe5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; @@ -25,31 +26,33 @@ public final class ServerlessEndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"modelSettings\":{\"modelId\":\"brvrhwq\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"fvgbkle\",\"headers\":{\"kmtljzilkyvyblj\":\"bwhesbeb\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Unknown\",\"marketplaceSubscriptionId\":\"tzqrm\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"urkggqxqanrkh\",\"identity\":{\"principalId\":\"b488f679-4345-4c70-99bd-42bc94ad7d9b\",\"tenantId\":\"2783b33a-e7ee-4719-8d89-03bed3065258\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"cnadwrbrnt\":{\"principalId\":\"44857e84-ebd2-458e-abcc-114227837c0f\",\"clientId\":\"b08901c0-8b84-4ac2-9d28-de7bad889a23\"},\"pykrlzualsvxpol\":{\"principalId\":\"068211d5-d4d5-4c2e-abd2-175fb0f0f8d4\",\"clientId\":\"92b62b95-7e41-4f79-a8e9-79b3c6c2083a\"},\"rjmsabnmu\":{\"principalId\":\"8beb7e8f-e328-41dd-806f-e27c85a05d4a\",\"clientId\":\"55cc2c73-5cf7-43b3-ae31-45d8a531d743\"},\"hyxryvwnzhsigddg\":{\"principalId\":\"3b0ddca6-7e9c-4f83-8f7a-c7547ffc6bc8\",\"clientId\":\"58291a9e-fcf7-4633-93e8-bb3271824c25\"}}},\"sku\":{\"name\":\"nqvbnybffcvtij\",\"tier\":\"Standard\",\"size\":\"zrwpgvgogczg\",\"family\":\"o\",\"capacity\":1118835977},\"location\":\"ddgyqen\",\"tags\":{\"amlrtcbvif\":\"z\",\"xstowvgwvfv\":\"r\"},\"id\":\"qlyahlao\",\"name\":\"kcitnbuzvaxltr\",\"type\":\"nwhictsauv\"}"; + = "{\"properties\":{\"authMode\":\"AAD\",\"contentSafety\":{\"contentSafetyLevel\":\"Blocking\",\"contentSafetyStatus\":\"Enabled\"},\"endpointState\":\"Online\",\"inferenceEndpoint\":{\"headers\":{\"xzicurufngp\":\"ocvetzkcolbclspq\",\"hzixranb\":\"vdlkpzdkiywwenvx\"},\"uri\":\"qejfq\"},\"marketplaceSubscriptionId\":\"gadrvxbcye\",\"modelSettings\":{\"modelId\":\"bcb\"},\"provisioningState\":\"Canceled\"},\"identity\":{\"principalId\":\"jlakam\",\"tenantId\":\"qluicrqxqjzmosml\",\"type\":\"None\",\"userAssignedIdentities\":{\"hdeml\":{\"principalId\":\"gtnsxdjhztn\",\"clientId\":\"kpmdlttm\"},\"cbtyor\":{\"principalId\":\"aiqyxlr\",\"clientId\":\"xpebsxcnhq\"},\"wqmkakgwlqz\":{\"principalId\":\"damyumrobbaxnym\",\"clientId\":\"g\"},\"oxe\":{\"principalId\":\"bsdgyheyayktutf\",\"clientId\":\"e\"}}},\"kind\":\"ahmdco\",\"sku\":{\"name\":\"xwgzszjq\",\"tier\":\"Standard\",\"size\":\"h\",\"family\":\"ihkhjldw\",\"capacity\":284149795},\"location\":\"jhtgncfbjvmdkgvu\",\"tags\":{\"uiaizzjotm\":\"lsuuhwuox\",\"xxcruleimswxoi\":\"gzjrkslqbafdb\",\"pgzetuvfps\":\"nqumj\"},\"id\":\"jpmeptnqsnpa\",\"name\":\"ks\",\"type\":\"rrvjwbeeolmob\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServerlessEndpoint response = manager.serverlessEndpoints() - .getWithResponse("ysrreebj", "slbxfkiiarlldygf", "dtykhsafrfv", com.azure.core.util.Context.NONE) + .getWithResponse("nds", "zgnyfhqyli", "gnbhz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ddgyqen", response.location()); - Assertions.assertEquals("z", response.tags().get("amlrtcbvif")); - Assertions.assertEquals("brvrhwq", response.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, response.properties().authMode()); + Assertions.assertEquals("jhtgncfbjvmdkgvu", response.location()); + Assertions.assertEquals("lsuuhwuox", response.tags().get("uiaizzjotm")); + Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.AAD, response.properties().authMode()); + Assertions.assertEquals(ContentSafetyLevel.BLOCKING, + response.properties().contentSafety().contentSafetyLevel()); Assertions.assertEquals(ContentSafetyStatus.ENABLED, response.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("urkggqxqanrkh", response.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nqvbnybffcvtij", response.sku().name()); + Assertions.assertEquals("bcb", response.properties().modelSettings().modelId()); + Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); + Assertions.assertEquals("ahmdco", response.kind()); + Assertions.assertEquals("xwgzszjq", response.sku().name()); Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("zrwpgvgogczg", response.sku().size()); - Assertions.assertEquals("o", response.sku().family()); - Assertions.assertEquals(1118835977, response.sku().capacity()); + Assertions.assertEquals("h", response.sku().size()); + Assertions.assertEquals("ihkhjldw", response.sku().family()); + Assertions.assertEquals(284149795, response.sku().capacity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java index 98c3a814def5..df2af46597ae 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java @@ -1,16 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; @@ -26,32 +27,33 @@ public final class ServerlessEndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"modelSettings\":{\"modelId\":\"natl\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"kqzfwl\",\"headers\":{\"yyu\":\"nmgsbubzf\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Unknown\",\"marketplaceSubscriptionId\":\"rederzsnfgmohhcg\",\"contentSafety\":{\"contentSafetyStatus\":\"Disabled\"}},\"kind\":\"vvfpkymq\",\"identity\":{\"principalId\":\"41536c01-2dc8-4767-b6c8-7798b01bd9f5\",\"tenantId\":\"7da471c5-d09c-4d7d-893e-104b6de6f901\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"lboawzplwghfg\":{\"principalId\":\"ea0ea3d7-586d-4a52-9903-a19b81c3099e\",\"clientId\":\"15820477-10ab-4c98-919d-a6a1dece5bb1\"},\"rmtuprqt\":{\"principalId\":\"be36aaa0-8d81-4f60-957a-e1c7a64f7bac\",\"clientId\":\"74576f39-b12a-4b7b-afcb-2a799b711002\"},\"kohupyajkdejp\":{\"principalId\":\"f45a5de5-9558-4e2a-82a5-605e036f07e2\",\"clientId\":\"cfef6c00-90d0-41f3-ba78-acb521fbfd79\"}}},\"sku\":{\"name\":\"jvsbozfjbdyyxhj\",\"tier\":\"Free\",\"size\":\"wmrdlnbklhwrikr\",\"family\":\"j\",\"capacity\":587687819},\"location\":\"ff\",\"tags\":{\"umvbhbli\":\"yoiaobbzcdlcc\",\"x\":\"bxolzin\"},\"id\":\"fixrukwxcaagzlqo\",\"name\":\"gzgsgzlbunmjha\",\"type\":\"fiyrywf\"}]}"; + = "{\"value\":[{\"properties\":{\"authMode\":\"Key\",\"contentSafety\":{\"contentSafetyLevel\":\"Blocking\",\"contentSafetyStatus\":\"Disabled\"},\"endpointState\":\"Unknown\",\"inferenceEndpoint\":{\"headers\":{\"rjby\":\"fnbzcjmsr\",\"ahvby\":\"xkc\",\"cyctakh\":\"xtjivwveng\"},\"uri\":\"jyholsmahbjc\"},\"marketplaceSubscriptionId\":\"skqxgbigozrvlkla\",\"modelSettings\":{\"modelId\":\"ysseocppgsfjnjgm\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"nqzu\",\"tenantId\":\"wy\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"oqmwpmrlg\":{\"principalId\":\"zvyoxgerizfl\",\"clientId\":\"kovopqpfcdp\"},\"vamvrejkvci\":{\"principalId\":\"qs\",\"clientId\":\"p\"},\"ziotxnpovf\":{\"principalId\":\"brdwfhhwt\",\"clientId\":\"gefaycbvgotbjnx\"}}},\"kind\":\"luvmsgdisup\",\"sku\":{\"name\":\"thuo\",\"tier\":\"Standard\",\"size\":\"kxuyhh\",\"family\":\"ikd\",\"capacity\":2139775621},\"location\":\"hgs\",\"tags\":{\"yaqda\":\"d\",\"kgnrya\":\"znzaxzfhhhgy\",\"xauihnb\":\"kf\",\"u\":\"dhkdwyehqn\"},\"id\":\"fgjynmin\",\"name\":\"vdkqigppdqsqs\",\"type\":\"p\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.serverlessEndpoints().list("fpkdsldyw", "wvswlhjlbkq", "gs", com.azure.core.util.Context.NONE); + = manager.serverlessEndpoints().list("qol", "fk", "dwzvhtgfdy", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ff", response.iterator().next().location()); - Assertions.assertEquals("yoiaobbzcdlcc", response.iterator().next().tags().get("umvbhbli")); - Assertions.assertEquals("natl", response.iterator().next().properties().modelSettings().modelId()); + Assertions.assertEquals("hgs", response.iterator().next().location()); + Assertions.assertEquals("d", response.iterator().next().tags().get("yaqda")); Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, response.iterator().next().properties().authMode()); + Assertions.assertEquals(ContentSafetyLevel.BLOCKING, + response.iterator().next().properties().contentSafety().contentSafetyLevel()); Assertions.assertEquals(ContentSafetyStatus.DISABLED, response.iterator().next().properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("vvfpkymq", response.iterator().next().kind()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("jvsbozfjbdyyxhj", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - Assertions.assertEquals("wmrdlnbklhwrikr", response.iterator().next().sku().size()); - Assertions.assertEquals("j", response.iterator().next().sku().family()); - Assertions.assertEquals(587687819, response.iterator().next().sku().capacity()); + Assertions.assertEquals("ysseocppgsfjnjgm", response.iterator().next().properties().modelSettings().modelId()); + Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); + Assertions.assertEquals("luvmsgdisup", response.iterator().next().kind()); + Assertions.assertEquals("thuo", response.iterator().next().sku().name()); + Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); + Assertions.assertEquals("kxuyhh", response.iterator().next().sku().size()); + Assertions.assertEquals("ikd", response.iterator().next().sku().family()); + Assertions.assertEquals(2139775621, response.iterator().next().sku().capacity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java index e38a60175117..c843f1b2111e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java @@ -1,26 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpoint; -import org.junit.jupiter.api.Assertions; public final class ServerlessInferenceEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServerlessInferenceEndpoint model - = BinaryData.fromString("{\"uri\":\"tjctibpvbkaeh\",\"headers\":{\"wseivmakxh\":\"zygdfwa\"}}") - .toObject(ServerlessInferenceEndpoint.class); - Assertions.assertEquals("tjctibpvbkaeh", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessInferenceEndpoint model = new ServerlessInferenceEndpoint().withUri("tjctibpvbkaeh"); - model = BinaryData.fromObject(model).toObject(ServerlessInferenceEndpoint.class); - Assertions.assertEquals("tjctibpvbkaeh", model.uri()); + ServerlessInferenceEndpoint model = BinaryData + .fromString("{\"headers\":{\"nwg\":\"mmuebsn\",\"azisvbr\":\"qufmjxcyoseq\"},\"uri\":\"gcyjpgawepk\"}") + .toObject(ServerlessInferenceEndpoint.class); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessOfferTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessOfferTests.java new file mode 100644 index 000000000000..5ae04a799c5f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessOfferTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ServerlessOffer; +import org.junit.jupiter.api.Assertions; + +public final class ServerlessOfferTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ServerlessOffer model = BinaryData.fromString("{\"offerName\":\"qnnmjundt\",\"publisher\":\"xcltj\"}") + .toObject(ServerlessOffer.class); + Assertions.assertEquals("qnnmjundt", model.offerName()); + Assertions.assertEquals("xcltj", model.publisher()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ServerlessOffer model = new ServerlessOffer().withOfferName("qnnmjundt").withPublisher("xcltj"); + model = BinaryData.fromObject(model).toObject(ServerlessOffer.class); + Assertions.assertEquals("qnnmjundt", model.offerName()); + Assertions.assertEquals("xcltj", model.publisher()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java index d8c9f4d142b4..c2eac7166ccf 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,16 +13,16 @@ public final class ServiceManagedResourcesSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceManagedResourcesSettings model - = BinaryData.fromString("{\"cosmosDb\":{\"collectionsThroughput\":531743918}}") + = BinaryData.fromString("{\"cosmosDb\":{\"collectionsThroughput\":1670044751}}") .toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(531743918, model.cosmosDb().collectionsThroughput()); + Assertions.assertEquals(1670044751, model.cosmosDb().collectionsThroughput()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ServiceManagedResourcesSettings model = new ServiceManagedResourcesSettings() - .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(531743918)); + .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(1670044751)); model = BinaryData.fromObject(model).toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(531743918, model.cosmosDb().collectionsThroughput()); + Assertions.assertEquals(1670044751, model.cosmosDb().collectionsThroughput()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java index 6a7354ae23c0..d89492ce2de0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java @@ -1,36 +1,40 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.RuleAction; import com.azure.resourcemanager.machinelearning.models.ServiceTagDestination; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ServiceTagDestinationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceTagDestination model = BinaryData.fromString( - "{\"action\":\"Deny\",\"addressPrefixes\":[\"cm\",\"oxfab\",\"qgpwbmwhr\",\"ali\"],\"portRanges\":\"ycgnwplrrbphc\",\"protocol\":\"bb\",\"serviceTag\":\"ticuhqvumsp\"}") + "{\"action\":\"Allow\",\"addressPrefixes\":[\"qabcypm\",\"vkwlzuvccfwnf\",\"bacfionlebxetq\",\"tzxdpnqbqqwx\"],\"portRanges\":\"feallnwsu\",\"protocol\":\"snjampmng\",\"serviceTag\":\"scxaq\"}") .toObject(ServiceTagDestination.class); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("ycgnwplrrbphc", model.portRanges()); - Assertions.assertEquals("bb", model.protocol()); - Assertions.assertEquals("ticuhqvumsp", model.serviceTag()); + Assertions.assertEquals(RuleAction.ALLOW, model.action()); + Assertions.assertEquals("qabcypm", model.addressPrefixes().get(0)); + Assertions.assertEquals("feallnwsu", model.portRanges()); + Assertions.assertEquals("snjampmng", model.protocol()); + Assertions.assertEquals("scxaq", model.serviceTag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceTagDestination model = new ServiceTagDestination().withAction(RuleAction.DENY) - .withPortRanges("ycgnwplrrbphc") - .withProtocol("bb") - .withServiceTag("ticuhqvumsp"); + ServiceTagDestination model = new ServiceTagDestination().withAction(RuleAction.ALLOW) + .withAddressPrefixes(Arrays.asList("qabcypm", "vkwlzuvccfwnf", "bacfionlebxetq", "tzxdpnqbqqwx")) + .withPortRanges("feallnwsu") + .withProtocol("snjampmng") + .withServiceTag("scxaq"); model = BinaryData.fromObject(model).toObject(ServiceTagDestination.class); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("ycgnwplrrbphc", model.portRanges()); - Assertions.assertEquals("bb", model.protocol()); - Assertions.assertEquals("ticuhqvumsp", model.serviceTag()); + Assertions.assertEquals(RuleAction.ALLOW, model.action()); + Assertions.assertEquals("qabcypm", model.addressPrefixes().get(0)); + Assertions.assertEquals("feallnwsu", model.portRanges()); + Assertions.assertEquals("snjampmng", model.protocol()); + Assertions.assertEquals("scxaq", model.serviceTag()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java index 551a1e363041..ca282b2721af 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,36 +10,40 @@ import com.azure.resourcemanager.machinelearning.models.RuleStatus; import com.azure.resourcemanager.machinelearning.models.ServiceTagDestination; import com.azure.resourcemanager.machinelearning.models.ServiceTagOutboundRule; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ServiceTagOutboundRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceTagOutboundRule model = BinaryData.fromString( - "{\"type\":\"ServiceTag\",\"destination\":{\"action\":\"Allow\",\"addressPrefixes\":[\"ijzzcaoijolbuauk\",\"wieopexelxqdw\"],\"portRanges\":\"wyil\",\"protocol\":\"ibkgxyxyau\",\"serviceTag\":\"eddobmcnltm\"},\"category\":\"UserDefined\",\"status\":\"Inactive\"}") + "{\"type\":\"ServiceTag\",\"destination\":{\"action\":\"Allow\",\"addressPrefixes\":[\"qmi\",\"tthzrvqd\"],\"portRanges\":\"bhj\",\"protocol\":\"igeho\",\"serviceTag\":\"bowsk\"},\"category\":\"Required\",\"status\":\"Inactive\",\"errorInformation\":\"lcuiywgqywgndr\",\"parentRuleNames\":[\"hzgpphrcgyncocpe\",\"fvm\",\"coofsxlzev\"]}") .toObject(ServiceTagOutboundRule.class); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); + Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("wyil", model.destination().portRanges()); - Assertions.assertEquals("ibkgxyxyau", model.destination().protocol()); - Assertions.assertEquals("eddobmcnltm", model.destination().serviceTag()); + Assertions.assertEquals("qmi", model.destination().addressPrefixes().get(0)); + Assertions.assertEquals("bhj", model.destination().portRanges()); + Assertions.assertEquals("igeho", model.destination().protocol()); + Assertions.assertEquals("bowsk", model.destination().serviceTag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceTagOutboundRule model = new ServiceTagOutboundRule().withCategory(RuleCategory.USER_DEFINED) + ServiceTagOutboundRule model = new ServiceTagOutboundRule().withCategory(RuleCategory.REQUIRED) .withStatus(RuleStatus.INACTIVE) .withDestination(new ServiceTagDestination().withAction(RuleAction.ALLOW) - .withPortRanges("wyil") - .withProtocol("ibkgxyxyau") - .withServiceTag("eddobmcnltm")); + .withAddressPrefixes(Arrays.asList("qmi", "tthzrvqd")) + .withPortRanges("bhj") + .withProtocol("igeho") + .withServiceTag("bowsk")); model = BinaryData.fromObject(model).toObject(ServiceTagOutboundRule.class); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); + Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("wyil", model.destination().portRanges()); - Assertions.assertEquals("ibkgxyxyau", model.destination().protocol()); - Assertions.assertEquals("eddobmcnltm", model.destination().serviceTag()); + Assertions.assertEquals("qmi", model.destination().addressPrefixes().get(0)); + Assertions.assertEquals("bhj", model.destination().portRanges()); + Assertions.assertEquals("igeho", model.destination().protocol()); + Assertions.assertEquals("bowsk", model.destination().serviceTag()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java index 66d203fa9cf2..2e580a4d605e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,37 +14,37 @@ public final class SetupScriptsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SetupScripts model = BinaryData.fromString( - "{\"scripts\":{\"startupScript\":{\"scriptSource\":\"awmpjprd\",\"scriptData\":\"rpcfpcfjfwzl\",\"scriptArguments\":\"awkgy\",\"timeout\":\"eyam\"},\"creationScript\":{\"scriptSource\":\"dmdiawpzxkzrntm\",\"scriptData\":\"tdhuo\",\"scriptArguments\":\"wqpsqaz\",\"timeout\":\"qodvqgcnbhcbmj\"}}}") + "{\"scripts\":{\"startupScript\":{\"scriptSource\":\"vkmnbzkopaiil\",\"scriptData\":\"pudkhqux\",\"scriptArguments\":\"jofpg\",\"timeout\":\"drobujnjgy\"},\"creationScript\":{\"scriptSource\":\"mqx\",\"scriptData\":\"idullnjgcpskg\",\"scriptArguments\":\"nytslgsazuqznghx\",\"timeout\":\"yqz\"}}}") .toObject(SetupScripts.class); - Assertions.assertEquals("awmpjprd", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("rpcfpcfjfwzl", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("awkgy", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("eyam", model.scripts().startupScript().timeout()); - Assertions.assertEquals("dmdiawpzxkzrntm", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("tdhuo", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("wqpsqaz", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("qodvqgcnbhcbmj", model.scripts().creationScript().timeout()); + Assertions.assertEquals("vkmnbzkopaiil", model.scripts().startupScript().scriptSource()); + Assertions.assertEquals("pudkhqux", model.scripts().startupScript().scriptData()); + Assertions.assertEquals("jofpg", model.scripts().startupScript().scriptArguments()); + Assertions.assertEquals("drobujnjgy", model.scripts().startupScript().timeout()); + Assertions.assertEquals("mqx", model.scripts().creationScript().scriptSource()); + Assertions.assertEquals("idullnjgcpskg", model.scripts().creationScript().scriptData()); + Assertions.assertEquals("nytslgsazuqznghx", model.scripts().creationScript().scriptArguments()); + Assertions.assertEquals("yqz", model.scripts().creationScript().timeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SetupScripts model = new SetupScripts().withScripts(new ScriptsToExecute() - .withStartupScript(new ScriptReference().withScriptSource("awmpjprd") - .withScriptData("rpcfpcfjfwzl") - .withScriptArguments("awkgy") - .withTimeout("eyam")) - .withCreationScript(new ScriptReference().withScriptSource("dmdiawpzxkzrntm") - .withScriptData("tdhuo") - .withScriptArguments("wqpsqaz") - .withTimeout("qodvqgcnbhcbmj"))); + .withStartupScript(new ScriptReference().withScriptSource("vkmnbzkopaiil") + .withScriptData("pudkhqux") + .withScriptArguments("jofpg") + .withTimeout("drobujnjgy")) + .withCreationScript(new ScriptReference().withScriptSource("mqx") + .withScriptData("idullnjgcpskg") + .withScriptArguments("nytslgsazuqznghx") + .withTimeout("yqz"))); model = BinaryData.fromObject(model).toObject(SetupScripts.class); - Assertions.assertEquals("awmpjprd", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("rpcfpcfjfwzl", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("awkgy", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("eyam", model.scripts().startupScript().timeout()); - Assertions.assertEquals("dmdiawpzxkzrntm", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("tdhuo", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("wqpsqaz", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("qodvqgcnbhcbmj", model.scripts().creationScript().timeout()); + Assertions.assertEquals("vkmnbzkopaiil", model.scripts().startupScript().scriptSource()); + Assertions.assertEquals("pudkhqux", model.scripts().startupScript().scriptData()); + Assertions.assertEquals("jofpg", model.scripts().startupScript().scriptArguments()); + Assertions.assertEquals("drobujnjgy", model.scripts().startupScript().timeout()); + Assertions.assertEquals("mqx", model.scripts().creationScript().scriptSource()); + Assertions.assertEquals("idullnjgcpskg", model.scripts().creationScript().scriptData()); + Assertions.assertEquals("nytslgsazuqznghx", model.scripts().creationScript().scriptArguments()); + Assertions.assertEquals("yqz", model.scripts().creationScript().timeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java index 78eb7cfd165b..9ab7a6e10d89 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,25 +13,24 @@ public final class SharedPrivateLinkResourcePropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SharedPrivateLinkResourceProperty model = BinaryData.fromString( - "{\"privateLinkResourceId\":\"tqxhocdgeab\",\"groupId\":\"phut\",\"requestMessage\":\"ndv\",\"status\":\"Rejected\"}") + "{\"groupId\":\"bldngkpoc\",\"privateLinkResourceId\":\"azyxoegukg\",\"requestMessage\":\"piu\",\"status\":\"Disconnected\"}") .toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("tqxhocdgeab", model.privateLinkResourceId()); - Assertions.assertEquals("phut", model.groupId()); - Assertions.assertEquals("ndv", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("bldngkpoc", model.groupId()); + Assertions.assertEquals("azyxoegukg", model.privateLinkResourceId()); + Assertions.assertEquals("piu", model.requestMessage()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SharedPrivateLinkResourceProperty model - = new SharedPrivateLinkResourceProperty().withPrivateLinkResourceId("tqxhocdgeab") - .withGroupId("phut") - .withRequestMessage("ndv") - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED); + SharedPrivateLinkResourceProperty model = new SharedPrivateLinkResourceProperty().withGroupId("bldngkpoc") + .withPrivateLinkResourceId("azyxoegukg") + .withRequestMessage("piu") + .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED); model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("tqxhocdgeab", model.privateLinkResourceId()); - Assertions.assertEquals("phut", model.groupId()); - Assertions.assertEquals("ndv", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("bldngkpoc", model.groupId()); + Assertions.assertEquals("azyxoegukg", model.privateLinkResourceId()); + Assertions.assertEquals("piu", model.requestMessage()); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java index 08e67b66961b..c8c4c21af4c4 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,27 +13,27 @@ public final class SharedPrivateLinkResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SharedPrivateLinkResource model = BinaryData.fromString( - "{\"name\":\"itcjczdz\",\"properties\":{\"privateLinkResourceId\":\"dhkrwpdappdsbdk\",\"groupId\":\"rwjfe\",\"requestMessage\":\"nhutjeltmrldhugj\",\"status\":\"Approved\"}}") + "{\"name\":\"feiithlvmez\",\"properties\":{\"groupId\":\"hxmzsbbzoggig\",\"privateLinkResourceId\":\"wburvjxxjnspydpt\",\"requestMessage\":\"enkouknvudw\",\"status\":\"Approved\"}}") .toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("itcjczdz", model.name()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.privateLinkResourceId()); - Assertions.assertEquals("rwjfe", model.groupId()); - Assertions.assertEquals("nhutjeltmrldhugj", model.requestMessage()); + Assertions.assertEquals("feiithlvmez", model.name()); + Assertions.assertEquals("hxmzsbbzoggig", model.groupId()); + Assertions.assertEquals("wburvjxxjnspydpt", model.privateLinkResourceId()); + Assertions.assertEquals("enkouknvudw", model.requestMessage()); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SharedPrivateLinkResource model = new SharedPrivateLinkResource().withName("itcjczdz") - .withPrivateLinkResourceId("dhkrwpdappdsbdk") - .withGroupId("rwjfe") - .withRequestMessage("nhutjeltmrldhugj") + SharedPrivateLinkResource model = new SharedPrivateLinkResource().withName("feiithlvmez") + .withGroupId("hxmzsbbzoggig") + .withPrivateLinkResourceId("wburvjxxjnspydpt") + .withRequestMessage("enkouknvudw") .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED); model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("itcjczdz", model.name()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.privateLinkResourceId()); - Assertions.assertEquals("rwjfe", model.groupId()); - Assertions.assertEquals("nhutjeltmrldhugj", model.requestMessage()); + Assertions.assertEquals("feiithlvmez", model.name()); + Assertions.assertEquals("hxmzsbbzoggig", model.groupId()); + Assertions.assertEquals("wburvjxxjnspydpt", model.privateLinkResourceId()); + Assertions.assertEquals("enkouknvudw", model.requestMessage()); Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java index 9eea4170cc87..21347245ede2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,24 +13,12 @@ public final class SkuCapacityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuCapacity model = BinaryData - .fromString("{\"minimum\":114097957,\"maximum\":1718972803,\"default\":133055758,\"scaleType\":\"Manual\"}") + .fromString( + "{\"default\":1407884011,\"maximum\":254592229,\"minimum\":1435272869,\"scaleType\":\"Manual\"}") .toObject(SkuCapacity.class); - Assertions.assertEquals(114097957, model.minimum()); - Assertions.assertEquals(1718972803, model.maximum()); - Assertions.assertEquals(133055758, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = new SkuCapacity().withMinimum(114097957) - .withMaximum(1718972803) - .withDefaultProperty(133055758) - .withScaleType(SkuScaleType.MANUAL); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - Assertions.assertEquals(114097957, model.minimum()); - Assertions.assertEquals(1718972803, model.maximum()); - Assertions.assertEquals(133055758, model.defaultProperty()); + Assertions.assertEquals(1407884011, model.defaultProperty()); + Assertions.assertEquals(254592229, model.maximum()); + Assertions.assertEquals(1435272869, model.minimum()); Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java index 9cf2dc95ea0c..194c25400ff3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java @@ -1,50 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.implementation.models.SkuResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class SkuResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"resourceType\":\"rra\",\"sku\":{\"name\":\"ekcsueh\",\"tier\":\"Premium\"},\"capacity\":{\"minimum\":942478708,\"maximum\":2130219210,\"default\":414889103,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"qidywmh\"}") + "{\"value\":[{\"capacity\":{\"default\":690959949,\"maximum\":2100647659,\"minimum\":1398156477,\"scaleType\":\"Manual\"},\"resourceType\":\"bzfcpuoeedwj\",\"sku\":{\"name\":\"iklhsyekrdrenx\",\"tier\":\"Premium\"}},{\"capacity\":{\"default\":1895095564,\"maximum\":1251834130,\"minimum\":1804772219,\"scaleType\":\"None\"},\"resourceType\":\"lhydwbdbfgrlpu\",\"sku\":{\"name\":\"tjlkesmmpathub\",\"tier\":\"Free\"}},{\"capacity\":{\"default\":270635152,\"maximum\":829874658,\"minimum\":1176158584,\"scaleType\":\"Manual\"},\"resourceType\":\"vgw\",\"sku\":{\"name\":\"fftedousnktj\",\"tier\":\"Basic\"}},{\"capacity\":{\"default\":553435314,\"maximum\":1297585909,\"minimum\":115189192,\"scaleType\":\"Automatic\"},\"resourceType\":\"bauzlqbtxxw\",\"sku\":{\"name\":\"h\",\"tier\":\"Basic\"}}],\"nextLink\":\"drtpzkgme\"}") .toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("ekcsueh", model.value().get(0).sku().name()); + Assertions.assertEquals(690959949, model.value().get(0).capacity().defaultProperty()); + Assertions.assertEquals(2100647659, model.value().get(0).capacity().maximum()); + Assertions.assertEquals(1398156477, model.value().get(0).capacity().minimum()); + Assertions.assertEquals(SkuScaleType.MANUAL, model.value().get(0).capacity().scaleType()); + Assertions.assertEquals("iklhsyekrdrenx", model.value().get(0).sku().name()); Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals(942478708, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(2130219210, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(414889103, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("qidywmh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceArmPaginatedResult model = new SkuResourceArmPaginatedResult().withValue( - Arrays.asList(new SkuResourceInner().withSku(new SkuSetting().withName("ekcsueh").withTier(SkuTier.PREMIUM)) - .withCapacity(new SkuCapacity().withMinimum(942478708) - .withMaximum(2130219210) - .withDefaultProperty(414889103) - .withScaleType(SkuScaleType.AUTOMATIC)))) - .withNextLink("qidywmh"); - model = BinaryData.fromObject(model).toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("ekcsueh", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals(942478708, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(2130219210, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(414889103, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("qidywmh", model.nextLink()); + Assertions.assertEquals("drtpzkgme", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java index 50b0ce32f4e2..bb7dc3892d6d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java @@ -1,14 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; import com.azure.resourcemanager.machinelearning.models.SkuTier; import org.junit.jupiter.api.Assertions; @@ -16,30 +14,13 @@ public final class SkuResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkuResourceInner model = BinaryData.fromString( - "{\"resourceType\":\"tyrilkfbnrqqxvz\",\"sku\":{\"name\":\"bnfnqtxjtoma\",\"tier\":\"Standard\"},\"capacity\":{\"minimum\":1063969738,\"maximum\":1165250795,\"default\":574415772,\"scaleType\":\"Manual\"}}") + "{\"capacity\":{\"default\":575771584,\"maximum\":1802606615,\"minimum\":494268735,\"scaleType\":\"None\"},\"resourceType\":\"mngqbe\",\"sku\":{\"name\":\"gis\",\"tier\":\"Premium\"}}") .toObject(SkuResourceInner.class); - Assertions.assertEquals("bnfnqtxjtoma", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(1063969738, model.capacity().minimum()); - Assertions.assertEquals(1165250795, model.capacity().maximum()); - Assertions.assertEquals(574415772, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceInner model - = new SkuResourceInner().withSku(new SkuSetting().withName("bnfnqtxjtoma").withTier(SkuTier.STANDARD)) - .withCapacity(new SkuCapacity().withMinimum(1063969738) - .withMaximum(1165250795) - .withDefaultProperty(574415772) - .withScaleType(SkuScaleType.MANUAL)); - model = BinaryData.fromObject(model).toObject(SkuResourceInner.class); - Assertions.assertEquals("bnfnqtxjtoma", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(1063969738, model.capacity().minimum()); - Assertions.assertEquals(1165250795, model.capacity().maximum()); - Assertions.assertEquals(574415772, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); + Assertions.assertEquals(575771584, model.capacity().defaultProperty()); + Assertions.assertEquals(1802606615, model.capacity().maximum()); + Assertions.assertEquals(494268735, model.capacity().minimum()); + Assertions.assertEquals(SkuScaleType.NONE, model.capacity().scaleType()); + Assertions.assertEquals("gis", model.sku().name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java index 01edc09634c2..f14b91571669 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,17 +12,8 @@ public final class SkuSettingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SkuSetting model - = BinaryData.fromString("{\"name\":\"wqjnsfzygleexa\",\"tier\":\"Basic\"}").toObject(SkuSetting.class); - Assertions.assertEquals("wqjnsfzygleexa", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuSetting model = new SkuSetting().withName("wqjnsfzygleexa").withTier(SkuTier.BASIC); - model = BinaryData.fromObject(model).toObject(SkuSetting.class); - Assertions.assertEquals("wqjnsfzygleexa", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); + SkuSetting model = BinaryData.fromString("{\"name\":\"hlr\",\"tier\":\"Premium\"}").toObject(SkuSetting.class); + Assertions.assertEquals("hlr", model.name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java index e98948b22eb8..03f81df2563e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,27 +13,27 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Sku model = BinaryData.fromString( - "{\"name\":\"bnjbiksqrglssain\",\"tier\":\"Standard\",\"size\":\"nzl\",\"family\":\"fmppe\",\"capacity\":1862600222}") + "{\"name\":\"y\",\"tier\":\"Premium\",\"size\":\"e\",\"family\":\"sonpclhocohs\",\"capacity\":442163665}") .toObject(Sku.class); - Assertions.assertEquals("bnjbiksqrglssain", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("nzl", model.size()); - Assertions.assertEquals("fmppe", model.family()); - Assertions.assertEquals(1862600222, model.capacity()); + Assertions.assertEquals("y", model.name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); + Assertions.assertEquals("e", model.size()); + Assertions.assertEquals("sonpclhocohs", model.family()); + Assertions.assertEquals(442163665, model.capacity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Sku model = new Sku().withName("bnjbiksqrglssain") - .withTier(SkuTier.STANDARD) - .withSize("nzl") - .withFamily("fmppe") - .withCapacity(1862600222); + Sku model = new Sku().withName("y") + .withTier(SkuTier.PREMIUM) + .withSize("e") + .withFamily("sonpclhocohs") + .withCapacity(442163665); model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("bnjbiksqrglssain", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("nzl", model.size()); - Assertions.assertEquals("fmppe", model.family()); - Assertions.assertEquals(1862600222, model.capacity()); + Assertions.assertEquals("y", model.name()); + Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); + Assertions.assertEquals("e", model.size()); + Assertions.assertEquals("sonpclhocohs", model.family()); + Assertions.assertEquals(442163665, model.capacity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java index 4a6f9c32b63d..9c73be036da2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java index 11fff316f12e..fa7fb233c101 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class SparkJobPythonEntryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SparkJobPythonEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobPythonEntry\",\"file\":\"qt\"}") + = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobPythonEntry\",\"file\":\"zujsjirkrp\"}") .toObject(SparkJobPythonEntry.class); - Assertions.assertEquals("qt", model.file()); + Assertions.assertEquals("zujsjirkrp", model.file()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SparkJobPythonEntry model = new SparkJobPythonEntry().withFile("qt"); + SparkJobPythonEntry model = new SparkJobPythonEntry().withFile("zujsjirkrp"); model = BinaryData.fromObject(model).toObject(SparkJobPythonEntry.class); - Assertions.assertEquals("qt", model.file()); + Assertions.assertEquals("zujsjirkrp", model.file()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java index 242c47ddafac..f74c29c7ef25 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class SparkJobScalaEntryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SparkJobScalaEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobScalaEntry\",\"className\":\"fkvuozb\"}") + = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobScalaEntry\",\"className\":\"kcjhmmofbnivd\"}") .toObject(SparkJobScalaEntry.class); - Assertions.assertEquals("fkvuozb", model.className()); + Assertions.assertEquals("kcjhmmofbnivd", model.className()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SparkJobScalaEntry model = new SparkJobScalaEntry().withClassName("fkvuozb"); + SparkJobScalaEntry model = new SparkJobScalaEntry().withClassName("kcjhmmofbnivd"); model = BinaryData.fromObject(model).toObject(SparkJobScalaEntry.class); - Assertions.assertEquals("fkvuozb", model.className()); + Assertions.assertEquals("kcjhmmofbnivd", model.className()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java index 7f9ce92ed454..53422333f539 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,18 @@ public final class SparkResourceConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SparkResourceConfiguration model - = BinaryData.fromString("{\"instanceType\":\"tnhrevimxmaxcj\",\"runtimeVersion\":\"itygvdwds\"}") + = BinaryData.fromString("{\"instanceType\":\"kykpaxnls\",\"runtimeVersion\":\"nyscaccpt\"}") .toObject(SparkResourceConfiguration.class); - Assertions.assertEquals("tnhrevimxmaxcj", model.instanceType()); - Assertions.assertEquals("itygvdwds", model.runtimeVersion()); + Assertions.assertEquals("kykpaxnls", model.instanceType()); + Assertions.assertEquals("nyscaccpt", model.runtimeVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SparkResourceConfiguration model - = new SparkResourceConfiguration().withInstanceType("tnhrevimxmaxcj").withRuntimeVersion("itygvdwds"); + = new SparkResourceConfiguration().withInstanceType("kykpaxnls").withRuntimeVersion("nyscaccpt"); model = BinaryData.fromObject(model).toObject(SparkResourceConfiguration.class); - Assertions.assertEquals("tnhrevimxmaxcj", model.instanceType()); - Assertions.assertEquals("itygvdwds", model.runtimeVersion()); + Assertions.assertEquals("kykpaxnls", model.instanceType()); + Assertions.assertEquals("nyscaccpt", model.runtimeVersion()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointDeploymentResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointDeploymentResourcePropertiesTests.java new file mode 100644 index 000000000000..b223b4d6b094 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointDeploymentResourcePropertiesTests.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku; +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.SpeechEndpointDeploymentResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class SpeechEndpointDeploymentResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SpeechEndpointDeploymentResourceProperties model = BinaryData.fromString( + "{\"type\":\"Azure.Speech\",\"model\":{\"format\":\"xth\",\"name\":\"tusivyevcciqihn\",\"source\":\"ngbwjz\",\"version\":\"fygxgispemvtzfk\"},\"raiPolicyName\":\"ubljofxqe\",\"sku\":{\"capacity\":1330720242,\"family\":\"qjhqjbas\",\"name\":\"smjqulngsntnbyb\",\"size\":\"gc\",\"tier\":\"wclxxwrl\"},\"versionUpgradeOption\":\"OnceCurrentVersionExpired\",\"failureReason\":\"skcqvkocrcjd\",\"provisioningState\":\"NotStarted\"}") + .toObject(SpeechEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("skcqvkocrcjd", model.failureReason()); + Assertions.assertEquals("xth", model.model().format()); + Assertions.assertEquals("tusivyevcciqihn", model.model().name()); + Assertions.assertEquals("ngbwjz", model.model().source()); + Assertions.assertEquals("fygxgispemvtzfk", model.model().version()); + Assertions.assertEquals("ubljofxqe", model.raiPolicyName()); + Assertions.assertEquals(1330720242, model.sku().capacity()); + Assertions.assertEquals("qjhqjbas", model.sku().family()); + Assertions.assertEquals("smjqulngsntnbyb", model.sku().name()); + Assertions.assertEquals("gc", model.sku().size()); + Assertions.assertEquals("wclxxwrl", model.sku().tier()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, + model.versionUpgradeOption()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SpeechEndpointDeploymentResourceProperties model + = new SpeechEndpointDeploymentResourceProperties().withFailureReason("skcqvkocrcjd") + .withModel(new EndpointDeploymentModel().withFormat("xth") + .withName("tusivyevcciqihn") + .withSource("ngbwjz") + .withVersion("fygxgispemvtzfk")) + .withRaiPolicyName("ubljofxqe") + .withSku(new CognitiveServicesSku().withCapacity(1330720242) + .withFamily("qjhqjbas") + .withName("smjqulngsntnbyb") + .withSize("gc") + .withTier("wclxxwrl")) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED); + model = BinaryData.fromObject(model).toObject(SpeechEndpointDeploymentResourceProperties.class); + Assertions.assertEquals("skcqvkocrcjd", model.failureReason()); + Assertions.assertEquals("xth", model.model().format()); + Assertions.assertEquals("tusivyevcciqihn", model.model().name()); + Assertions.assertEquals("ngbwjz", model.model().source()); + Assertions.assertEquals("fygxgispemvtzfk", model.model().version()); + Assertions.assertEquals("ubljofxqe", model.raiPolicyName()); + Assertions.assertEquals(1330720242, model.sku().capacity()); + Assertions.assertEquals("qjhqjbas", model.sku().family()); + Assertions.assertEquals("smjqulngsntnbyb", model.sku().name()); + Assertions.assertEquals("gc", model.sku().size()); + Assertions.assertEquals("wclxxwrl", model.sku().tier()); + Assertions.assertEquals(DeploymentModelVersionUpgradeOption.ONCE_CURRENT_VERSION_EXPIRED, + model.versionUpgradeOption()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointResourcePropertiesTests.java new file mode 100644 index 000000000000..931580e72901 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SpeechEndpointResourcePropertiesTests.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties; +import com.azure.resourcemanager.machinelearning.models.SpeechEndpointResourceProperties; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SpeechEndpointResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SpeechEndpointResourceProperties model = BinaryData.fromString( + "{\"endpointType\":\"Azure.Speech\",\"associatedResourceId\":\"cycg\",\"deployments\":[{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"sihxvtac\",\"provisioningState\":\"Scaling\"},\"id\":\"pxpry\",\"name\":\"nsbubwhzqqgugwlu\",\"type\":\"ahtqmmk\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"wqcqwe\",\"provisioningState\":\"Scaling\"},\"id\":\"fpkeph\",\"name\":\"jeucosvkkeergvy\",\"type\":\"a\"},{\"properties\":{\"type\":\"EndpointDeploymentResourceProperties\",\"failureReason\":\"jpyillgnue\",\"provisioningState\":\"Failed\"},\"id\":\"ffbuqxknvm\",\"name\":\"g\",\"type\":\"bg\"}],\"endpointUri\":\"ojfchicpa\",\"failureReason\":\"xzoksgqhbooj\",\"location\":\"ilozblkc\",\"name\":\"l\",\"provisioningState\":\"Failed\",\"shouldCreateAiServicesEndpoint\":true}") + .toObject(SpeechEndpointResourceProperties.class); + Assertions.assertEquals("cycg", model.associatedResourceId()); + Assertions.assertEquals("sihxvtac", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("ojfchicpa", model.endpointUri()); + Assertions.assertEquals("xzoksgqhbooj", model.failureReason()); + Assertions.assertEquals("ilozblkc", model.location()); + Assertions.assertEquals("l", model.name()); + Assertions.assertTrue(model.shouldCreateAiServicesEndpoint()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SpeechEndpointResourceProperties model = new SpeechEndpointResourceProperties().withAssociatedResourceId("cycg") + .withDeployments(Arrays.asList( + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("sihxvtac")), + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("wqcqwe")), + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new EndpointDeploymentResourceProperties().withFailureReason("jpyillgnue")))) + .withEndpointUri("ojfchicpa") + .withFailureReason("xzoksgqhbooj") + .withLocation("ilozblkc") + .withName("l") + .withShouldCreateAiServicesEndpoint(true); + model = BinaryData.fromObject(model).toObject(SpeechEndpointResourceProperties.class); + Assertions.assertEquals("cycg", model.associatedResourceId()); + Assertions.assertEquals("sihxvtac", model.deployments().get(0).properties().failureReason()); + Assertions.assertEquals("ojfchicpa", model.endpointUri()); + Assertions.assertEquals("xzoksgqhbooj", model.failureReason()); + Assertions.assertEquals("ilozblkc", model.location()); + Assertions.assertEquals("l", model.name()); + Assertions.assertTrue(model.shouldCreateAiServicesEndpoint()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java index 7feeef04c75c..4fba97d5e765 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,20 +13,19 @@ public final class StackEnsembleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StackEnsembleSettings model = BinaryData.fromString( - "{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":69.9155023159612,\"stackMetaLearnerKWargs\":\"dataygta\"}") + "{\"stackMetaLearnerKWargs\":\"\\\"dataxn\\\"\",\"stackMetaLearnerTrainPercentage\":90.39631202467197,\"stackMetaLearnerType\":\"LightGBMRegressor\"}") .toObject(StackEnsembleSettings.class); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, model.stackMetaLearnerType()); - Assertions.assertEquals(69.9155023159612D, model.stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(90.39631202467197D, model.stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackMetaLearnerType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StackEnsembleSettings model - = new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(69.9155023159612D) - .withStackMetaLearnerKWargs("dataygta"); + StackEnsembleSettings model = new StackEnsembleSettings().withStackMetaLearnerKWargs("\"dataxn\"") + .withStackMetaLearnerTrainPercentage(90.39631202467197D) + .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR); model = BinaryData.fromObject(model).toObject(StackEnsembleSettings.class); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, model.stackMetaLearnerType()); - Assertions.assertEquals(69.9155023159612D, model.stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(90.39631202467197D, model.stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackMetaLearnerType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java index ea05f46805b7..9400f6f02a4e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,34 +16,35 @@ public final class StaticInputDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StaticInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Static\",\"windowStart\":\"2021-07-21T17:55:57Z\",\"windowEnd\":\"2021-02-10T17:01:52Z\",\"preprocessingComponentId\":\"qekwanklpurl\",\"dataContext\":\"djh\",\"jobInputType\":\"mlflow_model\",\"uri\":\"jse\",\"columns\":{\"urdon\":\"yn\",\"swknpdrgn\":\"gobxblrdolen\",\"fqckie\":\"zaofro\",\"jyoybkqftusdw\":\"yr\"}}") + "{\"inputDataType\":\"Static\",\"preprocessingComponentId\":\"uyqaeohpj\",\"windowEnd\":\"2021-04-19T12:45:15Z\",\"windowStart\":\"2020-12-23T08:12:18Z\",\"columns\":{\"oxae\":\"bvhhdaurgh\",\"joezlqxrkdknkobe\":\"bkhxj\"},\"dataContext\":\"mbozom\",\"jobInputType\":\"custom_model\",\"uri\":\"amicbigwcdgz\"}") .toObject(StaticInputData.class); - Assertions.assertEquals("djh", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("jse", model.uri()); - Assertions.assertEquals("yn", model.columns().get("urdon")); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T17:55:57Z"), model.windowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-10T17:01:52Z"), model.windowEnd()); - Assertions.assertEquals("qekwanklpurl", model.preprocessingComponentId()); + Assertions.assertEquals("bvhhdaurgh", model.columns().get("oxae")); + Assertions.assertEquals("mbozom", model.dataContext()); + Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); + Assertions.assertEquals("amicbigwcdgz", model.uri()); + Assertions.assertEquals("uyqaeohpj", model.preprocessingComponentId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-19T12:45:15Z"), model.windowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T08:12:18Z"), model.windowStart()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - StaticInputData model = new StaticInputData().withDataContext("djh") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("jse") - .withColumns(mapOf("urdon", "yn", "swknpdrgn", "gobxblrdolen", "fqckie", "zaofro", "jyoybkqftusdw", "yr")) - .withWindowStart(OffsetDateTime.parse("2021-07-21T17:55:57Z")) - .withWindowEnd(OffsetDateTime.parse("2021-02-10T17:01:52Z")) - .withPreprocessingComponentId("qekwanklpurl"); + StaticInputData model + = new StaticInputData().withColumns(mapOf("oxae", "bvhhdaurgh", "joezlqxrkdknkobe", "bkhxj")) + .withDataContext("mbozom") + .withJobInputType(JobInputType.CUSTOM_MODEL) + .withUri("amicbigwcdgz") + .withPreprocessingComponentId("uyqaeohpj") + .withWindowEnd(OffsetDateTime.parse("2021-04-19T12:45:15Z")) + .withWindowStart(OffsetDateTime.parse("2020-12-23T08:12:18Z")); model = BinaryData.fromObject(model).toObject(StaticInputData.class); - Assertions.assertEquals("djh", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("jse", model.uri()); - Assertions.assertEquals("yn", model.columns().get("urdon")); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T17:55:57Z"), model.windowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-10T17:01:52Z"), model.windowEnd()); - Assertions.assertEquals("qekwanklpurl", model.preprocessingComponentId()); + Assertions.assertEquals("bvhhdaurgh", model.columns().get("oxae")); + Assertions.assertEquals("mbozom", model.dataContext()); + Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); + Assertions.assertEquals("amicbigwcdgz", model.uri()); + Assertions.assertEquals("uyqaeohpj", model.preprocessingComponentId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-04-19T12:45:15Z"), model.windowEnd()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T08:12:18Z"), model.windowStart()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java index b65a9f0c8efd..db025e9953e5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -8,39 +8,34 @@ import com.azure.resourcemanager.machinelearning.models.ArmResourceId; import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; import org.junit.jupiter.api.Assertions; public final class StorageAccountDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { StorageAccountDetails model = BinaryData.fromString( - "{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"ibz\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"ee\",\"storageAccountType\":\"ph\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"jw\"}}}") + "{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{\"resourceId\":\"uwjuetaeburuvdmo\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"l\",\"storageAccountType\":\"ab\"}}") .toObject(StorageAccountDetails.class); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("ibz", model.systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("ee", model.systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("ph", model.systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("jw", model.userCreatedStorageAccount().armResourceId().resourceId()); + Assertions.assertTrue(model.systemCreatedStorageAccount().allowBlobPublicAccess()); + Assertions.assertEquals("uwjuetaeburuvdmo", model.systemCreatedStorageAccount().armResourceId().resourceId()); + Assertions.assertFalse(model.systemCreatedStorageAccount().storageAccountHnsEnabled()); + Assertions.assertEquals("l", model.systemCreatedStorageAccount().storageAccountName()); + Assertions.assertEquals("ab", model.systemCreatedStorageAccount().storageAccountType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { StorageAccountDetails model = new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("ibz")) + .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) + .withArmResourceId(new ArmResourceId().withResourceId("uwjuetaeburuvdmo")) .withStorageAccountHnsEnabled(false) - .withStorageAccountName("ee") - .withStorageAccountType("ph")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("jw"))); + .withStorageAccountName("l") + .withStorageAccountType("ab")); model = BinaryData.fromObject(model).toObject(StorageAccountDetails.class); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("ibz", model.systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("ee", model.systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("ph", model.systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("jw", model.userCreatedStorageAccount().armResourceId().resourceId()); + Assertions.assertTrue(model.systemCreatedStorageAccount().allowBlobPublicAccess()); + Assertions.assertEquals("uwjuetaeburuvdmo", model.systemCreatedStorageAccount().armResourceId().resourceId()); + Assertions.assertFalse(model.systemCreatedStorageAccount().storageAccountHnsEnabled()); + Assertions.assertEquals("l", model.systemCreatedStorageAccount().storageAccountName()); + Assertions.assertEquals("ab", model.systemCreatedStorageAccount().storageAccountType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StringArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StringArmPaginatedResultTests.java new file mode 100644 index 000000000000..2f24a6fba142 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StringArmPaginatedResultTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.StringArmPaginatedResult; +import org.junit.jupiter.api.Assertions; + +public final class StringArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StringArmPaginatedResult model + = BinaryData.fromString("{\"value\":[\"ecleqioulndhzyo\"],\"nextLink\":\"jhtollh\"}") + .toObject(StringArmPaginatedResult.class); + Assertions.assertEquals("ecleqioulndhzyo", model.value().get(0)); + Assertions.assertEquals("jhtollh", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java index 98fc1f7a1a40..123ce35a35c1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,24 +13,24 @@ public final class SweepJobLimitsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SweepJobLimits model = BinaryData.fromString( - "{\"jobLimitsType\":\"Sweep\",\"maxTotalTrials\":1216231012,\"maxConcurrentTrials\":734824046,\"trialTimeout\":\"PT31H24M17S\",\"timeout\":\"PT39H5M12S\"}") + "{\"jobLimitsType\":\"Sweep\",\"maxConcurrentTrials\":28688418,\"maxTotalTrials\":1470986104,\"trialTimeout\":\"PT65H17M27S\",\"timeout\":\"PT32M27S\"}") .toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT39H5M12S"), model.timeout()); - Assertions.assertEquals(1216231012, model.maxTotalTrials()); - Assertions.assertEquals(734824046, model.maxConcurrentTrials()); - Assertions.assertEquals(Duration.parse("PT31H24M17S"), model.trialTimeout()); + Assertions.assertEquals(Duration.parse("PT32M27S"), model.timeout()); + Assertions.assertEquals(28688418, model.maxConcurrentTrials()); + Assertions.assertEquals(1470986104, model.maxTotalTrials()); + Assertions.assertEquals(Duration.parse("PT65H17M27S"), model.trialTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SweepJobLimits model = new SweepJobLimits().withTimeout(Duration.parse("PT39H5M12S")) - .withMaxTotalTrials(1216231012) - .withMaxConcurrentTrials(734824046) - .withTrialTimeout(Duration.parse("PT31H24M17S")); + SweepJobLimits model = new SweepJobLimits().withTimeout(Duration.parse("PT32M27S")) + .withMaxConcurrentTrials(28688418) + .withMaxTotalTrials(1470986104) + .withTrialTimeout(Duration.parse("PT65H17M27S")); model = BinaryData.fromObject(model).toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT39H5M12S"), model.timeout()); - Assertions.assertEquals(1216231012, model.maxTotalTrials()); - Assertions.assertEquals(734824046, model.maxConcurrentTrials()); - Assertions.assertEquals(Duration.parse("PT31H24M17S"), model.trialTimeout()); + Assertions.assertEquals(Duration.parse("PT32M27S"), model.timeout()); + Assertions.assertEquals(28688418, model.maxConcurrentTrials()); + Assertions.assertEquals(1470986104, model.maxTotalTrials()); + Assertions.assertEquals(Duration.parse("PT65H17M27S"), model.trialTimeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java index 4df91076ea92..0d3cdaa0e129 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,50 +14,50 @@ public final class SynapseSparkPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SynapseSparkProperties model = BinaryData.fromString( - "{\"autoScaleProperties\":{\"minNodeCount\":217576922,\"enabled\":true,\"maxNodeCount\":1065975774},\"autoPauseProperties\":{\"delayInMinutes\":1088502083,\"enabled\":false},\"sparkVersion\":\"rncmazdfsqxh\",\"nodeCount\":982275641,\"nodeSize\":\"ejparn\",\"nodeSizeFamily\":\"grszrbwtdrcwg\",\"subscriptionId\":\"ll\",\"resourceGroup\":\"lhhfi\",\"workspaceName\":\"cfculzj\",\"poolName\":\"hp\"}") + "{\"autoScaleProperties\":{\"minNodeCount\":1717985540,\"enabled\":false,\"maxNodeCount\":1605492433},\"autoPauseProperties\":{\"delayInMinutes\":1730858261,\"enabled\":false},\"sparkVersion\":\"nacgdnx\",\"nodeCount\":1337134016,\"nodeSize\":\"mzrjj\",\"nodeSizeFamily\":\"jpzngdrzigecw\",\"subscriptionId\":\"dsqyuddkhwqdm\",\"resourceGroup\":\"heuyuunxmyevyi\",\"workspaceName\":\"eip\",\"poolName\":\"izej\"}") .toObject(SynapseSparkProperties.class); - Assertions.assertEquals(217576922, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1065975774, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1088502083, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(false, model.autoPauseProperties().enabled()); - Assertions.assertEquals("rncmazdfsqxh", model.sparkVersion()); - Assertions.assertEquals(982275641, model.nodeCount()); - Assertions.assertEquals("ejparn", model.nodeSize()); - Assertions.assertEquals("grszrbwtdrcwg", model.nodeSizeFamily()); - Assertions.assertEquals("ll", model.subscriptionId()); - Assertions.assertEquals("lhhfi", model.resourceGroup()); - Assertions.assertEquals("cfculzj", model.workspaceName()); - Assertions.assertEquals("hp", model.poolName()); + Assertions.assertEquals(1717985540, model.autoScaleProperties().minNodeCount()); + Assertions.assertFalse(model.autoScaleProperties().enabled()); + Assertions.assertEquals(1605492433, model.autoScaleProperties().maxNodeCount()); + Assertions.assertEquals(1730858261, model.autoPauseProperties().delayInMinutes()); + Assertions.assertFalse(model.autoPauseProperties().enabled()); + Assertions.assertEquals("nacgdnx", model.sparkVersion()); + Assertions.assertEquals(1337134016, model.nodeCount()); + Assertions.assertEquals("mzrjj", model.nodeSize()); + Assertions.assertEquals("jpzngdrzigecw", model.nodeSizeFamily()); + Assertions.assertEquals("dsqyuddkhwqdm", model.subscriptionId()); + Assertions.assertEquals("heuyuunxmyevyi", model.resourceGroup()); + Assertions.assertEquals("eip", model.workspaceName()); + Assertions.assertEquals("izej", model.poolName()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SynapseSparkProperties model = new SynapseSparkProperties() .withAutoScaleProperties( - new AutoScaleProperties().withMinNodeCount(217576922).withEnabled(true).withMaxNodeCount(1065975774)) - .withAutoPauseProperties(new AutoPauseProperties().withDelayInMinutes(1088502083).withEnabled(false)) - .withSparkVersion("rncmazdfsqxh") - .withNodeCount(982275641) - .withNodeSize("ejparn") - .withNodeSizeFamily("grszrbwtdrcwg") - .withSubscriptionId("ll") - .withResourceGroup("lhhfi") - .withWorkspaceName("cfculzj") - .withPoolName("hp"); + new AutoScaleProperties().withMinNodeCount(1717985540).withEnabled(false).withMaxNodeCount(1605492433)) + .withAutoPauseProperties(new AutoPauseProperties().withDelayInMinutes(1730858261).withEnabled(false)) + .withSparkVersion("nacgdnx") + .withNodeCount(1337134016) + .withNodeSize("mzrjj") + .withNodeSizeFamily("jpzngdrzigecw") + .withSubscriptionId("dsqyuddkhwqdm") + .withResourceGroup("heuyuunxmyevyi") + .withWorkspaceName("eip") + .withPoolName("izej"); model = BinaryData.fromObject(model).toObject(SynapseSparkProperties.class); - Assertions.assertEquals(217576922, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1065975774, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1088502083, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(false, model.autoPauseProperties().enabled()); - Assertions.assertEquals("rncmazdfsqxh", model.sparkVersion()); - Assertions.assertEquals(982275641, model.nodeCount()); - Assertions.assertEquals("ejparn", model.nodeSize()); - Assertions.assertEquals("grszrbwtdrcwg", model.nodeSizeFamily()); - Assertions.assertEquals("ll", model.subscriptionId()); - Assertions.assertEquals("lhhfi", model.resourceGroup()); - Assertions.assertEquals("cfculzj", model.workspaceName()); - Assertions.assertEquals("hp", model.poolName()); + Assertions.assertEquals(1717985540, model.autoScaleProperties().minNodeCount()); + Assertions.assertFalse(model.autoScaleProperties().enabled()); + Assertions.assertEquals(1605492433, model.autoScaleProperties().maxNodeCount()); + Assertions.assertEquals(1730858261, model.autoPauseProperties().delayInMinutes()); + Assertions.assertFalse(model.autoPauseProperties().enabled()); + Assertions.assertEquals("nacgdnx", model.sparkVersion()); + Assertions.assertEquals(1337134016, model.nodeCount()); + Assertions.assertEquals("mzrjj", model.nodeSize()); + Assertions.assertEquals("jpzngdrzigecw", model.nodeSizeFamily()); + Assertions.assertEquals("dsqyuddkhwqdm", model.subscriptionId()); + Assertions.assertEquals("heuyuunxmyevyi", model.resourceGroup()); + Assertions.assertEquals("eip", model.workspaceName()); + Assertions.assertEquals("izej", model.poolName()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java index a844ebf3f256..25995bde90cd 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class SystemCreatedAcrAccountTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SystemCreatedAcrAccount model = BinaryData.fromString( - "{\"acrAccountName\":\"cwmbupyvqyvli\",\"acrAccountSku\":\"ipsejbsvsia\",\"armResourceId\":{\"resourceId\":\"whddzydisnuepyw\"}}") + "{\"acrAccountName\":\"gj\",\"acrAccountSku\":\"gdknnqv\",\"armResourceId\":{\"resourceId\":\"nqntorudsgsahm\"}}") .toObject(SystemCreatedAcrAccount.class); - Assertions.assertEquals("cwmbupyvqyvli", model.acrAccountName()); - Assertions.assertEquals("ipsejbsvsia", model.acrAccountSku()); - Assertions.assertEquals("whddzydisnuepyw", model.armResourceId().resourceId()); + Assertions.assertEquals("gj", model.acrAccountName()); + Assertions.assertEquals("gdknnqv", model.acrAccountSku()); + Assertions.assertEquals("nqntorudsgsahm", model.armResourceId().resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SystemCreatedAcrAccount model = new SystemCreatedAcrAccount().withAcrAccountName("cwmbupyvqyvli") - .withAcrAccountSku("ipsejbsvsia") - .withArmResourceId(new ArmResourceId().withResourceId("whddzydisnuepyw")); + SystemCreatedAcrAccount model = new SystemCreatedAcrAccount().withAcrAccountName("gj") + .withAcrAccountSku("gdknnqv") + .withArmResourceId(new ArmResourceId().withResourceId("nqntorudsgsahm")); model = BinaryData.fromObject(model).toObject(SystemCreatedAcrAccount.class); - Assertions.assertEquals("cwmbupyvqyvli", model.acrAccountName()); - Assertions.assertEquals("ipsejbsvsia", model.acrAccountSku()); - Assertions.assertEquals("whddzydisnuepyw", model.armResourceId().resourceId()); + Assertions.assertEquals("gj", model.acrAccountName()); + Assertions.assertEquals("gdknnqv", model.acrAccountSku()); + Assertions.assertEquals("nqntorudsgsahm", model.armResourceId().resourceId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java index 7a41b4a1f727..6bc81c1e0ae2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,27 +13,27 @@ public final class SystemCreatedStorageAccountTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SystemCreatedStorageAccount model = BinaryData.fromString( - "{\"allowBlobPublicAccess\":true,\"armResourceId\":{\"resourceId\":\"ratjhdhzybspij\"},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"gdkkagvwukh\",\"storageAccountType\":\"s\"}") + "{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"kif\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"u\",\"storageAccountType\":\"jmqlgkfb\"}") .toObject(SystemCreatedStorageAccount.class); - Assertions.assertEquals(true, model.allowBlobPublicAccess()); - Assertions.assertEquals("ratjhdhzybspij", model.armResourceId().resourceId()); - Assertions.assertEquals(true, model.storageAccountHnsEnabled()); - Assertions.assertEquals("gdkkagvwukh", model.storageAccountName()); - Assertions.assertEquals("s", model.storageAccountType()); + Assertions.assertFalse(model.allowBlobPublicAccess()); + Assertions.assertEquals("kif", model.armResourceId().resourceId()); + Assertions.assertFalse(model.storageAccountHnsEnabled()); + Assertions.assertEquals("u", model.storageAccountName()); + Assertions.assertEquals("jmqlgkfb", model.storageAccountType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SystemCreatedStorageAccount model = new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) - .withArmResourceId(new ArmResourceId().withResourceId("ratjhdhzybspij")) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("gdkkagvwukh") - .withStorageAccountType("s"); + SystemCreatedStorageAccount model = new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) + .withArmResourceId(new ArmResourceId().withResourceId("kif")) + .withStorageAccountHnsEnabled(false) + .withStorageAccountName("u") + .withStorageAccountType("jmqlgkfb"); model = BinaryData.fromObject(model).toObject(SystemCreatedStorageAccount.class); - Assertions.assertEquals(true, model.allowBlobPublicAccess()); - Assertions.assertEquals("ratjhdhzybspij", model.armResourceId().resourceId()); - Assertions.assertEquals(true, model.storageAccountHnsEnabled()); - Assertions.assertEquals("gdkkagvwukh", model.storageAccountName()); - Assertions.assertEquals("s", model.storageAccountType()); + Assertions.assertFalse(model.allowBlobPublicAccess()); + Assertions.assertEquals("kif", model.armResourceId().resourceId()); + Assertions.assertFalse(model.storageAccountHnsEnabled()); + Assertions.assertEquals("u", model.storageAccountName()); + Assertions.assertEquals("jmqlgkfb", model.storageAccountType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java index 678383993288..57d856cbb958 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,7 @@ public final class SystemServiceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SystemService model = BinaryData - .fromString( - "{\"systemServiceType\":\"lpzbtzuykykipf\",\"publicIpAddress\":\"yepfn\",\"version\":\"mbezacfpztg\"}") + .fromString("{\"systemServiceType\":\"jvxlhmpmh\",\"publicIpAddress\":\"t\",\"version\":\"phqeofy\"}") .toObject(SystemService.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemService model = new SystemService(); - model = BinaryData.fromObject(model).toObject(SystemService.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java index 1cf5c12b64a4..48be13908539 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,50 +18,56 @@ public final class TableVerticalFeaturizationSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TableVerticalFeaturizationSettings model = BinaryData.fromString( - "{\"mode\":\"Off\",\"blockedTransformers\":[\"LabelEncoder\"],\"columnNameAndTypes\":{\"klkqnqvkixnmb\":\"ujcyohigimwdc\",\"zayspzvriet\":\"mecuyrzwim\"},\"transformerParams\":{\"smcwoxfaxd\":[{\"fields\":[\"zxplgtpvdvatlz\",\"gschnzrsbk\"],\"parameters\":\"dataovlzdm\"},{\"fields\":[\"fwsx\",\"fo\",\"uworimmov\"],\"parameters\":\"datade\"},{\"fields\":[\"mvhzfovanyrvaprt\",\"elgwewi\"],\"parameters\":\"datayaqandmymnqoqju\"},{\"fields\":[\"sfbpbvzop\",\"x\"],\"parameters\":\"datam\"}],\"riwmmtmqrxrzqv\":[{\"fields\":[\"fbsatroi\"],\"parameters\":\"dataesugmocpcjycbo\"},{\"fields\":[\"gttwfldsi\",\"or\"],\"parameters\":\"dataikcedpk\"}],\"laetscflwtjdtlr\":[{\"fields\":[\"yayub\",\"g\",\"bxiqahragpxmibpl\"],\"parameters\":\"datapoyryefqmwovyzt\"},{\"fields\":[\"omfpb\",\"ceeg\",\"yieztkutnjil\",\"ukkrehyh\"],\"parameters\":\"datajoduifvulxfaryrv\"},{\"fields\":[\"dezvjqw\",\"hoyiyaxqvjweiw\",\"czkddn\"],\"parameters\":\"datavbooqbmdqrxy\"}]},\"enableDnnFeaturization\":false,\"datasetLanguage\":\"oyycuxdtz\"}") + "{\"blockedTransformers\":[\"OneHotEncoder\",\"OneHotEncoder\",\"TextTargetEncoder\"],\"columnNameAndTypes\":{\"qxded\":\"jey\",\"shzz\":\"cfiwhagxsurejq\",\"ll\":\"g\"},\"enableDnnFeaturization\":true,\"mode\":\"Custom\",\"transformerParams\":{\"tvzuzhasup\":[{\"fields\":[\"dupnamglr\",\"uigdmfivjqterdq\"],\"parameters\":\"\\\"datagd\\\"\"},{\"fields\":[\"ghpcvrwqirvt\",\"tyhhmvfxlapja\"],\"parameters\":\"\\\"datadmkr\\\"\"},{\"fields\":[\"pgqvqo\",\"qlujqgi\",\"abwlyvx\",\"hpqvcts\"],\"parameters\":\"\\\"dataeuhwwskn\\\"\"}],\"ey\":[{\"fields\":[\"dpgzvzqazv\"],\"parameters\":\"\\\"dataarkptgongruatsyi\\\"\"},{\"fields\":[\"qheni\",\"beqngubabyjde\"],\"parameters\":\"\\\"datasc\\\"\"}],\"rdemdidack\":[{\"fields\":[\"mexmnvk\",\"muwrx\",\"n\",\"wmcpmrrdlhvdvm\"],\"parameters\":\"\\\"datahbeae\\\"\"},{\"fields\":[\"mhkdclacroczfm\",\"ner\",\"eluxzshxzez\",\"zuzudlevzskejc\"],\"parameters\":\"\\\"datafsgqkstyecupyuij\\\"\"},{\"fields\":[\"davsjcfmazpz\",\"qwuzvcmcokx\",\"zeku\",\"frjwucaon\"],\"parameters\":\"\\\"dataajbvbn\\\"\"}]},\"datasetLanguage\":\"dgzwdyd\"}") .toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("oyycuxdtz", model.datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.OFF, model.mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("ujcyohigimwdc", model.columnNameAndTypes().get("klkqnqvkixnmb")); - Assertions.assertEquals("zxplgtpvdvatlz", model.transformerParams().get("smcwoxfaxd").get(0).fields().get(0)); - Assertions.assertEquals(false, model.enableDnnFeaturization()); + Assertions.assertEquals("dgzwdyd", model.datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.ONE_HOT_ENCODER, model.blockedTransformers().get(0)); + Assertions.assertEquals("jey", model.columnNameAndTypes().get("qxded")); + Assertions.assertTrue(model.enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.CUSTOM, model.mode()); + Assertions.assertEquals("dupnamglr", model.transformerParams().get("tvzuzhasup").get(0).fields().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TableVerticalFeaturizationSettings model = new TableVerticalFeaturizationSettings() - .withDatasetLanguage("oyycuxdtz") - .withMode(FeaturizationMode.OFF) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.LABEL_ENCODER)) - .withColumnNameAndTypes(mapOf("klkqnqvkixnmb", "ujcyohigimwdc", "zayspzvriet", "mecuyrzwim")) - .withTransformerParams(mapOf("smcwoxfaxd", Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("zxplgtpvdvatlz", "gschnzrsbk")) - .withParameters("dataovlzdm"), - new ColumnTransformer().withFields(Arrays.asList("fwsx", "fo", "uworimmov")).withParameters("datade"), - new ColumnTransformer().withFields(Arrays.asList("mvhzfovanyrvaprt", "elgwewi")) - .withParameters("datayaqandmymnqoqju"), - new ColumnTransformer().withFields(Arrays.asList("sfbpbvzop", "x")).withParameters("datam")), - "riwmmtmqrxrzqv", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("fbsatroi")).withParameters("dataesugmocpcjycbo"), - new ColumnTransformer().withFields(Arrays.asList("gttwfldsi", "or")).withParameters("dataikcedpk")), - "laetscflwtjdtlr", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("yayub", "g", "bxiqahragpxmibpl")) - .withParameters("datapoyryefqmwovyzt"), - new ColumnTransformer().withFields(Arrays.asList("omfpb", "ceeg", "yieztkutnjil", "ukkrehyh")) - .withParameters("datajoduifvulxfaryrv"), - new ColumnTransformer().withFields(Arrays.asList("dezvjqw", "hoyiyaxqvjweiw", "czkddn")) - .withParameters("datavbooqbmdqrxy")))) - .withEnableDnnFeaturization(false); + TableVerticalFeaturizationSettings model + = new TableVerticalFeaturizationSettings().withDatasetLanguage("dgzwdyd") + .withBlockedTransformers(Arrays.asList(BlockedTransformers.ONE_HOT_ENCODER, + BlockedTransformers.ONE_HOT_ENCODER, BlockedTransformers.TEXT_TARGET_ENCODER)) + .withColumnNameAndTypes(mapOf("qxded", "jey", "shzz", "cfiwhagxsurejq", "ll", "g")) + .withEnableDnnFeaturization(true) + .withMode(FeaturizationMode.CUSTOM) + .withTransformerParams(mapOf("tvzuzhasup", + Arrays.asList( + new ColumnTransformer().withFields(Arrays.asList("dupnamglr", "uigdmfivjqterdq")) + .withParameters("\"datagd\""), + new ColumnTransformer().withFields(Arrays.asList("ghpcvrwqirvt", "tyhhmvfxlapja")) + .withParameters("\"datadmkr\""), + new ColumnTransformer().withFields(Arrays.asList("pgqvqo", "qlujqgi", "abwlyvx", "hpqvcts")) + .withParameters("\"dataeuhwwskn\"")), + "ey", + Arrays.asList( + new ColumnTransformer().withFields(Arrays.asList("dpgzvzqazv")) + .withParameters("\"dataarkptgongruatsyi\""), + new ColumnTransformer().withFields(Arrays.asList("qheni", "beqngubabyjde")) + .withParameters("\"datasc\"")), + "rdemdidack", + Arrays.asList( + new ColumnTransformer().withFields(Arrays.asList("mexmnvk", "muwrx", "n", "wmcpmrrdlhvdvm")) + .withParameters("\"datahbeae\""), + new ColumnTransformer() + .withFields(Arrays.asList("mhkdclacroczfm", "ner", "eluxzshxzez", "zuzudlevzskejc")) + .withParameters("\"datafsgqkstyecupyuij\""), + new ColumnTransformer() + .withFields(Arrays.asList("davsjcfmazpz", "qwuzvcmcokx", "zeku", "frjwucaon")) + .withParameters("\"dataajbvbn\"")))); model = BinaryData.fromObject(model).toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("oyycuxdtz", model.datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.OFF, model.mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("ujcyohigimwdc", model.columnNameAndTypes().get("klkqnqvkixnmb")); - Assertions.assertEquals("zxplgtpvdvatlz", model.transformerParams().get("smcwoxfaxd").get(0).fields().get(0)); - Assertions.assertEquals(false, model.enableDnnFeaturization()); + Assertions.assertEquals("dgzwdyd", model.datasetLanguage()); + Assertions.assertEquals(BlockedTransformers.ONE_HOT_ENCODER, model.blockedTransformers().get(0)); + Assertions.assertEquals("jey", model.columnNameAndTypes().get("qxded")); + Assertions.assertTrue(model.enableDnnFeaturization()); + Assertions.assertEquals(FeaturizationMode.CUSTOM, model.mode()); + Assertions.assertEquals("dupnamglr", model.transformerParams().get("tvzuzhasup").get(0).fields().get(0)); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java index 2057d2c563c9..5cf68d6ed758 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,33 +13,33 @@ public final class TableVerticalLimitSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TableVerticalLimitSettings model = BinaryData.fromString( - "{\"maxTrials\":1966845044,\"trialTimeout\":\"PT99H7M46S\",\"timeout\":\"PT45H54M58S\",\"maxConcurrentTrials\":595135013,\"maxCoresPerTrial\":1991622972,\"exitScore\":96.52498690136247,\"enableEarlyTermination\":true}") + "{\"enableEarlyTermination\":true,\"exitScore\":54.441076694847645,\"maxConcurrentTrials\":1858466374,\"maxCoresPerTrial\":1361315831,\"maxTrials\":1192184138,\"timeout\":\"PT175H32M54S\",\"trialTimeout\":\"PT68H53M36S\"}") .toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(1966845044, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT99H7M46S"), model.trialTimeout()); - Assertions.assertEquals(Duration.parse("PT45H54M58S"), model.timeout()); - Assertions.assertEquals(595135013, model.maxConcurrentTrials()); - Assertions.assertEquals(1991622972, model.maxCoresPerTrial()); - Assertions.assertEquals(96.52498690136247D, model.exitScore()); - Assertions.assertEquals(true, model.enableEarlyTermination()); + Assertions.assertTrue(model.enableEarlyTermination()); + Assertions.assertEquals(54.441076694847645D, model.exitScore()); + Assertions.assertEquals(1858466374, model.maxConcurrentTrials()); + Assertions.assertEquals(1361315831, model.maxCoresPerTrial()); + Assertions.assertEquals(1192184138, model.maxTrials()); + Assertions.assertEquals(Duration.parse("PT175H32M54S"), model.timeout()); + Assertions.assertEquals(Duration.parse("PT68H53M36S"), model.trialTimeout()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TableVerticalLimitSettings model = new TableVerticalLimitSettings().withMaxTrials(1966845044) - .withTrialTimeout(Duration.parse("PT99H7M46S")) - .withTimeout(Duration.parse("PT45H54M58S")) - .withMaxConcurrentTrials(595135013) - .withMaxCoresPerTrial(1991622972) - .withExitScore(96.52498690136247D) - .withEnableEarlyTermination(true); + TableVerticalLimitSettings model = new TableVerticalLimitSettings().withEnableEarlyTermination(true) + .withExitScore(54.441076694847645D) + .withMaxConcurrentTrials(1858466374) + .withMaxCoresPerTrial(1361315831) + .withMaxTrials(1192184138) + .withTimeout(Duration.parse("PT175H32M54S")) + .withTrialTimeout(Duration.parse("PT68H53M36S")); model = BinaryData.fromObject(model).toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(1966845044, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT99H7M46S"), model.trialTimeout()); - Assertions.assertEquals(Duration.parse("PT45H54M58S"), model.timeout()); - Assertions.assertEquals(595135013, model.maxConcurrentTrials()); - Assertions.assertEquals(1991622972, model.maxCoresPerTrial()); - Assertions.assertEquals(96.52498690136247D, model.exitScore()); - Assertions.assertEquals(true, model.enableEarlyTermination()); + Assertions.assertTrue(model.enableEarlyTermination()); + Assertions.assertEquals(54.441076694847645D, model.exitScore()); + Assertions.assertEquals(1858466374, model.maxConcurrentTrials()); + Assertions.assertEquals(1361315831, model.maxCoresPerTrial()); + Assertions.assertEquals(1192184138, model.maxTrials()); + Assertions.assertEquals(Duration.parse("PT175H32M54S"), model.timeout()); + Assertions.assertEquals(Duration.parse("PT68H53M36S"), model.trialTimeout()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java deleted file mode 100644 index e029e0d76052..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.TableVertical; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVertical model = BinaryData.fromString( - "{\"limitSettings\":{\"maxTrials\":193717810,\"trialTimeout\":\"PT32H39M11S\",\"timeout\":\"PT201H50M53S\",\"maxConcurrentTrials\":116078360,\"maxCoresPerTrial\":466957223,\"exitScore\":15.688608348249321,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"h\",\"aspiflei\",\"ixlmdbgic\"],\"weightColumnName\":\"fgsmdrjuqb\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"tokljmtznpaxw\",\"mode\":\"EvalMount\",\"description\":\"yqiprclt\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"gbsoljckmiigzb\",\"mode\":\"Download\",\"description\":\"gkdskswtiiq\"},\"validationDataSize\":64.45639483346135,\"testDataSize\":36.424158932077646,\"featurizationSettings\":{\"mode\":\"Custom\",\"blockedTransformers\":[\"NaiveBayes\",\"CatTargetEncoder\"],\"columnNameAndTypes\":{\"ru\":\"ykdnonaaxwmg\",\"iqbcbgv\":\"lqcwnynll\"},\"transformerParams\":{\"il\":[{\"fields\":[\"toxadhxuvjhxmnr\",\"s\",\"jcm\",\"twmlg\"],\"parameters\":\"datavnpvvd\"},{\"fields\":[\"naqyqipslzmvcds\",\"mwbitekdtfo\"],\"parameters\":\"datafiybxqich\"},{\"fields\":[\"fzdqekiv\",\"cpzcvdizul\",\"qtbhtr\"],\"parameters\":\"datapzl\"},{\"fields\":[\"f\"],\"parameters\":\"datamdutzfk\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"ccgndjgdprig\"}}") - .toObject(TableVertical.class); - Assertions.assertEquals(193717810, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT32H39M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT201H50M53S"), model.limitSettings().timeout()); - Assertions.assertEquals(116078360, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(466957223, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(15.688608348249321D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("h", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("fgsmdrjuqb", model.weightColumnName()); - Assertions.assertEquals("yqiprclt", model.validationData().description()); - Assertions.assertEquals("tokljmtznpaxw", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gkdskswtiiq", model.testData().description()); - Assertions.assertEquals("gbsoljckmiigzb", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(64.45639483346135D, model.validationDataSize()); - Assertions.assertEquals(36.424158932077646D, model.testDataSize()); - Assertions.assertEquals("ccgndjgdprig", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ykdnonaaxwmg", model.featurizationSettings().columnNameAndTypes().get("ru")); - Assertions.assertEquals("toxadhxuvjhxmnr", - model.featurizationSettings().transformerParams().get("il").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVertical model = new TableVertical() - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(193717810) - .withTrialTimeout(Duration.parse("PT32H39M11S")) - .withTimeout(Duration.parse("PT201H50M53S")) - .withMaxConcurrentTrials(116078360) - .withMaxCoresPerTrial(466957223) - .withExitScore(15.688608348249321D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("h", "aspiflei", "ixlmdbgic")) - .withWeightColumnName("fgsmdrjuqb") - .withValidationData(new MLTableJobInput().withDescription("yqiprclt") - .withUri("tokljmtznpaxw") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withTestData(new MLTableJobInput().withDescription("gkdskswtiiq") - .withUri("gbsoljckmiigzb") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(64.45639483346135D) - .withTestDataSize(36.424158932077646D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("ccgndjgdprig") - .withMode(FeaturizationMode.CUSTOM) - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.NAIVE_BAYES, BlockedTransformers.CAT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("ru", "ykdnonaaxwmg", "iqbcbgv", "lqcwnynll")) - .withTransformerParams(mapOf("il", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("toxadhxuvjhxmnr", "s", "jcm", "twmlg")) - .withParameters("datavnpvvd"), - new ColumnTransformer().withFields(Arrays.asList("naqyqipslzmvcds", "mwbitekdtfo")) - .withParameters("datafiybxqich"), - new ColumnTransformer().withFields(Arrays.asList("fzdqekiv", "cpzcvdizul", "qtbhtr")) - .withParameters("datapzl"), - new ColumnTransformer().withFields(Arrays.asList("f")).withParameters("datamdutzfk")))) - .withEnableDnnFeaturization(true)); - model = BinaryData.fromObject(model).toObject(TableVertical.class); - Assertions.assertEquals(193717810, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT32H39M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT201H50M53S"), model.limitSettings().timeout()); - Assertions.assertEquals(116078360, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(466957223, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(15.688608348249321D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("h", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("fgsmdrjuqb", model.weightColumnName()); - Assertions.assertEquals("yqiprclt", model.validationData().description()); - Assertions.assertEquals("tokljmtznpaxw", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gkdskswtiiq", model.testData().description()); - Assertions.assertEquals("gbsoljckmiigzb", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(64.45639483346135D, model.validationDataSize()); - Assertions.assertEquals(36.424158932077646D, model.testDataSize()); - Assertions.assertEquals("ccgndjgdprig", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ykdnonaaxwmg", model.featurizationSettings().columnNameAndTypes().get("ru")); - Assertions.assertEquals("toxadhxuvjhxmnr", - model.featurizationSettings().transformerParams().get("il").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java index 529ec59a2e01..7fb2391ff4c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java index f227185329ba..52db22f09084 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java index c3716ab04ec3..d8af1bd83de5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,25 +13,24 @@ public final class TargetUtilizationScaleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TargetUtilizationScaleSettings model = BinaryData.fromString( - "{\"scaleType\":\"TargetUtilization\",\"pollingInterval\":\"PT36H54M23S\",\"targetUtilizationPercentage\":633287339,\"minInstances\":227283067,\"maxInstances\":1292414700}") + "{\"scaleType\":\"TargetUtilization\",\"maxInstances\":1070456282,\"minInstances\":1103734557,\"pollingInterval\":\"PT68H57M5S\",\"targetUtilizationPercentage\":2105610940}") .toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT36H54M23S"), model.pollingInterval()); - Assertions.assertEquals(633287339, model.targetUtilizationPercentage()); - Assertions.assertEquals(227283067, model.minInstances()); - Assertions.assertEquals(1292414700, model.maxInstances()); + Assertions.assertEquals(1070456282, model.maxInstances()); + Assertions.assertEquals(1103734557, model.minInstances()); + Assertions.assertEquals(Duration.parse("PT68H57M5S"), model.pollingInterval()); + Assertions.assertEquals(2105610940, model.targetUtilizationPercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetUtilizationScaleSettings model - = new TargetUtilizationScaleSettings().withPollingInterval(Duration.parse("PT36H54M23S")) - .withTargetUtilizationPercentage(633287339) - .withMinInstances(227283067) - .withMaxInstances(1292414700); + TargetUtilizationScaleSettings model = new TargetUtilizationScaleSettings().withMaxInstances(1070456282) + .withMinInstances(1103734557) + .withPollingInterval(Duration.parse("PT68H57M5S")) + .withTargetUtilizationPercentage(2105610940); model = BinaryData.fromObject(model).toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT36H54M23S"), model.pollingInterval()); - Assertions.assertEquals(633287339, model.targetUtilizationPercentage()); - Assertions.assertEquals(227283067, model.minInstances()); - Assertions.assertEquals(1292414700, model.maxInstances()); + Assertions.assertEquals(1070456282, model.maxInstances()); + Assertions.assertEquals(1103734557, model.minInstances()); + Assertions.assertEquals(Duration.parse("PT68H57M5S"), model.pollingInterval()); + Assertions.assertEquals(2105610940, model.targetUtilizationPercentage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointRequestSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointRequestSettingsTests.java new file mode 100644 index 000000000000..f95d24233d08 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointRequestSettingsTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings; +import org.junit.jupiter.api.Assertions; + +public final class TeacherModelEndpointRequestSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TeacherModelEndpointRequestSettings model + = BinaryData.fromString("{\"minEndpointSuccessRatio\":66.82604785150804,\"requestBatchSize\":890603813}") + .toObject(TeacherModelEndpointRequestSettings.class); + Assertions.assertEquals(66.82604785150804D, model.minEndpointSuccessRatio()); + Assertions.assertEquals(890603813, model.requestBatchSize()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TeacherModelEndpointRequestSettings model + = new TeacherModelEndpointRequestSettings().withMinEndpointSuccessRatio(66.82604785150804D) + .withRequestBatchSize(890603813); + model = BinaryData.fromObject(model).toObject(TeacherModelEndpointRequestSettings.class); + Assertions.assertEquals(66.82604785150804D, model.minEndpointSuccessRatio()); + Assertions.assertEquals(890603813, model.requestBatchSize()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointTests.java new file mode 100644 index 000000000000..cac8e45ccf62 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelEndpointTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint; +import org.junit.jupiter.api.Assertions; + +public final class TeacherModelEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TeacherModelEndpoint model + = BinaryData.fromString("{\"endpointName\":\"svujnjktvolefcj\"}").toObject(TeacherModelEndpoint.class); + Assertions.assertEquals("svujnjktvolefcj", model.endpointName()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TeacherModelEndpoint model = new TeacherModelEndpoint().withEndpointName("svujnjktvolefcj"); + model = BinaryData.fromObject(model).toObject(TeacherModelEndpoint.class); + Assertions.assertEquals("svujnjktvolefcj", model.endpointName()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelSettingsTests.java new file mode 100644 index 000000000000..88d0200074a2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TeacherModelSettingsTests.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings; +import com.azure.resourcemanager.machinelearning.models.TeacherModelSettings; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class TeacherModelSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TeacherModelSettings model = BinaryData.fromString( + "{\"teacherModelEndpointRequestSettings\":{\"minEndpointSuccessRatio\":27.60362942387595,\"requestBatchSize\":196268442},\"teacherModelInferenceParameters\":{\"c\":\"tfbjampq\",\"nmxynlsuqbwzst\":\"a\",\"gvp\":\"k\",\"i\":\"trgjjkt\"}}") + .toObject(TeacherModelSettings.class); + Assertions.assertEquals(27.60362942387595D, + model.teacherModelEndpointRequestSettings().minEndpointSuccessRatio()); + Assertions.assertEquals(196268442, model.teacherModelEndpointRequestSettings().requestBatchSize()); + Assertions.assertEquals("tfbjampq", model.teacherModelInferenceParameters().get("c")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TeacherModelSettings model = new TeacherModelSettings() + .withTeacherModelEndpointRequestSettings( + new TeacherModelEndpointRequestSettings().withMinEndpointSuccessRatio(27.60362942387595D) + .withRequestBatchSize(196268442)) + .withTeacherModelInferenceParameters( + mapOf("c", "tfbjampq", "nmxynlsuqbwzst", "a", "gvp", "k", "i", "trgjjkt")); + model = BinaryData.fromObject(model).toObject(TeacherModelSettings.class); + Assertions.assertEquals(27.60362942387595D, + model.teacherModelEndpointRequestSettings().minEndpointSuccessRatio()); + Assertions.assertEquals(196268442, model.teacherModelEndpointRequestSettings().requestBatchSize()); + Assertions.assertEquals("tfbjampq", model.teacherModelInferenceParameters().get("c")); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java index 176a15fe0236..622cac721b9c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,17 +13,17 @@ public final class TensorFlowTests { public void testDeserialize() throws Exception { TensorFlow model = BinaryData .fromString( - "{\"distributionType\":\"TensorFlow\",\"workerCount\":116693991,\"parameterServerCount\":1398971753}") + "{\"distributionType\":\"TensorFlow\",\"parameterServerCount\":715322521,\"workerCount\":1082076426}") .toObject(TensorFlow.class); - Assertions.assertEquals(116693991, model.workerCount()); - Assertions.assertEquals(1398971753, model.parameterServerCount()); + Assertions.assertEquals(715322521, model.parameterServerCount()); + Assertions.assertEquals(1082076426, model.workerCount()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TensorFlow model = new TensorFlow().withWorkerCount(116693991).withParameterServerCount(1398971753); + TensorFlow model = new TensorFlow().withParameterServerCount(715322521).withWorkerCount(1082076426); model = BinaryData.fromObject(model).toObject(TensorFlow.class); - Assertions.assertEquals(116693991, model.workerCount()); - Assertions.assertEquals(1398971753, model.parameterServerCount()); + Assertions.assertEquals(715322521, model.parameterServerCount()); + Assertions.assertEquals(1082076426, model.workerCount()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java index ffc5b8444f02..5232545f013c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,48 +18,48 @@ public final class TextClassificationMultilabelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TextClassificationMultilabel model = BinaryData.fromString( - "{\"taskType\":\"TextClassificationMultilabel\",\"primaryMetric\":\"NormMacroRecall\",\"limitSettings\":{\"timeout\":\"PT197H4M37S\",\"maxTrials\":470605377,\"maxConcurrentTrials\":1118935796},\"featurizationSettings\":{\"datasetLanguage\":\"xagf\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"dbqjnye\",\"mode\":\"Direct\",\"description\":\"gxqqqasfeooqftp\"},\"logVerbosity\":\"NotSet\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"tarp\",\"mode\":\"ReadOnlyMount\",\"description\":\"liiqeanu\"},\"targetColumnName\":\"jno\"}") + "{\"taskType\":\"TextClassificationMultilabel\",\"featurizationSettings\":{\"datasetLanguage\":\"gyresgzsd\"},\"limitSettings\":{\"maxConcurrentTrials\":1976961680,\"maxTrials\":549589660,\"timeout\":\"PT50H38M11S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"chy\",\"description\":\"akvyrfbqvum\"},\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"logVerbosity\":\"Debug\",\"targetColumnName\":\"uepm\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"nzlpqmpftxefvu\",\"description\":\"l\"}}") .toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("liiqeanu", model.trainingData().description()); - Assertions.assertEquals("tarp", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("jno", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT197H4M37S"), model.limitSettings().timeout()); - Assertions.assertEquals(470605377, model.limitSettings().maxTrials()); - Assertions.assertEquals(1118935796, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("xagf", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("gxqqqasfeooqftp", model.validationData().description()); - Assertions.assertEquals("dbqjnye", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); + Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); + Assertions.assertEquals("uepm", model.targetColumnName()); + Assertions.assertEquals("l", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("nzlpqmpftxefvu", model.trainingData().uri()); + Assertions.assertEquals("gyresgzsd", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(1976961680, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(549589660, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT50H38M11S"), model.limitSettings().timeout()); + Assertions.assertEquals("akvyrfbqvum", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("chy", model.validationData().uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TextClassificationMultilabel model = new TextClassificationMultilabel().withLogVerbosity(LogVerbosity.NOT_SET) - .withTrainingData(new MLTableJobInput().withDescription("liiqeanu") - .withUri("tarp") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("jno") - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT197H4M37S")) - .withMaxTrials(470605377) - .withMaxConcurrentTrials(1118935796)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("xagf")) - .withValidationData(new MLTableJobInput().withDescription("gxqqqasfeooqftp") - .withUri("dbqjnye") - .withMode(InputDeliveryMode.DIRECT)); + TextClassificationMultilabel model = new TextClassificationMultilabel().withLogVerbosity(LogVerbosity.DEBUG) + .withTargetColumnName("uepm") + .withTrainingData(new MLTableJobInput().withDescription("l") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("nzlpqmpftxefvu")) + .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("gyresgzsd")) + .withLimitSettings(new NlpVerticalLimitSettings().withMaxConcurrentTrials(1976961680) + .withMaxTrials(549589660) + .withTimeout(Duration.parse("PT50H38M11S"))) + .withValidationData(new MLTableJobInput().withDescription("akvyrfbqvum") + .withMode(InputDeliveryMode.EVAL_DOWNLOAD) + .withUri("chy")); model = BinaryData.fromObject(model).toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("liiqeanu", model.trainingData().description()); - Assertions.assertEquals("tarp", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("jno", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT197H4M37S"), model.limitSettings().timeout()); - Assertions.assertEquals(470605377, model.limitSettings().maxTrials()); - Assertions.assertEquals(1118935796, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("xagf", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("gxqqqasfeooqftp", model.validationData().description()); - Assertions.assertEquals("dbqjnye", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); + Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); + Assertions.assertEquals("uepm", model.targetColumnName()); + Assertions.assertEquals("l", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); + Assertions.assertEquals("nzlpqmpftxefvu", model.trainingData().uri()); + Assertions.assertEquals("gyresgzsd", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(1976961680, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(549589660, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT50H38M11S"), model.limitSettings().timeout()); + Assertions.assertEquals("akvyrfbqvum", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("chy", model.validationData().uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java index d9611ad3bb0c..3293ddee426a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -19,51 +19,51 @@ public final class TextClassificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TextClassification model = BinaryData.fromString( - "{\"taskType\":\"TextClassification\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"limitSettings\":{\"timeout\":\"PT208H31M59S\",\"maxTrials\":1029367761,\"maxConcurrentTrials\":1396784838},\"featurizationSettings\":{\"datasetLanguage\":\"qdvnpyeevff\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"ujgtdowlxmwefcb\",\"mode\":\"Direct\",\"description\":\"hrtczwjcujyz\"},\"logVerbosity\":\"Debug\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"rjq\",\"mode\":\"ReadWriteMount\",\"description\":\"kuirxxe\"},\"targetColumnName\":\"iiircvn\"}") + "{\"taskType\":\"TextClassification\",\"featurizationSettings\":{\"datasetLanguage\":\"ewfhxwyrkbre\"},\"limitSettings\":{\"maxConcurrentTrials\":1504317434,\"maxTrials\":1250431077,\"timeout\":\"PT46H54M3S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"mkaeplrajubow\",\"description\":\"wevtjrieikmwla\"},\"primaryMetric\":\"NormMacroRecall\",\"logVerbosity\":\"Critical\",\"targetColumnName\":\"syx\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"bmtredscnns\",\"description\":\"cyyuvtzrxzhclec\"}}") .toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("kuirxxe", model.trainingData().description()); - Assertions.assertEquals("rjq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("iiircvn", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(Duration.parse("PT208H31M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(1029367761, model.limitSettings().maxTrials()); - Assertions.assertEquals(1396784838, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qdvnpyeevff", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("hrtczwjcujyz", model.validationData().description()); - Assertions.assertEquals("ujgtdowlxmwefcb", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); + Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); + Assertions.assertEquals("syx", model.targetColumnName()); + Assertions.assertEquals("cyyuvtzrxzhclec", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); + Assertions.assertEquals("bmtredscnns", model.trainingData().uri()); + Assertions.assertEquals("ewfhxwyrkbre", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(1504317434, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(1250431077, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT46H54M3S"), model.limitSettings().timeout()); + Assertions.assertEquals("wevtjrieikmwla", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.validationData().mode()); + Assertions.assertEquals("mkaeplrajubow", model.validationData().uri()); + Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TextClassification model = new TextClassification().withLogVerbosity(LogVerbosity.DEBUG) - .withTrainingData(new MLTableJobInput().withDescription("kuirxxe") - .withUri("rjq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withTargetColumnName("iiircvn") - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT208H31M59S")) - .withMaxTrials(1029367761) - .withMaxConcurrentTrials(1396784838)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("qdvnpyeevff")) - .withValidationData(new MLTableJobInput().withDescription("hrtczwjcujyz") - .withUri("ujgtdowlxmwefcb") - .withMode(InputDeliveryMode.DIRECT)); + TextClassification model = new TextClassification().withLogVerbosity(LogVerbosity.CRITICAL) + .withTargetColumnName("syx") + .withTrainingData(new MLTableJobInput().withDescription("cyyuvtzrxzhclec") + .withMode(InputDeliveryMode.DOWNLOAD) + .withUri("bmtredscnns")) + .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("ewfhxwyrkbre")) + .withLimitSettings(new NlpVerticalLimitSettings().withMaxConcurrentTrials(1504317434) + .withMaxTrials(1250431077) + .withTimeout(Duration.parse("PT46H54M3S"))) + .withValidationData(new MLTableJobInput().withDescription("wevtjrieikmwla") + .withMode(InputDeliveryMode.READ_WRITE_MOUNT) + .withUri("mkaeplrajubow")) + .withPrimaryMetric(ClassificationPrimaryMetrics.NORM_MACRO_RECALL); model = BinaryData.fromObject(model).toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("kuirxxe", model.trainingData().description()); - Assertions.assertEquals("rjq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("iiircvn", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(Duration.parse("PT208H31M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(1029367761, model.limitSettings().maxTrials()); - Assertions.assertEquals(1396784838, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qdvnpyeevff", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("hrtczwjcujyz", model.validationData().description()); - Assertions.assertEquals("ujgtdowlxmwefcb", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); + Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); + Assertions.assertEquals("syx", model.targetColumnName()); + Assertions.assertEquals("cyyuvtzrxzhclec", model.trainingData().description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); + Assertions.assertEquals("bmtredscnns", model.trainingData().uri()); + Assertions.assertEquals("ewfhxwyrkbre", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(1504317434, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(1250431077, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT46H54M3S"), model.limitSettings().timeout()); + Assertions.assertEquals("wevtjrieikmwla", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.validationData().mode()); + Assertions.assertEquals("mkaeplrajubow", model.validationData().uri()); + Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java index 0c882e06daf9..93cdc1e0bbcb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -18,48 +18,48 @@ public final class TextNerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TextNer model = BinaryData.fromString( - "{\"taskType\":\"TextNER\",\"primaryMetric\":\"Accuracy\",\"limitSettings\":{\"timeout\":\"PT136H33M44S\",\"maxTrials\":911733513,\"maxConcurrentTrials\":1407364852},\"featurizationSettings\":{\"datasetLanguage\":\"y\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"evaebzm\",\"mode\":\"Download\",\"description\":\"rjkejv\"},\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ogzougxbxxgj\",\"mode\":\"ReadOnlyMount\",\"description\":\"hiv\"},\"targetColumnName\":\"rmtenfdvdoearywu\"}") + "{\"taskType\":\"TextNER\",\"featurizationSettings\":{\"datasetLanguage\":\"uxyprhfcaeooifqd\"},\"limitSettings\":{\"maxConcurrentTrials\":2133613058,\"maxTrials\":288723186,\"timeout\":\"PT60H42M37S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"momfecorkfroc\",\"description\":\"mx\"},\"primaryMetric\":\"Accuracy\",\"logVerbosity\":\"NotSet\",\"targetColumnName\":\"zbjesylslur\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"ygpnyhgdzuqsca\",\"description\":\"yvouprsytq\"}}") .toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("hiv", model.trainingData().description()); - Assertions.assertEquals("ogzougxbxxgj", model.trainingData().uri()); + Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); + Assertions.assertEquals("zbjesylslur", model.targetColumnName()); + Assertions.assertEquals("yvouprsytq", model.trainingData().description()); Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rmtenfdvdoearywu", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT136H33M44S"), model.limitSettings().timeout()); - Assertions.assertEquals(911733513, model.limitSettings().maxTrials()); - Assertions.assertEquals(1407364852, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("y", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("rjkejv", model.validationData().description()); - Assertions.assertEquals("evaebzm", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("ygpnyhgdzuqsca", model.trainingData().uri()); + Assertions.assertEquals("uxyprhfcaeooifqd", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(2133613058, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(288723186, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT60H42M37S"), model.limitSettings().timeout()); + Assertions.assertEquals("mx", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("momfecorkfroc", model.validationData().uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TextNer model = new TextNer().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("hiv") - .withUri("ogzougxbxxgj") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("rmtenfdvdoearywu") - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT136H33M44S")) - .withMaxTrials(911733513) - .withMaxConcurrentTrials(1407364852)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("y")) - .withValidationData(new MLTableJobInput().withDescription("rjkejv") - .withUri("evaebzm") - .withMode(InputDeliveryMode.DOWNLOAD)); + TextNer model = new TextNer().withLogVerbosity(LogVerbosity.NOT_SET) + .withTargetColumnName("zbjesylslur") + .withTrainingData(new MLTableJobInput().withDescription("yvouprsytq") + .withMode(InputDeliveryMode.READ_ONLY_MOUNT) + .withUri("ygpnyhgdzuqsca")) + .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("uxyprhfcaeooifqd")) + .withLimitSettings(new NlpVerticalLimitSettings().withMaxConcurrentTrials(2133613058) + .withMaxTrials(288723186) + .withTimeout(Duration.parse("PT60H42M37S"))) + .withValidationData(new MLTableJobInput().withDescription("mx") + .withMode(InputDeliveryMode.EVAL_DOWNLOAD) + .withUri("momfecorkfroc")); model = BinaryData.fromObject(model).toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("hiv", model.trainingData().description()); - Assertions.assertEquals("ogzougxbxxgj", model.trainingData().uri()); + Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); + Assertions.assertEquals("zbjesylslur", model.targetColumnName()); + Assertions.assertEquals("yvouprsytq", model.trainingData().description()); Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rmtenfdvdoearywu", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT136H33M44S"), model.limitSettings().timeout()); - Assertions.assertEquals(911733513, model.limitSettings().maxTrials()); - Assertions.assertEquals(1407364852, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("y", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("rjkejv", model.validationData().description()); - Assertions.assertEquals("evaebzm", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("ygpnyhgdzuqsca", model.trainingData().uri()); + Assertions.assertEquals("uxyprhfcaeooifqd", model.featurizationSettings().datasetLanguage()); + Assertions.assertEquals(2133613058, model.limitSettings().maxConcurrentTrials()); + Assertions.assertEquals(288723186, model.limitSettings().maxTrials()); + Assertions.assertEquals(Duration.parse("PT60H42M37S"), model.limitSettings().timeout()); + Assertions.assertEquals("mx", model.validationData().description()); + Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); + Assertions.assertEquals("momfecorkfroc", model.validationData().uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java index 85aed1311f37..22f20cd5b399 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,14 @@ public final class TmpfsOptionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TmpfsOptions model = BinaryData.fromString("{\"size\":1684202361}").toObject(TmpfsOptions.class); - Assertions.assertEquals(1684202361, model.size()); + TmpfsOptions model = BinaryData.fromString("{\"size\":1519640068}").toObject(TmpfsOptions.class); + Assertions.assertEquals(1519640068, model.size()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TmpfsOptions model = new TmpfsOptions().withSize(1684202361); + TmpfsOptions model = new TmpfsOptions().withSize(1519640068); model = BinaryData.fromObject(model).toObject(TmpfsOptions.class); - Assertions.assertEquals(1684202361, model.size()); + Assertions.assertEquals(1519640068, model.size()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java index c4f03675c279..bfbc0088c050 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,15 +12,15 @@ public final class TopNFeaturesByAttributionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TopNFeaturesByAttribution model - = BinaryData.fromString("{\"filterType\":\"TopNByAttribution\",\"top\":868397774}") + = BinaryData.fromString("{\"filterType\":\"TopNByAttribution\",\"top\":1655707346}") .toObject(TopNFeaturesByAttribution.class); - Assertions.assertEquals(868397774, model.top()); + Assertions.assertEquals(1655707346, model.top()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TopNFeaturesByAttribution model = new TopNFeaturesByAttribution().withTop(868397774); + TopNFeaturesByAttribution model = new TopNFeaturesByAttribution().withTop(1655707346); model = BinaryData.fromObject(model).toObject(TopNFeaturesByAttribution.class); - Assertions.assertEquals(868397774, model.top()); + Assertions.assertEquals(1655707346, model.top()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java index 9129497afac9..3940bcb05d56 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -15,40 +15,39 @@ public final class TrainingSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TrainingSettings model = BinaryData.fromString( - "{\"enableOnnxCompatibleModels\":true,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":20.375480617497665,\"stackMetaLearnerKWargs\":\"datauhktq\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT238H33M9S\",\"enableModelExplainability\":false,\"enableDnnTraining\":true}") + "{\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT56H51M36S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"\\\"dataim\\\"\",\"stackMetaLearnerTrainPercentage\":23.355892277748282,\"stackMetaLearnerType\":\"LogisticRegressionCV\"}}") .toObject(TrainingSettings.class); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, + Assertions.assertFalse(model.enableDnnTraining()); + Assertions.assertFalse(model.enableModelExplainability()); + Assertions.assertTrue(model.enableOnnxCompatibleModels()); + Assertions.assertFalse(model.enableStackEnsemble()); + Assertions.assertFalse(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT56H51M36S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(23.355892277748282D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION_CV, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.375480617497665D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT238H33M9S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TrainingSettings model = new TrainingSettings().withEnableOnnxCompatibleModels(true) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(20.375480617497665D) - .withStackMetaLearnerKWargs("datauhktq")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT238H33M9S")) + TrainingSettings model = new TrainingSettings().withEnableDnnTraining(false) .withEnableModelExplainability(false) - .withEnableDnnTraining(true); + .withEnableOnnxCompatibleModels(true) + .withEnableStackEnsemble(false) + .withEnableVoteEnsemble(false) + .withEnsembleModelDownloadTimeout(Duration.parse("PT56H51M36S")) + .withStackEnsembleSettings(new StackEnsembleSettings().withStackMetaLearnerKWargs("\"dataim\"") + .withStackMetaLearnerTrainPercentage(23.355892277748282D) + .withStackMetaLearnerType(StackMetaLearnerType.LOGISTIC_REGRESSION_CV)); model = BinaryData.fromObject(model).toObject(TrainingSettings.class); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, + Assertions.assertFalse(model.enableDnnTraining()); + Assertions.assertFalse(model.enableModelExplainability()); + Assertions.assertTrue(model.enableOnnxCompatibleModels()); + Assertions.assertFalse(model.enableStackEnsemble()); + Assertions.assertFalse(model.enableVoteEnsemble()); + Assertions.assertEquals(Duration.parse("PT56H51M36S"), model.ensembleModelDownloadTimeout()); + Assertions.assertEquals(23.355892277748282D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); + Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION_CV, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.375480617497665D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT238H33M9S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java index f55e6752c2ee..241b7877cc6f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,20 +12,21 @@ public final class TriggerBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TriggerBase model = BinaryData.fromString( - "{\"triggerType\":\"TriggerBase\",\"endTime\":\"jadhqoawj\",\"startTime\":\"yueayfbpcmsp\",\"timeZone\":\"yrrueqth\"}") + "{\"triggerType\":\"TriggerBase\",\"endTime\":\"bhfckdvezcrcssb\",\"startTime\":\"ddubbnqfblhkal\",\"timeZone\":\"pavawugiqjtio\"}") .toObject(TriggerBase.class); - Assertions.assertEquals("jadhqoawj", model.endTime()); - Assertions.assertEquals("yueayfbpcmsp", model.startTime()); - Assertions.assertEquals("yrrueqth", model.timeZone()); + Assertions.assertEquals("bhfckdvezcrcssb", model.endTime()); + Assertions.assertEquals("ddubbnqfblhkal", model.startTime()); + Assertions.assertEquals("pavawugiqjtio", model.timeZone()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TriggerBase model - = new TriggerBase().withEndTime("jadhqoawj").withStartTime("yueayfbpcmsp").withTimeZone("yrrueqth"); + TriggerBase model = new TriggerBase().withEndTime("bhfckdvezcrcssb") + .withStartTime("ddubbnqfblhkal") + .withTimeZone("pavawugiqjtio"); model = BinaryData.fromObject(model).toObject(TriggerBase.class); - Assertions.assertEquals("jadhqoawj", model.endTime()); - Assertions.assertEquals("yueayfbpcmsp", model.startTime()); - Assertions.assertEquals("yrrueqth", model.timeZone()); + Assertions.assertEquals("bhfckdvezcrcssb", model.endTime()); + Assertions.assertEquals("ddubbnqfblhkal", model.startTime()); + Assertions.assertEquals("pavawugiqjtio", model.timeZone()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java index d0da3ca5d682..ef4f3808b8e2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,21 @@ public final class TritonModelJobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TritonModelJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"triton_model\",\"uri\":\"zhdtrsyfe\",\"mode\":\"ReadWriteMount\",\"description\":\"yljdzyyrwnmwt\"}") + "{\"jobInputType\":\"triton_model\",\"mode\":\"Direct\",\"uri\":\"djhunhghcgawnr\",\"description\":\"quox\"}") .toObject(TritonModelJobInput.class); - Assertions.assertEquals("yljdzyyrwnmwt", model.description()); - Assertions.assertEquals("zhdtrsyfe", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("quox", model.description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("djhunhghcgawnr", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TritonModelJobInput model = new TritonModelJobInput().withDescription("yljdzyyrwnmwt") - .withUri("zhdtrsyfe") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); + TritonModelJobInput model = new TritonModelJobInput().withDescription("quox") + .withMode(InputDeliveryMode.DIRECT) + .withUri("djhunhghcgawnr"); model = BinaryData.fromObject(model).toObject(TritonModelJobInput.class); - Assertions.assertEquals("yljdzyyrwnmwt", model.description()); - Assertions.assertEquals("zhdtrsyfe", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("quox", model.description()); + Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("djhunhghcgawnr", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java index 773fa8b8701b..46ddbe5cf3d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,24 @@ public final class TritonModelJobOutputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TritonModelJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"triton_model\",\"uri\":\"ljknnkynkstdtfwh\",\"mode\":\"Upload\",\"description\":\"fxaqjyihjcwwv\"}") + "{\"jobOutputType\":\"triton_model\",\"assetName\":\"khkrc\",\"mode\":\"ReadWriteMount\",\"uri\":\"bvzarmq\",\"description\":\"po\"}") .toObject(TritonModelJobOutput.class); - Assertions.assertEquals("fxaqjyihjcwwv", model.description()); - Assertions.assertEquals("ljknnkynkstdtfwh", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); + Assertions.assertEquals("po", model.description()); + Assertions.assertEquals("khkrc", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("bvzarmq", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TritonModelJobOutput model = new TritonModelJobOutput().withDescription("fxaqjyihjcwwv") - .withUri("ljknnkynkstdtfwh") - .withMode(OutputDeliveryMode.UPLOAD); + TritonModelJobOutput model = new TritonModelJobOutput().withDescription("po") + .withAssetName("khkrc") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("bvzarmq"); model = BinaryData.fromObject(model).toObject(TritonModelJobOutput.class); - Assertions.assertEquals("fxaqjyihjcwwv", model.description()); - Assertions.assertEquals("ljknnkynkstdtfwh", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); + Assertions.assertEquals("po", model.description()); + Assertions.assertEquals("khkrc", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("bvzarmq", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java index bb3198194c4f..9e3af88f8ff0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,21 +12,21 @@ public final class TruncationSelectionPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TruncationSelectionPolicy model = BinaryData.fromString( - "{\"policyType\":\"TruncationSelection\",\"truncationPercentage\":2059662360,\"evaluationInterval\":281085668,\"delayEvaluation\":782879823}") + "{\"policyType\":\"TruncationSelection\",\"truncationPercentage\":1652520089,\"delayEvaluation\":355610537,\"evaluationInterval\":1675470439}") .toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(281085668, model.evaluationInterval()); - Assertions.assertEquals(782879823, model.delayEvaluation()); - Assertions.assertEquals(2059662360, model.truncationPercentage()); + Assertions.assertEquals(355610537, model.delayEvaluation()); + Assertions.assertEquals(1675470439, model.evaluationInterval()); + Assertions.assertEquals(1652520089, model.truncationPercentage()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TruncationSelectionPolicy model = new TruncationSelectionPolicy().withEvaluationInterval(281085668) - .withDelayEvaluation(782879823) - .withTruncationPercentage(2059662360); + TruncationSelectionPolicy model = new TruncationSelectionPolicy().withDelayEvaluation(355610537) + .withEvaluationInterval(1675470439) + .withTruncationPercentage(1652520089); model = BinaryData.fromObject(model).toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(281085668, model.evaluationInterval()); - Assertions.assertEquals(782879823, model.delayEvaluation()); - Assertions.assertEquals(2059662360, model.truncationPercentage()); + Assertions.assertEquals(355610537, model.delayEvaluation()); + Assertions.assertEquals(1675470439, model.evaluationInterval()); + Assertions.assertEquals(1652520089, model.truncationPercentage()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java index d6fed1b04cd5..e5c3b1e03674 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,13 +11,7 @@ public final class UpdateWorkspaceQuotasResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateWorkspaceQuotasResultInner model = BinaryData.fromString( - "{\"value\":[{\"id\":\"dybyxczfclhaa\",\"type\":\"babphlwrqlfk\",\"limit\":4312008787205173543,\"unit\":\"Count\",\"status\":\"OperationNotEnabledForRegion\"},{\"id\":\"mnyyazt\",\"type\":\"twwrqp\",\"limit\":2759149426383242118,\"unit\":\"Count\",\"status\":\"InvalidQuotaExceedsSubscriptionLimit\"}],\"nextLink\":\"iexzfeyue\"}") + "{\"value\":[{\"id\":\"m\",\"type\":\"zzjsnyfo\",\"limit\":1984029344419433302,\"unit\":\"Count\",\"status\":\"InvalidQuotaBelowClusterMinimum\"},{\"id\":\"ubeqkitt\",\"type\":\"glhxsoanguhb\",\"limit\":7472051440250061564,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"},{\"id\":\"neg\",\"type\":\"dtyzpx\",\"limit\":429340601940949834,\"unit\":\"Count\",\"status\":\"Undefined\"},{\"id\":\"em\",\"type\":\"upehs\",\"limit\":8802394955410834816,\"unit\":\"Count\",\"status\":\"OperationNotEnabledForRegion\"}],\"nextLink\":\"pezammpkapvnpeu\"}") .toObject(UpdateWorkspaceQuotasResultInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = new UpdateWorkspaceQuotasResultInner(); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotasResultInner.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java index 5e6308e7b2d4..b30dce8f9e96 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Status; import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas; import org.junit.jupiter.api.Assertions; @@ -13,18 +12,8 @@ public final class UpdateWorkspaceQuotasTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpdateWorkspaceQuotas model = BinaryData.fromString( - "{\"id\":\"ibx\",\"type\":\"wbhqwal\",\"limit\":4821082223595321199,\"unit\":\"Count\",\"status\":\"InvalidQuotaBelowClusterMinimum\"}") + "{\"id\":\"n\",\"type\":\"akeqnitromlc\",\"limit\":1592017672547136125,\"unit\":\"Count\",\"status\":\"Failure\"}") .toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(4821082223595321199L, model.limit()); - Assertions.assertEquals(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotas model = new UpdateWorkspaceQuotas().withLimit(4821082223595321199L) - .withStatus(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(4821082223595321199L, model.limit()); - Assertions.assertEquals(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM, model.status()); + Assertions.assertEquals(1592017672547136125L, model.limit()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java index 38e74cfaa8dc..79d45714ac83 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,31 +14,31 @@ public final class UriFileDataVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UriFileDataVersion model = BinaryData.fromString( - "{\"dataType\":\"uri_file\",\"dataUri\":\"vhkhpsp\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"yfaoexnguwnrdpu\",\"tags\":{\"ybsz\":\"ihsujtg\"},\"properties\":{\"yelrnh\":\"jxejpdcliqwzut\"}}") + "{\"dataType\":\"uri_file\",\"dataUri\":\"oaimlnw\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"l\",\"properties\":{\"lcsethwwnpj\":\"z\"},\"tags\":{\"fb\":\"zswpchwa\"}}") .toObject(UriFileDataVersion.class); - Assertions.assertEquals("yfaoexnguwnrdpu", model.description()); - Assertions.assertEquals("ihsujtg", model.tags().get("ybsz")); - Assertions.assertEquals("jxejpdcliqwzut", model.properties().get("yelrnh")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("vhkhpsp", model.dataUri()); + Assertions.assertEquals("l", model.description()); + Assertions.assertEquals("z", model.properties().get("lcsethwwnpj")); + Assertions.assertEquals("zswpchwa", model.tags().get("fb")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("oaimlnw", model.dataUri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UriFileDataVersion model = new UriFileDataVersion().withDescription("yfaoexnguwnrdpu") - .withTags(mapOf("ybsz", "ihsujtg")) - .withProperties(mapOf("yelrnh", "jxejpdcliqwzut")) - .withIsArchived(false) + UriFileDataVersion model = new UriFileDataVersion().withDescription("l") + .withProperties(mapOf("lcsethwwnpj", "z")) + .withTags(mapOf("fb", "zswpchwa")) .withIsAnonymous(false) - .withDataUri("vhkhpsp"); + .withIsArchived(true) + .withDataUri("oaimlnw"); model = BinaryData.fromObject(model).toObject(UriFileDataVersion.class); - Assertions.assertEquals("yfaoexnguwnrdpu", model.description()); - Assertions.assertEquals("ihsujtg", model.tags().get("ybsz")); - Assertions.assertEquals("jxejpdcliqwzut", model.properties().get("yelrnh")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("vhkhpsp", model.dataUri()); + Assertions.assertEquals("l", model.description()); + Assertions.assertEquals("z", model.properties().get("lcsethwwnpj")); + Assertions.assertEquals("zswpchwa", model.tags().get("fb")); + Assertions.assertFalse(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("oaimlnw", model.dataUri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java index b0d6f4a5f6fe..c42c121995b9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,22 +12,22 @@ public final class UriFileJobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UriFileJobInput model = BinaryData - .fromString( - "{\"jobInputType\":\"uri_file\",\"uri\":\"jt\",\"mode\":\"ReadWriteMount\",\"description\":\"z\"}") + UriFileJobInput model = BinaryData.fromString( + "{\"jobInputType\":\"uri_file\",\"mode\":\"Download\",\"uri\":\"ireimseobf\",\"description\":\"stcyilbvzmmxcjz\"}") .toObject(UriFileJobInput.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("jt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("stcyilbvzmmxcjz", model.description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); + Assertions.assertEquals("ireimseobf", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UriFileJobInput model - = new UriFileJobInput().withDescription("z").withUri("jt").withMode(InputDeliveryMode.READ_WRITE_MOUNT); + UriFileJobInput model = new UriFileJobInput().withDescription("stcyilbvzmmxcjz") + .withMode(InputDeliveryMode.DOWNLOAD) + .withUri("ireimseobf"); model = BinaryData.fromObject(model).toObject(UriFileJobInput.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("jt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("stcyilbvzmmxcjz", model.description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); + Assertions.assertEquals("ireimseobf", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java index d91cc4463d4a..7361356d21a9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,21 +13,24 @@ public final class UriFileJobOutputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UriFileJobOutput model = BinaryData.fromString( - "{\"jobOutputType\":\"uri_file\",\"uri\":\"yovqmqcudptoqwr\",\"mode\":\"ReadWriteMount\",\"description\":\"jthlokmx\"}") + "{\"jobOutputType\":\"uri_file\",\"assetName\":\"tsin\",\"mode\":\"ReadWriteMount\",\"uri\":\"vjyhdrxbrdvc\",\"description\":\"qwh\"}") .toObject(UriFileJobOutput.class); - Assertions.assertEquals("jthlokmx", model.description()); - Assertions.assertEquals("yovqmqcudptoqwr", model.uri()); + Assertions.assertEquals("qwh", model.description()); + Assertions.assertEquals("tsin", model.assetName()); Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("vjyhdrxbrdvc", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UriFileJobOutput model = new UriFileJobOutput().withDescription("jthlokmx") - .withUri("yovqmqcudptoqwr") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT); + UriFileJobOutput model = new UriFileJobOutput().withDescription("qwh") + .withAssetName("tsin") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("vjyhdrxbrdvc"); model = BinaryData.fromObject(model).toObject(UriFileJobOutput.class); - Assertions.assertEquals("jthlokmx", model.description()); - Assertions.assertEquals("yovqmqcudptoqwr", model.uri()); + Assertions.assertEquals("qwh", model.description()); + Assertions.assertEquals("tsin", model.assetName()); Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("vjyhdrxbrdvc", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java index bfeba02f5999..164121e28b9e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -14,33 +14,32 @@ public final class UriFolderDataVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UriFolderDataVersion model = BinaryData.fromString( - "{\"dataType\":\"uri_folder\",\"dataUri\":\"awfubkngejjxu\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"mo\",\"tags\":{\"fzcfdtstiax\":\"xuktdrsjtmnkxjou\",\"mlroiommemsoqgb\":\"yrnuhcfhepisqb\",\"bobaqca\":\"cyeqd\",\"xbj\":\"ebckcesrsixwnlpj\"},\"properties\":{\"yyfr\":\"y\",\"kidfhmlxrqkeknu\":\"idzfpsfy\",\"uwpuqpsrcekdvvo\":\"kqafzvptriysjrgt\",\"w\":\"dwedg\"}}") + "{\"dataType\":\"uri_folder\",\"dataUri\":\"usnfepgfewet\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"cxy\",\"properties\":{\"cxfhbcporxv\":\"djhlimm\",\"xfpxtgqscja\":\"cjzhqi\",\"qaz\":\"ftjuh\"},\"tags\":{\"wpijrajci\":\"gg\",\"ghfcfiwrxgkneuvy\":\"m\",\"hoxgsgbpf\":\"nzqodfvpg\",\"aqvlgafcqusr\":\"zdjtxvzflbqv\"}}") .toObject(UriFolderDataVersion.class); - Assertions.assertEquals("mo", model.description()); - Assertions.assertEquals("xuktdrsjtmnkxjou", model.tags().get("fzcfdtstiax")); - Assertions.assertEquals("y", model.properties().get("yyfr")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("awfubkngejjxu", model.dataUri()); + Assertions.assertEquals("cxy", model.description()); + Assertions.assertEquals("djhlimm", model.properties().get("cxfhbcporxv")); + Assertions.assertEquals("gg", model.tags().get("wpijrajci")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("usnfepgfewet", model.dataUri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UriFolderDataVersion model = new UriFolderDataVersion().withDescription("mo") - .withTags(mapOf("fzcfdtstiax", "xuktdrsjtmnkxjou", "mlroiommemsoqgb", "yrnuhcfhepisqb", "bobaqca", "cyeqd", - "xbj", "ebckcesrsixwnlpj")) - .withProperties( - mapOf("yyfr", "y", "kidfhmlxrqkeknu", "idzfpsfy", "uwpuqpsrcekdvvo", "kqafzvptriysjrgt", "w", "dwedg")) + UriFolderDataVersion model = new UriFolderDataVersion().withDescription("cxy") + .withProperties(mapOf("cxfhbcporxv", "djhlimm", "xfpxtgqscja", "cjzhqi", "qaz", "ftjuh")) + .withTags(mapOf("wpijrajci", "gg", "ghfcfiwrxgkneuvy", "m", "hoxgsgbpf", "nzqodfvpg", "aqvlgafcqusr", + "zdjtxvzflbqv")) + .withIsAnonymous(true) .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("awfubkngejjxu"); + .withDataUri("usnfepgfewet"); model = BinaryData.fromObject(model).toObject(UriFolderDataVersion.class); - Assertions.assertEquals("mo", model.description()); - Assertions.assertEquals("xuktdrsjtmnkxjou", model.tags().get("fzcfdtstiax")); - Assertions.assertEquals("y", model.properties().get("yyfr")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("awfubkngejjxu", model.dataUri()); + Assertions.assertEquals("cxy", model.description()); + Assertions.assertEquals("djhlimm", model.properties().get("cxfhbcporxv")); + Assertions.assertEquals("gg", model.tags().get("wpijrajci")); + Assertions.assertTrue(model.isAnonymous()); + Assertions.assertTrue(model.isArchived()); + Assertions.assertEquals("usnfepgfewet", model.dataUri()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java index 08a49b6a2e98..e5e597e2a6a5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,22 +12,22 @@ public final class UriFolderJobInputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UriFolderJobInput model = BinaryData.fromString( - "{\"jobInputType\":\"uri_folder\",\"uri\":\"clvbwatza\",\"mode\":\"ReadWriteMount\",\"description\":\"jngoarsrdrw\"}") + UriFolderJobInput model = BinaryData + .fromString( + "{\"jobInputType\":\"uri_folder\",\"mode\":\"Download\",\"uri\":\"zexokjxeb\",\"description\":\"b\"}") .toObject(UriFolderJobInput.class); - Assertions.assertEquals("jngoarsrdrw", model.description()); - Assertions.assertEquals("clvbwatza", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("b", model.description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); + Assertions.assertEquals("zexokjxeb", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UriFolderJobInput model = new UriFolderJobInput().withDescription("jngoarsrdrw") - .withUri("clvbwatza") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); + UriFolderJobInput model + = new UriFolderJobInput().withDescription("b").withMode(InputDeliveryMode.DOWNLOAD).withUri("zexokjxeb"); model = BinaryData.fromObject(model).toObject(UriFolderJobInput.class); - Assertions.assertEquals("jngoarsrdrw", model.description()); - Assertions.assertEquals("clvbwatza", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); + Assertions.assertEquals("b", model.description()); + Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); + Assertions.assertEquals("zexokjxeb", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java index ea88cf31f921..b2e264c4fef1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,22 +12,25 @@ public final class UriFolderJobOutputTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UriFolderJobOutput model = BinaryData - .fromString( - "{\"jobOutputType\":\"uri_folder\",\"uri\":\"mzc\",\"mode\":\"Upload\",\"description\":\"pypimrxi\"}") + UriFolderJobOutput model = BinaryData.fromString( + "{\"jobOutputType\":\"uri_folder\",\"assetName\":\"xnmxgnmguzb\",\"mode\":\"Direct\",\"uri\":\"rbalkjnb\",\"description\":\"dhlltqstqkqsyg\"}") .toObject(UriFolderJobOutput.class); - Assertions.assertEquals("pypimrxi", model.description()); - Assertions.assertEquals("mzc", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); + Assertions.assertEquals("dhlltqstqkqsyg", model.description()); + Assertions.assertEquals("xnmxgnmguzb", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("rbalkjnb", model.uri()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UriFolderJobOutput model - = new UriFolderJobOutput().withDescription("pypimrxi").withUri("mzc").withMode(OutputDeliveryMode.UPLOAD); + UriFolderJobOutput model = new UriFolderJobOutput().withDescription("dhlltqstqkqsyg") + .withAssetName("xnmxgnmguzb") + .withMode(OutputDeliveryMode.DIRECT) + .withUri("rbalkjnb"); model = BinaryData.fromObject(model).toObject(UriFolderJobOutput.class); - Assertions.assertEquals("pypimrxi", model.description()); - Assertions.assertEquals("mzc", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); + Assertions.assertEquals("dhlltqstqkqsyg", model.description()); + Assertions.assertEquals("xnmxgnmguzb", model.assetName()); + Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); + Assertions.assertEquals("rbalkjnb", model.uri()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsArmPaginatedResultTests.java new file mode 100644 index 000000000000..0c4ef65d20fa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsArmPaginatedResultTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.implementation.models.UsageAndQuotaDetailsArmPaginatedResult; +import org.junit.jupiter.api.Assertions; + +public final class UsageAndQuotaDetailsArmPaginatedResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UsageAndQuotaDetailsArmPaginatedResult model = BinaryData.fromString( + "{\"value\":[{\"modelCollection\":\"gcesfdd\",\"quota\":7297279352475419475,\"usageDetails\":[{\"collectionQuotaUsage\":3810864796750074467,\"deploymentName\":\"ofkbcjzzww\",\"resourceGroup\":\"blbtdqzhixc\",\"usage\":1607853846220598001,\"workspaceName\":\"og\"},{\"collectionQuotaUsage\":1949628440570337993,\"deploymentName\":\"yqzyqep\",\"resourceGroup\":\"bzd\",\"usage\":737737645590311708,\"workspaceName\":\"ce\"},{\"collectionQuotaUsage\":4453458391857053211,\"deploymentName\":\"dpwmgwxwukfjvqg\",\"resourceGroup\":\"xseisvvvgyphhe\",\"usage\":3075264709053921645,\"workspaceName\":\"palec\"}]},{\"modelCollection\":\"lthrtzpuv\",\"quota\":6613040844918921597,\"usageDetails\":[{\"collectionQuotaUsage\":5896094617539973117,\"deploymentName\":\"quo\",\"resourceGroup\":\"ouurmu\",\"usage\":1305227371382956772,\"workspaceName\":\"qieh\"},{\"collectionQuotaUsage\":4200276678814209715,\"deploymentName\":\"ywwnaxoxlorxgs\",\"resourceGroup\":\"c\",\"usage\":3354061924659974563,\"workspaceName\":\"paglyyhrgmab\"},{\"collectionQuotaUsage\":3896534203437278989,\"deploymentName\":\"tyjukk\",\"resourceGroup\":\"putocr\",\"usage\":8534904317895853425,\"workspaceName\":\"cmdrgcuzjmvkrw\"},{\"collectionQuotaUsage\":6973749545284154281,\"deploymentName\":\"gcmlj\",\"resourceGroup\":\"sqimybqjvfiomhca\",\"usage\":404947305866194655,\"workspaceName\":\"zope\"}]},{\"modelCollection\":\"uf\",\"quota\":3264246079412963788,\"usageDetails\":[{\"collectionQuotaUsage\":1089211368196010373,\"deploymentName\":\"emosq\",\"resourceGroup\":\"sjbpwjwzqgipdzy\",\"usage\":6317775273368283841,\"workspaceName\":\"fpzcuudqhadx\"}]}],\"nextLink\":\"vl\"}") + .toObject(UsageAndQuotaDetailsArmPaginatedResult.class); + Assertions.assertEquals("gcesfdd", model.value().get(0).modelCollection()); + Assertions.assertEquals(7297279352475419475L, model.value().get(0).quota()); + Assertions.assertEquals(3810864796750074467L, + model.value().get(0).usageDetails().get(0).collectionQuotaUsage()); + Assertions.assertEquals("ofkbcjzzww", model.value().get(0).usageDetails().get(0).deploymentName()); + Assertions.assertEquals("blbtdqzhixc", model.value().get(0).usageDetails().get(0).resourceGroup()); + Assertions.assertEquals(1607853846220598001L, model.value().get(0).usageDetails().get(0).usage()); + Assertions.assertEquals("og", model.value().get(0).usageDetails().get(0).workspaceName()); + Assertions.assertEquals("vl", model.nextLink()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsInnerTests.java new file mode 100644 index 000000000000..f18f3189c916 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageAndQuotaDetailsInnerTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import org.junit.jupiter.api.Assertions; + +public final class UsageAndQuotaDetailsInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + UsageAndQuotaDetailsInner model = BinaryData.fromString( + "{\"modelCollection\":\"b\",\"quota\":820474150750382708,\"usageDetails\":[{\"collectionQuotaUsage\":2774829349106216787,\"deploymentName\":\"ncoqxtvytzq\",\"resourceGroup\":\"ldjvzmxy\",\"usage\":1994826426981889746,\"workspaceName\":\"tjvcszbdbr\"},{\"collectionQuotaUsage\":2715654813664756569,\"deploymentName\":\"tyolacbibt\",\"resourceGroup\":\"iecup\",\"usage\":6676206532374764182,\"workspaceName\":\"okrlnrpeylfiiuld\"},{\"collectionQuotaUsage\":5108611953185344776,\"deploymentName\":\"nhcx\",\"resourceGroup\":\"wvunknsgvx\",\"usage\":4736734738144059666,\"workspaceName\":\"atrtcqyfjvifbmo\"},{\"collectionQuotaUsage\":4884948259037745861,\"deploymentName\":\"yoytrcoufkqmbhuk\",\"resourceGroup\":\"pknvkivoz\",\"usage\":1634997084259945031,\"workspaceName\":\"meo\"}]}") + .toObject(UsageAndQuotaDetailsInner.class); + Assertions.assertEquals("b", model.modelCollection()); + Assertions.assertEquals(820474150750382708L, model.quota()); + Assertions.assertEquals(2774829349106216787L, model.usageDetails().get(0).collectionQuotaUsage()); + Assertions.assertEquals("ncoqxtvytzq", model.usageDetails().get(0).deploymentName()); + Assertions.assertEquals("ldjvzmxy", model.usageDetails().get(0).resourceGroup()); + Assertions.assertEquals(1994826426981889746L, model.usageDetails().get(0).usage()); + Assertions.assertEquals("tjvcszbdbr", model.usageDetails().get(0).workspaceName()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java index f8f3f626f8e2..4cd53347817f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,13 +11,7 @@ public final class UsageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageInner model = BinaryData.fromString( - "{\"id\":\"nkoukn\",\"amlWorkspaceLocation\":\"dwtiukbldngkp\",\"type\":\"ipazyxoegukgjnpi\",\"unit\":\"Count\",\"currentValue\":9071113490700391496,\"limit\":7306786683100499941,\"name\":{\"value\":\"yp\",\"localizedValue\":\"bpizcdrqjsdpydn\"}}") + "{\"id\":\"tztkajqhsnse\",\"amlWorkspaceLocation\":\"lislxyljzbkd\",\"type\":\"fjwxgvtkjctvrpea\",\"unit\":\"Count\",\"currentValue\":6670297569680675535,\"limit\":3669150342182756800,\"name\":{\"value\":\"qxsphtraitrmsuk\",\"localizedValue\":\"uytgcptctxpo\"}}") .toObject(UsageInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner(); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java index 0195859044b4..b15a1adcdc88 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,12 +11,6 @@ public final class UsageNameTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UsageName model - = BinaryData.fromString("{\"value\":\"hxdeoejz\",\"localizedValue\":\"w\"}").toObject(UsageName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName(); - model = BinaryData.fromObject(model).toObject(UsageName.class); + = BinaryData.fromString("{\"value\":\"yckmemfvr\",\"localizedValue\":\"lcl\"}").toObject(UsageName.class); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java index 869b6facf9c8..6ce62134abbc 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.Usage; @@ -21,16 +21,16 @@ public final class UsagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"id\":\"m\",\"amlWorkspaceLocation\":\"zbyfkoc\",\"type\":\"zdct\",\"unit\":\"Count\",\"currentValue\":3928826524604163892,\"limit\":9107747162621331635,\"name\":{\"value\":\"gxrolw\",\"localizedValue\":\"lks\"}}]}"; + = "{\"value\":[{\"id\":\"gbssqthcywyoqxp\",\"amlWorkspaceLocation\":\"ocfxlrzjjff\",\"type\":\"zm\",\"unit\":\"Count\",\"currentValue\":6143248396808627628,\"limit\":619309832671473796,\"name\":{\"value\":\"kygnepjyux\",\"localizedValue\":\"rphiyxjqranp\"}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.usages().list("fjczgohvpsuwi", com.azure.core.util.Context.NONE); + PagedIterable response = manager.usages().list("oqwmhcpujygntx", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java index b958eef621cc..6ba205709e66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -10,9 +10,9 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"a78b5bf0-7059-446f-a340-f6da79e18669\",\"clientId\":\"865ed2ee-b134-400f-ae82-0e9ea9358bf5\"}") - .toObject(UserAssignedIdentity.class); + UserAssignedIdentity model + = BinaryData.fromString("{\"principalId\":\"hsauuimjmvxied\",\"clientId\":\"gidyjrrf\"}") + .toObject(UserAssignedIdentity.class); } @org.junit.jupiter.api.Test diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.java deleted file mode 100644 index 6a60f23f291a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import org.junit.jupiter.api.Assertions; - -public final class UserCreatedAcrAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserCreatedAcrAccount model = BinaryData.fromString("{\"armResourceId\":{\"resourceId\":\"nldpxottd\"}}") - .toObject(UserCreatedAcrAccount.class); - Assertions.assertEquals("nldpxottd", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserCreatedAcrAccount model - = new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("nldpxottd")); - model = BinaryData.fromObject(model).toObject(UserCreatedAcrAccount.class); - Assertions.assertEquals("nldpxottd", model.armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.java deleted file mode 100644 index cccd5edd0611..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.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.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class UserCreatedStorageAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserCreatedStorageAccount model = BinaryData.fromString("{\"armResourceId\":{\"resourceId\":\"rfmzhwilz\"}}") - .toObject(UserCreatedStorageAccount.class); - Assertions.assertEquals("rfmzhwilz", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserCreatedStorageAccount model - = new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("rfmzhwilz")); - model = BinaryData.fromObject(model).toObject(UserCreatedStorageAccount.class); - Assertions.assertEquals("rfmzhwilz", model.armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java index a6544cd23012..5c9548a56c66 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java index 4ba738a2cb71..35bd5d8821c9 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,14 +11,14 @@ public final class VirtualMachineImageTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineImage model = BinaryData.fromString("{\"id\":\"eqi\"}").toObject(VirtualMachineImage.class); - Assertions.assertEquals("eqi", model.id()); + VirtualMachineImage model = BinaryData.fromString("{\"id\":\"sb\"}").toObject(VirtualMachineImage.class); + Assertions.assertEquals("sb", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VirtualMachineImage model = new VirtualMachineImage().withId("eqi"); + VirtualMachineImage model = new VirtualMachineImage().withId("sb"); model = BinaryData.fromObject(model).toObject(VirtualMachineImage.class); - Assertions.assertEquals("eqi", model.id()); + Assertions.assertEquals("sb", model.id()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java index 5bce03f11974..54c2ee4f92ca 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java @@ -1,80 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class VirtualMachineSizeListResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineSizeListResultInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ttgzfbis\",\"family\":\"bkh\",\"vCPUs\":2127806039,\"gpus\":1288949880,\"osVhdSizeMB\":38028181,\"maxResourceVolumeMB\":1859867828,\"memoryGB\":87.63753319479677,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":64.09894900073603,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":79.35964206973047,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":42.700623481202356,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"ankixzbinjeput\",\"mryw\",\"uzoqft\"]},{\"name\":\"qzrnkcqvyxlwhz\",\"family\":\"icohoqqnwvl\",\"vCPUs\":137418501,\"gpus\":240696862,\"osVhdSizeMB\":989865410,\"maxResourceVolumeMB\":1111271416,\"memoryGB\":89.24862714636545,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":16.817525955184955,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":34.762358205235685,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"xuconu\",\"szfkbe\"]},{\"name\":\"ewrmjmwvvjektc\",\"family\":\"enhwlrs\",\"vCPUs\":1160903159,\"gpus\":1611937755,\"osVhdSizeMB\":88674605,\"maxResourceVolumeMB\":1497747183,\"memoryGB\":0.6800349373471626,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":75.88369080213783,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"vfcivfsnkymuc\",\"qhjfbebr\",\"cxerf\"]}]}") + "{\"value\":[{\"name\":\"tnntqrcjqpzjvnp\",\"family\":\"rhpgsjb\",\"vCPUs\":2079410949,\"gpus\":1874325220,\"osVhdSizeMB\":199329303,\"maxResourceVolumeMB\":1153792857,\"memoryGB\":81.04600646529593,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":12.712520080857015,\"osType\":\"Windows\",\"vmTier\":\"Spot\"},{\"retailPrice\":36.52689308857462,\"osType\":\"Windows\",\"vmTier\":\"Spot\"},{\"retailPrice\":20.1317266402651,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"xphtjn\",\"ptjlrkdcyzhim\",\"ydtdtftmizuzjd\",\"rgyzcslazp\"]},{\"name\":\"qoyimxp\",\"family\":\"ktteagbga\",\"vCPUs\":491443006,\"gpus\":1049199142,\"osVhdSizeMB\":991008241,\"maxResourceVolumeMB\":710382698,\"memoryGB\":45.09232389477713,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":42.40668418907016,\"osType\":\"Linux\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"xglpwdjraurfshzn\"]}]}") .toObject(VirtualMachineSizeListResultInner.class); Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(64.09894900073603, + Assertions.assertEquals(12.712520080857015, model.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); Assertions.assertEquals(VMPriceOSType.WINDOWS, model.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("ankixzbinjeput", model.value().get(0).supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSizeListResultInner model = new VirtualMachineSizeListResultInner().withValue(Arrays.asList( - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(64.09894900073603) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(79.35964206973047) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(42.700623481202356) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("ankixzbinjeput", "mryw", "uzoqft")), - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(16.817525955184955) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(34.762358205235685) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("xuconu", "szfkbe")), - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList(new EstimatedVMPrice().withRetailPrice(75.88369080213783) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.SPOT)))) - .withSupportedComputeTypes(Arrays.asList("vfcivfsnkymuc", "qhjfbebr", "cxerf")))); - model = BinaryData.fromObject(model).toObject(VirtualMachineSizeListResultInner.class); - Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(64.09894900073603, - model.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, - model.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("ankixzbinjeput", model.value().get(0).supportedComputeTypes().get(0)); + Assertions.assertEquals(VMTier.SPOT, model.value().get(0).estimatedVMPrices().values().get(0).vmTier()); + Assertions.assertEquals("xphtjn", model.value().get(0).supportedComputeTypes().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java index 5d1c21f91557..08606d4aaf5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java @@ -1,59 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; +import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; import org.junit.jupiter.api.Assertions; public final class VirtualMachineSizeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VirtualMachineSize model = BinaryData.fromString( - "{\"name\":\"utttxfvjrbirp\",\"family\":\"epcyvahfnlj\",\"vCPUs\":561070013,\"gpus\":197436298,\"osVhdSizeMB\":1640197955,\"maxResourceVolumeMB\":9347197,\"memoryGB\":95.87972980881396,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":41.20565542900856,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":89.24458873666032,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":74.67569214860603,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":67.46272082562218,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"zz\",\"bijhtxfvgxbf\",\"mxnehmp\",\"ec\"]}") + "{\"name\":\"ttuhaaax\",\"family\":\"c\",\"vCPUs\":178534975,\"gpus\":1802555671,\"osVhdSizeMB\":1113871804,\"maxResourceVolumeMB\":668673483,\"memoryGB\":34.962382023378225,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":83.65065383361126,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"hwesrtja\"]}") .toObject(VirtualMachineSize.class); Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(41.20565542900856, model.estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("zz", model.supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSize model = new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(41.20565542900856) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(89.24458873666032) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(74.67569214860603) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice().withRetailPrice(67.46272082562218) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD)))) - .withSupportedComputeTypes(Arrays.asList("zz", "bijhtxfvgxbf", "mxnehmp", "ec")); - model = BinaryData.fromObject(model).toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(41.20565542900856, model.estimatedVMPrices().values().get(0).retailPrice()); + Assertions.assertEquals(83.65065383361126, model.estimatedVMPrices().values().get(0).retailPrice()); Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("zz", model.supportedComputeTypes().get(0)); + Assertions.assertEquals(VMTier.LOW_PRIORITY, model.estimatedVMPrices().values().get(0).vmTier()); + Assertions.assertEquals("hwesrtja", model.supportedComputeTypes().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java index 75e3ce53d1ba..42a27beae422 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java @@ -1,20 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.BillingCurrency; import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; import com.azure.resourcemanager.machinelearning.models.VMTier; +import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -25,26 +25,25 @@ public final class VirtualMachineSizesListWithResponseMockTests { @Test public void testListWithResponse() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"bvjh\",\"family\":\"pmqququxl\",\"vCPUs\":241242158,\"gpus\":1242468021,\"osVhdSizeMB\":650458247,\"maxResourceVolumeMB\":132435040,\"memoryGB\":31.054010870691286,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":9.524913939318969,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"qpfy\",\"vhtvijvwmrg\"]},{\"name\":\"zhrplcxfmbzqu\",\"family\":\"tqmh\",\"vCPUs\":1980172415,\"gpus\":1049452948,\"osVhdSizeMB\":939315181,\"maxResourceVolumeMB\":823035085,\"memoryGB\":7.69921960533233,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":69.40534502928313,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":80.17743221655657,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"fufkekzfk\",\"cxhsevmnkgghvsr\",\"jokvlwvbjsa\",\"xsv\"]}]}"; + = "{\"value\":[{\"name\":\"apbrwviovvyhso\",\"family\":\"avkfhyoigzwedf\",\"vCPUs\":1327205968,\"gpus\":1874549224,\"osVhdSizeMB\":181175739,\"maxResourceVolumeMB\":585669884,\"memoryGB\":60.652380312685125,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":45.24750927209794,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":96.70149498226317,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":23.84621552231021,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"chvqwhscvaqdxgel\"]},{\"name\":\"gftqkgavgoul\",\"family\":\"paylk\",\"vCPUs\":1759036580,\"gpus\":137856771,\"osVhdSizeMB\":1073253893,\"maxResourceVolumeMB\":1498339645,\"memoryGB\":36.563339172899255,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":45.44931635110174,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":1.5685567913388043,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":89.95037846442338,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":69.04735888259331,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"fofrfvhbbno\"]},{\"name\":\"kkrlkdouk\",\"family\":\"cmds\",\"vCPUs\":1991494532,\"gpus\":1153132025,\"osVhdSizeMB\":537487562,\"maxResourceVolumeMB\":1006354532,\"memoryGB\":92.22614354933626,\"lowPriorityCapable\":false,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":44.2049405569456,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":35.6716740080683,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"icesqpvmoxilh\"]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - VirtualMachineSizeListResult response = manager.virtualMachineSizes() - .listWithResponse("ksutacuctiha", com.azure.core.util.Context.NONE) - .getValue(); + VirtualMachineSizeListResult response + = manager.virtualMachineSizes().listWithResponse("tlachpfzs", com.azure.core.util.Context.NONE).getValue(); Assertions.assertEquals(BillingCurrency.USD, response.value().get(0).estimatedVMPrices().billingCurrency()); Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, response.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(9.524913939318969, + Assertions.assertEquals(45.24750927209794, response.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, + Assertions.assertEquals(VMPriceOSType.WINDOWS, response.value().get(0).estimatedVMPrices().values().get(0).osType()); Assertions.assertEquals(VMTier.STANDARD, response.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("qpfy", response.value().get(0).supportedComputeTypes().get(0)); + Assertions.assertEquals("chvqwhscvaqdxgel", response.value().get(0).supportedComputeTypes().get(0)); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java index b8642c8393a9..282d9fc1377d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -16,40 +16,40 @@ public final class VolumeDefinitionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeDefinition model = BinaryData.fromString( - "{\"type\":\"bind\",\"readOnly\":true,\"source\":\"q\",\"target\":\"qkqsygxiyneco\",\"consistency\":\"gzkheubanl\",\"bind\":{\"propagation\":\"pqcckqiawzlz\",\"createHostPath\":true,\"selinux\":\"lg\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":1215971610}}") + "{\"type\":\"bind\",\"readOnly\":false,\"source\":\"vguy\",\"target\":\"nxelrjkfzcde\",\"consistency\":\"wwezhyfkdilb\",\"bind\":{\"propagation\":\"qacsf\",\"createHostPath\":true,\"selinux\":\"tyb\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":1206586214}}") .toObject(VolumeDefinition.class); Assertions.assertEquals(VolumeDefinitionType.BIND, model.type()); - Assertions.assertEquals(true, model.readOnly()); - Assertions.assertEquals("q", model.source()); - Assertions.assertEquals("qkqsygxiyneco", model.target()); - Assertions.assertEquals("gzkheubanl", model.consistency()); - Assertions.assertEquals("pqcckqiawzlz", model.bind().propagation()); - Assertions.assertEquals(true, model.bind().createHostPath()); - Assertions.assertEquals("lg", model.bind().selinux()); - Assertions.assertEquals(true, model.volume().nocopy()); - Assertions.assertEquals(1215971610, model.tmpfs().size()); + Assertions.assertFalse(model.readOnly()); + Assertions.assertEquals("vguy", model.source()); + Assertions.assertEquals("nxelrjkfzcde", model.target()); + Assertions.assertEquals("wwezhyfkdilb", model.consistency()); + Assertions.assertEquals("qacsf", model.bind().propagation()); + Assertions.assertTrue(model.bind().createHostPath()); + Assertions.assertEquals("tyb", model.bind().selinux()); + Assertions.assertTrue(model.volume().nocopy()); + Assertions.assertEquals(1206586214, model.tmpfs().size()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumeDefinition model = new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(true) - .withSource("q") - .withTarget("qkqsygxiyneco") - .withConsistency("gzkheubanl") - .withBind(new BindOptions().withPropagation("pqcckqiawzlz").withCreateHostPath(true).withSelinux("lg")) + .withReadOnly(false) + .withSource("vguy") + .withTarget("nxelrjkfzcde") + .withConsistency("wwezhyfkdilb") + .withBind(new BindOptions().withPropagation("qacsf").withCreateHostPath(true).withSelinux("tyb")) .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(1215971610)); + .withTmpfs(new TmpfsOptions().withSize(1206586214)); model = BinaryData.fromObject(model).toObject(VolumeDefinition.class); Assertions.assertEquals(VolumeDefinitionType.BIND, model.type()); - Assertions.assertEquals(true, model.readOnly()); - Assertions.assertEquals("q", model.source()); - Assertions.assertEquals("qkqsygxiyneco", model.target()); - Assertions.assertEquals("gzkheubanl", model.consistency()); - Assertions.assertEquals("pqcckqiawzlz", model.bind().propagation()); - Assertions.assertEquals(true, model.bind().createHostPath()); - Assertions.assertEquals("lg", model.bind().selinux()); - Assertions.assertEquals(true, model.volume().nocopy()); - Assertions.assertEquals(1215971610, model.tmpfs().size()); + Assertions.assertFalse(model.readOnly()); + Assertions.assertEquals("vguy", model.source()); + Assertions.assertEquals("nxelrjkfzcde", model.target()); + Assertions.assertEquals("wwezhyfkdilb", model.consistency()); + Assertions.assertEquals("qacsf", model.bind().propagation()); + Assertions.assertTrue(model.bind().createHostPath()); + Assertions.assertEquals("tyb", model.bind().selinux()); + Assertions.assertTrue(model.volume().nocopy()); + Assertions.assertEquals(1206586214, model.tmpfs().size()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java index c5717dcfeab5..90645b82388d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,13 +12,13 @@ public final class VolumeOptionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VolumeOptions model = BinaryData.fromString("{\"nocopy\":false}").toObject(VolumeOptions.class); - Assertions.assertEquals(false, model.nocopy()); + Assertions.assertFalse(model.nocopy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VolumeOptions model = new VolumeOptions().withNocopy(false); model = BinaryData.fromObject(model).toObject(VolumeOptions.class); - Assertions.assertEquals(false, model.nocopy()); + Assertions.assertFalse(model.nocopy()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityDetailsTests.java new file mode 100644 index 000000000000..7f868a86a496 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityDetailsTests.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.PackageDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VulnerabilityDetailsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VulnerabilityDetails model = BinaryData.fromString( + "{\"cve\":\"tmkzjvkviirhgfgr\",\"cveUrl\":\"dpgra\",\"dueDate\":\"2021-03-02T16:22:17Z\",\"id\":\"bglbyvict\",\"packageDetails\":[{\"installPath\":\"xkjzwrgxffm\",\"installedVersion\":\"kwfbkgo\",\"name\":\"wopdbydpiz\",\"patchedVersion\":\"clnapxbiygnugjkn\"},{\"installPath\":\"mfcttux\",\"installedVersion\":\"yilflqoiquvrehmr\",\"name\":\"hvsujztc\",\"patchedVersion\":\"tqjtwhauu\"}],\"patchable\":true,\"providerId\":\"njle\",\"publishDate\":\"2021-03-23T16:05:03Z\",\"risk\":\"CRITICAL\",\"solution\":\"pddouifamowaziyn\",\"title\":\"lqwzdvpiwhxqsz\",\"vendorId\":\"maajquhuxylr\",\"vendorUrl\":\"m\"}") + .toObject(VulnerabilityDetails.class); + Assertions.assertEquals("tmkzjvkviirhgfgr", model.cve()); + Assertions.assertEquals("dpgra", model.cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T16:22:17Z"), model.dueDate()); + Assertions.assertEquals("xkjzwrgxffm", model.packageDetails().get(0).installPath()); + Assertions.assertEquals("kwfbkgo", model.packageDetails().get(0).installedVersion()); + Assertions.assertEquals("wopdbydpiz", model.packageDetails().get(0).name()); + Assertions.assertEquals("clnapxbiygnugjkn", model.packageDetails().get(0).patchedVersion()); + Assertions.assertTrue(model.patchable()); + Assertions.assertEquals("njle", model.providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T16:05:03Z"), model.publishDate()); + Assertions.assertEquals(VulnerabilityRisk.CRITICAL, model.risk()); + Assertions.assertEquals("pddouifamowaziyn", model.solution()); + Assertions.assertEquals("lqwzdvpiwhxqsz", model.title()); + Assertions.assertEquals("maajquhuxylr", model.vendorId()); + Assertions.assertEquals("m", model.vendorUrl()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VulnerabilityDetails model = new VulnerabilityDetails().withCve("tmkzjvkviirhgfgr") + .withCveUrl("dpgra") + .withDueDate(OffsetDateTime.parse("2021-03-02T16:22:17Z")) + .withPackageDetails(Arrays.asList( + new PackageDetails().withInstallPath("xkjzwrgxffm") + .withInstalledVersion("kwfbkgo") + .withName("wopdbydpiz") + .withPatchedVersion("clnapxbiygnugjkn"), + new PackageDetails().withInstallPath("mfcttux") + .withInstalledVersion("yilflqoiquvrehmr") + .withName("hvsujztc") + .withPatchedVersion("tqjtwhauu"))) + .withPatchable(true) + .withProviderId("njle") + .withPublishDate(OffsetDateTime.parse("2021-03-23T16:05:03Z")) + .withRisk(VulnerabilityRisk.CRITICAL) + .withSolution("pddouifamowaziyn") + .withTitle("lqwzdvpiwhxqsz") + .withVendorId("maajquhuxylr") + .withVendorUrl("m"); + model = BinaryData.fromObject(model).toObject(VulnerabilityDetails.class); + Assertions.assertEquals("tmkzjvkviirhgfgr", model.cve()); + Assertions.assertEquals("dpgra", model.cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-02T16:22:17Z"), model.dueDate()); + Assertions.assertEquals("xkjzwrgxffm", model.packageDetails().get(0).installPath()); + Assertions.assertEquals("kwfbkgo", model.packageDetails().get(0).installedVersion()); + Assertions.assertEquals("wopdbydpiz", model.packageDetails().get(0).name()); + Assertions.assertEquals("clnapxbiygnugjkn", model.packageDetails().get(0).patchedVersion()); + Assertions.assertTrue(model.patchable()); + Assertions.assertEquals("njle", model.providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-03-23T16:05:03Z"), model.publishDate()); + Assertions.assertEquals(VulnerabilityRisk.CRITICAL, model.risk()); + Assertions.assertEquals("pddouifamowaziyn", model.solution()); + Assertions.assertEquals("lqwzdvpiwhxqsz", model.title()); + Assertions.assertEquals("maajquhuxylr", model.vendorId()); + Assertions.assertEquals("m", model.vendorUrl()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityFindingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityFindingsTests.java new file mode 100644 index 000000000000..e9f10dd0fffe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VulnerabilityFindingsTests.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.PackageDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings; +import com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class VulnerabilityFindingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + VulnerabilityFindings model = BinaryData.fromString( + "{\"assetId\":\"chcxwaxfewzj\",\"criticalFindingsCount\":1116581331,\"data\":[{\"cve\":\"eqvhpsylkk\",\"cveUrl\":\"kbffmbmx\",\"dueDate\":\"2021-06-13T14:19:09Z\",\"id\":\"ywwpgjxsnptfuj\",\"packageDetails\":[{\"installPath\":\"aaoepttaqut\",\"installedVersion\":\"wemxswvruunzz\",\"name\":\"ehkfkimrtixok\",\"patchedVersion\":\"qyinl\"}],\"patchable\":false,\"providerId\":\"qwhix\",\"publishDate\":\"2021-11-10T00:22:24Z\",\"risk\":\"LOW\",\"solution\":\"hiyxgvelfclduc\",\"title\":\"irdsvuwcob\",\"vendorId\":\"gstmninwjizciln\",\"vendorUrl\":\"gshejjtbxqmulux\"},{\"cve\":\"qzvnersbycucr\",\"cveUrl\":\"amikzebrqbsm\",\"dueDate\":\"2021-08-06T20:36:14Z\",\"id\":\"qgfuhokzru\",\"packageDetails\":[{\"installPath\":\"hczznvf\",\"installedVersion\":\"cjsxjww\",\"name\":\"z\",\"patchedVersion\":\"mwmxqhndvnoamld\"},{\"installPath\":\"haohdjhhflzokxc\",\"installedVersion\":\"pelnjetag\",\"name\":\"sxoa\",\"patchedVersion\":\"tgzpnpb\"}],\"patchable\":true,\"providerId\":\"floccsrmozih\",\"publishDate\":\"2021-06-17T22:27:31Z\",\"risk\":\"HIGH\",\"solution\":\"xxpkyjcxc\",\"title\":\"grytfmpcyci\",\"vendorId\":\"mcayk\",\"vendorUrl\":\"noxuztrksx\"},{\"cve\":\"ndfcpfn\",\"cveUrl\":\"thjtwk\",\"dueDate\":\"2021-03-31T04:06:02Z\",\"id\":\"rxuzvoam\",\"packageDetails\":[{\"installPath\":\"iosmgbzahgxqdly\",\"installedVersion\":\"ltlaprltzkatbhj\",\"name\":\"nnbsoqeqa\",\"patchedVersion\":\"rvlagunbtgfebwln\"},{\"installPath\":\"hyreeu\",\"installedVersion\":\"qavbpdqmj\",\"name\":\"yyzglgouwtlmjjy\",\"patchedVersion\":\"j\"},{\"installPath\":\"obaxkjeytu\",\"installedVersion\":\"bfjkw\",\"name\":\"snkq\",\"patchedVersion\":\"syrq\"}],\"patchable\":false,\"providerId\":\"hdenxaulk\",\"publishDate\":\"2021-05-04T10:50:30Z\",\"risk\":\"CRITICAL\",\"solution\":\"fmjnnawtqa\",\"title\":\"xuckpggqoweyir\",\"vendorId\":\"lisn\",\"vendorUrl\":\"fl\"}],\"generatedTime\":\"2020-12-29T01:03:02Z\",\"highFindingsCount\":1682370359,\"lastScanDate\":\"2021-01-05T18:40:55Z\",\"scanner\":\"w\",\"source\":\"qxpxiwfcngjsaa\",\"totalFindingsCount\":2037372213}") + .toObject(VulnerabilityFindings.class); + Assertions.assertEquals("chcxwaxfewzj", model.assetId()); + Assertions.assertEquals("eqvhpsylkk", model.data().get(0).cve()); + Assertions.assertEquals("kbffmbmx", model.data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T14:19:09Z"), model.data().get(0).dueDate()); + Assertions.assertEquals("aaoepttaqut", model.data().get(0).packageDetails().get(0).installPath()); + Assertions.assertEquals("wemxswvruunzz", model.data().get(0).packageDetails().get(0).installedVersion()); + Assertions.assertEquals("ehkfkimrtixok", model.data().get(0).packageDetails().get(0).name()); + Assertions.assertEquals("qyinl", model.data().get(0).packageDetails().get(0).patchedVersion()); + Assertions.assertFalse(model.data().get(0).patchable()); + Assertions.assertEquals("qwhix", model.data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-10T00:22:24Z"), model.data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.LOW, model.data().get(0).risk()); + Assertions.assertEquals("hiyxgvelfclduc", model.data().get(0).solution()); + Assertions.assertEquals("irdsvuwcob", model.data().get(0).title()); + Assertions.assertEquals("gstmninwjizciln", model.data().get(0).vendorId()); + Assertions.assertEquals("gshejjtbxqmulux", model.data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T01:03:02Z"), model.generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T18:40:55Z"), model.lastScanDate()); + Assertions.assertEquals("w", model.scanner()); + Assertions.assertEquals("qxpxiwfcngjsaa", model.source()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + VulnerabilityFindings model = new VulnerabilityFindings().withAssetId("chcxwaxfewzj") + .withData(Arrays.asList( + new VulnerabilityDetails().withCve("eqvhpsylkk") + .withCveUrl("kbffmbmx") + .withDueDate(OffsetDateTime.parse("2021-06-13T14:19:09Z")) + .withPackageDetails(Arrays.asList(new PackageDetails().withInstallPath("aaoepttaqut") + .withInstalledVersion("wemxswvruunzz") + .withName("ehkfkimrtixok") + .withPatchedVersion("qyinl"))) + .withPatchable(false) + .withProviderId("qwhix") + .withPublishDate(OffsetDateTime.parse("2021-11-10T00:22:24Z")) + .withRisk(VulnerabilityRisk.LOW) + .withSolution("hiyxgvelfclduc") + .withTitle("irdsvuwcob") + .withVendorId("gstmninwjizciln") + .withVendorUrl("gshejjtbxqmulux"), + new VulnerabilityDetails().withCve("qzvnersbycucr") + .withCveUrl("amikzebrqbsm") + .withDueDate(OffsetDateTime.parse("2021-08-06T20:36:14Z")) + .withPackageDetails(Arrays.asList( + new PackageDetails().withInstallPath("hczznvf") + .withInstalledVersion("cjsxjww") + .withName("z") + .withPatchedVersion("mwmxqhndvnoamld"), + new PackageDetails().withInstallPath("haohdjhhflzokxc") + .withInstalledVersion("pelnjetag") + .withName("sxoa") + .withPatchedVersion("tgzpnpb"))) + .withPatchable(true) + .withProviderId("floccsrmozih") + .withPublishDate(OffsetDateTime.parse("2021-06-17T22:27:31Z")) + .withRisk(VulnerabilityRisk.HIGH) + .withSolution("xxpkyjcxc") + .withTitle("grytfmpcyci") + .withVendorId("mcayk") + .withVendorUrl("noxuztrksx"), + new VulnerabilityDetails().withCve("ndfcpfn") + .withCveUrl("thjtwk") + .withDueDate(OffsetDateTime.parse("2021-03-31T04:06:02Z")) + .withPackageDetails(Arrays.asList( + new PackageDetails().withInstallPath("iosmgbzahgxqdly") + .withInstalledVersion("ltlaprltzkatbhj") + .withName("nnbsoqeqa") + .withPatchedVersion("rvlagunbtgfebwln"), + new PackageDetails().withInstallPath("hyreeu") + .withInstalledVersion("qavbpdqmj") + .withName("yyzglgouwtlmjjy") + .withPatchedVersion("j"), + new PackageDetails().withInstallPath("obaxkjeytu") + .withInstalledVersion("bfjkw") + .withName("snkq") + .withPatchedVersion("syrq"))) + .withPatchable(false) + .withProviderId("hdenxaulk") + .withPublishDate(OffsetDateTime.parse("2021-05-04T10:50:30Z")) + .withRisk(VulnerabilityRisk.CRITICAL) + .withSolution("fmjnnawtqa") + .withTitle("xuckpggqoweyir") + .withVendorId("lisn") + .withVendorUrl("fl"))) + .withGeneratedTime(OffsetDateTime.parse("2020-12-29T01:03:02Z")) + .withLastScanDate(OffsetDateTime.parse("2021-01-05T18:40:55Z")) + .withScanner("w") + .withSource("qxpxiwfcngjsaa"); + model = BinaryData.fromObject(model).toObject(VulnerabilityFindings.class); + Assertions.assertEquals("chcxwaxfewzj", model.assetId()); + Assertions.assertEquals("eqvhpsylkk", model.data().get(0).cve()); + Assertions.assertEquals("kbffmbmx", model.data().get(0).cveUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2021-06-13T14:19:09Z"), model.data().get(0).dueDate()); + Assertions.assertEquals("aaoepttaqut", model.data().get(0).packageDetails().get(0).installPath()); + Assertions.assertEquals("wemxswvruunzz", model.data().get(0).packageDetails().get(0).installedVersion()); + Assertions.assertEquals("ehkfkimrtixok", model.data().get(0).packageDetails().get(0).name()); + Assertions.assertEquals("qyinl", model.data().get(0).packageDetails().get(0).patchedVersion()); + Assertions.assertFalse(model.data().get(0).patchable()); + Assertions.assertEquals("qwhix", model.data().get(0).providerId()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-10T00:22:24Z"), model.data().get(0).publishDate()); + Assertions.assertEquals(VulnerabilityRisk.LOW, model.data().get(0).risk()); + Assertions.assertEquals("hiyxgvelfclduc", model.data().get(0).solution()); + Assertions.assertEquals("irdsvuwcob", model.data().get(0).title()); + Assertions.assertEquals("gstmninwjizciln", model.data().get(0).vendorId()); + Assertions.assertEquals("gshejjtbxqmulux", model.data().get(0).vendorUrl()); + Assertions.assertEquals(OffsetDateTime.parse("2020-12-29T01:03:02Z"), model.generatedTime()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T18:40:55Z"), model.lastScanDate()); + Assertions.assertEquals("w", model.scanner()); + Assertions.assertEquals("qxpxiwfcngjsaa", model.source()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java index dac066de552e..0cc317ac77e3 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,15 @@ public final class WebhookTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Webhook model = BinaryData.fromString("{\"webhookType\":\"Webhook\",\"eventType\":\"zrazisgyk\"}") + Webhook model = BinaryData.fromString("{\"webhookType\":\"Webhook\",\"eventType\":\"bpqvybefg\"}") .toObject(Webhook.class); - Assertions.assertEquals("zrazisgyk", model.eventType()); + Assertions.assertEquals("bpqvybefg", model.eventType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Webhook model = new Webhook().withEventType("zrazisgyk"); + Webhook model = new Webhook().withEventType("bpqvybefg"); model = BinaryData.fromObject(model).toObject(Webhook.class); - Assertions.assertEquals("zrazisgyk", model.eventType()); + Assertions.assertEquals("bpqvybefg", model.eventType()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java index 6799aa1ec4e8..da5d10bc7e2a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,18 +12,18 @@ public final class WorkspaceConnectionManagedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkspaceConnectionManagedIdentity model - = BinaryData.fromString("{\"resourceId\":\"rvrk\",\"clientId\":\"abdu\"}") + = BinaryData.fromString("{\"clientId\":\"pvemdfkht\",\"resourceId\":\"obrxzmh\"}") .toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("rvrk", model.resourceId()); - Assertions.assertEquals("abdu", model.clientId()); + Assertions.assertEquals("pvemdfkht", model.clientId()); + Assertions.assertEquals("obrxzmh", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkspaceConnectionManagedIdentity model - = new WorkspaceConnectionManagedIdentity().withResourceId("rvrk").withClientId("abdu"); + = new WorkspaceConnectionManagedIdentity().withClientId("pvemdfkht").withResourceId("obrxzmh"); model = BinaryData.fromObject(model).toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("rvrk", model.resourceId()); - Assertions.assertEquals("abdu", model.clientId()); + Assertions.assertEquals("pvemdfkht", model.clientId()); + Assertions.assertEquals("obrxzmh", model.resourceId()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java index 9ef57a9721c7..1ed4a4ffe53b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -11,15 +11,16 @@ public final class WorkspaceConnectionPersonalAccessTokenTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model - = BinaryData.fromString("{\"pat\":\"jshcybwf\"}").toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("jshcybwf", model.pat()); + WorkspaceConnectionPersonalAccessToken model = BinaryData.fromString("{\"pat\":\"zdnuehxwltss\"}") + .toObject(WorkspaceConnectionPersonalAccessToken.class); + Assertions.assertEquals("zdnuehxwltss", model.pat()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model = new WorkspaceConnectionPersonalAccessToken().withPat("jshcybwf"); + WorkspaceConnectionPersonalAccessToken model + = new WorkspaceConnectionPersonalAccessToken().withPat("zdnuehxwltss"); model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("jshcybwf", model.pat()); + Assertions.assertEquals("zdnuehxwltss", model.pat()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java index 8c458b41eab6..acc5dfc33d35 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java @@ -1,86 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; +import com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; 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 WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"ashrt\",\"expiryTime\":\"2021-03-25T05:20:51Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":true,\"target\":\"bpokulpiujwaasip\",\"metadata\":{\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\"},\"sharedUserList\":[\"ymkcdyhb\"],\"value\":\"kpw\",\"valueFormat\":\"JSON\"},\"id\":\"novvqfovljxy\",\"name\":\"suwsyrsnds\",\"type\":\"tgadgvraeaen\"},{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"arrwlquu\",\"expiryTime\":\"2021-08-08T16:39:53Z\",\"group\":\"File\",\"isSharedToAll\":true,\"target\":\"wiipfpub\",\"metadata\":{\"sgplsakn\":\"wwiftohqkvpuv\",\"synljphuopxodl\":\"n\"},\"sharedUserList\":[\"ntorzihleosjswsr\"],\"value\":\"lyzrpzbchckqqzqi\",\"valueFormat\":\"JSON\"},\"id\":\"suiizynkedyat\",\"name\":\"wyhqmibzyhwits\",\"type\":\"ypyynpcdpumnzg\"}],\"nextLink\":\"z\"}") + "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"AzureDatabricksDeltaLake\",\"createdByWorkspaceArmId\":\"lydp\",\"error\":\"ensbmz\",\"expiryTime\":\"2021-01-09T08:26:41Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":false,\"metadata\":{\"xwjoqfzwand\":\"hbfexmizz\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"olxtqmric\",\"s\",\"lzbki\",\"mjfgoxedrmra\"],\"target\":\"vchvvoy\",\"useWorkspaceManagedIdentity\":true},\"id\":\"ntnwzruzso\",\"name\":\"wxcsmx\",\"type\":\"lcappnvcebspci\"}],\"nextLink\":\"omhkdwuwedupb\"}") .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.value().get(0).properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T05:20:51Z"), + Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, + model.value().get(0).properties().category()); + Assertions.assertEquals("ensbmz", model.value().get(0).properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-09T08:26:41Z"), model.value().get(0).properties().expiryTime()); - Assertions.assertEquals(true, model.value().get(0).properties().isSharedToAll()); - Assertions.assertEquals("bpokulpiujwaasip", model.value().get(0).properties().target()); - Assertions.assertEquals("obyu", model.value().get(0).properties().metadata().get("erpqlpqwcciuqg")); - Assertions.assertEquals("ymkcdyhb", model.value().get(0).properties().sharedUserList().get(0)); - Assertions.assertEquals("kpw", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model - = new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() - .withValue( - Arrays - .asList( - new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( - new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-03-25T05:20:51Z")) - .withIsSharedToAll(true) - .withTarget("bpokulpiujwaasip") - .withMetadata( - mapOf("erpqlpqwcciuqg", "obyu", "hykojoxafnndlpic", "dbutauvfbtkuwhh")) - .withSharedUserList(Arrays.asList("ymkcdyhb")) - .withValue("kpw") - .withValueFormat(ValueFormat.JSON)), - new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( - new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-08-08T16:39:53Z")) - .withIsSharedToAll(true) - .withTarget("wiipfpub") - .withMetadata(mapOf("sgplsakn", "wwiftohqkvpuv", "synljphuopxodl", "n")) - .withSharedUserList(Arrays.asList("ntorzihleosjswsr")) - .withValue("lyzrpzbchckqqzqi") - .withValueFormat(ValueFormat.JSON)))); - model = BinaryData.fromObject(model) - .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.value().get(0).properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T05:20:51Z"), - model.value().get(0).properties().expiryTime()); - Assertions.assertEquals(true, model.value().get(0).properties().isSharedToAll()); - Assertions.assertEquals("bpokulpiujwaasip", model.value().get(0).properties().target()); - Assertions.assertEquals("obyu", model.value().get(0).properties().metadata().get("erpqlpqwcciuqg")); - Assertions.assertEquals("ymkcdyhb", model.value().get(0).properties().sharedUserList().get(0)); - Assertions.assertEquals("kpw", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } - - // 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; + Assertions.assertFalse(model.value().get(0).properties().isSharedToAll()); + Assertions.assertEquals("hbfexmizz", model.value().get(0).properties().metadata().get("xwjoqfzwand")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.value().get(0).properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.value().get(0).properties().peStatus()); + Assertions.assertEquals("olxtqmric", model.value().get(0).properties().sharedUserList().get(0)); + Assertions.assertEquals("vchvvoy", model.value().get(0).properties().target()); + Assertions.assertTrue(model.value().get(0).properties().useWorkspaceManagedIdentity()); + Assertions.assertEquals("omhkdwuwedupb", model.nextLink()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java index ada8ee08bb73..577951438eb0 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java @@ -1,13 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; import java.time.OffsetDateTime; import java.util.Arrays; @@ -19,40 +20,46 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkspaceConnectionPropertiesV2BasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"AzureDatabricksDeltaLake\",\"createdByWorkspaceArmId\":\"afcnih\",\"expiryTime\":\"2021-09-16T02:36:36Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"target\":\"gfbcvkcv\",\"metadata\":{\"tbobz\":\"keqdcvdrhvoods\",\"d\":\"opcjwvnhd\",\"twuoegrpkhjwni\":\"mgxcxrslpm\",\"ggkzzlvmbmpa\":\"qsluicp\"},\"sharedUserList\":[\"dfvue\",\"yw\",\"bpfvm\"],\"value\":\"hrfou\",\"valueFormat\":\"JSON\"},\"id\":\"akcp\",\"name\":\"iyzvqtmnub\",\"type\":\"xkp\"}") + "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"GroundingWithBingSearch\",\"createdByWorkspaceArmId\":\"pvydd\",\"error\":\"vclrsn\",\"expiryTime\":\"2021-05-05T04:11:11Z\",\"group\":\"Azure\",\"isSharedToAll\":true,\"metadata\":{\"xxep\":\"lmdmt\",\"zxlcqzfxaiti\":\"p\",\"m\":\"mcjbsmkirpqnipu\",\"b\":\"kcomeobwkeuzlten\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"Inactive\",\"sharedUserList\":[\"e\",\"ndoduom\",\"xjbrixymc\"],\"target\":\"kk\",\"useWorkspaceManagedIdentity\":true},\"id\":\"rhwis\",\"name\":\"yfmrzcqfevnkyak\",\"type\":\"ktehognsdd\"}") .toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, model.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:36:36Z"), model.properties().expiryTime()); - Assertions.assertEquals(true, model.properties().isSharedToAll()); - Assertions.assertEquals("gfbcvkcv", model.properties().target()); - Assertions.assertEquals("keqdcvdrhvoods", model.properties().metadata().get("tbobz")); - Assertions.assertEquals("dfvue", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("hrfou", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); + Assertions.assertEquals(ConnectionCategory.GROUNDING_WITH_BING_SEARCH, model.properties().category()); + Assertions.assertEquals("vclrsn", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T04:11:11Z"), model.properties().expiryTime()); + Assertions.assertTrue(model.properties().isSharedToAll()); + Assertions.assertEquals("lmdmt", model.properties().metadata().get("xxep")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.properties().peStatus()); + Assertions.assertEquals("e", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("kk", model.properties().target()); + Assertions.assertTrue(model.properties().useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkspaceConnectionPropertiesV2BasicResourceInner model = new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( - new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE) - .withExpiryTime(OffsetDateTime.parse("2021-09-16T02:36:36Z")) + new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.GROUNDING_WITH_BING_SEARCH) + .withError("vclrsn") + .withExpiryTime(OffsetDateTime.parse("2021-05-05T04:11:11Z")) .withIsSharedToAll(true) - .withTarget("gfbcvkcv") - .withMetadata(mapOf("tbobz", "keqdcvdrhvoods", "d", "opcjwvnhd", "twuoegrpkhjwni", "mgxcxrslpm", - "ggkzzlvmbmpa", "qsluicp")) - .withSharedUserList(Arrays.asList("dfvue", "yw", "bpfvm")) - .withValue("hrfou") - .withValueFormat(ValueFormat.JSON)); + .withMetadata( + mapOf("xxep", "lmdmt", "zxlcqzfxaiti", "p", "m", "mcjbsmkirpqnipu", "b", "kcomeobwkeuzlten")) + .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) + .withPeStatus(ManagedPEStatus.INACTIVE) + .withSharedUserList(Arrays.asList("e", "ndoduom", "xjbrixymc")) + .withTarget("kk") + .withUseWorkspaceManagedIdentity(true)); model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, model.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:36:36Z"), model.properties().expiryTime()); - Assertions.assertEquals(true, model.properties().isSharedToAll()); - Assertions.assertEquals("gfbcvkcv", model.properties().target()); - Assertions.assertEquals("keqdcvdrhvoods", model.properties().metadata().get("tbobz")); - Assertions.assertEquals("dfvue", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("hrfou", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); + Assertions.assertEquals(ConnectionCategory.GROUNDING_WITH_BING_SEARCH, model.properties().category()); + Assertions.assertEquals("vclrsn", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-05T04:11:11Z"), model.properties().expiryTime()); + Assertions.assertTrue(model.properties().isSharedToAll()); + Assertions.assertEquals("lmdmt", model.properties().metadata().get("xxep")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.INACTIVE, model.properties().peStatus()); + Assertions.assertEquals("e", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("kk", model.properties().target()); + Assertions.assertTrue(model.properties().useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java index 2796f9c6ce63..873959a088d1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; import java.time.OffsetDateTime; import java.util.Arrays; @@ -18,38 +19,44 @@ public final class WorkspaceConnectionPropertiesV2Tests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkspaceConnectionPropertiesV2 model = BinaryData.fromString( - "{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"SapOpenHub\",\"createdByWorkspaceArmId\":\"ondjmq\",\"expiryTime\":\"2021-06-21T21:58:07Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"target\":\"kopkwhojvpajqgx\",\"metadata\":{\"vhelxprglyatdd\":\"ocmbqfqvmkcxoza\",\"rjxgciqib\":\"kcbcue\",\"sdqrhzoymibmrq\":\"hos\"},\"sharedUserList\":[\"ahwfluszdtmhrk\",\"ofyyvoqacpi\"],\"value\":\"pbtg\",\"valueFormat\":\"JSON\"}") + "{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Databricks\",\"createdByWorkspaceArmId\":\"edesuazogfcnx\",\"error\":\"g\",\"expiryTime\":\"2021-01-20T22:54:38Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":true,\"metadata\":{\"ifjc\":\"vkxixypa\"},\"peRequirement\":\"Required\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"uw\",\"chmxczbyfkoc\",\"mzdctsnlwscrngt\",\"gxrolw\"],\"target\":\"lks\",\"useWorkspaceManagedIdentity\":true}") .toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.SAP_OPEN_HUB, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T21:58:07Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("kopkwhojvpajqgx", model.target()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.metadata().get("vhelxprglyatdd")); - Assertions.assertEquals("ahwfluszdtmhrk", model.sharedUserList().get(0)); - Assertions.assertEquals("pbtg", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); + Assertions.assertEquals(ConnectionCategory.DATABRICKS, model.category()); + Assertions.assertEquals("g", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T22:54:38Z"), model.expiryTime()); + Assertions.assertTrue(model.isSharedToAll()); + Assertions.assertEquals("vkxixypa", model.metadata().get("ifjc")); + Assertions.assertEquals(ManagedPERequirement.REQUIRED, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); + Assertions.assertEquals("uw", model.sharedUserList().get(0)); + Assertions.assertEquals("lks", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.SAP_OPEN_HUB) - .withExpiryTime(OffsetDateTime.parse("2021-06-21T21:58:07Z")) - .withIsSharedToAll(false) - .withTarget("kopkwhojvpajqgx") - .withMetadata(mapOf("vhelxprglyatdd", "ocmbqfqvmkcxoza", "rjxgciqib", "kcbcue", "sdqrhzoymibmrq", "hos")) - .withSharedUserList(Arrays.asList("ahwfluszdtmhrk", "ofyyvoqacpi")) - .withValue("pbtg") - .withValueFormat(ValueFormat.JSON); + WorkspaceConnectionPropertiesV2 model + = new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.DATABRICKS) + .withError("g") + .withExpiryTime(OffsetDateTime.parse("2021-01-20T22:54:38Z")) + .withIsSharedToAll(true) + .withMetadata(mapOf("ifjc", "vkxixypa")) + .withPeRequirement(ManagedPERequirement.REQUIRED) + .withPeStatus(ManagedPEStatus.NOT_APPLICABLE) + .withSharedUserList(Arrays.asList("uw", "chmxczbyfkoc", "mzdctsnlwscrngt", "gxrolw")) + .withTarget("lks") + .withUseWorkspaceManagedIdentity(true); model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.SAP_OPEN_HUB, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T21:58:07Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("kopkwhojvpajqgx", model.target()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.metadata().get("vhelxprglyatdd")); - Assertions.assertEquals("ahwfluszdtmhrk", model.sharedUserList().get(0)); - Assertions.assertEquals("pbtg", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); + Assertions.assertEquals(ConnectionCategory.DATABRICKS, model.category()); + Assertions.assertEquals("g", model.error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T22:54:38Z"), model.expiryTime()); + Assertions.assertTrue(model.isSharedToAll()); + Assertions.assertEquals("vkxixypa", model.metadata().get("ifjc")); + Assertions.assertEquals(ManagedPERequirement.REQUIRED, model.peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.peStatus()); + Assertions.assertEquals("uw", model.sharedUserList().get(0)); + Assertions.assertEquals("lks", model.target()); + Assertions.assertTrue(model.useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java index 820519fd5dfc..c49411ba4f2d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -12,14 +12,15 @@ public final class WorkspaceConnectionSharedAccessSignatureTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkspaceConnectionSharedAccessSignature model - = BinaryData.fromString("{\"sas\":\"vo\"}").toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("vo", model.sas()); + = BinaryData.fromString("{\"sas\":\"tsawv\"}").toObject(WorkspaceConnectionSharedAccessSignature.class); + Assertions.assertEquals("tsawv", model.sas()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model = new WorkspaceConnectionSharedAccessSignature().withSas("vo"); + WorkspaceConnectionSharedAccessSignature model + = new WorkspaceConnectionSharedAccessSignature().withSas("tsawv"); model = BinaryData.fromObject(model).toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("vo", model.sas()); + Assertions.assertEquals("tsawv", model.sas()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionUpdateParameterTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionUpdateParameterTests.java new file mode 100644 index 000000000000..8454e32771b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionUpdateParameterTests.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter; +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 WorkspaceConnectionUpdateParameterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspaceConnectionUpdateParameter model = BinaryData.fromString( + "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"GroundingWithBingSearch\",\"createdByWorkspaceArmId\":\"eysyqnipehfwwcbf\",\"error\":\"iajuvjucf\",\"expiryTime\":\"2021-09-01T18:58:18Z\",\"group\":\"NoSQL\",\"isSharedToAll\":false,\"metadata\":{\"hvjixgo\":\"raxnfyzguax\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"mihuvrqp\"],\"target\":\"do\",\"useWorkspaceManagedIdentity\":true}}") + .toObject(WorkspaceConnectionUpdateParameter.class); + Assertions.assertEquals(ConnectionCategory.GROUNDING_WITH_BING_SEARCH, model.properties().category()); + Assertions.assertEquals("iajuvjucf", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T18:58:18Z"), model.properties().expiryTime()); + Assertions.assertFalse(model.properties().isSharedToAll()); + Assertions.assertEquals("raxnfyzguax", model.properties().metadata().get("hvjixgo")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.properties().peStatus()); + Assertions.assertEquals("mihuvrqp", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("do", model.properties().target()); + Assertions.assertTrue(model.properties().useWorkspaceManagedIdentity()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkspaceConnectionUpdateParameter model = new WorkspaceConnectionUpdateParameter().withProperties( + new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.GROUNDING_WITH_BING_SEARCH) + .withError("iajuvjucf") + .withExpiryTime(OffsetDateTime.parse("2021-09-01T18:58:18Z")) + .withIsSharedToAll(false) + .withMetadata(mapOf("hvjixgo", "raxnfyzguax")) + .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) + .withPeStatus(ManagedPEStatus.NOT_APPLICABLE) + .withSharedUserList(Arrays.asList("mihuvrqp")) + .withTarget("do") + .withUseWorkspaceManagedIdentity(true)); + model = BinaryData.fromObject(model).toObject(WorkspaceConnectionUpdateParameter.class); + Assertions.assertEquals(ConnectionCategory.GROUNDING_WITH_BING_SEARCH, model.properties().category()); + Assertions.assertEquals("iajuvjucf", model.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-01T18:58:18Z"), model.properties().expiryTime()); + Assertions.assertFalse(model.properties().isSharedToAll()); + Assertions.assertEquals("raxnfyzguax", model.properties().metadata().get("hvjixgo")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, model.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, model.properties().peStatus()); + Assertions.assertEquals("mihuvrqp", model.properties().sharedUserList().get(0)); + Assertions.assertEquals("do", model.properties().target()); + Assertions.assertTrue(model.properties().useWorkspaceManagedIdentity()); + } + + // 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/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java index 37ebe555db56..6f06cb65a246 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; import java.nio.charset.StandardCharsets; @@ -27,36 +28,41 @@ public final class WorkspaceConnectionsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"AzureTableStorage\",\"createdByWorkspaceArmId\":\"njjthpsnxebycym\",\"expiryTime\":\"2021-04-08T08:44:08Z\",\"group\":\"AzureAI\",\"isSharedToAll\":false,\"target\":\"pnse\",\"metadata\":{\"dyzssjlmykdygj\":\"nous\",\"h\":\"gspjlf\",\"s\":\"ngwqxcrbcrgyoim\"},\"sharedUserList\":[\"cctvkog\",\"htvagwnnw\",\"nv\"],\"value\":\"yldjdkjvdryk\",\"valueFormat\":\"JSON\"},\"id\":\"oxh\",\"name\":\"rjlqdoqeje\",\"type\":\"fdlh\"}"; + = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Zoho\",\"createdByWorkspaceArmId\":\"rgoodfhpyuegdyny\",\"error\":\"pjlizlzxh\",\"expiryTime\":\"2021-11-13T18:30:10Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":false,\"metadata\":{\"qmznkcwiok\":\"nholaflsjwawl\",\"vxmobnehbb\":\"yk\"},\"peRequirement\":\"NotApplicable\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"xrfnpxu\",\"gnjmskuveuog\",\"iowandefmebp\"],\"target\":\"zpyptgwm\",\"useWorkspaceManagedIdentity\":false},\"id\":\"cfdsvmptnrz\",\"name\":\"lvcn\",\"type\":\"dazw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkspaceConnectionPropertiesV2BasicResource response = manager.workspaceConnections() - .define("irlunsskydi") - .withExistingWorkspace("ex", "fjqzyhzydyvtuq") - .withProperties(new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.AZURE_MY_SQL_DB) - .withExpiryTime(OffsetDateTime.parse("2021-10-27T23:46:30Z")) + .define("eaiaycauvlf") + .withExistingWorkspace("rfwnpwv", "nbgyxomck") + .withProperties(new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.API_MANAGEMENT) + .withError("rydl") + .withExpiryTime(OffsetDateTime.parse("2021-09-11T00:28:43Z")) .withIsSharedToAll(true) - .withTarget("dcwuzs") - .withMetadata(mapOf("jeeyv", "yixecmasjnfgngxa", "axvwxtxuzh", "xbfckmoal")) - .withSharedUserList(Arrays.asList("yffwflbkjcdzu", "ygtc", "z")) - .withValue("efpubaldjcgldryv") - .withValueFormat(ValueFormat.JSON)) + .withMetadata(mapOf("rcdumkqhat", "jjatjmnd", "sskvzvkdd", "komdyf", "kksxy", "eiepvjr", + "duawokrhhjyahrmu", "kb")) + .withPeRequirement(ManagedPERequirement.NOT_REQUIRED) + .withPeStatus(ManagedPEStatus.INACTIVE) + .withSharedUserList(Arrays.asList("osidtxmbnmjimg", "zkqgpld", "n")) + .withTarget("hdb") + .withUseWorkspaceManagedIdentity(true)) .create(); - Assertions.assertEquals(ConnectionCategory.AZURE_TABLE_STORAGE, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T08:44:08Z"), response.properties().expiryTime()); - Assertions.assertEquals(false, response.properties().isSharedToAll()); - Assertions.assertEquals("pnse", response.properties().target()); - Assertions.assertEquals("nous", response.properties().metadata().get("dyzssjlmykdygj")); - Assertions.assertEquals("cctvkog", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("yldjdkjvdryk", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); + Assertions.assertEquals(ConnectionCategory.ZOHO, response.properties().category()); + Assertions.assertEquals("pjlizlzxh", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-11-13T18:30:10Z"), response.properties().expiryTime()); + Assertions.assertFalse(response.properties().isSharedToAll()); + Assertions.assertEquals("nholaflsjwawl", response.properties().metadata().get("qmznkcwiok")); + Assertions.assertEquals(ManagedPERequirement.NOT_APPLICABLE, response.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, response.properties().peStatus()); + Assertions.assertEquals("xrfnpxu", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("zpyptgwm", response.properties().target()); + Assertions.assertFalse(response.properties().useWorkspaceManagedIdentity()); } // Use "Map.of" if available diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java index 6ee1b46d2015..cb1711326502 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.workspaceConnections() - .deleteWithResponse("jjpduibsrrrq", "neqrypyur", "shhovtuer", com.azure.core.util.Context.NONE); + .deleteWithResponse("tudk", "gsgopyckmncr", "t", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java index b3e0c9c7ce2e..4d710938ad83 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,26 +24,28 @@ public final class WorkspaceConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ApiKey\",\"createdByWorkspaceArmId\":\"knrbxzepi\",\"expiryTime\":\"2021-04-17T10:55:35Z\",\"group\":\"Database\",\"isSharedToAll\":true,\"target\":\"qbvxqtolpwbopv\",\"metadata\":{\"ithue\":\"tzaprjxcontickf\",\"jwv\":\"csgvuqzg\",\"b\":\"udmpwewpmioleaj\"},\"sharedUserList\":[\"yzwphbjks\"],\"value\":\"cmbaa\",\"valueFormat\":\"JSON\"},\"id\":\"rdkqlvzkfekdesb\",\"name\":\"jqtl\",\"type\":\"b\"}"; + = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Greenplum\",\"createdByWorkspaceArmId\":\"bxeqzvokfrhfafx\",\"error\":\"jucmuaxdu\",\"expiryTime\":\"2021-09-02T01:31:37Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"metadata\":{\"mksgeqpai\":\"scdbbwej\",\"eotvnet\":\"lfscosf\",\"pf\":\"ehnd\"},\"peRequirement\":\"NotRequired\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"aoehkgpk\",\"sjbwkwxdgcfcfkyy\",\"jwxhslrbwwk\"],\"target\":\"wodhsodofsxjiky\",\"useWorkspaceManagedIdentity\":true},\"id\":\"huixqwo\",\"name\":\"gwcxdmxhuw\",\"type\":\"dfahky\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkspaceConnectionPropertiesV2BasicResource response = manager.workspaceConnections() - .getWithResponse("zdsyxb", "jilbuazcco", "hwivkd", com.azure.core.util.Context.NONE) + .getWithResponse("chokkcjjnqxjj", "ayajdf", "cxjmap", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ConnectionCategory.API_KEY, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T10:55:35Z"), response.properties().expiryTime()); - Assertions.assertEquals(true, response.properties().isSharedToAll()); - Assertions.assertEquals("qbvxqtolpwbopv", response.properties().target()); - Assertions.assertEquals("tzaprjxcontickf", response.properties().metadata().get("ithue")); - Assertions.assertEquals("yzwphbjks", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("cmbaa", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); + Assertions.assertEquals(ConnectionCategory.GREENPLUM, response.properties().category()); + Assertions.assertEquals("jucmuaxdu", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-09-02T01:31:37Z"), response.properties().expiryTime()); + Assertions.assertTrue(response.properties().isSharedToAll()); + Assertions.assertEquals("scdbbwej", response.properties().metadata().get("mksgeqpai")); + Assertions.assertEquals(ManagedPERequirement.NOT_REQUIRED, response.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, response.properties().peStatus()); + Assertions.assertEquals("aoehkgpk", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("wodhsodofsxjiky", response.properties().target()); + Assertions.assertTrue(response.properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java index 688d7b0855b1..a5d6ef052a0e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java @@ -1,18 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -24,26 +25,28 @@ public final class WorkspaceConnectionsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Oracle\",\"createdByWorkspaceArmId\":\"hxh\",\"expiryTime\":\"2021-06-05T00:33:45Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":false,\"target\":\"zzfmugykwuyc\",\"metadata\":{\"zffpherwj\":\"enndzgthdzit\",\"xvfybxmmr\":\"vswtwonadezm\"},\"sharedUserList\":[\"vqkrr\",\"guogkcbrotp\",\"abensjflwpftvv\",\"tmvifgcv\"],\"value\":\"mal\",\"valueFormat\":\"JSON\"},\"id\":\"cx\",\"name\":\"osnx\",\"type\":\"jptcd\"}]}"; + = "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"AIServices\",\"createdByWorkspaceArmId\":\"ulhfqdgnchahl\",\"error\":\"rpt\",\"expiryTime\":\"2021-07-21T07:56:08Z\",\"group\":\"Azure\",\"isSharedToAll\":true,\"metadata\":{\"zbkrbqpzdpujywjm\":\"o\",\"mcamse\":\"hqzzkpl\",\"gtjgfpqw\":\"auvee\"},\"peRequirement\":\"Required\",\"peStatus\":\"NotApplicable\",\"sharedUserList\":[\"jcewbqaibkyeys\",\"e\",\"hdydyybztlylh\",\"xcjqdvcieqzkuixf\"],\"target\":\"hvecjhbttmhneqd\",\"useWorkspaceManagedIdentity\":false},\"id\":\"yxx\",\"name\":\"dabqlakk\",\"type\":\"aacse\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.workspaceConnections() - .list("pzhbw", "xybtdzycxhao", "gjzgpljbnwczsr", "zcby", com.azure.core.util.Context.NONE); + .list("udjmdayqkgix", "nrneyavld", "vp", "rqcfzokplzliizb", true, com.azure.core.util.Context.NONE); - Assertions.assertEquals(ConnectionCategory.ORACLE, response.iterator().next().properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T00:33:45Z"), + Assertions.assertEquals(ConnectionCategory.AISERVICES, response.iterator().next().properties().category()); + Assertions.assertEquals("rpt", response.iterator().next().properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T07:56:08Z"), response.iterator().next().properties().expiryTime()); - Assertions.assertEquals(false, response.iterator().next().properties().isSharedToAll()); - Assertions.assertEquals("zzfmugykwuyc", response.iterator().next().properties().target()); - Assertions.assertEquals("enndzgthdzit", response.iterator().next().properties().metadata().get("zffpherwj")); - Assertions.assertEquals("vqkrr", response.iterator().next().properties().sharedUserList().get(0)); - Assertions.assertEquals("mal", response.iterator().next().properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.iterator().next().properties().valueFormat()); + Assertions.assertTrue(response.iterator().next().properties().isSharedToAll()); + Assertions.assertEquals("o", response.iterator().next().properties().metadata().get("zbkrbqpzdpujywjm")); + Assertions.assertEquals(ManagedPERequirement.REQUIRED, response.iterator().next().properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.NOT_APPLICABLE, response.iterator().next().properties().peStatus()); + Assertions.assertEquals("jcewbqaibkyeys", response.iterator().next().properties().sharedUserList().get(0)); + Assertions.assertEquals("hvecjhbttmhneqd", response.iterator().next().properties().target()); + Assertions.assertFalse(response.iterator().next().properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.java index 404038d99c5d..c84483e2703c 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; +import com.azure.resourcemanager.machinelearning.models.ManagedPERequirement; +import com.azure.resourcemanager.machinelearning.models.ManagedPEStatus; import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; @@ -23,26 +24,28 @@ public final class WorkspaceConnectionsListSecretsWithResponseMockTests { @Test public void testListSecretsWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Hive\",\"createdByWorkspaceArmId\":\"aqoqbvejoysoxovl\",\"expiryTime\":\"2021-08-21T06:47:57Z\",\"group\":\"AzureAI\",\"isSharedToAll\":false,\"target\":\"qdlqqhntqrykkxak\",\"metadata\":{\"vpzgyxcc\":\"ptiic\",\"mztjekxsnnbrysg\":\"pxiema\",\"bblrtbofz\":\"tfmocn\",\"hocqxugjx\":\"hfuifwxudyn\"},\"sharedUserList\":[\"crrfbplvhmh\"],\"value\":\"osdjlz\",\"valueFormat\":\"JSON\"},\"id\":\"dghq\",\"name\":\"uyaorservpv\",\"type\":\"sorsbegcl\"}"; + = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"DynamicsAx\",\"createdByWorkspaceArmId\":\"zrvya\",\"error\":\"qgyui\",\"expiryTime\":\"2021-02-19T08:50:50Z\",\"group\":\"File\",\"isSharedToAll\":false,\"metadata\":{\"rqc\":\"apnopotodp\",\"mzuwrcehfwce\":\"glytxjcbdpc\",\"aqaviqskylwpq\":\"l\",\"kn\":\"cyfccnwmdpbso\"},\"peRequirement\":\"Required\",\"peStatus\":\"Active\",\"sharedUserList\":[\"uuckrzwra\",\"aptqyr\"],\"target\":\"y\",\"useWorkspaceManagedIdentity\":true},\"id\":\"wwnqoubwbssvfzjj\",\"name\":\"lc\",\"type\":\"eosylgjppqjujb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); WorkspaceConnectionPropertiesV2BasicResource response = manager.workspaceConnections() - .listSecretsWithResponse("mzxaoxlhmvj", "nn", "sbnuc", com.azure.core.util.Context.NONE) + .listSecretsWithResponse("onljsfcryq", "rsjqtdjeyd", "euimlhyzez", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ConnectionCategory.HIVE, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T06:47:57Z"), response.properties().expiryTime()); - Assertions.assertEquals(false, response.properties().isSharedToAll()); - Assertions.assertEquals("qdlqqhntqrykkxak", response.properties().target()); - Assertions.assertEquals("ptiic", response.properties().metadata().get("vpzgyxcc")); - Assertions.assertEquals("crrfbplvhmh", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("osdjlz", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); + Assertions.assertEquals(ConnectionCategory.DYNAMICS_AX, response.properties().category()); + Assertions.assertEquals("qgyui", response.properties().error()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-19T08:50:50Z"), response.properties().expiryTime()); + Assertions.assertFalse(response.properties().isSharedToAll()); + Assertions.assertEquals("apnopotodp", response.properties().metadata().get("rqc")); + Assertions.assertEquals(ManagedPERequirement.REQUIRED, response.properties().peRequirement()); + Assertions.assertEquals(ManagedPEStatus.ACTIVE, response.properties().peStatus()); + Assertions.assertEquals("uuckrzwra", response.properties().sharedUserList().get(0)); + Assertions.assertEquals("y", response.properties().target()); + Assertions.assertTrue(response.properties().useWorkspaceManagedIdentity()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java index d07093c62d7a..68cb67c68f0a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.AmlUserFeature; @@ -21,21 +21,20 @@ public final class WorkspaceFeaturesListMockTests { @Test public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"vvogwghxoxw\",\"displayName\":\"qkkmpfnwdrmzw\",\"description\":\"smeaciyp\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"yww\",\"displayName\":\"ipkhqhvktcztm\",\"description\":\"k\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.workspaceFeatures().list("pmlrjnnbmodsytq", "vatujphqv", com.azure.core.util.Context.NONE); + = manager.workspaceFeatures().list("aawyy", "zwoeqljlwfq", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vvogwghxoxw", response.iterator().next().id()); - Assertions.assertEquals("qkkmpfnwdrmzw", response.iterator().next().displayName()); - Assertions.assertEquals("smeaciyp", response.iterator().next().description()); + Assertions.assertEquals("yww", response.iterator().next().id()); + Assertions.assertEquals("ipkhqhvktcztm", response.iterator().next().displayName()); + Assertions.assertEquals("k", response.iterator().next().description()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java index b55ced0cf712..8b16d6d33c97 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.generated; @@ -13,20 +13,19 @@ public final class WorkspaceHubConfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WorkspaceHubConfig model = BinaryData.fromString( - "{\"additionalWorkspaceStorageAccounts\":[\"tduqktapspwgcuer\",\"umkdosvqwhbmd\",\"bbjfddgmbmbexp\",\"bhtqqrolfpfpsa\"],\"defaultWorkspaceResourceGroup\":\"bquxigjy\"}") + "{\"additionalWorkspaceStorageAccounts\":[\"vqzntypmrbpizcdr\",\"j\",\"dpydn\"],\"defaultWorkspaceResourceGroup\":\"hxdeoejz\"}") .toObject(WorkspaceHubConfig.class); - Assertions.assertEquals("tduqktapspwgcuer", model.additionalWorkspaceStorageAccounts().get(0)); - Assertions.assertEquals("bquxigjy", model.defaultWorkspaceResourceGroup()); + Assertions.assertEquals("vqzntypmrbpizcdr", model.additionalWorkspaceStorageAccounts().get(0)); + Assertions.assertEquals("hxdeoejz", model.defaultWorkspaceResourceGroup()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WorkspaceHubConfig model = new WorkspaceHubConfig() - .withAdditionalWorkspaceStorageAccounts( - Arrays.asList("tduqktapspwgcuer", "umkdosvqwhbmd", "bbjfddgmbmbexp", "bhtqqrolfpfpsa")) - .withDefaultWorkspaceResourceGroup("bquxigjy"); + .withAdditionalWorkspaceStorageAccounts(Arrays.asList("vqzntypmrbpizcdr", "j", "dpydn")) + .withDefaultWorkspaceResourceGroup("hxdeoejz"); model = BinaryData.fromObject(model).toObject(WorkspaceHubConfig.class); - Assertions.assertEquals("tduqktapspwgcuer", model.additionalWorkspaceStorageAccounts().get(0)); - Assertions.assertEquals("bquxigjy", model.defaultWorkspaceResourceGroup()); + Assertions.assertEquals("vqzntypmrbpizcdr", model.additionalWorkspaceStorageAccounts().get(0)); + Assertions.assertEquals("hxdeoejz", model.defaultWorkspaceResourceGroup()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePrivateEndpointResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePrivateEndpointResourceTests.java new file mode 100644 index 000000000000..318fafef0f6e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePrivateEndpointResourceTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource; + +public final class WorkspacePrivateEndpointResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + WorkspacePrivateEndpointResource model + = BinaryData.fromString("{\"id\":\"zyiuokk\",\"subnetArmId\":\"hrdxwzywqsmbs\"}") + .toObject(WorkspacePrivateEndpointResource.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + WorkspacePrivateEndpointResource model = new WorkspacePrivateEndpointResource(); + model = BinaryData.fromObject(model).toObject(WorkspacePrivateEndpointResource.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java index 5a1818883d15..f66e7af31a6a 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workspaces().delete("hlutjs", "zelsr", true, com.azure.core.util.Context.NONE); + manager.workspaces().delete("jealkdbewho", "vbmyzuqfdqdktrj", false, com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java index 5c563bd87192..a61324a61941 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; @@ -20,21 +20,19 @@ public final class WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests { @Test public void testListOutboundNetworkDependenciesEndpointsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"category\":\"xjbrixymc\",\"endpoints\":[{}]}},{\"properties\":{\"category\":\"yvurhwishy\",\"endpoints\":[{},{},{},{}]}},{\"properties\":{\"category\":\"qfev\",\"endpoints\":[{},{},{},{}]}}]}"; + String responseStr = "{\"value\":[{\"properties\":{\"category\":\"rrhyjxcqcaczzvwa\",\"endpoints\":[{}]}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExternalFqdnResponse response = manager.workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse("uzltenlb", "xlmxozesndo", - com.azure.core.util.Context.NONE) + .listOutboundNetworkDependenciesEndpointsWithResponse("x", "xmlfouqpskva", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("xjbrixymc", response.value().get(0).properties().category()); + Assertions.assertEquals("rrhyjxcqcaczzvwa", response.value().get(0).properties().category()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java index 56ebd32e4983..ac45f68139ba 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.machinelearning.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.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.machinelearning.MachineLearningManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testResyncKeys() throws Exception { MachineLearningManager manager = MachineLearningManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.workspaces().resyncKeys("qwnjzebpicciyo", "poedksp", com.azure.core.util.Context.NONE); + manager.workspaces().resyncKeys("fzhhru", "m", com.azure.core.util.Context.NONE); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml b/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml new file mode 100644 index 000000000000..3f65a75c1174 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/machinelearningservices/MachineLearningServices.Management +commit: 96406064213bc7e5ee56208866e698fa679e42e8 +repo: Azure/azure-rest-api-specs +additionalDirectories: From 02fb6c261f34fbcf919bd7f24edc5b84a3877951 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 22 Jul 2026 11:16:27 +0000 Subject: [PATCH 2/4] Configurations: 'specification/machinelearningservices/MachineLearningServices.Management/tspconfig.yaml', and CommitSHA: '00ba16307ce7d82e80ad67cff0849a183f19a788' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6601240 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 706 +++++++++--------- .../SAMPLE.md | 10 +- .../fluent/models/ComputeSecretsInner.java | 4 +- .../models/{AKS.java => Aks.java} | 56 +- ...uteSecrets.java => AksComputeSecrets.java} | 26 +- ...n.java => AksNetworkingConfiguration.java} | 60 +- ...operties.java => AksSchemaProperties.java} | 74 +- .../machinelearning/models/Compute.java | 2 +- .../models/ComputeInstanceCreatedBy.java | 12 +- .../models/DockerCredential.java | 14 +- ...uthTypeWorkspaceConnectionProperties.java} | 74 +- .../WorkspaceConnectionPropertiesV2.java | 2 +- ...ourcemanager-machinelearning_metadata.json | 2 +- .../ComputeCreateOrUpdateSamples.java | 10 +- ...a => AksNetworkingConfigurationTests.java} | 18 +- .../tsp-location.yaml | 2 +- 16 files changed, 541 insertions(+), 531 deletions(-) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{AKS.java => Aks.java} (74%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{AKSComputeSecrets.java => AksComputeSecrets.java} (82%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{AKSNetworkingConfiguration.java => AksNetworkingConfiguration.java} (72%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{AKSSchemaProperties.java => AksSchemaProperties.java} (76%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{PATAuthTypeWorkspaceConnectionProperties.java => PatAuthTypeWorkspaceConnectionProperties.java} (76%) rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/{AKSNetworkingConfigurationTests.java => AksNetworkingConfigurationTests.java} (69%) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index 9cfb61070a2c..ccbd85fa47e1 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md @@ -16,8 +16,6 @@ #### `models.ComputeInstanceSchema` was removed -#### `models.Aks` was removed - #### `models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult` was removed #### `models.DataVersionBaseResourceArmPaginatedResult` was removed @@ -38,8 +36,6 @@ #### `models.ModelVersionResourceArmPaginatedResult` was removed -#### `models.AksSchemaProperties` was removed - #### `models.AssetJobOutput` was removed #### `models.PrivateEndpointConnectionListResult` was removed @@ -86,8 +82,6 @@ #### `models.EnvironmentVersionResourceArmPaginatedResult` was removed -#### `models.AksNetworkingConfiguration` was removed - #### `models.VirtualMachineSecretsSchema` was removed #### `models.BatchEndpointTrackedResourceArmPaginatedResult` was removed @@ -98,8 +92,6 @@ #### `models.KubernetesSchema` was removed -#### `models.AksComputeSecrets` was removed - #### `models.AksSchema` was removed #### `models.AssetJobInput` was removed @@ -142,8 +134,6 @@ #### `models.AzureDatastore` was removed -#### `models.PatAuthTypeWorkspaceConnectionProperties` was removed - #### `models.DataVersionBase$DefinitionStages` was modified * `withExistingData(java.lang.String,java.lang.String,java.lang.String)` was removed in stage 1 @@ -171,9 +161,9 @@ #### `models.EstimatedVMPrice` was modified * `EstimatedVMPrice()` was changed to private access +* `validate()` was removed * `withVmTier(models.VMTier)` was removed * `withRetailPrice(double)` was removed -* `validate()` was removed * `withOsType(models.VMPriceOSType)` was removed #### `models.ScaleSettingsInformation` was modified @@ -182,19 +172,19 @@ #### `models.WorkspaceConnectionPropertiesV2` was modified -* `withValueFormat(models.ValueFormat)` was removed -* `valueFormat()` was removed * `validate()` was removed -* `value()` was removed * `withValue(java.lang.String)` was removed +* `value()` was removed +* `valueFormat()` was removed +* `withValueFormat(models.ValueFormat)` was removed #### `models.BanditPolicy` was modified -* `java.lang.Float slackAmount()` -> `java.lang.Double slackAmount()` -* `validate()` was removed -* `withSlackFactor(java.lang.Float)` was removed * `java.lang.Float slackFactor()` -> `java.lang.Double slackFactor()` * `withSlackAmount(java.lang.Float)` was removed +* `withSlackFactor(java.lang.Float)` was removed +* `validate()` was removed +* `java.lang.Float slackAmount()` -> `java.lang.Double slackAmount()` #### `models.JobResourceConfiguration` was modified @@ -222,8 +212,8 @@ #### `models.AzureBlobDatastore` was modified -* `validate()` was removed * `isDefault()` was removed +* `validate()` was removed #### `models.AssetContainer` was modified @@ -243,34 +233,34 @@ #### `models.ImageModelSettingsObjectDetection` was modified -* `withMomentum(java.lang.Float)` was removed -* `withTileOverlapRatio(java.lang.Float)` was removed -* `withBeta1(java.lang.Float)` was removed -* `java.lang.Float tileOverlapRatio()` -> `java.lang.Double tileOverlapRatio()` -* `withTilePredictionsNmsThreshold(java.lang.Float)` was removed -* `java.lang.Float tilePredictionsNmsThreshold()` -> `java.lang.Double tilePredictionsNmsThreshold()` -* `withWeightDecay(java.lang.Float)` was removed -* `validate()` was removed * `withStepLRGamma(java.lang.Float)` was removed +* `withBeta1(java.lang.Float)` was removed +* `withValidationIouThreshold(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed * `withBeta2(java.lang.Float)` was removed +* `withNmsIouThreshold(java.lang.Float)` was removed +* `withWeightDecay(java.lang.Float)` was removed +* `java.lang.Float tilePredictionsNmsThreshold()` -> `java.lang.Double tilePredictionsNmsThreshold()` +* `withTileOverlapRatio(java.lang.Float)` was removed * `withWarmupCosineLRCycles(java.lang.Float)` was removed +* `java.lang.Float tileOverlapRatio()` -> `java.lang.Double tileOverlapRatio()` +* `validate()` was removed +* `withBoxScoreThreshold(java.lang.Float)` was removed * `java.lang.Float boxScoreThreshold()` -> `java.lang.Double boxScoreThreshold()` -* `java.lang.Float nmsIouThreshold()` -> `java.lang.Double nmsIouThreshold()` -* `withNmsIouThreshold(java.lang.Float)` was removed * `java.lang.Float validationIouThreshold()` -> `java.lang.Double validationIouThreshold()` -* `withValidationIouThreshold(java.lang.Float)` was removed -* `withLearningRate(java.lang.Float)` was removed -* `withBoxScoreThreshold(java.lang.Float)` was removed +* `withTilePredictionsNmsThreshold(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed +* `java.lang.Float nmsIouThreshold()` -> `java.lang.Double nmsIouThreshold()` #### `models.ManagedIdentityCredential` was modified * `ManagedIdentityCredential()` was changed to private access -* `withUserManagedIdentityTenantId(java.lang.String)` was removed +* `validate()` was removed * `withUserManagedIdentityClientId(java.lang.String)` was removed -* `withManagedIdentityType(java.lang.String)` was removed +* `withUserManagedIdentityTenantId(java.lang.String)` was removed * `withUserManagedIdentityPrincipalId(java.lang.String)` was removed +* `withManagedIdentityType(java.lang.String)` was removed * `withUserManagedIdentityResourceId(java.lang.String)` was removed -* `validate()` was removed #### `models.AmlToken` was modified @@ -302,12 +292,12 @@ #### `models.SynapseSpark` was modified -* `validate()` was removed -* `createdOn()` was removed * `isAttachedCompute()` was removed +* `validate()` was removed * `provisioningErrors()` was removed -* `provisioningState()` was removed +* `createdOn()` was removed * `modifiedOn()` was removed +* `provisioningState()` was removed #### `models.ScheduleProperties` was modified @@ -316,9 +306,9 @@ #### `models.FqdnEndpoints` was modified * `FqdnEndpoints()` was changed to private access -* `withProperties(models.FqdnEndpointsProperties)` was removed * `properties()` was removed * `validate()` was removed +* `withProperties(models.FqdnEndpointsProperties)` was removed #### `models.DefaultScaleSettings` was modified @@ -360,8 +350,8 @@ #### `models.AcrDetails` was modified * `validate()` was removed -* `userCreatedAcrAccount()` was removed * `withUserCreatedAcrAccount(models.UserCreatedAcrAccount)` was removed +* `userCreatedAcrAccount()` was removed #### `models.CodeConfiguration` was modified @@ -382,10 +372,9 @@ #### `models.DockerCredential` was modified * `DockerCredential()` was changed to private access -* `withUsername(java.lang.String)` was removed -* `username()` was removed * `validate()` was removed * `withPassword(java.lang.String)` was removed +* `withUsername(java.lang.String)` was removed #### `models.BatchDeploymentProperties` was modified @@ -395,6 +384,15 @@ * `validate()` was removed +#### `models.Aks` was modified + +* `provisioningErrors()` was removed +* `isAttachedCompute()` was removed +* `validate()` was removed +* `provisioningState()` was removed +* `modifiedOn()` was removed +* `createdOn()` was removed + #### `models.CustomMetricThreshold` was modified * `validate()` was removed @@ -417,12 +415,12 @@ #### `models.DataLakeAnalytics` was modified -* `provisioningErrors()` was removed +* `provisioningState()` was removed * `createdOn()` was removed -* `modifiedOn()` was removed -* `isAttachedCompute()` was removed * `validate()` was removed -* `provisioningState()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningErrors()` was removed #### `models.AutoTargetRollingWindowSize` was modified @@ -478,7 +476,6 @@ #### `models.ComputeInstanceCreatedBy` was modified * `ComputeInstanceCreatedBy()` was changed to private access -* `username()` was removed * `validate()` was removed #### `models.ModelVersionProperties` was modified @@ -627,11 +624,11 @@ #### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified +* `group()` was removed * `withValueFormat(models.ValueFormat)` was removed -* `validate()` was removed -* `withValue(java.lang.String)` was removed * `createdByWorkspaceArmId()` was removed -* `group()` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed #### `models.BatchEndpointDefaults` was modified @@ -664,17 +661,17 @@ #### `models.Workspaces` was modified -* `list(java.lang.String,com.azure.core.util.Context)` was removed * `listByResourceGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `list(java.lang.String,com.azure.core.util.Context)` was removed #### `models.Kubernetes` was modified -* `validate()` was removed * `isAttachedCompute()` was removed -* `modifiedOn()` was removed -* `provisioningErrors()` was removed +* `validate()` was removed * `createdOn()` was removed * `provisioningState()` was removed +* `provisioningErrors()` was removed +* `modifiedOn()` was removed #### `models.AllFeatures` was modified @@ -682,8 +679,8 @@ #### `models.ManagedOnlineDeployment` was modified -* `provisioningState()` was removed * `validate()` was removed +* `provisioningState()` was removed #### `models.NodeStateCounts` was modified @@ -714,23 +711,27 @@ * `validate()` was removed -#### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified +#### `models.AksSchemaProperties` was modified -* `withValue(java.lang.String)` was removed * `validate()` was removed -* `createdByWorkspaceArmId()` was removed + +#### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified + * `withValueFormat(models.ValueFormat)` was removed * `group()` was removed +* `createdByWorkspaceArmId()` was removed +* `validate()` was removed +* `withValue(java.lang.String)` was removed #### `models.FeatureProperties` was modified * `FeatureProperties()` was changed to private access -* `withFeatureName(java.lang.String)` was removed * `withTags(java.util.Map)` was removed -* `withDataType(models.FeatureDataType)` was removed -* `withProperties(java.util.Map)` was removed * `withDescription(java.lang.String)` was removed +* `withFeatureName(java.lang.String)` was removed +* `withProperties(java.util.Map)` was removed * `validate()` was removed +* `withDataType(models.FeatureDataType)` was removed #### `models.CustomModelJobInput` was modified @@ -754,9 +755,9 @@ #### `models.RegistryPartialManagedServiceIdentity` was modified -* `validate()` was removed * `java.util.UUID tenantId()` -> `java.lang.String tenantId()` * `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `validate()` was removed #### `models.UriFolderDataVersion` was modified @@ -785,11 +786,11 @@ #### `models.ComputeInstanceDataDisk` was modified * `ComputeInstanceDataDisk()` was changed to private access -* `withCaching(models.Caching)` was removed -* `withLun(java.lang.Integer)` was removed -* `withStorageAccountType(models.StorageAccountType)` was removed * `validate()` was removed +* `withStorageAccountType(models.StorageAccountType)` was removed * `withDiskSizeGB(java.lang.Integer)` was removed +* `withCaching(models.Caching)` was removed +* `withLun(java.lang.Integer)` was removed #### `models.RegistryPrivateEndpointConnection` was modified @@ -806,32 +807,32 @@ #### `models.ComputeInstanceApplication` was modified * `ComputeInstanceApplication()` was changed to private access +* `withEndpointUri(java.lang.String)` was removed * `withDisplayName(java.lang.String)` was removed * `validate()` was removed -* `withEndpointUri(java.lang.String)` was removed #### `models.PrivateLinkResource` was modified * `PrivateLinkResource()` was removed -* `java.lang.String groupId()` -> `java.lang.String groupId()` -* `withIdentity(models.ManagedServiceIdentity)` was removed -* `toJson(com.azure.json.JsonWriter)` was removed -* `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` * `java.lang.String name()` -> `java.lang.String name()` * `java.lang.String type()` -> `java.lang.String type()` -* `validate()` was removed -* `withRequiredZoneNames(java.util.List)` was removed -* `withLocation(java.lang.String)` was removed -* `models.Sku sku()` -> `models.Sku sku()` -* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` -* `java.util.List requiredMembers()` -> `java.util.List requiredMembers()` * `withTags(java.util.Map)` was removed * `fromJson(com.azure.json.JsonReader)` was removed -* `java.lang.String id()` -> `java.lang.String id()` -* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` +* `java.util.List requiredMembers()` -> `java.util.List requiredMembers()` +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` * `withSku(models.Sku)` was removed -* `java.lang.String location()` -> `java.lang.String location()` +* `toJson(com.azure.json.JsonWriter)` was removed +* `withRequiredZoneNames(java.util.List)` was removed * `java.util.Map tags()` -> `java.util.Map tags()` +* `validate()` was removed +* `models.Sku sku()` -> `models.Sku sku()` +* `java.lang.String location()` -> `java.lang.String location()` +* `java.lang.String groupId()` -> `java.lang.String groupId()` +* `withIdentity(models.ManagedServiceIdentity)` was removed +* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` +* `withLocation(java.lang.String)` was removed +* `java.lang.String id()` -> `java.lang.String id()` #### `models.PipelineJob` was modified @@ -857,8 +858,8 @@ #### `models.StorageAccountDetails` was modified -* `userCreatedStorageAccount()` was removed * `validate()` was removed +* `userCreatedStorageAccount()` was removed * `withUserCreatedStorageAccount(models.UserCreatedStorageAccount)` was removed #### `models.PartialMinimalTrackedResource` was modified @@ -903,12 +904,12 @@ #### `models.VirtualMachine` was modified -* `provisioningErrors()` was removed -* `validate()` was removed * `createdOn()` was removed +* `provisioningErrors()` was removed * `isAttachedCompute()` was removed -* `modifiedOn()` was removed * `provisioningState()` was removed +* `validate()` was removed +* `modifiedOn()` was removed #### `models.RegressionTrainingSettings` was modified @@ -921,23 +922,23 @@ #### `models.UpdateWorkspaceQuotas` was modified * `UpdateWorkspaceQuotas()` was changed to private access -* `validate()` was removed -* `withStatus(models.Status)` was removed * `withLimit(java.lang.Long)` was removed +* `withStatus(models.Status)` was removed +* `validate()` was removed #### `models.AmlCompute` was modified -* `createdOn()` was removed -* `provisioningErrors()` was removed +* `isAttachedCompute()` was removed * `validate()` was removed +* `provisioningErrors()` was removed * `provisioningState()` was removed -* `isAttachedCompute()` was removed * `modifiedOn()` was removed +* `createdOn()` was removed #### `models.AzureDataLakeGen2Datastore` was modified -* `validate()` was removed * `isDefault()` was removed +* `validate()` was removed #### `models.MonitoringTarget` was modified @@ -946,13 +947,13 @@ #### `models.ImageModelSettingsClassification` was modified * `withBeta1(java.lang.Float)` was removed -* `withLearningRate(java.lang.Float)` was removed -* `withStepLRGamma(java.lang.Float)` was removed -* `withMomentum(java.lang.Float)` was removed -* `withBeta2(java.lang.Float)` was removed * `withWarmupCosineLRCycles(java.lang.Float)` was removed * `validate()` was removed +* `withStepLRGamma(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed * `withWeightDecay(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed +* `withBeta2(java.lang.Float)` was removed #### `models.QueueSettings` was modified @@ -973,12 +974,12 @@ #### `models.Databricks` was modified -* `modifiedOn()` was removed -* `createdOn()` was removed -* `provisioningErrors()` was removed * `isAttachedCompute()` was removed -* `provisioningState()` was removed +* `provisioningErrors()` was removed * `validate()` was removed +* `provisioningState()` was removed +* `modifiedOn()` was removed +* `createdOn()` was removed #### `models.PrivateEndpointConnection$Update` was modified @@ -1002,11 +1003,11 @@ #### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified +* `withValueFormat(models.ValueFormat)` was removed * `createdByWorkspaceArmId()` was removed * `group()` was removed -* `withValue(java.lang.String)` was removed -* `withValueFormat(models.ValueFormat)` was removed * `validate()` was removed +* `withValue(java.lang.String)` was removed #### `models.UriFileJobInput` was modified @@ -1014,12 +1015,12 @@ #### `models.ComputeInstance` was modified -* `createdOn()` was removed -* `provisioningErrors()` was removed -* `validate()` was removed -* `modifiedOn()` was removed * `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningErrors()` was removed * `provisioningState()` was removed +* `createdOn()` was removed +* `validate()` was removed #### `models.AnonymousAccessCredential` was modified @@ -1029,11 +1030,11 @@ #### `models.SkuCapacity` was modified * `SkuCapacity()` was changed to private access -* `withDefaultProperty(java.lang.Integer)` was removed -* `withMinimum(java.lang.Integer)` was removed * `withScaleType(models.SkuScaleType)` was removed * `validate()` was removed +* `withDefaultProperty(java.lang.Integer)` was removed * `withMaximum(java.lang.Integer)` was removed +* `withMinimum(java.lang.Integer)` was removed #### `models.WorkspaceConnections` was modified @@ -1054,10 +1055,10 @@ #### `models.ComputeInstanceContainer` was modified * `ComputeInstanceContainer()` was changed to private access -* `withNetwork(models.Network)` was removed +* `validate()` was removed * `withName(java.lang.String)` was removed * `withEnvironment(models.ComputeInstanceEnvironmentInfo)` was removed -* `validate()` was removed +* `withNetwork(models.Network)` was removed * `withGpu(java.lang.String)` was removed * `withAutosave(models.Autosave)` was removed @@ -1108,10 +1109,10 @@ #### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified * `withValueFormat(models.ValueFormat)` was removed -* `validate()` was removed * `withValue(java.lang.String)` was removed -* `createdByWorkspaceArmId()` was removed * `group()` was removed +* `createdByWorkspaceArmId()` was removed +* `validate()` was removed #### `models.NotebookPreparationError` was modified @@ -1156,9 +1157,9 @@ * `ImageMetadata()` was changed to private access * `validate()` was removed +* `withIsLatestOsImageVersion(java.lang.Boolean)` was removed * `withCurrentImageVersion(java.lang.String)` was removed * `withLatestImageVersion(java.lang.String)` was removed -* `withIsLatestOsImageVersion(java.lang.Boolean)` was removed #### `models.ScheduleActionBase` was modified @@ -1178,19 +1179,19 @@ #### `models.CustomKeysWorkspaceConnectionProperties` was modified +* `createdByWorkspaceArmId()` was removed * `withValue(java.lang.String)` was removed * `withValueFormat(models.ValueFormat)` was removed -* `createdByWorkspaceArmId()` was removed -* `group()` was removed * `validate()` was removed +* `group()` was removed #### `models.CertificateDatastoreCredentials` was modified -* `withTenantId(java.util.UUID)` was removed * `java.util.UUID tenantId()` -> `java.lang.String tenantId()` * `java.util.UUID clientId()` -> `java.lang.String clientId()` * `validate()` was removed * `withClientId(java.util.UUID)` was removed +* `withTenantId(java.util.UUID)` was removed #### `models.CustomKeys` was modified @@ -1207,18 +1208,18 @@ #### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified * `withValueFormat(models.ValueFormat)` was removed -* `group()` was removed -* `withValue(java.lang.String)` was removed -* `createdByWorkspaceArmId()` was removed * `validate()` was removed +* `createdByWorkspaceArmId()` was removed +* `withValue(java.lang.String)` was removed +* `group()` was removed #### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed -* `createdByWorkspaceArmId()` was removed -* `group()` was removed * `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed * `validate()` was removed +* `group()` was removed #### `models.ServiceManagedResourcesSettings` was modified @@ -1249,43 +1250,43 @@ #### `models.WorkspaceUpdateParameters` was modified * `WorkspaceUpdateParameters()` was removed -* `models.Sku sku()` -> `models.Sku sku()` +* `withV1LegacyMode(java.lang.Boolean)` was removed +* `withFriendlyName(java.lang.String)` was removed +* `java.lang.Boolean v1LegacyMode()` -> `java.lang.Boolean v1LegacyMode()` +* `withDescription(java.lang.String)` was removed * `withPrimaryUserAssignedIdentity(java.lang.String)` was removed * `fromJson(com.azure.json.JsonReader)` was removed -* `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -> `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -* `fluent.models.ManagedNetworkSettingsInner managedNetwork()` -> `models.ManagedNetworkSettings managedNetwork()` -* `withImageBuildCompute(java.lang.String)` was removed -* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` -* `models.ServerlessComputeSettings serverlessComputeSettings()` -> `models.ServerlessComputeSettings serverlessComputeSettings()` -* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed -* `withV1LegacyMode(java.lang.Boolean)` was removed -* `java.lang.String description()` -> `java.lang.String description()` * `toJson(com.azure.json.JsonWriter)` was removed -* `models.EncryptionUpdateProperties encryption()` -> `models.EncryptionUpdateProperties encryption()` -* `withDescription(java.lang.String)` was removed * `withContainerRegistry(java.lang.String)` was removed -* `withSku(models.Sku)` was removed -* `withFeatureStoreSettings(models.FeatureStoreSettings)` was removed -* `withManagedNetwork(fluent.models.ManagedNetworkSettingsInner)` was removed -* `withServerlessComputeSettings(models.ServerlessComputeSettings)` was removed +* `withIdentity(models.ManagedServiceIdentity)` was removed * `java.lang.String friendlyName()` -> `java.lang.String friendlyName()` +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed +* `java.lang.String containerRegistry()` -> `java.lang.String containerRegistry()` +* `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -> `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` * `validate()` was removed -* `java.lang.String imageBuildCompute()` -> `java.lang.String imageBuildCompute()` -* `java.lang.String applicationInsights()` -> `java.lang.String applicationInsights()` -* `withApplicationInsights(java.lang.String)` was removed -* `withEncryption(models.EncryptionUpdateProperties)` was removed -* `withServiceManagedResourcesSettings(models.ServiceManagedResourcesSettings)` was removed -* `java.lang.Boolean enableDataIsolation()` -> `java.lang.Boolean enableDataIsolation()` +* `fluent.models.ManagedNetworkSettingsInner managedNetwork()` -> `models.ManagedNetworkSettings managedNetwork()` +* `withServerlessComputeSettings(models.ServerlessComputeSettings)` was removed * `java.util.Map tags()` -> `java.util.Map tags()` +* `withFeatureStoreSettings(models.FeatureStoreSettings)` was removed +* `withEnableDataIsolation(java.lang.Boolean)` was removed +* `java.lang.String description()` -> `java.lang.String description()` +* `withEncryption(models.EncryptionUpdateProperties)` was removed * `models.FeatureStoreSettings featureStoreSettings()` -> `models.FeatureStoreSettings featureStoreSettings()` +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `java.lang.Boolean enableDataIsolation()` -> `java.lang.Boolean enableDataIsolation()` +* `withManagedNetwork(fluent.models.ManagedNetworkSettingsInner)` was removed +* `withServiceManagedResourcesSettings(models.ServiceManagedResourcesSettings)` was removed +* `withSku(models.Sku)` was removed +* `java.lang.String imageBuildCompute()` -> `java.lang.String imageBuildCompute()` +* `models.Sku sku()` -> `models.Sku sku()` +* `withImageBuildCompute(java.lang.String)` was removed * `withTags(java.util.Map)` was removed -* `java.lang.Boolean v1LegacyMode()` -> `java.lang.Boolean v1LegacyMode()` -* `withFriendlyName(java.lang.String)` was removed +* `withApplicationInsights(java.lang.String)` was removed +* `java.lang.String applicationInsights()` -> `java.lang.String applicationInsights()` * `java.lang.String primaryUserAssignedIdentity()` -> `java.lang.String primaryUserAssignedIdentity()` -* `withIdentity(models.ManagedServiceIdentity)` was removed -* `withEnableDataIsolation(java.lang.Boolean)` was removed -* `java.lang.String containerRegistry()` -> `java.lang.String containerRegistry()` -* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` +* `models.ServerlessComputeSettings serverlessComputeSettings()` -> `models.ServerlessComputeSettings serverlessComputeSettings()` +* `models.EncryptionUpdateProperties encryption()` -> `models.EncryptionUpdateProperties encryption()` #### `models.ComputeRuntimeDto` was modified @@ -1370,16 +1371,16 @@ #### `models.DiagnoseResponseResultValue` was modified * `DiagnoseResponseResultValue()` was changed to private access -* `withKeyVaultResults(java.util.List)` was removed -* `withDnsResolutionResults(java.util.List)` was removed -* `withStorageAccountResults(java.util.List)` was removed -* `validate()` was removed -* `withApplicationInsightsResults(java.util.List)` was removed * `withNetworkSecurityRuleResults(java.util.List)` was removed +* `withResourceLockResults(java.util.List)` was removed * `withUserDefinedRouteResults(java.util.List)` was removed -* `withOtherResults(java.util.List)` was removed +* `withStorageAccountResults(java.util.List)` was removed +* `withDnsResolutionResults(java.util.List)` was removed +* `withKeyVaultResults(java.util.List)` was removed * `withContainerRegistryResults(java.util.List)` was removed -* `withResourceLockResults(java.util.List)` was removed +* `validate()` was removed +* `withOtherResults(java.util.List)` was removed +* `withApplicationInsightsResults(java.util.List)` was removed #### `models.SasDatastoreCredentials` was modified @@ -1387,11 +1388,15 @@ #### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed * `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed * `validate()` was removed * `createdByWorkspaceArmId()` was removed -* `group()` was removed + +#### `models.AksNetworkingConfiguration` was modified + +* `validate()` was removed #### `models.CategoricalDataQualityMetricThreshold` was modified @@ -1413,19 +1418,19 @@ #### `models.AadAuthTypeWorkspaceConnectionProperties` was modified -* `group()` was removed -* `withValue(java.lang.String)` was removed -* `validate()` was removed * `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed * `createdByWorkspaceArmId()` was removed +* `validate()` was removed +* `withValue(java.lang.String)` was removed #### `models.BlobReferenceForConsumptionDto` was modified * `BlobReferenceForConsumptionDto()` was changed to private access +* `withStorageAccountArmId(java.lang.String)` was removed * `withBlobUri(java.lang.String)` was removed -* `validate()` was removed * `withCredential(models.PendingUploadCredentialDto)` was removed -* `withStorageAccountArmId(java.lang.String)` was removed +* `validate()` was removed #### `models.VolumeDefinition` was modified @@ -1458,23 +1463,23 @@ #### `models.ManagedServiceIdentity` was modified -* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` -* `validate()` was removed * `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `validate()` was removed +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` #### `models.EstimatedVMPrices` was modified * `EstimatedVMPrices()` was changed to private access -* `validate()` was removed -* `withBillingCurrency(models.BillingCurrency)` was removed -* `withUnitOfMeasure(models.UnitOfMeasure)` was removed * `withValues(java.util.List)` was removed +* `withUnitOfMeasure(models.UnitOfMeasure)` was removed +* `withBillingCurrency(models.BillingCurrency)` was removed +* `validate()` was removed #### `models.ServerlessInferenceEndpoint` was modified * `ServerlessInferenceEndpoint()` was changed to private access -* `withUri(java.lang.String)` was removed * `validate()` was removed +* `withUri(java.lang.String)` was removed #### `models.TextClassificationMultilabel` was modified @@ -1492,6 +1497,14 @@ * `validate()` was removed +#### `models.AksComputeSecrets` was modified + +* `AksComputeSecrets()` was changed to private access +* `validate()` was removed +* `withUserKubeConfig(java.lang.String)` was removed +* `withAdminKubeConfig(java.lang.String)` was removed +* `withImagePullSecretName(java.lang.String)` was removed + #### `models.PersonalComputeInstanceSettings` was modified * `validate()` was removed @@ -1507,9 +1520,9 @@ #### `models.VirtualMachineSize` was modified * `VirtualMachineSize()` was changed to private access -* `withSupportedComputeTypes(java.util.List)` was removed -* `withEstimatedVMPrices(models.EstimatedVMPrices)` was removed * `validate()` was removed +* `withEstimatedVMPrices(models.EstimatedVMPrices)` was removed +* `withSupportedComputeTypes(java.util.List)` was removed #### `models.ModelSettings` was modified @@ -1594,24 +1607,24 @@ #### `models.ComputeInstanceEnvironmentInfo` was modified * `ComputeInstanceEnvironmentInfo()` was changed to private access -* `validate()` was removed * `withName(java.lang.String)` was removed +* `validate()` was removed * `withVersion(java.lang.String)` was removed #### `models.GetBlobReferenceForConsumptionDto` was modified * `GetBlobReferenceForConsumptionDto()` was changed to private access -* `withCredential(models.DataReferenceCredential)` was removed -* `validate()` was removed * `withStorageAccountArmId(java.lang.String)` was removed * `withBlobUri(java.lang.String)` was removed +* `validate()` was removed +* `withCredential(models.DataReferenceCredential)` was removed #### `models.SkuSetting` was modified * `SkuSetting()` was changed to private access -* `validate()` was removed -* `withTier(models.SkuTier)` was removed * `withName(java.lang.String)` was removed +* `withTier(models.SkuTier)` was removed +* `validate()` was removed #### `models.MonitorEmailNotificationSettings` was modified @@ -1641,8 +1654,8 @@ #### `models.SasCredential` was modified * `SasCredential()` was changed to private access -* `validate()` was removed * `withSasUri(java.lang.String)` was removed +* `validate()` was removed #### `models.NotificationSetting` was modified @@ -1650,11 +1663,11 @@ #### `models.SasAuthTypeWorkspaceConnectionProperties` was modified -* `withValue(java.lang.String)` was removed * `validate()` was removed -* `createdByWorkspaceArmId()` was removed * `withValueFormat(models.ValueFormat)` was removed * `group()` was removed +* `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed #### `models.BatchDeploymentConfiguration` was modified @@ -1663,8 +1676,8 @@ #### `models.SasCredentialDto` was modified * `SasCredentialDto()` was changed to private access -* `withSasUri(java.lang.String)` was removed * `validate()` was removed +* `withSasUri(java.lang.String)` was removed #### `models.ServiceTagOutboundRule` was modified @@ -1682,8 +1695,8 @@ * `FqdnEndpoint()` was changed to private access * `withEndpointDetails(java.util.List)` was removed -* `withDomainName(java.lang.String)` was removed * `validate()` was removed +* `withDomainName(java.lang.String)` was removed #### `models.MLTableJobInput` was modified @@ -1699,9 +1712,9 @@ #### `models.WorkspaceConnectionOAuth2` was modified -* `validate()` was removed -* `withClientId(java.util.UUID)` was removed * `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `withClientId(java.util.UUID)` was removed +* `validate()` was removed #### `models.PartialRegistryPartialTrackedResource` was modified @@ -1717,9 +1730,9 @@ #### `models.EncryptionProperty` was modified -* `withKeyVaultProperties(models.EncryptionKeyVaultProperties)` was removed * `models.EncryptionKeyVaultProperties keyVaultProperties()` -> `models.KeyVaultProperties keyVaultProperties()` * `validate()` was removed +* `withKeyVaultProperties(models.EncryptionKeyVaultProperties)` was removed #### `models.FeaturestoreEntityVersionProperties` was modified @@ -1746,11 +1759,11 @@ #### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified +* `validate()` was removed +* `withValue(java.lang.String)` was removed * `withValueFormat(models.ValueFormat)` was removed * `createdByWorkspaceArmId()` was removed * `group()` was removed -* `withValue(java.lang.String)` was removed -* `validate()` was removed #### `models.RegistryListCredentialsResult` was modified @@ -1764,11 +1777,11 @@ #### `models.ServicePrincipalDatastoreCredentials` was modified -* `withTenantId(java.util.UUID)` was removed * `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `withClientId(java.util.UUID)` was removed * `validate()` was removed * `java.util.UUID tenantId()` -> `java.lang.String tenantId()` -* `withClientId(java.util.UUID)` was removed +* `withTenantId(java.util.UUID)` was removed #### `models.ServiceTagDestination` was modified @@ -1792,12 +1805,12 @@ #### `models.DataFactory` was modified -* `isAttachedCompute()` was removed * `provisioningState()` was removed -* `createdOn()` was removed * `modifiedOn()` was removed +* `isAttachedCompute()` was removed * `provisioningErrors()` was removed * `validate()` was removed +* `createdOn()` was removed #### `models.CustomTargetRollingWindowSize` was modified @@ -1825,21 +1838,21 @@ #### `models.ImageModelSettings` was modified -* `withMomentum(java.lang.Float)` was removed -* `java.lang.Float stepLRGamma()` -> `java.lang.Double stepLRGamma()` -* `java.lang.Float momentum()` -> `java.lang.Double momentum()` -* `java.lang.Float weightDecay()` -> `java.lang.Double weightDecay()` -* `java.lang.Float warmupCosineLRCycles()` -> `java.lang.Double warmupCosineLRCycles()` +* `validate()` was removed * `withWeightDecay(java.lang.Float)` was removed +* `java.lang.Float stepLRGamma()` -> `java.lang.Double stepLRGamma()` * `java.lang.Float beta2()` -> `java.lang.Double beta2()` -* `java.lang.Float learningRate()` -> `java.lang.Double learningRate()` -* `java.lang.Float beta1()` -> `java.lang.Double beta1()` -* `withStepLRGamma(java.lang.Float)` was removed +* `withWarmupCosineLRCycles(java.lang.Float)` was removed +* `withBeta2(java.lang.Float)` was removed * `withLearningRate(java.lang.Float)` was removed +* `java.lang.Float momentum()` -> `java.lang.Double momentum()` +* `java.lang.Float learningRate()` -> `java.lang.Double learningRate()` +* `java.lang.Float warmupCosineLRCycles()` -> `java.lang.Double warmupCosineLRCycles()` * `withBeta1(java.lang.Float)` was removed -* `validate()` was removed -* `withBeta2(java.lang.Float)` was removed -* `withWarmupCosineLRCycles(java.lang.Float)` was removed +* `java.lang.Float weightDecay()` -> `java.lang.Double weightDecay()` +* `withMomentum(java.lang.Float)` was removed +* `withStepLRGamma(java.lang.Float)` was removed +* `java.lang.Float beta1()` -> `java.lang.Double beta1()` #### `models.CustomMonitoringSignal` was modified @@ -1859,10 +1872,10 @@ #### `models.ManagedIdentity` was modified +* `java.util.UUID clientId()` -> `java.lang.String clientId()` * `java.util.UUID objectId()` -> `java.lang.String objectId()` * `withObjectId(java.util.UUID)` was removed * `withClientId(java.util.UUID)` was removed -* `java.util.UUID clientId()` -> `java.lang.String clientId()` * `validate()` was removed #### `models.CreateMonitorAction` was modified @@ -1973,8 +1986,8 @@ #### `models.AutoMLJob` was modified -* `validate()` was removed * `status()` was removed +* `validate()` was removed #### `models.AmlTokenComputeIdentity` was modified @@ -2004,9 +2017,9 @@ * `isAttachedCompute()` was removed * `validate()` was removed -* `modifiedOn()` was removed -* `provisioningState()` was removed * `createdOn()` was removed +* `provisioningState()` was removed +* `modifiedOn()` was removed * `provisioningErrors()` was removed #### `models.KubernetesOnlineDeployment` was modified @@ -2024,9 +2037,9 @@ #### `models.OnlineEndpointProperties` was modified +* `validate()` was removed * `withPublicNetworkAccess(models.PublicNetworkAccessType)` was removed * `models.PublicNetworkAccessType publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` -* `validate()` was removed #### `models.CustomSeasonality` was modified @@ -2047,8 +2060,8 @@ #### `models.FqdnEndpointDetail` was modified * `FqdnEndpointDetail()` was changed to private access -* `withPort(java.lang.Integer)` was removed * `validate()` was removed +* `withPort(java.lang.Integer)` was removed #### `models.MonitorComputeIdentityBase` was modified @@ -2062,10 +2075,10 @@ * `ComputeInstanceLastOperation()` was changed to private access * `withOperationTrigger(models.OperationTrigger)` was removed -* `validate()` was removed -* `withOperationName(models.OperationName)` was removed * `withOperationTime(java.time.OffsetDateTime)` was removed +* `withOperationName(models.OperationName)` was removed * `withOperationStatus(models.OperationStatus)` was removed +* `validate()` was removed #### `models.ForecastingSettings` was modified @@ -2089,9 +2102,9 @@ #### `models.RegistryPrivateLinkServiceConnectionState` was modified -* `models.EndpointServiceConnectionStatus status()` -> `models.PrivateEndpointServiceConnectionStatus status()` -* `withStatus(models.EndpointServiceConnectionStatus)` was removed * `validate()` was removed +* `withStatus(models.EndpointServiceConnectionStatus)` was removed +* `models.EndpointServiceConnectionStatus status()` -> `models.PrivateEndpointServiceConnectionStatus status()` #### `models.FixedInputData` was modified @@ -2099,9 +2112,9 @@ #### `models.UserAssignedIdentity` was modified -* `java.util.UUID principalId()` -> `java.lang.String principalId()` -* `validate()` was removed * `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `validate()` was removed +* `java.util.UUID principalId()` -> `java.lang.String principalId()` #### `models.DataLakeAnalyticsSchemaProperties` was modified @@ -2119,6 +2132,14 @@ * `validate()` was removed +#### `models.PatAuthTypeWorkspaceConnectionProperties` was modified + +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed + #### `models.ComputeSchedules` was modified * `validate()` was removed @@ -2205,8 +2226,6 @@ * `models.EndpointModelSkuProperties` was added -* `models.AKSSchemaProperties` was added - * `models.InferenceGroup` was added * `models.EndpointResourcePropertiesBasicResource$UpdateStages` was added @@ -2249,8 +2268,6 @@ * `models.EndpointResourcePropertiesBasicResource$Update` was added -* `models.AKSComputeSecrets` was added - * `models.AllowedContentLevel` was added * `models.EndpointDeploymentResourcePropertiesBasicResource$Update` was added @@ -2361,8 +2378,6 @@ * `models.JupyterKernelConfig` was added -* `models.AKS` was added - * `models.ConnectionRaiBlocklistsOperations` was added * `models.ManagedNetworkSettingsEx` was added @@ -2425,16 +2440,12 @@ * `models.WorkspacePrivateEndpointResource` was added -* `models.PATAuthTypeWorkspaceConnectionProperties` was added - * `models.NetworkAcls` was added * `models.SpeechEndpointDeploymentResourceProperties` was added * `models.InferencePoolProperties` was added -* `models.AKSNetworkingConfiguration` was added - * `models.RaiPolicyPropertiesBasicResource` was added * `models.RaiPolicyContentSource` was added @@ -2517,8 +2528,8 @@ #### `models.DiagnoseRequestProperties` was modified -* `requiredResourceProviders()` was added * `withRequiredResourceProviders(java.util.Map)` was added +* `requiredResourceProviders()` was added #### `models.ConnectionCategory` was modified @@ -2543,13 +2554,13 @@ #### `models.WorkspaceConnectionPropertiesV2` was modified +* `peStatus()` was added +* `withError(java.lang.String)` was added +* `peRequirement()` was added * `withPeRequirement(models.ManagedPERequirement)` was added -* `error()` was added -* `withPeStatus(models.ManagedPEStatus)` was added * `useWorkspaceManagedIdentity()` was added -* `peRequirement()` was added -* `withError(java.lang.String)` was added -* `peStatus()` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `error()` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.BanditPolicy` was modified @@ -2564,23 +2575,23 @@ #### `models.MLFlowModelJobOutput` was modified -* `assetName()` was added * `withAssetName(java.lang.String)` was added +* `assetName()` was added #### `models.ImageModelSettingsObjectDetection` was modified -* `withValidationIouThreshold(java.lang.Double)` was added -* `withBoxScoreThreshold(java.lang.Double)` was added -* `withWarmupCosineLRCycles(java.lang.Double)` was added -* `withBeta2(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added * `withTileOverlapRatio(java.lang.Double)` was added * `withWeightDecay(java.lang.Double)` was added * `withMomentum(java.lang.Double)` was added -* `withStepLRGamma(java.lang.Double)` was added -* `withNmsIouThreshold(java.lang.Double)` was added -* `withTilePredictionsNmsThreshold(java.lang.Double)` was added -* `withBeta1(java.lang.Double)` was added +* `withWarmupCosineLRCycles(java.lang.Double)` was added +* `withValidationIouThreshold(java.lang.Double)` was added * `withLearningRate(java.lang.Double)` was added +* `withBeta1(java.lang.Double)` was added +* `withBeta2(java.lang.Double)` was added +* `withTilePredictionsNmsThreshold(java.lang.Double)` was added +* `withNmsIouThreshold(java.lang.Double)` was added +* `withBoxScoreThreshold(java.lang.Double)` was added #### `models.ComputeInstanceState` was modified @@ -2591,10 +2602,6 @@ * `category()` was added * `endpoints()` was added -#### `models.DockerCredential` was modified - -* `userName()` was added - #### `models.Registry` was modified * `managedResourceGroupSettings()` was added @@ -2602,11 +2609,11 @@ #### `models.Workspace$Update` was modified * `withIpAllowlist(java.util.List)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added * `withSoftDeleteRetentionInDays(java.lang.Integer)` was added -* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added * `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added * `withNetworkAcls(models.NetworkAcls)` was added -* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added #### `models.Image` was modified @@ -2617,10 +2624,6 @@ * `withPrivateEndpoint(models.WorkspacePrivateEndpointResource)` was added -#### `models.ComputeInstanceCreatedBy` was modified - -* `userName()` was added - #### `models.ModelVersionProperties` was modified * `withDatasets(java.util.List)` was added @@ -2628,13 +2631,13 @@ #### `models.OnlineDeploymentProperties` was modified -* `withStartupProbe(models.ProbeSettings)` was added * `startupProbe()` was added +* `withStartupProbe(models.ProbeSettings)` was added #### `models.InferenceContainerProperties` was modified -* `startupRoute()` was added * `withStartupRoute(models.Route)` was added +* `startupRoute()` was added #### `models.OperationStatus` was modified @@ -2647,9 +2650,9 @@ #### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified * `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added -* `withPeStatus(models.ManagedPEStatus)` was added #### `models.PrivateEndpointOutboundRule` was modified @@ -2667,21 +2670,21 @@ #### `models.EnvironmentVersionProperties` was modified -* `withImageDetails(models.ImageDetails)` was added * `imageDetails()` was added +* `withImageDetails(models.ImageDetails)` was added #### `models.Computes` was modified +* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema,com.azure.core.util.Context)` was added * `updateDataMountsWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added -* `updateIdleShutdownSettingWithResponse(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting,com.azure.core.util.Context)` was added -* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added -* `updateDataMounts(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added -* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added * `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema)` was added +* `updateIdleShutdownSettingWithResponse(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting,com.azure.core.util.Context)` was added * `getAllowedResizeSizes(java.lang.String,java.lang.String,java.lang.String)` was added -* `updateIdleShutdownSetting(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting)` was added +* `updateDataMounts(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added * `updateCustomServices(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added -* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema,com.azure.core.util.Context)` was added +* `updateIdleShutdownSetting(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting)` was added +* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added #### `models.ConnectionAuthType` was modified @@ -2695,26 +2698,26 @@ #### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added * `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.Workspace$Definition` was modified -* `withKeyVaults(java.util.List)` was added -* `withNetworkAcls(models.NetworkAcls)` was added -* `withExistingWorkspaces(java.util.List)` was added -* `withEnableServiceSideCmkEncryption(java.lang.Boolean)` was added -* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added -* `withEnableSimplifiedCmk(java.lang.Boolean)` was added * `withStorageAccounts(java.util.List)` was added * `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added -* `withIpAllowlist(java.util.List)` was added +* `withExistingWorkspaces(java.util.List)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `withEnableServiceSideCmkEncryption(java.lang.Boolean)` was added * `withProvisionNetworkNow(java.lang.Boolean)` was added +* `withIpAllowlist(java.util.List)` was added +* `withEnableSimplifiedCmk(java.lang.Boolean)` was added +* `withKeyVaults(java.util.List)` was added * `withContainerRegistries(java.util.List)` was added -* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added -* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added #### `models.Datastores` was modified @@ -2730,13 +2733,13 @@ #### `models.ImageModelSettingsClassification` was modified +* `withWeightDecay(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added * `withLearningRate(java.lang.Double)` was added * `withWarmupCosineLRCycles(java.lang.Double)` was added -* `withStepLRGamma(java.lang.Double)` was added * `withBeta2(java.lang.Double)` was added -* `withMomentum(java.lang.Double)` was added -* `withWeightDecay(java.lang.Double)` was added * `withBeta1(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added #### `models.PrivateEndpointConnection$Update` was modified @@ -2744,15 +2747,15 @@ #### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified -* `withPeRequirement(models.ManagedPERequirement)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added * `withPeStatus(models.ManagedPEStatus)` was added #### `models.WorkspaceConnections` was modified -* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added * `testConnection(java.lang.String,java.lang.String,java.lang.String)` was added +* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added * `testConnection(java.lang.String,java.lang.String,java.lang.String,fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added #### `models.ManagedNetworkSettings` was modified @@ -2764,25 +2767,25 @@ #### `models.Workspace` was modified +* `systemDatastoresAuthMode()` was added +* `storageAccounts()` was added +* `networkAcls()` was added * `existingWorkspaces()` was added * `softDeleteRetentionInDays()` was added * `ipAllowlist()` was added -* `allowRoleAssignmentOnRG()` was added +* `provisionNetworkNow()` was added +* `enableServiceSideCmkEncryption()` was added * `agentsEndpointUri()` was added -* `systemDatastoresAuthMode()` was added +* `enableSoftwareBillOfMaterials()` was added * `containerRegistries()` was added -* `enableServiceSideCmkEncryption()` was added -* `storageAccounts()` was added -* `provisionNetworkNow()` was added -* `networkAcls()` was added * `enableSimplifiedCmk()` was added * `keyVaults()` was added -* `enableSoftwareBillOfMaterials()` was added +* `allowRoleAssignmentOnRG()` was added #### `models.UriFileJobOutput` was modified -* `assetName()` was added * `withAssetName(java.lang.String)` was added +* `assetName()` was added #### `models.Datastore` was modified @@ -2790,32 +2793,32 @@ #### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added * `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `MachineLearningManager` was modified -* `capabilityHosts()` was added -* `outboundRules()` was added +* `endpoints()` was added +* `raiPolicies()` was added * `connections()` was added -* `outboundRulesOperations()` was added -* `endpointDeployments()` was added * `inferenceGroups()` was added -* `managedNetworkSettingsOperations()` was added -* `connectionRaiBlocklistsOperations()` was added -* `connectionRaiBlocklistItemsOperations()` was added * `inferencePools()` was added -* `inferenceEndpoints()` was added * `connectionRaiPolicies()` was added -* `raiPoliciesOperations()` was added -* `endpoints()` was added -* `connectionRaiPoliciesOperations()` was added -* `raiPolicies()` was added +* `inferenceEndpoints()` was added * `connectionRaiBlocklists()` was added * `pTUQuotas()` was added +* `endpointDeployments()` was added +* `raiPoliciesOperations()` was added +* `capabilityHosts()` was added * `connectionRaiBlocklistItems()` was added +* `connectionRaiBlocklistsOperations()` was added +* `outboundRules()` was added +* `outboundRulesOperations()` was added +* `managedNetworkSettingsOperations()` was added +* `connectionRaiBlocklistItemsOperations()` was added +* `connectionRaiPoliciesOperations()` was added #### `models.ImageMetadata` was modified @@ -2823,27 +2826,27 @@ #### `models.CustomKeysWorkspaceConnectionProperties` was modified -* `withPeRequirement(models.ManagedPERequirement)` was added -* `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `models.CertificateDatastoreCredentials` was modified -* `withClientId(java.lang.String)` was added * `withTenantId(java.lang.String)` was added +* `withClientId(java.lang.String)` was added #### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified -* `withPeRequirement(models.ManagedPERequirement)` was added -* `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added @@ -2853,20 +2856,20 @@ #### `models.WorkspacePropertiesUpdateParameters` was modified -* `ipAllowlist()` was added * `networkAcls()` was added -* `enableSoftwareBillOfMaterials()` was added -* `allowRoleAssignmentOnRG()` was added * `softDeleteRetentionInDays()` was added * `systemDatastoresAuthMode()` was added +* `ipAllowlist()` was added +* `allowRoleAssignmentOnRG()` was added +* `enableSoftwareBillOfMaterials()` was added #### `models.WorkspaceUpdateParameters` was modified -* `networkAcls()` was added -* `systemDatastoresAuthMode()` was added -* `enableSoftwareBillOfMaterials()` was added * `ipAllowlist()` was added +* `enableSoftwareBillOfMaterials()` was added +* `networkAcls()` was added * `allowRoleAssignmentOnRG()` was added +* `systemDatastoresAuthMode()` was added * `innerModel()` was added * `softDeleteRetentionInDays()` was added @@ -2883,27 +2886,27 @@ #### `models.MLTableJobOutput` was modified -* `assetName()` was added * `withAssetName(java.lang.String)` was added +* `assetName()` was added #### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified * `withPeStatus(models.ManagedPEStatus)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added -* `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added +* `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.CustomService` was modified -* `kernel()` was added * `withKernel(models.JupyterKernelConfig)` was added +* `kernel()` was added #### `models.AadAuthTypeWorkspaceConnectionProperties` was modified -* `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `models.TritonModelJobOutput` was modified @@ -2912,27 +2915,27 @@ #### `models.WorkspaceConnectionPropertiesV2BasicResource` was modified -* `testConnection(fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added * `update()` was added -* `testConnection()` was added * `resourceGroupName()` was added +* `testConnection()` was added +* `testConnection(fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added #### `models.WorkspaceProperties` was modified -* `enableSoftwareBillOfMaterials()` was added -* `containerRegistries()` was added -* `softDeleteRetentionInDays()` was added * `existingWorkspaces()` was added -* `keyVaults()` was added -* `systemDatastoresAuthMode()` was added +* `networkAcls()` was added +* `enableSoftwareBillOfMaterials()` was added * `enableSimplifiedCmk()` was added * `ipAllowlist()` was added +* `systemDatastoresAuthMode()` was added +* `provisionNetworkNow()` was added * `enableServiceSideCmkEncryption()` was added -* `agentsEndpointUri()` was added -* `storageAccounts()` was added -* `networkAcls()` was added * `allowRoleAssignmentOnRG()` was added -* `provisionNetworkNow()` was added +* `softDeleteRetentionInDays()` was added +* `storageAccounts()` was added +* `containerRegistries()` was added +* `keyVaults()` was added +* `agentsEndpointUri()` was added #### `models.OutboundRule` was modified @@ -2941,16 +2944,16 @@ #### `models.ComputeResource` was modified -* `updateIdleShutdownSettingWithResponse(models.IdleShutdownSetting,com.azure.core.util.Context)` was added -* `updateIdleShutdownSetting(models.IdleShutdownSetting)` was added -* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added -* `getAllowedResizeSizes()` was added -* `resize(models.ResizeSchema)` was added * `updateDataMounts(java.util.List)` was added -* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added +* `resize(models.ResizeSchema)` was added +* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added * `getAllowedResizeSizesWithResponse(com.azure.core.util.Context)` was added * `updateCustomServices(java.util.List)` was added * `updateCustomServicesWithResponse(java.util.List,com.azure.core.util.Context)` was added +* `updateIdleShutdownSettingWithResponse(models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `updateIdleShutdownSetting(models.IdleShutdownSetting)` was added +* `getAllowedResizeSizes()` was added +* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added #### `models.CustomModelJobOutput` was modified @@ -2963,10 +2966,10 @@ #### `models.SasAuthTypeWorkspaceConnectionProperties` was modified -* `withError(java.lang.String)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.WorkspaceConnectionOAuth2` was modified @@ -2974,13 +2977,13 @@ #### `models.EncryptionProperty` was modified +* `withCosmosDbResourceId(java.lang.String)` was added +* `withKeyVaultProperties(models.KeyVaultProperties)` was added * `storageAccountResourceId()` was added * `searchAccountResourceId()` was added -* `withCosmosDbResourceId(java.lang.String)` was added * `withStorageAccountResourceId(java.lang.String)` was added -* `cosmosDbResourceId()` was added * `withSearchAccountResourceId(java.lang.String)` was added -* `withKeyVaultProperties(models.KeyVaultProperties)` was added +* `cosmosDbResourceId()` was added #### `models.CommandJob` was modified @@ -2988,10 +2991,10 @@ #### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added -* `withPeStatus(models.ManagedPEStatus)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added * `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.ServicePrincipalDatastoreCredentials` was modified @@ -3008,33 +3011,33 @@ #### `models.ImageModelSettings` was modified -* `withBeta1(java.lang.Double)` was added -* `withLearningRate(java.lang.Double)` was added * `withStepLRGamma(java.lang.Double)` was added +* `withBeta2(java.lang.Double)` was added +* `withLearningRate(java.lang.Double)` was added +* `withWarmupCosineLRCycles(java.lang.Double)` was added +* `withBeta1(java.lang.Double)` was added * `withMomentum(java.lang.Double)` was added * `withWeightDecay(java.lang.Double)` was added -* `withWarmupCosineLRCycles(java.lang.Double)` was added -* `withBeta2(java.lang.Double)` was added #### `models.ManagedIdentity` was modified -* `withClientId(java.lang.String)` was added * `withObjectId(java.lang.String)` was added +* `withClientId(java.lang.String)` was added #### `models.ComputeInstanceProperties` was modified -* `enableOSPatching()` was added -* `withEnableOSPatching(java.lang.Boolean)` was added -* `withEnableRootAccess(java.lang.Boolean)` was added -* `idleTimeBeforeShutdown()` was added +* `withEnableSSO(java.lang.Boolean)` was added +* `enableSSO()` was added * `releaseQuotaOnStop()` was added * `withReleaseQuotaOnStop(java.lang.Boolean)` was added +* `enableOSPatching()` was added * `withIdleTimeBeforeShutdown(java.lang.String)` was added -* `autologgerSettings()` was added -* `withEnableSSO(java.lang.Boolean)` was added +* `withEnableRootAccess(java.lang.Boolean)` was added * `enableRootAccess()` was added -* `enableSSO()` was added +* `idleTimeBeforeShutdown()` was added * `withAutologgerSettings(models.ComputeInstanceAutologgerSettings)` was added +* `autologgerSettings()` was added +* `withEnableOSPatching(java.lang.Boolean)` was added #### `models.ServerlessInferenceEndpointAuthMode` was modified @@ -3055,8 +3058,8 @@ #### `models.ComputeInstanceDataMount` was modified -* `mountMode()` was added * `withMountMode(models.MountMode)` was added +* `mountMode()` was added #### `models.AutoMLJob` was modified @@ -3089,6 +3092,13 @@ * `withStatus(models.PrivateEndpointServiceConnectionStatus)` was added +#### `models.PatAuthTypeWorkspaceConnectionProperties` was modified + +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withError(java.lang.String)` was added + ## 1.1.0 (2024-08-22) - Azure Resource Manager Machine Learning client library for Java. This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package tag package-2024-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md index 91a429c1a37b..7d368699923b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md @@ -1532,8 +1532,8 @@ public final class ComponentVersionsPublishSamples { ### Compute_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.AKS; -import com.azure.resourcemanager.machinelearning.models.AKSSchemaProperties; +import com.azure.resourcemanager.machinelearning.models.Aks; +import com.azure.resourcemanager.machinelearning.models.AksSchemaProperties; import com.azure.resourcemanager.machinelearning.models.AmlCompute; import com.azure.resourcemanager.machinelearning.models.AmlComputeProperties; import com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy; @@ -1596,10 +1596,10 @@ public final class ComputeCreateOrUpdateSamples { .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new AKS().withDescription("some compute") + .withProperties(new Aks().withDescription("some compute") .withResourceId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AKSSchemaProperties().withAgentCount(4))) + .withProperties(new AksSchemaProperties().withAgentCount(4))) .create(); } @@ -1616,7 +1616,7 @@ public final class ComputeCreateOrUpdateSamples { .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new AKS()) + .withProperties(new Aks()) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java index aa11f0fe7b48..814c02310004 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.AKSComputeSecrets; +import com.azure.resourcemanager.machinelearning.models.AksComputeSecrets; import com.azure.resourcemanager.machinelearning.models.ComputeType; import com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets; import com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets; @@ -75,7 +75,7 @@ public static ComputeSecretsInner fromJson(JsonReader jsonReader) throws IOExcep } // Use the discriminator value to determine which subtype should be deserialized. if ("AKS".equals(discriminatorValue)) { - return AKSComputeSecrets.fromJson(readerToUse.reset()); + return AksComputeSecrets.fromJson(readerToUse.reset()); } else if ("VirtualMachine".equals(discriminatorValue)) { return VirtualMachineSecrets.fromJson(readerToUse.reset()); } else if ("Databricks".equals(discriminatorValue)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java similarity index 74% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java index 588bdb8df700..37026ca5d443 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java @@ -17,7 +17,7 @@ * A Machine Learning compute based on AKS. */ @Fluent -public final class AKS extends Compute { +public final class Aks extends Compute { /* * The type of compute */ @@ -26,12 +26,12 @@ public final class AKS extends Compute { /* * AKS properties */ - private AKSSchemaProperties properties; + private AksSchemaProperties properties; /** - * Creates an instance of AKS class. + * Creates an instance of Aks class. */ - public AKS() { + public Aks() { } /** @@ -49,7 +49,7 @@ public ComputeType computeType() { * * @return the properties value. */ - public AKSSchemaProperties properties() { + public AksSchemaProperties properties() { return this.properties; } @@ -57,9 +57,9 @@ public AKSSchemaProperties properties() { * Set the properties property: AKS properties. * * @param properties the properties value to set. - * @return the AKS object itself. + * @return the Aks object itself. */ - public AKS withProperties(AKSSchemaProperties properties) { + public Aks withProperties(AksSchemaProperties properties) { this.properties = properties; return this; } @@ -68,7 +68,7 @@ public AKS withProperties(AKSSchemaProperties properties) { * {@inheritDoc} */ @Override - public AKS withComputeLocation(String computeLocation) { + public Aks withComputeLocation(String computeLocation) { super.withComputeLocation(computeLocation); return this; } @@ -77,7 +77,7 @@ public AKS withComputeLocation(String computeLocation) { * {@inheritDoc} */ @Override - public AKS withDescription(String description) { + public Aks withDescription(String description) { super.withDescription(description); return this; } @@ -86,7 +86,7 @@ public AKS withDescription(String description) { * {@inheritDoc} */ @Override - public AKS withResourceId(String resourceId) { + public Aks withResourceId(String resourceId) { super.withResourceId(resourceId); return this; } @@ -95,7 +95,7 @@ public AKS withResourceId(String resourceId) { * {@inheritDoc} */ @Override - public AKS withDisableLocalAuth(Boolean disableLocalAuth) { + public Aks withDisableLocalAuth(Boolean disableLocalAuth) { super.withDisableLocalAuth(disableLocalAuth); return this; } @@ -116,52 +116,52 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AKS from the JsonReader. + * Reads an instance of Aks from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AKS if the JsonReader was pointing to an instance of it, or null if it was pointing to + * @return An instance of Aks 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 AKS. + * @throws IOException If an error occurs while reading the Aks. */ - public static AKS fromJson(JsonReader jsonReader) throws IOException { + public static Aks fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AKS deserializedAKS = new AKS(); + Aks deserializedAks = new Aks(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("computeLocation".equals(fieldName)) { - deserializedAKS.withComputeLocation(reader.getString()); + deserializedAks.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedAKS.withProvisioningState(ProvisioningState.fromString(reader.getString())); + deserializedAks.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { - deserializedAKS.withDescription(reader.getString()); + deserializedAks.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedAKS.withCreatedOn(reader + deserializedAks.withCreatedOn(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedAKS.withModifiedOn(reader + deserializedAks.withModifiedOn(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { - deserializedAKS.withResourceId(reader.getString()); + deserializedAks.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAKS.withProvisioningErrors(provisioningErrors); + deserializedAks.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedAKS.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); + deserializedAks.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { - deserializedAKS.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); + deserializedAks.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { - deserializedAKS.computeType = ComputeType.fromString(reader.getString()); + deserializedAks.computeType = ComputeType.fromString(reader.getString()); } else if ("properties".equals(fieldName)) { - deserializedAKS.properties = AKSSchemaProperties.fromJson(reader); + deserializedAks.properties = AksSchemaProperties.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedAKS; + return deserializedAks; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java similarity index 82% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java index a642974640b8..12b9cb61039d 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java @@ -15,7 +15,7 @@ * Secrets related to a Machine Learning compute based on AKS. */ @Immutable -public final class AKSComputeSecrets extends ComputeSecretsInner { +public final class AksComputeSecrets extends ComputeSecretsInner { /* * The type of compute */ @@ -37,9 +37,9 @@ public final class AKSComputeSecrets extends ComputeSecretsInner { private String imagePullSecretName; /** - * Creates an instance of AKSComputeSecrets class. + * Creates an instance of AksComputeSecrets class. */ - private AKSComputeSecrets() { + private AksComputeSecrets() { } /** @@ -95,34 +95,34 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AKSComputeSecrets from the JsonReader. + * Reads an instance of AksComputeSecrets from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AKSComputeSecrets if the JsonReader was pointing to an instance of it, or null if it was + * @return An instance of AksComputeSecrets 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 AKSComputeSecrets. + * @throws IOException If an error occurs while reading the AksComputeSecrets. */ - public static AKSComputeSecrets fromJson(JsonReader jsonReader) throws IOException { + public static AksComputeSecrets fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AKSComputeSecrets deserializedAKSComputeSecrets = new AKSComputeSecrets(); + AksComputeSecrets deserializedAksComputeSecrets = new AksComputeSecrets(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("computeType".equals(fieldName)) { - deserializedAKSComputeSecrets.computeType = ComputeType.fromString(reader.getString()); + deserializedAksComputeSecrets.computeType = ComputeType.fromString(reader.getString()); } else if ("userKubeConfig".equals(fieldName)) { - deserializedAKSComputeSecrets.userKubeConfig = reader.getString(); + deserializedAksComputeSecrets.userKubeConfig = reader.getString(); } else if ("adminKubeConfig".equals(fieldName)) { - deserializedAKSComputeSecrets.adminKubeConfig = reader.getString(); + deserializedAksComputeSecrets.adminKubeConfig = reader.getString(); } else if ("imagePullSecretName".equals(fieldName)) { - deserializedAKSComputeSecrets.imagePullSecretName = reader.getString(); + deserializedAksComputeSecrets.imagePullSecretName = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAKSComputeSecrets; + return deserializedAksComputeSecrets; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java similarity index 72% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java index 5e458d854984..02c8f9dfafa7 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java @@ -15,7 +15,7 @@ * Advance configuration for AKS networking. */ @Fluent -public final class AKSNetworkingConfiguration implements JsonSerializable { +public final class AksNetworkingConfiguration implements JsonSerializable { /* * Virtual network subnet resource ID the compute nodes belong to */ @@ -30,7 +30,7 @@ public final class AKSNetworkingConfiguration implements JsonSerializable { - AKSNetworkingConfiguration deserializedAKSNetworkingConfiguration = new AKSNetworkingConfiguration(); + AksNetworkingConfiguration deserializedAksNetworkingConfiguration = new AksNetworkingConfiguration(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("subnetId".equals(fieldName)) { - deserializedAKSNetworkingConfiguration.subnetId = reader.getString(); + deserializedAksNetworkingConfiguration.subnetId = reader.getString(); } else if ("serviceCidr".equals(fieldName)) { - deserializedAKSNetworkingConfiguration.serviceCidr = reader.getString(); + deserializedAksNetworkingConfiguration.serviceCidr = reader.getString(); } else if ("dnsServiceIP".equals(fieldName)) { - deserializedAKSNetworkingConfiguration.dnsServiceIP = reader.getString(); + deserializedAksNetworkingConfiguration.dnsServiceIp = reader.getString(); } else if ("dockerBridgeCidr".equals(fieldName)) { - deserializedAKSNetworkingConfiguration.dockerBridgeCidr = reader.getString(); + deserializedAksNetworkingConfiguration.dockerBridgeCidr = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAKSNetworkingConfiguration; + return deserializedAksNetworkingConfiguration; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java similarity index 76% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java index 1bd3d847b832..932917be08f8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java @@ -16,7 +16,7 @@ * AKS properties. */ @Fluent -public final class AKSSchemaProperties implements JsonSerializable { +public final class AksSchemaProperties implements JsonSerializable { /* * Cluster full qualified domain name */ @@ -50,7 +50,7 @@ public final class AKSSchemaProperties implements JsonSerializable { - AKSSchemaProperties deserializedAKSSchemaProperties = new AKSSchemaProperties(); + AksSchemaProperties deserializedAksSchemaProperties = new AksSchemaProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("clusterFqdn".equals(fieldName)) { - deserializedAKSSchemaProperties.clusterFqdn = reader.getString(); + deserializedAksSchemaProperties.clusterFqdn = reader.getString(); } else if ("systemServices".equals(fieldName)) { List systemServices = reader.readArray(reader1 -> SystemService.fromJson(reader1)); - deserializedAKSSchemaProperties.systemServices = systemServices; + deserializedAksSchemaProperties.systemServices = systemServices; } else if ("agentCount".equals(fieldName)) { - deserializedAKSSchemaProperties.agentCount = reader.getNullable(JsonReader::getInt); + deserializedAksSchemaProperties.agentCount = reader.getNullable(JsonReader::getInt); } else if ("agentVmSize".equals(fieldName)) { - deserializedAKSSchemaProperties.agentVmSize = reader.getString(); + deserializedAksSchemaProperties.agentVmSize = reader.getString(); } else if ("clusterPurpose".equals(fieldName)) { - deserializedAKSSchemaProperties.clusterPurpose = ClusterPurpose.fromString(reader.getString()); + deserializedAksSchemaProperties.clusterPurpose = ClusterPurpose.fromString(reader.getString()); } else if ("sslConfiguration".equals(fieldName)) { - deserializedAKSSchemaProperties.sslConfiguration = SslConfiguration.fromJson(reader); + deserializedAksSchemaProperties.sslConfiguration = SslConfiguration.fromJson(reader); } else if ("aksNetworkingConfiguration".equals(fieldName)) { - deserializedAKSSchemaProperties.aksNetworkingConfiguration - = AKSNetworkingConfiguration.fromJson(reader); + deserializedAksSchemaProperties.aksNetworkingConfiguration + = AksNetworkingConfiguration.fromJson(reader); } else if ("loadBalancerType".equals(fieldName)) { - deserializedAKSSchemaProperties.loadBalancerType = LoadBalancerType.fromString(reader.getString()); + deserializedAksSchemaProperties.loadBalancerType = LoadBalancerType.fromString(reader.getString()); } else if ("loadBalancerSubnet".equals(fieldName)) { - deserializedAKSSchemaProperties.loadBalancerSubnet = reader.getString(); + deserializedAksSchemaProperties.loadBalancerSubnet = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAKSSchemaProperties; + return deserializedAksSchemaProperties; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java index a7773178b915..d3eb65bd4c84 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java @@ -311,7 +311,7 @@ public static Compute fromJson(JsonReader jsonReader) throws IOException { } // Use the discriminator value to determine which subtype should be deserialized. if ("AKS".equals(discriminatorValue)) { - return AKS.fromJson(readerToUse.reset()); + return Aks.fromJson(readerToUse.reset()); } else if ("Kubernetes".equals(discriminatorValue)) { return Kubernetes.fromJson(readerToUse.reset()); } else if ("AmlCompute".equals(discriminatorValue)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java index d4e2219c666e..246a2b1f1847 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java @@ -19,7 +19,7 @@ public final class ComputeInstanceCreatedBy implements JsonSerializable metadata) { + public PatAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { super.withMetadata(metadata); return this; } @@ -116,7 +116,7 @@ public PATAuthTypeWorkspaceConnectionProperties withMetadata(Map * {@inheritDoc} */ @Override - public PATAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + public PatAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { super.withPeRequirement(peRequirement); return this; } @@ -125,7 +125,7 @@ public PATAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequi * {@inheritDoc} */ @Override - public PATAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + public PatAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { super.withPeStatus(peStatus); return this; } @@ -134,7 +134,7 @@ public PATAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peS * {@inheritDoc} */ @Override - public PATAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { + public PatAuthTypeWorkspaceConnectionProperties withSharedUserList(List sharedUserList) { super.withSharedUserList(sharedUserList); return this; } @@ -143,7 +143,7 @@ public PATAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public PATAuthTypeWorkspaceConnectionProperties withTarget(String target) { + public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { super.withTarget(target); return this; } @@ -152,7 +152,7 @@ public PATAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public PATAuthTypeWorkspaceConnectionProperties + public PatAuthTypeWorkspaceConnectionProperties withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; @@ -182,67 +182,67 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of PATAuthTypeWorkspaceConnectionProperties from the JsonReader. + * Reads an instance of PatAuthTypeWorkspaceConnectionProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of PATAuthTypeWorkspaceConnectionProperties if the JsonReader was pointing to an instance of + * @return An instance of PatAuthTypeWorkspaceConnectionProperties 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 PATAuthTypeWorkspaceConnectionProperties. + * @throws IOException If an error occurs while reading the PatAuthTypeWorkspaceConnectionProperties. */ - public static PATAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + public static PatAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - PATAuthTypeWorkspaceConnectionProperties deserializedPATAuthTypeWorkspaceConnectionProperties - = new PATAuthTypeWorkspaceConnectionProperties(); + PatAuthTypeWorkspaceConnectionProperties deserializedPatAuthTypeWorkspaceConnectionProperties + = new PatAuthTypeWorkspaceConnectionProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("category".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties + deserializedPatAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties + deserializedPatAuthTypeWorkspaceConnectionProperties .withCreatedByWorkspaceArmId(reader.getString()); } else if ("error".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); + deserializedPatAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader + deserializedPatAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties + deserializedPatAuthTypeWorkspaceConnectionProperties .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties + deserializedPatAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedPATAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + deserializedPatAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); } else if ("peRequirement".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties + deserializedPatAuthTypeWorkspaceConnectionProperties .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); } else if ("peStatus".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties + deserializedPatAuthTypeWorkspaceConnectionProperties .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); - deserializedPATAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); + deserializedPatAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); } else if ("target".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + deserializedPatAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties + deserializedPatAuthTypeWorkspaceConnectionProperties .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties.authType + deserializedPatAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); } else if ("credentials".equals(fieldName)) { - deserializedPATAuthTypeWorkspaceConnectionProperties.credentials + deserializedPatAuthTypeWorkspaceConnectionProperties.credentials = WorkspaceConnectionPersonalAccessToken.fromJson(reader); } else { reader.skipChildren(); } } - return deserializedPATAuthTypeWorkspaceConnectionProperties; + return deserializedPatAuthTypeWorkspaceConnectionProperties; }); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java index a792f9e77ab3..6a2962f50979 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java @@ -404,7 +404,7 @@ public static WorkspaceConnectionPropertiesV2 fromJson(JsonReader jsonReader) th } else if ("OAuth2".equals(discriminatorValue)) { return OAuth2AuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("PAT".equals(discriminatorValue)) { - return PATAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + return PatAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("SAS".equals(discriminatorValue)) { return SasAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("ServicePrincipal".equals(discriminatorValue)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json index 0e902ad1047d..7c886c4043c2 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/resources/META-INF/azure-resourcemanager-machinelearning_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"Microsoft.MachineLearningServices":"2026-05-15-preview"},"crossLanguagePackageId":"Microsoft.MachineLearningServices","crossLanguageVersion":"1dcab8754b9f","crossLanguageDefinitions":{"com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient":"Microsoft.MachineLearningServices.BatchDeployments","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.BatchDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.BatchDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginUpdate":"Microsoft.MachineLearningServices.BatchDeployments.update","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.BatchDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.delete":"Microsoft.MachineLearningServices.BatchDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.get":"Microsoft.MachineLearningServices.BatchDeployments.get","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.BatchDeployments.get","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.list":"Microsoft.MachineLearningServices.BatchDeployments.list","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.update":"Microsoft.MachineLearningServices.BatchDeployments.update","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient":"Microsoft.MachineLearningServices.BatchEndpoints","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.BatchEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.delete":"Microsoft.MachineLearningServices.BatchEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.get":"Microsoft.MachineLearningServices.BatchEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.BatchEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.list":"Microsoft.MachineLearningServices.BatchEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.listKeys":"Microsoft.MachineLearningServices.BatchEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.BatchEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.update":"Microsoft.MachineLearningServices.BatchEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient":"Microsoft.MachineLearningServices.CapabilityHosts","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.beginDelete":"Microsoft.MachineLearningServices.CapabilityHosts.delete","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.createOrUpdate":"Microsoft.MachineLearningServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.delete":"Microsoft.MachineLearningServices.CapabilityHosts.delete","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.get":"Microsoft.MachineLearningServices.CapabilityHosts.get","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.getWithResponse":"Microsoft.MachineLearningServices.CapabilityHosts.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient":"Microsoft.MachineLearningServices.CodeContainers","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.delete":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.get":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.getWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.list":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient":"Microsoft.MachineLearningServices.CodeVersions","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.beginPublish":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.delete":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.get":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.list":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.publish":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient":"Microsoft.MachineLearningServices.ComponentContainers","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.delete":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.get":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.list":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient":"Microsoft.MachineLearningServices.ComponentVersions","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.beginPublish":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.delete":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.get":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.list":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.publish":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComputesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComputeResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginDelete":"Microsoft.MachineLearningServices.ComputeResources.delete","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginResize":"Microsoft.MachineLearningServices.ComputeResources.resize","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginRestart":"Microsoft.MachineLearningServices.ComputeResources.restart","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginStart":"Microsoft.MachineLearningServices.ComputeResources.start","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginStop":"Microsoft.MachineLearningServices.ComputeResources.stop","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginUpdate":"Microsoft.MachineLearningServices.ComputeResources.update","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.createOrUpdate":"Microsoft.MachineLearningServices.ComputeResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.delete":"Microsoft.MachineLearningServices.ComputeResources.delete","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.get":"Microsoft.MachineLearningServices.ComputeResources.get","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getAllowedResizeSizes":"Microsoft.MachineLearningServices.ComputeResources.getAllowedResizeSizes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getAllowedResizeSizesWithResponse":"Microsoft.MachineLearningServices.ComputeResources.getAllowedResizeSizes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getWithResponse":"Microsoft.MachineLearningServices.ComputeResources.get","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.list":"Microsoft.MachineLearningServices.ComputeResources.list","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listKeys":"Microsoft.MachineLearningServices.ComputeResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listKeysWithResponse":"Microsoft.MachineLearningServices.ComputeResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listNodes":"Microsoft.MachineLearningServices.ComputeResources.listNodes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.resize":"Microsoft.MachineLearningServices.ComputeResources.resize","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.restart":"Microsoft.MachineLearningServices.ComputeResources.restart","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.start":"Microsoft.MachineLearningServices.ComputeResources.start","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.stop":"Microsoft.MachineLearningServices.ComputeResources.stop","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.update":"Microsoft.MachineLearningServices.ComputeResources.update","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateCustomServices":"Microsoft.MachineLearningServices.ComputeResources.updateCustomServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateCustomServicesWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateCustomServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateDataMounts":"Microsoft.MachineLearningServices.ComputeResources.updateDataMounts","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateDataMountsWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateDataMounts","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateIdleShutdownSetting":"Microsoft.MachineLearningServices.ComputeResources.updateIdleShutdownSetting","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateIdleShutdownSettingWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateIdleShutdownSetting","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.addBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.addBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginAddBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.addBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginCreate":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginDelete":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginDeleteBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.deleteBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.create":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.delete":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.deleteBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.deleteBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.get":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.getWithResponse":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient.list":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.beginCreate":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.beginDelete":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.create":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.delete":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.get":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.getWithResponse":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient.list":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.beginCreate":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.beginDelete":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.create":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.delete":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.get":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.getWithResponse":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient.list":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.beginCreateOrUpdateDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.createOrUpdateDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.beginDeleteDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.deleteDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.createOrUpdateDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.createOrUpdateDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.deleteDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.deleteDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getAllModels":"Microsoft.MachineLearningServices.Workspaces.getAllModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getAllModelsWithResponse":"Microsoft.MachineLearningServices.Workspaces.getAllModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.getDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getDeploymentWithResponse":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.getDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getModels":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.getModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.listDeployments":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.listDeployments","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient":"Microsoft.MachineLearningServices.DataContainers","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.DataContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.delete":"Microsoft.MachineLearningServices.DataContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.get":"Microsoft.MachineLearningServices.DataContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.getWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.list":"Microsoft.MachineLearningServices.DataContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient":"Microsoft.MachineLearningServices.DataVersions","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.beginPublish":"Microsoft.MachineLearningServices.DataVersions.publish","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.DataVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.DataVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.delete":"Microsoft.MachineLearningServices.DataVersions.delete","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.DataVersions.delete","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.get":"Microsoft.MachineLearningServices.DataVersions.get","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.DataVersions.get","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.list":"Microsoft.MachineLearningServices.DataVersions.list","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.publish":"Microsoft.MachineLearningServices.DataVersions.publish","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient":"Microsoft.MachineLearningServices.Datastores","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.createOrUpdate":"Microsoft.MachineLearningServices.Datastores.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.Datastores.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.delete":"Microsoft.MachineLearningServices.Datastores.delete","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.deleteWithResponse":"Microsoft.MachineLearningServices.Datastores.delete","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.get":"Microsoft.MachineLearningServices.Datastores.get","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.getWithResponse":"Microsoft.MachineLearningServices.Datastores.get","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.list":"Microsoft.MachineLearningServices.Datastores.list","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.listSecrets":"Microsoft.MachineLearningServices.Datastores.listSecrets","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.listSecretsWithResponse":"Microsoft.MachineLearningServices.Datastores.listSecrets","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient":"Microsoft.MachineLearningServices.EndpointDeployment","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EndpointDeployment.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.EndpointDeployment.delete","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.EndpointDeployment.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.delete":"Microsoft.MachineLearningServices.EndpointDeployment.delete","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.get":"Microsoft.MachineLearningServices.EndpointDeployment.get","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.getInWorkspace":"Microsoft.MachineLearningServices.Workspaces.getInWorkspace","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.EndpointDeployment.get","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.list":"Microsoft.MachineLearningServices.EndpointDeployment.list","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.get":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.getModels":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.getModels","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.list":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.listKeys":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.regenerateKeysWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient":"Microsoft.MachineLearningServices.EnvironmentContainers","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.delete":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.get":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.list":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient":"Microsoft.MachineLearningServices.EnvironmentVersions","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.beginPublish":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.delete":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.get":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.list":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.publish":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient":"Microsoft.MachineLearningServices.Features","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.get":"Microsoft.MachineLearningServices.Features.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.getWithResponse":"Microsoft.MachineLearningServices.Features.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.list":"Microsoft.MachineLearningServices.Features.list","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient":"Microsoft.MachineLearningServices.FeaturesetContainers","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturesetContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.beginDelete":"Microsoft.MachineLearningServices.FeaturesetContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturesetContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.delete":"Microsoft.MachineLearningServices.FeaturesetContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.getEntity":"Microsoft.MachineLearningServices.FeaturesetContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.getEntityWithResponse":"Microsoft.MachineLearningServices.FeaturesetContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.list":"Microsoft.MachineLearningServices.FeaturesetContainers.list","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient":"Microsoft.MachineLearningServices.FeaturesetVersions","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.backfill":"Microsoft.MachineLearningServices.FeaturesetVersions.backfill","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginBackfill":"Microsoft.MachineLearningServices.FeaturesetVersions.backfill","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturesetVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginDelete":"Microsoft.MachineLearningServices.FeaturesetVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturesetVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.delete":"Microsoft.MachineLearningServices.FeaturesetVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.get":"Microsoft.MachineLearningServices.FeaturesetVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.FeaturesetVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.list":"Microsoft.MachineLearningServices.FeaturesetVersions.list","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.beginDelete":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.delete":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.getEntity":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.getEntityWithResponse":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.list":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.list","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.beginDelete":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.delete":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.get":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.list":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.list","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient":"Microsoft.MachineLearningServices.InferenceEndpoints","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.InferenceEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.delete":"Microsoft.MachineLearningServices.InferenceEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.get":"Microsoft.MachineLearningServices.InferenceEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.InferenceEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.list":"Microsoft.MachineLearningServices.InferenceEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.update":"Microsoft.MachineLearningServices.InferenceEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient":"Microsoft.MachineLearningServices.InferenceGroups","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferenceGroups.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginDelete":"Microsoft.MachineLearningServices.InferenceGroups.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginModifyDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.modifyDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginUpdate":"Microsoft.MachineLearningServices.InferenceGroups.update","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferenceGroups.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.delete":"Microsoft.MachineLearningServices.InferenceGroups.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.get":"Microsoft.MachineLearningServices.InferenceGroups.get","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getDeltaModelsStatusAsync":"Microsoft.MachineLearningServices.InferenceGroups.getDeltaModelsStatusAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getDeltaModelsStatusAsyncWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.getDeltaModelsStatusAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getStatus":"Microsoft.MachineLearningServices.InferenceGroups.getStatus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getStatusWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.getStatus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.get","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.list":"Microsoft.MachineLearningServices.InferenceGroups.list","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.listDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.listDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.listSkus":"Microsoft.MachineLearningServices.InferenceGroups.listSkus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.modifyDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.modifyDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.update":"Microsoft.MachineLearningServices.InferenceGroups.update","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient":"Microsoft.MachineLearningServices.InferencePools","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferencePools.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginDelete":"Microsoft.MachineLearningServices.InferencePools.delete","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginUpdate":"Microsoft.MachineLearningServices.InferencePools.update","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferencePools.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.delete":"Microsoft.MachineLearningServices.InferencePools.delete","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.get":"Microsoft.MachineLearningServices.InferencePools.get","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.getWithResponse":"Microsoft.MachineLearningServices.InferencePools.get","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.list":"Microsoft.MachineLearningServices.InferencePools.list","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.update":"Microsoft.MachineLearningServices.InferencePools.update","com.azure.resourcemanager.machinelearning.fluent.JobsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.JobsClient.beginCancel":"Microsoft.MachineLearningServices.JobBases.cancel","com.azure.resourcemanager.machinelearning.fluent.JobsClient.beginDelete":"Microsoft.MachineLearningServices.JobBases.delete","com.azure.resourcemanager.machinelearning.fluent.JobsClient.cancel":"Microsoft.MachineLearningServices.JobBases.cancel","com.azure.resourcemanager.machinelearning.fluent.JobsClient.createOrUpdate":"Microsoft.MachineLearningServices.JobBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.JobsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.JobBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.JobsClient.delete":"Microsoft.MachineLearningServices.JobBases.delete","com.azure.resourcemanager.machinelearning.fluent.JobsClient.get":"Microsoft.MachineLearningServices.JobBases.get","com.azure.resourcemanager.machinelearning.fluent.JobsClient.getWithResponse":"Microsoft.MachineLearningServices.JobBases.get","com.azure.resourcemanager.machinelearning.fluent.JobsClient.list":"Microsoft.MachineLearningServices.JobBases.list","com.azure.resourcemanager.machinelearning.fluent.MachineLearningManagementClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient.beginProvisionManagedNetwork":"Microsoft.MachineLearningServices.Workspaces.provisionManagedNetwork","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient.provisionManagedNetwork":"Microsoft.MachineLearningServices.Workspaces.provisionManagedNetwork","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.beginPatch":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.beginPut":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.get":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.getWithResponse":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.list":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.patch":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.put":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.beginDelete":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.createOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.delete":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.get":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.getWithResponse":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.list":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient":"Microsoft.MachineLearningServices.MarketplaceSubscriptions","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.beginDelete":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.delete","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.createOrUpdate":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.delete":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.delete","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.get":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.get","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.getWithResponse":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.get","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.list":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.list","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient":"Microsoft.MachineLearningServices.ModelContainers","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.delete":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.get":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.list":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient":"Microsoft.MachineLearningServices.ModelVersions","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.beginPublish":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.delete":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.get":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.list":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.publish":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient":"Microsoft.MachineLearningServices.OnlineDeployments","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.OnlineDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.update","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.delete":"Microsoft.MachineLearningServices.OnlineDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.get":"Microsoft.MachineLearningServices.OnlineDeployments.get","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getLogs":"Microsoft.MachineLearningServices.OnlineDeployments.getLogs","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getLogsWithResponse":"Microsoft.MachineLearningServices.OnlineDeployments.getLogs","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.OnlineDeployments.get","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.list":"Microsoft.MachineLearningServices.OnlineDeployments.list","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.listSkus":"Microsoft.MachineLearningServices.OnlineDeployments.listSkus","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.update":"Microsoft.MachineLearningServices.OnlineDeployments.update","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient":"Microsoft.MachineLearningServices.OnlineEndpoints","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.OnlineEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginRegenerateKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.delete":"Microsoft.MachineLearningServices.OnlineEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.get":"Microsoft.MachineLearningServices.OnlineEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getToken":"Microsoft.MachineLearningServices.OnlineEndpoints.getToken","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getTokenWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.getToken","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.list":"Microsoft.MachineLearningServices.OnlineEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.listKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.update":"Microsoft.MachineLearningServices.OnlineEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.OperationsClient":"Microsoft.MachineLearningServices.Operations","com.azure.resourcemanager.machinelearning.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.beginDelete":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.createOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.delete":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.get":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.getWithResponse":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.list":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient.post":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.post","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.getAvailable":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.getAvailable","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.getAvailableWithResponse":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.getAvailable","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.list":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.listAvailable":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.listAvailable","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient":"Microsoft.MachineLearningServices.PrivateEndpointConnections","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.MachineLearningServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.MachineLearningServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.MachineLearningServices.PrivateEndpointConnections.get","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.get","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.MachineLearningServices.PrivateEndpointConnections.list","com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient.list":"Microsoft.MachineLearningServices.Workspaces.privateLinkResourcesList","com.azure.resourcemanager.machinelearning.fluent.QuotasClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.list":"Microsoft.MachineLearningServices.QuotasOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.update":"Microsoft.MachineLearningServices.QuotasOperationGroup.update","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.updateWithResponse":"Microsoft.MachineLearningServices.QuotasOperationGroup.update","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient":"Microsoft.MachineLearningServices.RaiPolicy","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.beginCreate":"Microsoft.MachineLearningServices.RaiPolicy.create","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.beginDelete":"Microsoft.MachineLearningServices.RaiPolicy.delete","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.create":"Microsoft.MachineLearningServices.RaiPolicy.create","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.delete":"Microsoft.MachineLearningServices.RaiPolicy.delete","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.get":"Microsoft.MachineLearningServices.RaiPolicy.get","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.getWithResponse":"Microsoft.MachineLearningServices.RaiPolicy.get","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient.list":"Microsoft.MachineLearningServices.RaiPolicy.list","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient":"Microsoft.MachineLearningServices.Registries","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Registries.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginDelete":"Microsoft.MachineLearningServices.Registries.delete","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginRemoveRegions":"Microsoft.MachineLearningServices.Registries.removeRegions","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.createOrUpdate":"Microsoft.MachineLearningServices.Registries.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.delete":"Microsoft.MachineLearningServices.Registries.delete","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.getByResourceGroup":"Microsoft.MachineLearningServices.Registries.get","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.getByResourceGroupWithResponse":"Microsoft.MachineLearningServices.Registries.get","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.list":"Microsoft.MachineLearningServices.Registries.listBySubscription","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.listByResourceGroup":"Microsoft.MachineLearningServices.Registries.list","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.removeRegions":"Microsoft.MachineLearningServices.Registries.removeRegions","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.update":"Microsoft.MachineLearningServices.Registries.update","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.updateWithResponse":"Microsoft.MachineLearningServices.Registries.update","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CodeContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.beginDelete":"Microsoft.MachineLearningServices.CodeContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.delete":"Microsoft.MachineLearningServices.CodeContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.get":"Microsoft.MachineLearningServices.CodeContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.getWithResponse":"Microsoft.MachineLearningServices.CodeContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.list":"Microsoft.MachineLearningServices.CodeContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CodeVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.beginDelete":"Microsoft.MachineLearningServices.CodeVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.CodeVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.CodeVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.delete":"Microsoft.MachineLearningServices.CodeVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.get":"Microsoft.MachineLearningServices.CodeVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.CodeVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.list":"Microsoft.MachineLearningServices.CodeVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComponentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.beginDelete":"Microsoft.MachineLearningServices.ComponentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.delete":"Microsoft.MachineLearningServices.ComponentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.get":"Microsoft.MachineLearningServices.ComponentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.list":"Microsoft.MachineLearningServices.ComponentContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComponentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.beginDelete":"Microsoft.MachineLearningServices.ComponentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.delete":"Microsoft.MachineLearningServices.ComponentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.get":"Microsoft.MachineLearningServices.ComponentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.list":"Microsoft.MachineLearningServices.ComponentVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.DataContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.beginDelete":"Microsoft.MachineLearningServices.DataContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.DataContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.delete":"Microsoft.MachineLearningServices.DataContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.get":"Microsoft.MachineLearningServices.DataContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.getWithResponse":"Microsoft.MachineLearningServices.DataContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.list":"Microsoft.MachineLearningServices.DataContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient.getBlobReferenceSas":"Microsoft.MachineLearningServices.Registries.getBlobReferenceSAS","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient.getBlobReferenceSasWithResponse":"Microsoft.MachineLearningServices.Registries.getBlobReferenceSAS","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.DataVersionBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.beginDelete":"Microsoft.MachineLearningServices.DataVersionBases.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.DataVersionBases.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.DataVersionBases.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.DataVersionBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.delete":"Microsoft.MachineLearningServices.DataVersionBases.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.get":"Microsoft.MachineLearningServices.DataVersionBases.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.DataVersionBases.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.list":"Microsoft.MachineLearningServices.DataVersionBases.list","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.beginDelete":"Microsoft.MachineLearningServices.EnvironmentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.delete":"Microsoft.MachineLearningServices.EnvironmentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.get":"Microsoft.MachineLearningServices.EnvironmentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.list":"Microsoft.MachineLearningServices.EnvironmentContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.beginDelete":"Microsoft.MachineLearningServices.EnvironmentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.delete":"Microsoft.MachineLearningServices.EnvironmentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.get":"Microsoft.MachineLearningServices.EnvironmentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.list":"Microsoft.MachineLearningServices.EnvironmentVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ModelContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.beginDelete":"Microsoft.MachineLearningServices.ModelContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.delete":"Microsoft.MachineLearningServices.ModelContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.get":"Microsoft.MachineLearningServices.ModelContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ModelContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.list":"Microsoft.MachineLearningServices.ModelContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ModelVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.beginDelete":"Microsoft.MachineLearningServices.ModelVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.ModelVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.ModelVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.delete":"Microsoft.MachineLearningServices.ModelVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.get":"Microsoft.MachineLearningServices.ModelVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ModelVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.list":"Microsoft.MachineLearningServices.ModelVersions.list","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient":"Microsoft.MachineLearningServices.Schedules","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Schedules.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.beginDelete":"Microsoft.MachineLearningServices.Schedules.delete","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.createOrUpdate":"Microsoft.MachineLearningServices.Schedules.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.delete":"Microsoft.MachineLearningServices.Schedules.delete","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.get":"Microsoft.MachineLearningServices.Schedules.get","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.getWithResponse":"Microsoft.MachineLearningServices.Schedules.get","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.list":"Microsoft.MachineLearningServices.Schedules.list","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient":"Microsoft.MachineLearningServices.ServerlessEndpoints","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.ServerlessEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginRegenerateKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.delete":"Microsoft.MachineLearningServices.ServerlessEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.get":"Microsoft.MachineLearningServices.ServerlessEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.ServerlessEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.list":"Microsoft.MachineLearningServices.ServerlessEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.listKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.ServerlessEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.update":"Microsoft.MachineLearningServices.ServerlessEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.UsagesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.UsagesClient.list":"Microsoft.MachineLearningServices.UsagesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient.list":"Microsoft.MachineLearningServices.VirtualMachineSizesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient.listWithResponse":"Microsoft.MachineLearningServices.VirtualMachineSizesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.beginTestConnection":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.testConnection","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.create":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.createWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.delete":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.get":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.getWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.list":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.list","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.listSecrets":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.listSecrets","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.listSecretsWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.listSecrets","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.testConnection":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.testConnection","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.update":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.updateWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient.list":"Microsoft.MachineLearningServices.Workspaces.list","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient":"Microsoft.MachineLearningServices.Workspaces","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Workspaces.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginDelete":"Microsoft.MachineLearningServices.Workspaces.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginDiagnose":"Microsoft.MachineLearningServices.Workspaces.diagnose","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginPrepareNotebook":"Microsoft.MachineLearningServices.Workspaces.prepareNotebook","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginResyncKeys":"Microsoft.MachineLearningServices.Workspaces.resyncKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginUpdate":"Microsoft.MachineLearningServices.Workspaces.update","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.createOrUpdate":"Microsoft.MachineLearningServices.Workspaces.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.delete":"Microsoft.MachineLearningServices.Workspaces.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.diagnose":"Microsoft.MachineLearningServices.Workspaces.diagnose","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.getByResourceGroup":"Microsoft.MachineLearningServices.Workspaces.get","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.getByResourceGroupWithResponse":"Microsoft.MachineLearningServices.Workspaces.get","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.list":"Microsoft.MachineLearningServices.Workspaces.listBySubscription","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listByResourceGroup":"Microsoft.MachineLearningServices.Workspaces.listByResourceGroup","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listKeys":"Microsoft.MachineLearningServices.Workspaces.listKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookAccessToken":"Microsoft.MachineLearningServices.Workspaces.listNotebookAccessToken","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookAccessTokenWithResponse":"Microsoft.MachineLearningServices.Workspaces.listNotebookAccessToken","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookKeys":"Microsoft.MachineLearningServices.Workspaces.listNotebookKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listNotebookKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listOutboundNetworkDependenciesEndpoints":"Microsoft.MachineLearningServices.Workspaces.listOutboundNetworkDependenciesEndpoints","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listOutboundNetworkDependenciesEndpointsWithResponse":"Microsoft.MachineLearningServices.Workspaces.listOutboundNetworkDependenciesEndpoints","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listStorageAccountKeys":"Microsoft.MachineLearningServices.Workspaces.listStorageAccountKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listStorageAccountKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listStorageAccountKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.prepareNotebook":"Microsoft.MachineLearningServices.Workspaces.prepareNotebook","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.resyncKeys":"Microsoft.MachineLearningServices.Workspaces.resyncKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.update":"Microsoft.MachineLearningServices.Workspaces.update","com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner":"Microsoft.MachineLearningServices.AccountApiKeys","com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner":"Microsoft.MachineLearningServices.AmlUserFeature","com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner":"Microsoft.MachineLearningServices.AvailableQuota","com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner":"Microsoft.MachineLearningServices.BatchDeployment","com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner":"Microsoft.MachineLearningServices.BatchEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner":"Microsoft.MachineLearningServices.CapabilityHost","com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties":"Microsoft.MachineLearningServices.ClusterUpdateProperties","com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner":"Microsoft.MachineLearningServices.CodeContainer","com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner":"Microsoft.MachineLearningServices.CodeVersion","com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner":"Microsoft.MachineLearningServices.ComponentContainer","com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner":"Microsoft.MachineLearningServices.ComponentVersion","com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner":"Microsoft.MachineLearningServices.ComputeResource","com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner":"Microsoft.MachineLearningServices.ComputeSecrets","com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner":"Microsoft.MachineLearningServices.DataContainer","com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner":"Microsoft.MachineLearningServices.DataVersionBase","com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner":"Microsoft.MachineLearningServices.Datastore","com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner":"Microsoft.MachineLearningServices.DatastoreSecrets","com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner":"Microsoft.MachineLearningServices.DeltaModelStatusResponse","com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner":"Microsoft.MachineLearningServices.DeploymentLogs","com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner":"Microsoft.MachineLearningServices.DiagnoseResponseResult","com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner":"Microsoft.MachineLearningServices.EndpointAuthKeys","com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner":"Microsoft.MachineLearningServices.EndpointAuthToken","com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner":"Microsoft.MachineLearningServices.EndpointKeys","com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner":"Microsoft.MachineLearningServices.EndpointModelProperties","com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner":"Microsoft.MachineLearningServices.EndpointModels","com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner":"Microsoft.MachineLearningServices.EndpointPropertiesBase","com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner":"Microsoft.MachineLearningServices.EnvironmentContainer","com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner":"Microsoft.MachineLearningServices.EnvironmentVersion","com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner":"Microsoft.MachineLearningServices.ExternalFQDNResponse","com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner":"Microsoft.MachineLearningServices.Feature","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner":"Microsoft.MachineLearningServices.FeaturesetContainer","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner":"Microsoft.MachineLearningServices.FeaturesetVersionBackfillResponse","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner":"Microsoft.MachineLearningServices.FeaturesetVersion","com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner":"Microsoft.MachineLearningServices.FeaturestoreEntityContainer","com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner":"Microsoft.MachineLearningServices.FeaturestoreEntityVersion","com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner":"Microsoft.MachineLearningServices.GetBlobReferenceSASResponseDto","com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner":"Microsoft.MachineLearningServices.GroupStatus","com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner":"Microsoft.MachineLearningServices.InferenceEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner":"Microsoft.MachineLearningServices.InferenceGroup","com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner":"Microsoft.MachineLearningServices.InferencePool","com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner":"Microsoft.MachineLearningServices.JobBase","com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner":"Microsoft.MachineLearningServices.ListNotebookKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner":"Microsoft.MachineLearningServices.ListStorageAccountKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner":"Microsoft.MachineLearningServices.ListWorkspaceKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner":"Microsoft.MachineLearningServices.ManagedNetworkProvisionStatus","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner":"Microsoft.MachineLearningServices.ManagedNetworkSettingsBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner":"Microsoft.MachineLearningServices.ManagedNetworkSettings","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner":"Microsoft.MachineLearningServices.MarketplaceSubscription","com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner":"Microsoft.MachineLearningServices.ModelContainer","com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner":"Microsoft.MachineLearningServices.ModelVersion","com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner":"Microsoft.MachineLearningServices.NotebookAccessTokenResult","com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner":"Microsoft.MachineLearningServices.NotebookResourceInfo","com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner":"Microsoft.MachineLearningServices.OnlineDeployment","com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner":"Microsoft.MachineLearningServices.OnlineEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner":"Microsoft.MachineLearningServices.OutboundRuleBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner":"Microsoft.MachineLearningServices.PendingUploadResponseDto","com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner":"Microsoft.MachineLearningServices.PrivateEndpointConnection","com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties":"Microsoft.MachineLearningServices.PrivateEndpointConnectionProperties","com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner":"Microsoft.MachineLearningServices.PrivateLinkResource","com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties":"Microsoft.MachineLearningServices.PrivateLinkResourceProperties","com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner":"Microsoft.MachineLearningServices.Registry","com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties":"Microsoft.MachineLearningServices.RegistryPrivateEndpointConnectionProperties","com.azure.resourcemanager.machinelearning.fluent.models.RegistryProperties":"Microsoft.MachineLearningServices.RegistryProperties","com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner":"Microsoft.MachineLearningServices.ResourceQuota","com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner":"Microsoft.MachineLearningServices.Schedule","com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner":"Microsoft.MachineLearningServices.ServerlessEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty":"Microsoft.MachineLearningServices.SharedPrivateLinkResourceProperty","com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner":"Microsoft.MachineLearningServices.SkuResource","com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner":"Microsoft.MachineLearningServices.UpdateWorkspaceQuotasResult","com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner":"Microsoft.MachineLearningServices.UsageAndQuotaDetails","com.azure.resourcemanager.machinelearning.fluent.models.UsageInner":"Microsoft.MachineLearningServices.Usage","com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner":"Microsoft.MachineLearningServices.VirtualMachineSizeListResult","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResource","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner":"Microsoft.MachineLearningServices.Workspace","com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner":"Microsoft.MachineLearningServices.WorkspaceProperties","com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner":"Microsoft.MachineLearningServices.WorkspacePropertiesUpdateParameters","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner":"Microsoft.MachineLearningServices.WorkspaceUpdateParameters","com.azure.resourcemanager.machinelearning.implementation.MachineLearningManagementClientBuilder":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.implementation.models.AmlComputeNodesInformation":"Microsoft.MachineLearningServices.AmlComputeNodesInformation","com.azure.resourcemanager.machinelearning.implementation.models.AvailableQuotaArmPaginatedResult":"Microsoft.MachineLearningServices.AvailableQuotaArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.BatchDeploymentTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.BatchDeploymentTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.BatchEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.BatchEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.CodeContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.CodeContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.CodeVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.CodeVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ComponentContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ComponentContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ComponentVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ComponentVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DataContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DataContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DataVersionBaseResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DataVersionBaseResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DatastoreResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DatastoreResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EndpointResourcePropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EnvironmentContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EnvironmentVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeatureResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeatureResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturesetContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturesetVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturestoreEntityContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturestoreEntityVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferenceEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferenceEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferenceGroupTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferenceGroupTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferencePoolTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferencePoolTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.JobBaseResourceArmPaginatedResult":"Microsoft.MachineLearningServices.JobBaseResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ListAmlUserFeatureResult":"Microsoft.MachineLearningServices.ListAmlUserFeatureResult","com.azure.resourcemanager.machinelearning.implementation.models.ListUsagesResult":"Microsoft.MachineLearningServices.ListUsagesResult","com.azure.resourcemanager.machinelearning.implementation.models.ListWorkspaceQuotas":"Microsoft.MachineLearningServices.ListWorkspaceQuotas","com.azure.resourcemanager.machinelearning.implementation.models.ManagedNetworkListResult":"Microsoft.MachineLearningServices.ManagedNetworkListResult","com.azure.resourcemanager.machinelearning.implementation.models.MarketplaceSubscriptionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.MarketplaceSubscriptionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ModelContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ModelContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ModelVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ModelVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OnlineDeploymentTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.OnlineDeploymentTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OnlineEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.OnlineEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.machinelearning.implementation.models.OutboundRuleListResult":"Microsoft.MachineLearningServices.OutboundRuleListResult","com.azure.resourcemanager.machinelearning.implementation.models.PaginatedComputeResourcesList":"Microsoft.MachineLearningServices.PaginatedComputeResourcesList","com.azure.resourcemanager.machinelearning.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.MachineLearningServices.PrivateEndpointConnectionListResult","com.azure.resourcemanager.machinelearning.implementation.models.PrivateLinkResourceListResult":"Microsoft.MachineLearningServices.PrivateLinkResourceListResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RegistryTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RegistryTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ScheduleResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ScheduleResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ServerlessEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ServerlessEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.SkuResourceArmPaginatedResult":"Microsoft.MachineLearningServices.SkuResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.StringArmPaginatedResult":"Microsoft.MachineLearningServices.StringArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.UsageAndQuotaDetailsArmPaginatedResult":"Microsoft.MachineLearningServices.UsageAndQuotaDetailsArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.machinelearning.models.AKS":"Microsoft.MachineLearningServices.AKS","com.azure.resourcemanager.machinelearning.models.AKSComputeSecrets":"Microsoft.MachineLearningServices.AksComputeSecrets","com.azure.resourcemanager.machinelearning.models.AKSNetworkingConfiguration":"Microsoft.MachineLearningServices.AksNetworkingConfiguration","com.azure.resourcemanager.machinelearning.models.AKSSchemaProperties":"Microsoft.MachineLearningServices.AKSSchemaProperties","com.azure.resourcemanager.machinelearning.models.AadAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AADAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AccessKeyAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccountKeyAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AccountKeyAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials":"Microsoft.MachineLearningServices.AccountKeyDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets":"Microsoft.MachineLearningServices.AccountKeyDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.AcrDetails":"Microsoft.MachineLearningServices.AcrDetails","com.azure.resourcemanager.machinelearning.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo":"Microsoft.MachineLearningServices.ActualCapacityInfo","com.azure.resourcemanager.machinelearning.models.AllFeatures":"Microsoft.MachineLearningServices.AllFeatures","com.azure.resourcemanager.machinelearning.models.AllNodes":"Microsoft.MachineLearningServices.AllNodes","com.azure.resourcemanager.machinelearning.models.AllocationState":"Microsoft.MachineLearningServices.AllocationState","com.azure.resourcemanager.machinelearning.models.AllowedContentLevel":"Microsoft.MachineLearningServices.AllowedContentLevel","com.azure.resourcemanager.machinelearning.models.AmlCompute":"Microsoft.MachineLearningServices.AmlCompute","com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation":"Microsoft.MachineLearningServices.AmlComputeNodeInformation","com.azure.resourcemanager.machinelearning.models.AmlComputeProperties":"Microsoft.MachineLearningServices.AmlComputeProperties","com.azure.resourcemanager.machinelearning.models.AmlToken":"Microsoft.MachineLearningServices.AmlToken","com.azure.resourcemanager.machinelearning.models.AmlTokenComputeIdentity":"Microsoft.MachineLearningServices.AmlTokenComputeIdentity","com.azure.resourcemanager.machinelearning.models.AnonymousAccessCredential":"Microsoft.MachineLearningServices.AnonymousAccessCredential","com.azure.resourcemanager.machinelearning.models.ApiKeyAuthWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ApiKeyAuthWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy":"Microsoft.MachineLearningServices.ApplicationSharingPolicy","com.azure.resourcemanager.machinelearning.models.ArmResourceId":"Microsoft.MachineLearningServices.ArmResourceId","com.azure.resourcemanager.machinelearning.models.AssetBase":"Microsoft.MachineLearningServices.AssetBase","com.azure.resourcemanager.machinelearning.models.AssetContainer":"Microsoft.MachineLearningServices.AssetContainer","com.azure.resourcemanager.machinelearning.models.AssetProvisioningState":"Microsoft.MachineLearningServices.AssetProvisioningState","com.azure.resourcemanager.machinelearning.models.AssetReferenceBase":"Microsoft.MachineLearningServices.AssetReferenceBase","com.azure.resourcemanager.machinelearning.models.AssignedUser":"Microsoft.MachineLearningServices.AssignedUser","com.azure.resourcemanager.machinelearning.models.AuthMode":"Microsoft.MachineLearningServices.AuthMode","com.azure.resourcemanager.machinelearning.models.AutoForecastHorizon":"Microsoft.MachineLearningServices.AutoForecastHorizon","com.azure.resourcemanager.machinelearning.models.AutoMLJob":"Microsoft.MachineLearningServices.AutoMLJob","com.azure.resourcemanager.machinelearning.models.AutoMLVertical":"Microsoft.MachineLearningServices.AutoMLVertical","com.azure.resourcemanager.machinelearning.models.AutoNCrossValidations":"Microsoft.MachineLearningServices.AutoNCrossValidations","com.azure.resourcemanager.machinelearning.models.AutoPauseProperties":"Microsoft.MachineLearningServices.AutoPauseProperties","com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting":"Microsoft.MachineLearningServices.AutoRebuildSetting","com.azure.resourcemanager.machinelearning.models.AutoScaleProperties":"Microsoft.MachineLearningServices.AutoScaleProperties","com.azure.resourcemanager.machinelearning.models.AutoSeasonality":"Microsoft.MachineLearningServices.AutoSeasonality","com.azure.resourcemanager.machinelearning.models.AutoTargetLags":"Microsoft.MachineLearningServices.AutoTargetLags","com.azure.resourcemanager.machinelearning.models.AutoTargetRollingWindowSize":"Microsoft.MachineLearningServices.AutoTargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.Autosave":"Microsoft.MachineLearningServices.Autosave","com.azure.resourcemanager.machinelearning.models.AvailableQuotaProperties":"Microsoft.MachineLearningServices.AvailableQuotaProperties","com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore":"Microsoft.MachineLearningServices.AzureBlobDatastore","com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore":"Microsoft.MachineLearningServices.AzureDataLakeGen1Datastore","com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore":"Microsoft.MachineLearningServices.AzureDataLakeGen2Datastore","com.azure.resourcemanager.machinelearning.models.AzureDevOpsWebhook":"Microsoft.MachineLearningServices.AzureDevOpsWebhook","com.azure.resourcemanager.machinelearning.models.AzureFileDatastore":"Microsoft.MachineLearningServices.AzureFileDatastore","com.azure.resourcemanager.machinelearning.models.AzureOpenAiFineTuning":"Microsoft.MachineLearningServices.AzureOpenAiFineTuning","com.azure.resourcemanager.machinelearning.models.AzureOpenAiHyperParameters":"Microsoft.MachineLearningServices.AzureOpenAiHyperParameters","com.azure.resourcemanager.machinelearning.models.BanditPolicy":"Microsoft.MachineLearningServices.BanditPolicy","com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfiguration":"Microsoft.MachineLearningServices.BatchDeploymentConfiguration","com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfigurationType":"Microsoft.MachineLearningServices.BatchDeploymentConfigurationType","com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties":"Microsoft.MachineLearningServices.BatchDeploymentProperties","com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults":"Microsoft.MachineLearningServices.BatchEndpointDefaults","com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties":"Microsoft.MachineLearningServices.BatchEndpointProperties","com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel":"Microsoft.MachineLearningServices.BatchLoggingLevel","com.azure.resourcemanager.machinelearning.models.BatchOutputAction":"Microsoft.MachineLearningServices.BatchOutputAction","com.azure.resourcemanager.machinelearning.models.BatchPipelineComponentDeploymentConfiguration":"Microsoft.MachineLearningServices.BatchPipelineComponentDeploymentConfiguration","com.azure.resourcemanager.machinelearning.models.BatchRetrySettings":"Microsoft.MachineLearningServices.BatchRetrySettings","com.azure.resourcemanager.machinelearning.models.BayesianSamplingAlgorithm":"Microsoft.MachineLearningServices.BayesianSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.BillingCurrency":"Microsoft.MachineLearningServices.BillingCurrency","com.azure.resourcemanager.machinelearning.models.BindOptions":"Microsoft.MachineLearningServices.BindOptions","com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto":"Microsoft.MachineLearningServices.BlobReferenceForConsumptionDto","com.azure.resourcemanager.machinelearning.models.BlockedTransformers":"Microsoft.MachineLearningServices.BlockedTransformers","com.azure.resourcemanager.machinelearning.models.BuildContext":"Microsoft.MachineLearningServices.BuildContext","com.azure.resourcemanager.machinelearning.models.Caching":"Microsoft.MachineLearningServices.Caching","com.azure.resourcemanager.machinelearning.models.CapabilityHostKind":"Microsoft.MachineLearningServices.CapabilityHostKind","com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties":"Microsoft.MachineLearningServices.CapabilityHostProperties","com.azure.resourcemanager.machinelearning.models.CapabilityHostProvisioningState":"Microsoft.MachineLearningServices.CapabilityHostProvisioningState","com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetric":"Microsoft.MachineLearningServices.CategoricalDataDriftMetric","com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetricThreshold":"Microsoft.MachineLearningServices.CategoricalDataDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetric":"Microsoft.MachineLearningServices.CategoricalDataQualityMetric","com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetricThreshold":"Microsoft.MachineLearningServices.CategoricalDataQualityMetricThreshold","com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetric":"Microsoft.MachineLearningServices.CategoricalPredictionDriftMetric","com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetricThreshold":"Microsoft.MachineLearningServices.CategoricalPredictionDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.CertificateDatastoreCredentials":"Microsoft.MachineLearningServices.CertificateDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.CertificateDatastoreSecrets":"Microsoft.MachineLearningServices.CertificateDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.Classification":"Microsoft.MachineLearningServices.Classification","com.azure.resourcemanager.machinelearning.models.ClassificationModels":"Microsoft.MachineLearningServices.ClassificationModels","com.azure.resourcemanager.machinelearning.models.ClassificationMultilabelPrimaryMetrics":"Microsoft.MachineLearningServices.ClassificationMultilabelPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics":"Microsoft.MachineLearningServices.ClassificationPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings":"Microsoft.MachineLearningServices.ClassificationTrainingSettings","com.azure.resourcemanager.machinelearning.models.ClusterPurpose":"Microsoft.MachineLearningServices.ClusterPurpose","com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters":"Microsoft.MachineLearningServices.ClusterUpdateParameters","com.azure.resourcemanager.machinelearning.models.CodeConfiguration":"Microsoft.MachineLearningServices.CodeConfiguration","com.azure.resourcemanager.machinelearning.models.CodeContainerProperties":"Microsoft.MachineLearningServices.CodeContainerProperties","com.azure.resourcemanager.machinelearning.models.CodeVersionProperties":"Microsoft.MachineLearningServices.CodeVersionProperties","com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku":"Microsoft.MachineLearningServices.CognitiveServicesSku","com.azure.resourcemanager.machinelearning.models.Collection":"Microsoft.MachineLearningServices.Collection","com.azure.resourcemanager.machinelearning.models.ColumnTransformer":"Microsoft.MachineLearningServices.ColumnTransformer","com.azure.resourcemanager.machinelearning.models.CommandJob":"Microsoft.MachineLearningServices.CommandJob","com.azure.resourcemanager.machinelearning.models.CommandJobLimits":"Microsoft.MachineLearningServices.CommandJobLimits","com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties":"Microsoft.MachineLearningServices.ComponentContainerProperties","com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties":"Microsoft.MachineLearningServices.ComponentVersionProperties","com.azure.resourcemanager.machinelearning.models.Compute":"Microsoft.MachineLearningServices.Compute","com.azure.resourcemanager.machinelearning.models.ComputeInstance":"Microsoft.MachineLearningServices.ComputeInstance","com.azure.resourcemanager.machinelearning.models.ComputeInstanceApplication":"Microsoft.MachineLearningServices.ComputeInstanceApplication","com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType":"Microsoft.MachineLearningServices.ComputeInstanceAuthorizationType","com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings":"Microsoft.MachineLearningServices.ComputeInstanceAutologgerSettings","com.azure.resourcemanager.machinelearning.models.ComputeInstanceConnectivityEndpoints":"Microsoft.MachineLearningServices.ComputeInstanceConnectivityEndpoints","com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer":"Microsoft.MachineLearningServices.ComputeInstanceContainer","com.azure.resourcemanager.machinelearning.models.ComputeInstanceCreatedBy":"Microsoft.MachineLearningServices.ComputeInstanceCreatedBy","com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataDisk":"Microsoft.MachineLearningServices.ComputeInstanceDataDisk","com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount":"Microsoft.MachineLearningServices.ComputeInstanceDataMount","com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo":"Microsoft.MachineLearningServices.ComputeInstanceEnvironmentInfo","com.azure.resourcemanager.machinelearning.models.ComputeInstanceLastOperation":"Microsoft.MachineLearningServices.ComputeInstanceLastOperation","com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties":"Microsoft.MachineLearningServices.ComputeInstanceProperties","com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings":"Microsoft.MachineLearningServices.ComputeInstanceSshSettings","com.azure.resourcemanager.machinelearning.models.ComputeInstanceState":"Microsoft.MachineLearningServices.ComputeInstanceState","com.azure.resourcemanager.machinelearning.models.ComputeInstanceVersion":"Microsoft.MachineLearningServices.ComputeInstanceVersion","com.azure.resourcemanager.machinelearning.models.ComputePowerAction":"Microsoft.MachineLearningServices.ComputePowerAction","com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency":"Microsoft.MachineLearningServices.ComputeRecurrenceFrequency","com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule":"Microsoft.MachineLearningServices.ComputeRecurrenceSchedule","com.azure.resourcemanager.machinelearning.models.ComputeRuntimeDto":"Microsoft.MachineLearningServices.ComputeRuntimeDto","com.azure.resourcemanager.machinelearning.models.ComputeSchedules":"Microsoft.MachineLearningServices.ComputeSchedules","com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule":"Microsoft.MachineLearningServices.ComputeStartStopSchedule","com.azure.resourcemanager.machinelearning.models.ComputeTriggerType":"Microsoft.MachineLearningServices.ComputeTriggerType","com.azure.resourcemanager.machinelearning.models.ComputeType":"Microsoft.MachineLearningServices.ComputeType","com.azure.resourcemanager.machinelearning.models.ComputeWeekDay":"Microsoft.MachineLearningServices.ComputeWeekDay","com.azure.resourcemanager.machinelearning.models.ConnectionAuthType":"Microsoft.MachineLearningServices.ConnectionAuthType","com.azure.resourcemanager.machinelearning.models.ConnectionCategory":"Microsoft.MachineLearningServices.ConnectionCategory","com.azure.resourcemanager.machinelearning.models.ConnectionGroup":"Microsoft.MachineLearningServices.ConnectionGroup","com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements":"Microsoft.MachineLearningServices.ContainerResourceRequirements","com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings":"Microsoft.MachineLearningServices.ContainerResourceSettings","com.azure.resourcemanager.machinelearning.models.ContainerType":"Microsoft.MachineLearningServices.ContainerType","com.azure.resourcemanager.machinelearning.models.ContentSafety":"Microsoft.MachineLearningServices.ContentSafety","com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.ContentSafetyEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointResourceProperties":"Microsoft.MachineLearningServices.ContentSafetyEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel":"Microsoft.MachineLearningServices.ContentSafetyLevel","com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus":"Microsoft.MachineLearningServices.ContentSafetyStatus","com.azure.resourcemanager.machinelearning.models.CosmosDbSettings":"Microsoft.MachineLearningServices.CosmosDbSettings","com.azure.resourcemanager.machinelearning.models.CreateMonitorAction":"Microsoft.MachineLearningServices.CreateMonitorAction","com.azure.resourcemanager.machinelearning.models.CredentialsType":"Microsoft.MachineLearningServices.CredentialsType","com.azure.resourcemanager.machinelearning.models.Cron":"Microsoft.MachineLearningServices.Cron","com.azure.resourcemanager.machinelearning.models.CronTrigger":"Microsoft.MachineLearningServices.CronTrigger","com.azure.resourcemanager.machinelearning.models.CustomForecastHorizon":"Microsoft.MachineLearningServices.CustomForecastHorizon","com.azure.resourcemanager.machinelearning.models.CustomKeys":"Microsoft.MachineLearningServices.CustomKeys","com.azure.resourcemanager.machinelearning.models.CustomKeysWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.CustomKeysWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.CustomMetricThreshold":"Microsoft.MachineLearningServices.CustomMetricThreshold","com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning":"Microsoft.MachineLearningServices.CustomModelFineTuning","com.azure.resourcemanager.machinelearning.models.CustomModelJobInput":"Microsoft.MachineLearningServices.CustomModelJobInput","com.azure.resourcemanager.machinelearning.models.CustomModelJobOutput":"Microsoft.MachineLearningServices.CustomModelJobOutput","com.azure.resourcemanager.machinelearning.models.CustomMonitoringSignal":"Microsoft.MachineLearningServices.CustomMonitoringSignal","com.azure.resourcemanager.machinelearning.models.CustomNCrossValidations":"Microsoft.MachineLearningServices.CustomNCrossValidations","com.azure.resourcemanager.machinelearning.models.CustomSeasonality":"Microsoft.MachineLearningServices.CustomSeasonality","com.azure.resourcemanager.machinelearning.models.CustomService":"Microsoft.MachineLearningServices.CustomService","com.azure.resourcemanager.machinelearning.models.CustomTargetLags":"Microsoft.MachineLearningServices.CustomTargetLags","com.azure.resourcemanager.machinelearning.models.CustomTargetRollingWindowSize":"Microsoft.MachineLearningServices.CustomTargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus":"Microsoft.MachineLearningServices.DataAvailabilityStatus","com.azure.resourcemanager.machinelearning.models.DataCollectionMode":"Microsoft.MachineLearningServices.DataCollectionMode","com.azure.resourcemanager.machinelearning.models.DataCollector":"Microsoft.MachineLearningServices.DataCollector","com.azure.resourcemanager.machinelearning.models.DataContainerProperties":"Microsoft.MachineLearningServices.DataContainerProperties","com.azure.resourcemanager.machinelearning.models.DataDriftMetricThresholdBase":"Microsoft.MachineLearningServices.DataDriftMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.DataDriftMonitoringSignal":"Microsoft.MachineLearningServices.DataDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.DataFactory":"Microsoft.MachineLearningServices.DataFactory","com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType":"Microsoft.MachineLearningServices.DataGenerationTaskType","com.azure.resourcemanager.machinelearning.models.DataGenerationType":"Microsoft.MachineLearningServices.DataGenerationType","com.azure.resourcemanager.machinelearning.models.DataGenerationVertical":"Microsoft.MachineLearningServices.DataGenerationVertical","com.azure.resourcemanager.machinelearning.models.DataLakeAnalytics":"Microsoft.MachineLearningServices.DataLakeAnalytics","com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties":"Microsoft.MachineLearningServices.DataLakeAnalyticsSchemaProperties","com.azure.resourcemanager.machinelearning.models.DataPathAssetReference":"Microsoft.MachineLearningServices.DataPathAssetReference","com.azure.resourcemanager.machinelearning.models.DataQualityMetricThresholdBase":"Microsoft.MachineLearningServices.DataQualityMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.DataQualityMonitoringSignal":"Microsoft.MachineLearningServices.DataQualityMonitoringSignal","com.azure.resourcemanager.machinelearning.models.DataReferenceCredential":"Microsoft.MachineLearningServices.DataReferenceCredential","com.azure.resourcemanager.machinelearning.models.DataReferenceCredentialType":"Microsoft.MachineLearningServices.DataReferenceCredentialType","com.azure.resourcemanager.machinelearning.models.DataType":"Microsoft.MachineLearningServices.DataType","com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties":"Microsoft.MachineLearningServices.DataVersionBaseProperties","com.azure.resourcemanager.machinelearning.models.Databricks":"Microsoft.MachineLearningServices.Databricks","com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets":"Microsoft.MachineLearningServices.DatabricksComputeSecrets","com.azure.resourcemanager.machinelearning.models.DatabricksProperties":"Microsoft.MachineLearningServices.DatabricksProperties","com.azure.resourcemanager.machinelearning.models.DatasetReference":"Microsoft.MachineLearningServices.DatasetReference","com.azure.resourcemanager.machinelearning.models.DatastoreCredentials":"Microsoft.MachineLearningServices.DatastoreCredentials","com.azure.resourcemanager.machinelearning.models.DatastoreProperties":"Microsoft.MachineLearningServices.DatastoreProperties","com.azure.resourcemanager.machinelearning.models.DatastoreType":"Microsoft.MachineLearningServices.DatastoreType","com.azure.resourcemanager.machinelearning.models.DefaultActionType":"Microsoft.MachineLearningServices.DefaultActionType","com.azure.resourcemanager.machinelearning.models.DefaultResourceProvisioningState":"Microsoft.MachineLearningServices.DefaultResourceProvisioningState","com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings":"Microsoft.MachineLearningServices.DefaultScaleSettings","com.azure.resourcemanager.machinelearning.models.DeltaModelCurrentState":"Microsoft.MachineLearningServices.DeltaModelCurrentState","com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest":"Microsoft.MachineLearningServices.DeltaModelListRequest","com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest":"Microsoft.MachineLearningServices.DeltaModelModifyRequest","com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest":"Microsoft.MachineLearningServices.DeltaModelStatusRequest","com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest":"Microsoft.MachineLearningServices.DeploymentLogsRequest","com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption":"Microsoft.MachineLearningServices.DeploymentModelVersionUpgradeOption","com.azure.resourcemanager.machinelearning.models.DeploymentProvisioningState":"Microsoft.MachineLearningServices.DeploymentProvisioningState","com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration":"Microsoft.MachineLearningServices.DeploymentResourceConfiguration","com.azure.resourcemanager.machinelearning.models.DestinationAsset":"Microsoft.MachineLearningServices.DestinationAsset","com.azure.resourcemanager.machinelearning.models.DiagnoseRequestProperties":"Microsoft.MachineLearningServices.DiagnoseRequestProperties","com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue":"Microsoft.MachineLearningServices.DiagnoseResponseResultValue","com.azure.resourcemanager.machinelearning.models.DiagnoseResult":"Microsoft.MachineLearningServices.DiagnoseResult","com.azure.resourcemanager.machinelearning.models.DiagnoseResultLevel":"Microsoft.MachineLearningServices.DiagnoseResultLevel","com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters":"Microsoft.MachineLearningServices.DiagnoseWorkspaceParameters","com.azure.resourcemanager.machinelearning.models.DistillationJob":"Microsoft.MachineLearningServices.DistillationJob","com.azure.resourcemanager.machinelearning.models.DistributionConfiguration":"Microsoft.MachineLearningServices.DistributionConfiguration","com.azure.resourcemanager.machinelearning.models.DistributionType":"Microsoft.MachineLearningServices.DistributionType","com.azure.resourcemanager.machinelearning.models.Docker":"Microsoft.MachineLearningServices.Docker","com.azure.resourcemanager.machinelearning.models.DockerCredential":"Microsoft.MachineLearningServices.DockerCredential","com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy":"Microsoft.MachineLearningServices.EarlyTerminationPolicy","com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicyType":"Microsoft.MachineLearningServices.EarlyTerminationPolicyType","com.azure.resourcemanager.machinelearning.models.EgressPublicNetworkAccessType":"Microsoft.MachineLearningServices.EgressPublicNetworkAccessType","com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType":"Microsoft.MachineLearningServices.EmailNotificationEnableType","com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultUpdateProperties":"Microsoft.MachineLearningServices.EncryptionKeyVaultUpdateProperties","com.azure.resourcemanager.machinelearning.models.EncryptionProperty":"Microsoft.MachineLearningServices.EncryptionProperty","com.azure.resourcemanager.machinelearning.models.EncryptionStatus":"Microsoft.MachineLearningServices.EncryptionStatus","com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties":"Microsoft.MachineLearningServices.EncryptionUpdateProperties","com.azure.resourcemanager.machinelearning.models.Endpoint":"Microsoft.MachineLearningServices.Endpoint","com.azure.resourcemanager.machinelearning.models.EndpointAuthMode":"Microsoft.MachineLearningServices.EndpointAuthMode","com.azure.resourcemanager.machinelearning.models.EndpointComputeType":"Microsoft.MachineLearningServices.EndpointComputeType","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel":"Microsoft.MachineLearningServices.EndpointDeploymentModel","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentPropertiesBase":"Microsoft.MachineLearningServices.EndpointDeploymentPropertiesBase","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.EndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties":"Microsoft.MachineLearningServices.EndpointModelDeprecationProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuCapacityProperties":"Microsoft.MachineLearningServices.EndpointModelSkuCapacityProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuProperties":"Microsoft.MachineLearningServices.EndpointModelSkuProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitRulePatternProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitRulePatternProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitRuleProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitRuleProperties","com.azure.resourcemanager.machinelearning.models.EndpointProvisioningState":"Microsoft.MachineLearningServices.EndpointProvisioningState","com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties":"Microsoft.MachineLearningServices.EndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction":"Microsoft.MachineLearningServices.EndpointScheduleAction","com.azure.resourcemanager.machinelearning.models.EndpointType":"Microsoft.MachineLearningServices.EndpointType","com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties":"Microsoft.MachineLearningServices.EnvironmentContainerProperties","com.azure.resourcemanager.machinelearning.models.EnvironmentType":"Microsoft.MachineLearningServices.EnvironmentType","com.azure.resourcemanager.machinelearning.models.EnvironmentVariable":"Microsoft.MachineLearningServices.EnvironmentVariable","com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType":"Microsoft.MachineLearningServices.EnvironmentVariableType","com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties":"Microsoft.MachineLearningServices.EnvironmentVersionProperties","com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice":"Microsoft.MachineLearningServices.EstimatedVMPrice","com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices":"Microsoft.MachineLearningServices.EstimatedVMPrices","com.azure.resourcemanager.machinelearning.models.FeatureAttributionDriftMonitoringSignal":"Microsoft.MachineLearningServices.FeatureAttributionDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetric":"Microsoft.MachineLearningServices.FeatureAttributionMetric","com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold":"Microsoft.MachineLearningServices.FeatureAttributionMetricThreshold","com.azure.resourcemanager.machinelearning.models.FeatureDataType":"Microsoft.MachineLearningServices.FeatureDataType","com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode":"Microsoft.MachineLearningServices.FeatureImportanceMode","com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings":"Microsoft.MachineLearningServices.FeatureImportanceSettings","com.azure.resourcemanager.machinelearning.models.FeatureLags":"Microsoft.MachineLearningServices.FeatureLags","com.azure.resourcemanager.machinelearning.models.FeatureProperties":"Microsoft.MachineLearningServices.FeatureProperties","com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings":"Microsoft.MachineLearningServices.FeatureStoreSettings","com.azure.resourcemanager.machinelearning.models.FeatureSubset":"Microsoft.MachineLearningServices.FeatureSubset","com.azure.resourcemanager.machinelearning.models.FeatureWindow":"Microsoft.MachineLearningServices.FeatureWindow","com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties":"Microsoft.MachineLearningServices.FeaturesetContainerProperties","com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification":"Microsoft.MachineLearningServices.FeaturesetSpecification","com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest":"Microsoft.MachineLearningServices.FeaturesetVersionBackfillRequest","com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties":"Microsoft.MachineLearningServices.FeaturesetVersionProperties","com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties":"Microsoft.MachineLearningServices.FeaturestoreEntityContainerProperties","com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties":"Microsoft.MachineLearningServices.FeaturestoreEntityVersionProperties","com.azure.resourcemanager.machinelearning.models.FeaturizationMode":"Microsoft.MachineLearningServices.FeaturizationMode","com.azure.resourcemanager.machinelearning.models.FeaturizationSettings":"Microsoft.MachineLearningServices.FeaturizationSettings","com.azure.resourcemanager.machinelearning.models.FineTuningJob":"Microsoft.MachineLearningServices.FineTuningJob","com.azure.resourcemanager.machinelearning.models.FineTuningTaskType":"Microsoft.MachineLearningServices.FineTuningTaskType","com.azure.resourcemanager.machinelearning.models.FineTuningVertical":"Microsoft.MachineLearningServices.FineTuningVertical","com.azure.resourcemanager.machinelearning.models.FinetuningDetails":"Microsoft.MachineLearningServices.FinetuningDetails","com.azure.resourcemanager.machinelearning.models.FirewallSku":"Microsoft.MachineLearningServices.FirewallSku","com.azure.resourcemanager.machinelearning.models.FixedInputData":"Microsoft.MachineLearningServices.FixedInputData","com.azure.resourcemanager.machinelearning.models.FlavorData":"Microsoft.MachineLearningServices.FlavorData","com.azure.resourcemanager.machinelearning.models.ForecastHorizon":"Microsoft.MachineLearningServices.ForecastHorizon","com.azure.resourcemanager.machinelearning.models.ForecastHorizonMode":"Microsoft.MachineLearningServices.ForecastHorizonMode","com.azure.resourcemanager.machinelearning.models.Forecasting":"Microsoft.MachineLearningServices.Forecasting","com.azure.resourcemanager.machinelearning.models.ForecastingModels":"Microsoft.MachineLearningServices.ForecastingModels","com.azure.resourcemanager.machinelearning.models.ForecastingPrimaryMetrics":"Microsoft.MachineLearningServices.ForecastingPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ForecastingSettings":"Microsoft.MachineLearningServices.ForecastingSettings","com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings":"Microsoft.MachineLearningServices.ForecastingTrainingSettings","com.azure.resourcemanager.machinelearning.models.FqdnEndpoint":"Microsoft.MachineLearningServices.FqdnEndpoint","com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail":"Microsoft.MachineLearningServices.FqdnEndpointDetail","com.azure.resourcemanager.machinelearning.models.FqdnEndpoints":"Microsoft.MachineLearningServices.FqdnEndpoints","com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag":"Microsoft.MachineLearningServices.FqdnEndpointsPropertyBag","com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule":"Microsoft.MachineLearningServices.FqdnOutboundRule","com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto":"Microsoft.MachineLearningServices.GetBlobReferenceForConsumptionDto","com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto":"Microsoft.MachineLearningServices.GetBlobReferenceSASRequestDto","com.azure.resourcemanager.machinelearning.models.Goal":"Microsoft.MachineLearningServices.Goal","com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm":"Microsoft.MachineLearningServices.GridSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.GroupEnvironmentConfiguration":"Microsoft.MachineLearningServices.GroupEnvironmentConfiguration","com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration":"Microsoft.MachineLearningServices.GroupModelConfiguration","com.azure.resourcemanager.machinelearning.models.HDInsight":"Microsoft.MachineLearningServices.HDInsight","com.azure.resourcemanager.machinelearning.models.HDInsightProperties":"Microsoft.MachineLearningServices.HDInsightProperties","com.azure.resourcemanager.machinelearning.models.IPRule":"Microsoft.MachineLearningServices.IPRule","com.azure.resourcemanager.machinelearning.models.IdAssetReference":"Microsoft.MachineLearningServices.IdAssetReference","com.azure.resourcemanager.machinelearning.models.IdentityConfiguration":"Microsoft.MachineLearningServices.IdentityConfiguration","com.azure.resourcemanager.machinelearning.models.IdentityConfigurationType":"Microsoft.MachineLearningServices.IdentityConfigurationType","com.azure.resourcemanager.machinelearning.models.IdentityForCmk":"Microsoft.MachineLearningServices.IdentityForCmk","com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting":"Microsoft.MachineLearningServices.IdleShutdownSetting","com.azure.resourcemanager.machinelearning.models.Image":"Microsoft.MachineLearningServices.Image","com.azure.resourcemanager.machinelearning.models.ImageClassification":"Microsoft.MachineLearningServices.ImageClassification","com.azure.resourcemanager.machinelearning.models.ImageClassificationMultilabel":"Microsoft.MachineLearningServices.ImageClassificationMultilabel","com.azure.resourcemanager.machinelearning.models.ImageDetails":"Microsoft.MachineLearningServices.ImageDetails","com.azure.resourcemanager.machinelearning.models.ImageInfo":"Microsoft.MachineLearningServices.ImageInfo","com.azure.resourcemanager.machinelearning.models.ImageInstanceSegmentation":"Microsoft.MachineLearningServices.ImageInstanceSegmentation","com.azure.resourcemanager.machinelearning.models.ImageLimitSettings":"Microsoft.MachineLearningServices.ImageLimitSettings","com.azure.resourcemanager.machinelearning.models.ImageMetadata":"Microsoft.MachineLearningServices.ImageMetadata","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings":"Microsoft.MachineLearningServices.ImageModelDistributionSettings","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification":"Microsoft.MachineLearningServices.ImageModelDistributionSettingsClassification","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection":"Microsoft.MachineLearningServices.ImageModelDistributionSettingsObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageModelSettings":"Microsoft.MachineLearningServices.ImageModelSettings","com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification":"Microsoft.MachineLearningServices.ImageModelSettingsClassification","com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection":"Microsoft.MachineLearningServices.ImageModelSettingsObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageObjectDetection":"Microsoft.MachineLearningServices.ImageObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageSweepSettings":"Microsoft.MachineLearningServices.ImageSweepSettings","com.azure.resourcemanager.machinelearning.models.ImageType":"Microsoft.MachineLearningServices.ImageType","com.azure.resourcemanager.machinelearning.models.IndexColumn":"Microsoft.MachineLearningServices.IndexColumn","com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties":"Microsoft.MachineLearningServices.InferenceContainerProperties","com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties":"Microsoft.MachineLearningServices.InferenceEndpointProperties","com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties":"Microsoft.MachineLearningServices.InferenceGroupProperties","com.azure.resourcemanager.machinelearning.models.InferencePoolProperties":"Microsoft.MachineLearningServices.InferencePoolProperties","com.azure.resourcemanager.machinelearning.models.InputDeliveryMode":"Microsoft.MachineLearningServices.InputDeliveryMode","com.azure.resourcemanager.machinelearning.models.InstanceSegmentationPrimaryMetrics":"Microsoft.MachineLearningServices.InstanceSegmentationPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema":"Microsoft.MachineLearningServices.InstanceTypeSchema","com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources":"Microsoft.MachineLearningServices.InstanceTypeSchemaResources","com.azure.resourcemanager.machinelearning.models.IsolationMode":"Microsoft.MachineLearningServices.IsolationMode","com.azure.resourcemanager.machinelearning.models.JobBaseProperties":"Microsoft.MachineLearningServices.JobBaseProperties","com.azure.resourcemanager.machinelearning.models.JobInput":"Microsoft.MachineLearningServices.JobInput","com.azure.resourcemanager.machinelearning.models.JobInputType":"Microsoft.MachineLearningServices.JobInputType","com.azure.resourcemanager.machinelearning.models.JobLimits":"Microsoft.MachineLearningServices.JobLimits","com.azure.resourcemanager.machinelearning.models.JobLimitsType":"Microsoft.MachineLearningServices.JobLimitsType","com.azure.resourcemanager.machinelearning.models.JobOutput":"Microsoft.MachineLearningServices.JobOutput","com.azure.resourcemanager.machinelearning.models.JobOutputType":"Microsoft.MachineLearningServices.JobOutputType","com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration":"Microsoft.MachineLearningServices.JobResourceConfiguration","com.azure.resourcemanager.machinelearning.models.JobResources":"Microsoft.MachineLearningServices.JobResources","com.azure.resourcemanager.machinelearning.models.JobScheduleAction":"Microsoft.MachineLearningServices.JobScheduleAction","com.azure.resourcemanager.machinelearning.models.JobService":"Microsoft.MachineLearningServices.JobService","com.azure.resourcemanager.machinelearning.models.JobStatus":"Microsoft.MachineLearningServices.JobStatus","com.azure.resourcemanager.machinelearning.models.JobTier":"Microsoft.MachineLearningServices.JobTier","com.azure.resourcemanager.machinelearning.models.JobType":"Microsoft.MachineLearningServices.JobType","com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig":"Microsoft.MachineLearningServices.JupyterKernelConfig","com.azure.resourcemanager.machinelearning.models.KeyType":"Microsoft.MachineLearningServices.KeyType","com.azure.resourcemanager.machinelearning.models.KeyVaultProperties":"Microsoft.MachineLearningServices.KeyVaultProperties","com.azure.resourcemanager.machinelearning.models.Kubernetes":"Microsoft.MachineLearningServices.Kubernetes","com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment":"Microsoft.MachineLearningServices.KubernetesOnlineDeployment","com.azure.resourcemanager.machinelearning.models.KubernetesProperties":"Microsoft.MachineLearningServices.KubernetesProperties","com.azure.resourcemanager.machinelearning.models.LabelGeneration":"Microsoft.MachineLearningServices.LabelGeneration","com.azure.resourcemanager.machinelearning.models.LakeHouseArtifact":"Microsoft.MachineLearningServices.LakeHouseArtifact","com.azure.resourcemanager.machinelearning.models.LearningRateScheduler":"Microsoft.MachineLearningServices.LearningRateScheduler","com.azure.resourcemanager.machinelearning.models.ListViewType":"Microsoft.MachineLearningServices.ListViewType","com.azure.resourcemanager.machinelearning.models.LiteralJobInput":"Microsoft.MachineLearningServices.LiteralJobInput","com.azure.resourcemanager.machinelearning.models.LoadBalancerType":"Microsoft.MachineLearningServices.LoadBalancerType","com.azure.resourcemanager.machinelearning.models.LogVerbosity":"Microsoft.MachineLearningServices.LogVerbosity","com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput":"Microsoft.MachineLearningServices.MLFlowModelJobInput","com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput":"Microsoft.MachineLearningServices.MLFlowModelJobOutput","com.azure.resourcemanager.machinelearning.models.MLTableData":"Microsoft.MachineLearningServices.MLTableData","com.azure.resourcemanager.machinelearning.models.MLTableJobInput":"Microsoft.MachineLearningServices.MLTableJobInput","com.azure.resourcemanager.machinelearning.models.MLTableJobOutput":"Microsoft.MachineLearningServices.MLTableJobOutput","com.azure.resourcemanager.machinelearning.models.ManagedComputeIdentity":"Microsoft.MachineLearningServices.ManagedComputeIdentity","com.azure.resourcemanager.machinelearning.models.ManagedIdentity":"Microsoft.MachineLearningServices.ManagedIdentity","com.azure.resourcemanager.machinelearning.models.ManagedIdentityAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ManagedIdentityAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ManagedIdentityCredential":"Microsoft.MachineLearningServices.ManagedIdentityCredential","com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind":"Microsoft.MachineLearningServices.ManagedNetworkKind","com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions":"Microsoft.MachineLearningServices.ManagedNetworkProvisionOptions","com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisioningState":"Microsoft.MachineLearningServices.ManagedNetworkProvisioningState","com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx":"Microsoft.MachineLearningServices.ManagedNetworkSettingsEx","com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties":"Microsoft.MachineLearningServices.ManagedNetworkSettingsProperties","com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus":"Microsoft.MachineLearningServices.ManagedNetworkStatus","com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment":"Microsoft.MachineLearningServices.ManagedOnlineDeployment","com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.ManagedOnlineEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointResourceProperties":"Microsoft.MachineLearningServices.ManagedOnlineEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ManagedPERequirement":"Microsoft.MachineLearningServices.ManagedPERequirement","com.azure.resourcemanager.machinelearning.models.ManagedPEStatus":"Microsoft.MachineLearningServices.ManagedPEStatus","com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities":"Microsoft.MachineLearningServices.ManagedResourceGroupAssignedIdentities","com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings":"Microsoft.MachineLearningServices.ManagedResourceGroupSettings","com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.machinelearning.models.MarketplacePlan":"Microsoft.MachineLearningServices.MarketplacePlan","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties":"Microsoft.MachineLearningServices.MarketplaceSubscriptionProperties","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProvisioningState":"Microsoft.MachineLearningServices.MarketplaceSubscriptionProvisioningState","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionStatus":"Microsoft.MachineLearningServices.MarketplaceSubscriptionStatus","com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource":"Microsoft.MachineLearningServices.MaterializationComputeResource","com.azure.resourcemanager.machinelearning.models.MaterializationSettings":"Microsoft.MachineLearningServices.MaterializationSettings","com.azure.resourcemanager.machinelearning.models.MaterializationStoreType":"Microsoft.MachineLearningServices.MaterializationStoreType","com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy":"Microsoft.MachineLearningServices.MedianStoppingPolicy","com.azure.resourcemanager.machinelearning.models.MlflowAutologger":"Microsoft.MachineLearningServices.MlflowAutologger","com.azure.resourcemanager.machinelearning.models.ModelContainerProperties":"Microsoft.MachineLearningServices.ModelContainerProperties","com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus":"Microsoft.MachineLearningServices.ModelLifecycleStatus","com.azure.resourcemanager.machinelearning.models.ModelProvider":"Microsoft.MachineLearningServices.ModelProvider","com.azure.resourcemanager.machinelearning.models.ModelSettings":"Microsoft.MachineLearningServices.ModelSettings","com.azure.resourcemanager.machinelearning.models.ModelSize":"Microsoft.MachineLearningServices.ModelSize","com.azure.resourcemanager.machinelearning.models.ModelTaskType":"Microsoft.MachineLearningServices.ModelTaskType","com.azure.resourcemanager.machinelearning.models.ModelVersionProperties":"Microsoft.MachineLearningServices.ModelVersionProperties","com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase":"Microsoft.MachineLearningServices.MonitorComputeConfigurationBase","com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityBase":"Microsoft.MachineLearningServices.MonitorComputeIdentityBase","com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityType":"Microsoft.MachineLearningServices.MonitorComputeIdentityType","com.azure.resourcemanager.machinelearning.models.MonitorComputeType":"Microsoft.MachineLearningServices.MonitorComputeType","com.azure.resourcemanager.machinelearning.models.MonitorDefinition":"Microsoft.MachineLearningServices.MonitorDefinition","com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings":"Microsoft.MachineLearningServices.MonitorEmailNotificationSettings","com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings":"Microsoft.MachineLearningServices.MonitorNotificationSettings","com.azure.resourcemanager.machinelearning.models.MonitorServerlessSparkCompute":"Microsoft.MachineLearningServices.MonitorServerlessSparkCompute","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType":"Microsoft.MachineLearningServices.MonitoringFeatureDataType","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase":"Microsoft.MachineLearningServices.MonitoringFeatureFilterBase","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterType":"Microsoft.MachineLearningServices.MonitoringFeatureFilterType","com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase":"Microsoft.MachineLearningServices.MonitoringInputDataBase","com.azure.resourcemanager.machinelearning.models.MonitoringInputDataType":"Microsoft.MachineLearningServices.MonitoringInputDataType","com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType":"Microsoft.MachineLearningServices.MonitoringNotificationType","com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase":"Microsoft.MachineLearningServices.MonitoringSignalBase","com.azure.resourcemanager.machinelearning.models.MonitoringSignalType":"Microsoft.MachineLearningServices.MonitoringSignalType","com.azure.resourcemanager.machinelearning.models.MonitoringTarget":"Microsoft.MachineLearningServices.MonitoringTarget","com.azure.resourcemanager.machinelearning.models.MonitoringThreshold":"Microsoft.MachineLearningServices.MonitoringThreshold","com.azure.resourcemanager.machinelearning.models.MountAction":"Microsoft.MachineLearningServices.MountAction","com.azure.resourcemanager.machinelearning.models.MountMode":"Microsoft.MachineLearningServices.MountMode","com.azure.resourcemanager.machinelearning.models.MountState":"Microsoft.MachineLearningServices.MountState","com.azure.resourcemanager.machinelearning.models.Mpi":"Microsoft.MachineLearningServices.Mpi","com.azure.resourcemanager.machinelearning.models.NCrossValidations":"Microsoft.MachineLearningServices.NCrossValidations","com.azure.resourcemanager.machinelearning.models.NCrossValidationsMode":"Microsoft.MachineLearningServices.NCrossValidationsMode","com.azure.resourcemanager.machinelearning.models.Network":"Microsoft.MachineLearningServices.Network","com.azure.resourcemanager.machinelearning.models.NetworkAcls":"Microsoft.MachineLearningServices.NetworkAcls","com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings":"Microsoft.MachineLearningServices.NlpVerticalFeaturizationSettings","com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings":"Microsoft.MachineLearningServices.NlpVerticalLimitSettings","com.azure.resourcemanager.machinelearning.models.NodeState":"Microsoft.MachineLearningServices.NodeState","com.azure.resourcemanager.machinelearning.models.NodeStateCounts":"Microsoft.MachineLearningServices.NodeStateCounts","com.azure.resourcemanager.machinelearning.models.Nodes":"Microsoft.MachineLearningServices.Nodes","com.azure.resourcemanager.machinelearning.models.NodesValueType":"Microsoft.MachineLearningServices.NodesValueType","com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.NoneAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.NoneDatastoreCredentials":"Microsoft.MachineLearningServices.NoneDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.NotebookPreparationError":"Microsoft.MachineLearningServices.NotebookPreparationError","com.azure.resourcemanager.machinelearning.models.NotificationSetting":"Microsoft.MachineLearningServices.NotificationSetting","com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetric":"Microsoft.MachineLearningServices.NumericalDataDriftMetric","com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetricThreshold":"Microsoft.MachineLearningServices.NumericalDataDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetric":"Microsoft.MachineLearningServices.NumericalDataQualityMetric","com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetricThreshold":"Microsoft.MachineLearningServices.NumericalDataQualityMetricThreshold","com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetric":"Microsoft.MachineLearningServices.NumericalPredictionDriftMetric","com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetricThreshold":"Microsoft.MachineLearningServices.NumericalPredictionDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.OAuth2AuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.OAuth2AuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ObjectDetectionPrimaryMetrics":"Microsoft.MachineLearningServices.ObjectDetectionPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.Objective":"Microsoft.MachineLearningServices.Objective","com.azure.resourcemanager.machinelearning.models.OneLakeArtifact":"Microsoft.MachineLearningServices.OneLakeArtifact","com.azure.resourcemanager.machinelearning.models.OneLakeArtifactType":"Microsoft.MachineLearningServices.OneLakeArtifactType","com.azure.resourcemanager.machinelearning.models.OneLakeDatastore":"Microsoft.MachineLearningServices.OneLakeDatastore","com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties":"Microsoft.MachineLearningServices.OnlineDeploymentProperties","com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties":"Microsoft.MachineLearningServices.OnlineEndpointProperties","com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings":"Microsoft.MachineLearningServices.OnlineRequestSettings","com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings":"Microsoft.MachineLearningServices.OnlineScaleSettings","com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.OpenAIEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties":"Microsoft.MachineLearningServices.OpenAIEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.OperatingSystemType":"Microsoft.MachineLearningServices.OperatingSystemType","com.azure.resourcemanager.machinelearning.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.machinelearning.models.OperationName":"Microsoft.MachineLearningServices.OperationName","com.azure.resourcemanager.machinelearning.models.OperationStatus":"Microsoft.MachineLearningServices.OperationStatus","com.azure.resourcemanager.machinelearning.models.OperationTrigger":"Microsoft.MachineLearningServices.OperationTrigger","com.azure.resourcemanager.machinelearning.models.OrderString":"Microsoft.MachineLearningServices.OrderString","com.azure.resourcemanager.machinelearning.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.machinelearning.models.OsPatchingStatus":"Microsoft.MachineLearningServices.OsPatchingStatus","com.azure.resourcemanager.machinelearning.models.OsType":"Microsoft.MachineLearningServices.OsType","com.azure.resourcemanager.machinelearning.models.OutboundRule":"Microsoft.MachineLearningServices.OutboundRule","com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode":"Microsoft.MachineLearningServices.OutputDeliveryMode","com.azure.resourcemanager.machinelearning.models.OutputPathAssetReference":"Microsoft.MachineLearningServices.OutputPathAssetReference","com.azure.resourcemanager.machinelearning.models.PATAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.PATAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.PTUDeploymentUsage":"Microsoft.MachineLearningServices.PTUDeploymentUsage","com.azure.resourcemanager.machinelearning.models.PackageDetails":"Microsoft.MachineLearningServices.PackageDetails","com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment":"Microsoft.MachineLearningServices.PartialBatchDeployment","com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties":"Microsoft.MachineLearningServices.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties","com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity":"Microsoft.MachineLearningServices.PartialManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResource":"Microsoft.MachineLearningServices.PartialMinimalTrackedResource","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithIdentity","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithSku","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithSkuAndIdentity","com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource":"Microsoft.MachineLearningServices.PartialRegistryPartialTrackedResource","com.azure.resourcemanager.machinelearning.models.PartialSku":"Microsoft.MachineLearningServices.PartialSku","com.azure.resourcemanager.machinelearning.models.Password":"Microsoft.MachineLearningServices.Password","com.azure.resourcemanager.machinelearning.models.PatchStatus":"Microsoft.MachineLearningServices.PatchStatus","com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialDto":"Microsoft.MachineLearningServices.PendingUploadCredentialDto","com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialType":"Microsoft.MachineLearningServices.PendingUploadCredentialType","com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto":"Microsoft.MachineLearningServices.PendingUploadRequestDto","com.azure.resourcemanager.machinelearning.models.PendingUploadType":"Microsoft.MachineLearningServices.PendingUploadType","com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings":"Microsoft.MachineLearningServices.PersonalComputeInstanceSettings","com.azure.resourcemanager.machinelearning.models.PipelineJob":"Microsoft.MachineLearningServices.PipelineJob","com.azure.resourcemanager.machinelearning.models.PoolProvisioningState":"Microsoft.MachineLearningServices.PoolProvisioningState","com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase":"Microsoft.MachineLearningServices.PredictionDriftMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.PredictionDriftMonitoringSignal":"Microsoft.MachineLearningServices.PredictionDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState":"Microsoft.MachineLearningServices.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.machinelearning.models.PrivateEndpointDestination":"Microsoft.MachineLearningServices.PrivateEndpointDestination","com.azure.resourcemanager.machinelearning.models.PrivateEndpointOutboundRule":"Microsoft.MachineLearningServices.PrivateEndpointOutboundRule","com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource":"Microsoft.MachineLearningServices.PrivateEndpointResource","com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus":"Microsoft.MachineLearningServices.EndpointServiceConnectionStatus","com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState":"Microsoft.MachineLearningServices.PrivateLinkServiceConnectionState","com.azure.resourcemanager.machinelearning.models.ProbeSettings":"Microsoft.MachineLearningServices.ProbeSettings","com.azure.resourcemanager.machinelearning.models.PromptSettings":"Microsoft.MachineLearningServices.PromptSettings","com.azure.resourcemanager.machinelearning.models.PropertiesBase":"Microsoft.MachineLearningServices.PropertiesBase","com.azure.resourcemanager.machinelearning.models.Protocol":"Microsoft.MachineLearningServices.Protocol","com.azure.resourcemanager.machinelearning.models.ProvisioningState":"Microsoft.MachineLearningServices.ProvisioningState","com.azure.resourcemanager.machinelearning.models.ProvisioningStatus":"Microsoft.MachineLearningServices.ProvisioningStatus","com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess":"Microsoft.MachineLearningServices.PublicNetworkAccessType","com.azure.resourcemanager.machinelearning.models.PyTorch":"Microsoft.MachineLearningServices.PyTorch","com.azure.resourcemanager.machinelearning.models.QueueSettings":"Microsoft.MachineLearningServices.QueueSettings","com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties":"Microsoft.MachineLearningServices.QuotaBaseProperties","com.azure.resourcemanager.machinelearning.models.QuotaUnit":"Microsoft.MachineLearningServices.QuotaUnit","com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters":"Microsoft.MachineLearningServices.QuotaUpdateParameters","com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig":"Microsoft.MachineLearningServices.RaiBlocklistConfig","com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest":"Microsoft.MachineLearningServices.RaiBlocklistItemBulkRequest","com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties":"Microsoft.MachineLearningServices.RaiBlocklistItemProperties","com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties":"Microsoft.MachineLearningServices.RaiBlocklistProperties","com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter":"Microsoft.MachineLearningServices.RaiPolicyContentFilter","com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource":"Microsoft.MachineLearningServices.RaiPolicyContentSource","com.azure.resourcemanager.machinelearning.models.RaiPolicyMode":"Microsoft.MachineLearningServices.RaiPolicyMode","com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties":"Microsoft.MachineLearningServices.RaiPolicyProperties","com.azure.resourcemanager.machinelearning.models.RaiPolicyType":"Microsoft.MachineLearningServices.RaiPolicyType","com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm":"Microsoft.MachineLearningServices.RandomSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithmRule":"Microsoft.MachineLearningServices.RandomSamplingAlgorithmRule","com.azure.resourcemanager.machinelearning.models.Ray":"Microsoft.MachineLearningServices.Ray","com.azure.resourcemanager.machinelearning.models.Recurrence":"Microsoft.MachineLearningServices.Recurrence","com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency":"Microsoft.MachineLearningServices.RecurrenceFrequency","com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule":"Microsoft.MachineLearningServices.RecurrenceSchedule","com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger":"Microsoft.MachineLearningServices.RecurrenceTrigger","com.azure.resourcemanager.machinelearning.models.ReferenceType":"Microsoft.MachineLearningServices.ReferenceType","com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest":"Microsoft.MachineLearningServices.RegenerateEndpointKeysRequest","com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent":"Microsoft.MachineLearningServices.RegenerateServiceAccountKeyContent","com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult":"Microsoft.MachineLearningServices.RegistryListCredentialsResult","com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity":"Microsoft.MachineLearningServices.RegistryPartialManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection":"Microsoft.MachineLearningServices.RegistryPrivateEndpointConnection","com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState":"Microsoft.MachineLearningServices.RegistryPrivateLinkServiceConnectionState","com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails":"Microsoft.MachineLearningServices.RegistryRegionArmDetails","com.azure.resourcemanager.machinelearning.models.Regression":"Microsoft.MachineLearningServices.Regression","com.azure.resourcemanager.machinelearning.models.RegressionModels":"Microsoft.MachineLearningServices.RegressionModels","com.azure.resourcemanager.machinelearning.models.RegressionPrimaryMetrics":"Microsoft.MachineLearningServices.RegressionPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings":"Microsoft.MachineLearningServices.RegressionTrainingSettings","com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess":"Microsoft.MachineLearningServices.RemoteLoginPortPublicAccess","com.azure.resourcemanager.machinelearning.models.RequestConfiguration":"Microsoft.MachineLearningServices.RequestConfiguration","com.azure.resourcemanager.machinelearning.models.RequestLogging":"Microsoft.MachineLearningServices.RequestLogging","com.azure.resourcemanager.machinelearning.models.ResizeSchema":"Microsoft.MachineLearningServices.ResizeSchema","com.azure.resourcemanager.machinelearning.models.ResourceBase":"Microsoft.MachineLearningServices.ResourceBase","com.azure.resourcemanager.machinelearning.models.ResourceConfiguration":"Microsoft.MachineLearningServices.ResourceConfiguration","com.azure.resourcemanager.machinelearning.models.ResourceId":"Microsoft.MachineLearningServices.ResourceId","com.azure.resourcemanager.machinelearning.models.ResourceName":"Microsoft.MachineLearningServices.ResourceName","com.azure.resourcemanager.machinelearning.models.RollingInputData":"Microsoft.MachineLearningServices.RollingInputData","com.azure.resourcemanager.machinelearning.models.RollingRateType":"Microsoft.MachineLearningServices.RollingRateType","com.azure.resourcemanager.machinelearning.models.Route":"Microsoft.MachineLearningServices.Route","com.azure.resourcemanager.machinelearning.models.RuleAction":"Microsoft.MachineLearningServices.RuleAction","com.azure.resourcemanager.machinelearning.models.RuleCategory":"Microsoft.MachineLearningServices.RuleCategory","com.azure.resourcemanager.machinelearning.models.RuleStatus":"Microsoft.MachineLearningServices.RuleStatus","com.azure.resourcemanager.machinelearning.models.RuleType":"Microsoft.MachineLearningServices.RuleType","com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm":"Microsoft.MachineLearningServices.SamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType":"Microsoft.MachineLearningServices.SamplingAlgorithmType","com.azure.resourcemanager.machinelearning.models.SasAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.SASAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.SasCredential":"Microsoft.MachineLearningServices.SASCredential","com.azure.resourcemanager.machinelearning.models.SasCredentialDto":"Microsoft.MachineLearningServices.SASCredentialDto","com.azure.resourcemanager.machinelearning.models.SasDatastoreCredentials":"Microsoft.MachineLearningServices.SasDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.SasDatastoreSecrets":"Microsoft.MachineLearningServices.SasDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.ScaleSettings":"Microsoft.MachineLearningServices.ScaleSettings","com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation":"Microsoft.MachineLearningServices.ScaleSettingsInformation","com.azure.resourcemanager.machinelearning.models.ScaleType":"Microsoft.MachineLearningServices.ScaleType","com.azure.resourcemanager.machinelearning.models.ScaleUnitConfiguration":"Microsoft.MachineLearningServices.ScaleUnitConfiguration","com.azure.resourcemanager.machinelearning.models.ScheduleActionBase":"Microsoft.MachineLearningServices.ScheduleActionBase","com.azure.resourcemanager.machinelearning.models.ScheduleActionType":"Microsoft.MachineLearningServices.ScheduleActionType","com.azure.resourcemanager.machinelearning.models.ScheduleBase":"Microsoft.MachineLearningServices.ScheduleBase","com.azure.resourcemanager.machinelearning.models.ScheduleListViewType":"Microsoft.MachineLearningServices.ScheduleListViewType","com.azure.resourcemanager.machinelearning.models.ScheduleProperties":"Microsoft.MachineLearningServices.ScheduleProperties","com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState":"Microsoft.MachineLearningServices.ScheduleProvisioningState","com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningStatus":"Microsoft.MachineLearningServices.ScheduleProvisioningStatus","com.azure.resourcemanager.machinelearning.models.ScheduleStatus":"Microsoft.MachineLearningServices.ScheduleStatus","com.azure.resourcemanager.machinelearning.models.ScriptReference":"Microsoft.MachineLearningServices.ScriptReference","com.azure.resourcemanager.machinelearning.models.ScriptsToExecute":"Microsoft.MachineLearningServices.ScriptsToExecute","com.azure.resourcemanager.machinelearning.models.Seasonality":"Microsoft.MachineLearningServices.Seasonality","com.azure.resourcemanager.machinelearning.models.SeasonalityMode":"Microsoft.MachineLearningServices.SeasonalityMode","com.azure.resourcemanager.machinelearning.models.SecretExpiry":"Microsoft.MachineLearningServices.SecretExpiry","com.azure.resourcemanager.machinelearning.models.SecretsType":"Microsoft.MachineLearningServices.SecretsType","com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings":"Microsoft.MachineLearningServices.ServerlessComputeSettings","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation":"Microsoft.MachineLearningServices.ServerlessEndpointCapacityReservation","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointContentSafety":"Microsoft.MachineLearningServices.ServerlessEndpointContentSafety","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointInferenceEndpoint":"Microsoft.MachineLearningServices.ServerlessEndpointInferenceEndpoint","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointModelSettings":"Microsoft.MachineLearningServices.ServerlessEndpointModelSettings","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties":"Microsoft.MachineLearningServices.ServerlessEndpointProperties","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointResourceProperties":"Microsoft.MachineLearningServices.ServerlessEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointState":"Microsoft.MachineLearningServices.ServerlessEndpointState","com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpoint":"Microsoft.MachineLearningServices.ServerlessInferenceEndpoint","com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode":"Microsoft.MachineLearningServices.ServerlessInferenceEndpointAuthMode","com.azure.resourcemanager.machinelearning.models.ServerlessOffer":"Microsoft.MachineLearningServices.ServerlessOffer","com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName":"Microsoft.MachineLearningServices.ServiceAccountKeyName","com.azure.resourcemanager.machinelearning.models.ServiceDataAccessAuthIdentity":"Microsoft.MachineLearningServices.ServiceDataAccessAuthIdentity","com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings":"Microsoft.MachineLearningServices.ServiceManagedResourcesSettings","com.azure.resourcemanager.machinelearning.models.ServicePrincipalAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ServicePrincipalAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials":"Microsoft.MachineLearningServices.ServicePrincipalDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets":"Microsoft.MachineLearningServices.ServicePrincipalDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.ServiceTagDestination":"Microsoft.MachineLearningServices.ServiceTagDestination","com.azure.resourcemanager.machinelearning.models.ServiceTagOutboundRule":"Microsoft.MachineLearningServices.ServiceTagOutboundRule","com.azure.resourcemanager.machinelearning.models.SetupScripts":"Microsoft.MachineLearningServices.SetupScripts","com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource":"Microsoft.MachineLearningServices.SharedPrivateLinkResource","com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration":"Microsoft.MachineLearningServices.ShortSeriesHandlingConfiguration","com.azure.resourcemanager.machinelearning.models.Sku":"Azure.ResourceManager.CommonTypes.Sku","com.azure.resourcemanager.machinelearning.models.SkuCapacity":"Microsoft.MachineLearningServices.SkuCapacity","com.azure.resourcemanager.machinelearning.models.SkuScaleType":"Microsoft.MachineLearningServices.SkuScaleType","com.azure.resourcemanager.machinelearning.models.SkuSetting":"Microsoft.MachineLearningServices.SkuSetting","com.azure.resourcemanager.machinelearning.models.SkuTier":"Azure.ResourceManager.CommonTypes.SkuTier","com.azure.resourcemanager.machinelearning.models.SourceType":"Microsoft.MachineLearningServices.SourceType","com.azure.resourcemanager.machinelearning.models.SparkJob":"Microsoft.MachineLearningServices.SparkJob","com.azure.resourcemanager.machinelearning.models.SparkJobEntry":"Microsoft.MachineLearningServices.SparkJobEntry","com.azure.resourcemanager.machinelearning.models.SparkJobEntryType":"Microsoft.MachineLearningServices.SparkJobEntryType","com.azure.resourcemanager.machinelearning.models.SparkJobPythonEntry":"Microsoft.MachineLearningServices.SparkJobPythonEntry","com.azure.resourcemanager.machinelearning.models.SparkJobScalaEntry":"Microsoft.MachineLearningServices.SparkJobScalaEntry","com.azure.resourcemanager.machinelearning.models.SparkResourceConfiguration":"Microsoft.MachineLearningServices.SparkResourceConfiguration","com.azure.resourcemanager.machinelearning.models.SpeechEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.SpeechEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.SpeechEndpointResourceProperties":"Microsoft.MachineLearningServices.SpeechEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.SshPublicAccess":"Microsoft.MachineLearningServices.SshPublicAccess","com.azure.resourcemanager.machinelearning.models.SslConfigStatus":"Microsoft.MachineLearningServices.SslConfigStatus","com.azure.resourcemanager.machinelearning.models.SslConfiguration":"Microsoft.MachineLearningServices.SslConfiguration","com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings":"Microsoft.MachineLearningServices.StackEnsembleSettings","com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType":"Microsoft.MachineLearningServices.StackMetaLearnerType","com.azure.resourcemanager.machinelearning.models.StaticInputData":"Microsoft.MachineLearningServices.StaticInputData","com.azure.resourcemanager.machinelearning.models.Status":"Microsoft.MachineLearningServices.Status","com.azure.resourcemanager.machinelearning.models.StochasticOptimizer":"Microsoft.MachineLearningServices.StochasticOptimizer","com.azure.resourcemanager.machinelearning.models.StorageAccountDetails":"Microsoft.MachineLearningServices.StorageAccountDetails","com.azure.resourcemanager.machinelearning.models.StorageAccountType":"Microsoft.MachineLearningServices.StorageAccountType","com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair":"Microsoft.MachineLearningServices.StringStringKeyValuePair","com.azure.resourcemanager.machinelearning.models.SweepJob":"Microsoft.MachineLearningServices.SweepJob","com.azure.resourcemanager.machinelearning.models.SweepJobLimits":"Microsoft.MachineLearningServices.SweepJobLimits","com.azure.resourcemanager.machinelearning.models.SynapseSpark":"Microsoft.MachineLearningServices.SynapseSpark","com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties":"Microsoft.MachineLearningServices.SynapseSparkProperties","com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount":"Microsoft.MachineLearningServices.SystemCreatedAcrAccount","com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount":"Microsoft.MachineLearningServices.SystemCreatedStorageAccount","com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode":"Microsoft.MachineLearningServices.SystemDatastoresAuthMode","com.azure.resourcemanager.machinelearning.models.SystemService":"Microsoft.MachineLearningServices.SystemService","com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings":"Microsoft.MachineLearningServices.TableVerticalFeaturizationSettings","com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings":"Microsoft.MachineLearningServices.TableVerticalLimitSettings","com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction":"Microsoft.MachineLearningServices.TargetAggregationFunction","com.azure.resourcemanager.machinelearning.models.TargetLags":"Microsoft.MachineLearningServices.TargetLags","com.azure.resourcemanager.machinelearning.models.TargetLagsMode":"Microsoft.MachineLearningServices.TargetLagsMode","com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize":"Microsoft.MachineLearningServices.TargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSizeMode":"Microsoft.MachineLearningServices.TargetRollingWindowSizeMode","com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings":"Microsoft.MachineLearningServices.TargetUtilizationScaleSettings","com.azure.resourcemanager.machinelearning.models.TaskType":"Microsoft.MachineLearningServices.TaskType","com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint":"Microsoft.MachineLearningServices.TeacherModelEndpoint","com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings":"Microsoft.MachineLearningServices.TeacherModelEndpointRequestSettings","com.azure.resourcemanager.machinelearning.models.TeacherModelSettings":"Microsoft.MachineLearningServices.TeacherModelSettings","com.azure.resourcemanager.machinelearning.models.TensorFlow":"Microsoft.MachineLearningServices.TensorFlow","com.azure.resourcemanager.machinelearning.models.TextClassification":"Microsoft.MachineLearningServices.TextClassification","com.azure.resourcemanager.machinelearning.models.TextClassificationMultilabel":"Microsoft.MachineLearningServices.TextClassificationMultilabel","com.azure.resourcemanager.machinelearning.models.TextNer":"Microsoft.MachineLearningServices.TextNer","com.azure.resourcemanager.machinelearning.models.TmpfsOptions":"Microsoft.MachineLearningServices.TmpfsOptions","com.azure.resourcemanager.machinelearning.models.TopNFeaturesByAttribution":"Microsoft.MachineLearningServices.TopNFeaturesByAttribution","com.azure.resourcemanager.machinelearning.models.TrainingSettings":"Microsoft.MachineLearningServices.TrainingSettings","com.azure.resourcemanager.machinelearning.models.TrialComponent":"Microsoft.MachineLearningServices.TrialComponent","com.azure.resourcemanager.machinelearning.models.TriggerBase":"Microsoft.MachineLearningServices.TriggerBase","com.azure.resourcemanager.machinelearning.models.TriggerType":"Microsoft.MachineLearningServices.TriggerType","com.azure.resourcemanager.machinelearning.models.TritonModelJobInput":"Microsoft.MachineLearningServices.TritonModelJobInput","com.azure.resourcemanager.machinelearning.models.TritonModelJobOutput":"Microsoft.MachineLearningServices.TritonModelJobOutput","com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy":"Microsoft.MachineLearningServices.TruncationSelectionPolicy","com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction":"Microsoft.MachineLearningServices.UnderlyingResourceAction","com.azure.resourcemanager.machinelearning.models.UnitOfMeasure":"Microsoft.MachineLearningServices.UnitOfMeasure","com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas":"Microsoft.MachineLearningServices.UpdateWorkspaceQuotas","com.azure.resourcemanager.machinelearning.models.UriFileDataVersion":"Microsoft.MachineLearningServices.UriFileDataVersion","com.azure.resourcemanager.machinelearning.models.UriFileJobInput":"Microsoft.MachineLearningServices.UriFileJobInput","com.azure.resourcemanager.machinelearning.models.UriFileJobOutput":"Microsoft.MachineLearningServices.UriFileJobOutput","com.azure.resourcemanager.machinelearning.models.UriFolderDataVersion":"Microsoft.MachineLearningServices.UriFolderDataVersion","com.azure.resourcemanager.machinelearning.models.UriFolderJobInput":"Microsoft.MachineLearningServices.UriFolderJobInput","com.azure.resourcemanager.machinelearning.models.UriFolderJobOutput":"Microsoft.MachineLearningServices.UriFolderJobOutput","com.azure.resourcemanager.machinelearning.models.UsageName":"Microsoft.MachineLearningServices.UsageName","com.azure.resourcemanager.machinelearning.models.UsageUnit":"Microsoft.MachineLearningServices.UsageUnit","com.azure.resourcemanager.machinelearning.models.UseStl":"Microsoft.MachineLearningServices.UseStl","com.azure.resourcemanager.machinelearning.models.UserAccountCredentials":"Microsoft.MachineLearningServices.UserAccountCredentials","com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.machinelearning.models.UserIdentity":"Microsoft.MachineLearningServices.UserIdentity","com.azure.resourcemanager.machinelearning.models.UsernamePasswordAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.UsernamePasswordAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.VMPriceOSType":"Microsoft.MachineLearningServices.VMPriceOSType","com.azure.resourcemanager.machinelearning.models.VMTier":"Microsoft.MachineLearningServices.VMTier","com.azure.resourcemanager.machinelearning.models.ValidationMetricType":"Microsoft.MachineLearningServices.ValidationMetricType","com.azure.resourcemanager.machinelearning.models.VirtualMachine":"Microsoft.MachineLearningServices.VirtualMachine","com.azure.resourcemanager.machinelearning.models.VirtualMachineImage":"Microsoft.MachineLearningServices.VirtualMachineImage","com.azure.resourcemanager.machinelearning.models.VirtualMachineSchemaProperties":"Microsoft.MachineLearningServices.VirtualMachineSchemaProperties","com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets":"Microsoft.MachineLearningServices.VirtualMachineSecrets","com.azure.resourcemanager.machinelearning.models.VirtualMachineSize":"Microsoft.MachineLearningServices.VirtualMachineSize","com.azure.resourcemanager.machinelearning.models.VirtualMachineSshCredentials":"Microsoft.MachineLearningServices.VirtualMachineSshCredentials","com.azure.resourcemanager.machinelearning.models.VmPriority":"Microsoft.MachineLearningServices.VmPriority","com.azure.resourcemanager.machinelearning.models.VolumeDefinition":"Microsoft.MachineLearningServices.VolumeDefinition","com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType":"Microsoft.MachineLearningServices.VolumeDefinitionType","com.azure.resourcemanager.machinelearning.models.VolumeOptions":"Microsoft.MachineLearningServices.VolumeOptions","com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails":"Microsoft.MachineLearningServices.VulnerabilityDetails","com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings":"Microsoft.MachineLearningServices.VulnerabilityFindings","com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk":"Microsoft.MachineLearningServices.VulnerabilityRisk","com.azure.resourcemanager.machinelearning.models.Webhook":"Microsoft.MachineLearningServices.Webhook","com.azure.resourcemanager.machinelearning.models.WebhookType":"Microsoft.MachineLearningServices.WebhookType","com.azure.resourcemanager.machinelearning.models.WeekDay":"Microsoft.MachineLearningServices.WeekDay","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey":"Microsoft.MachineLearningServices.WorkspaceConnectionAccessKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccountKey":"Microsoft.MachineLearningServices.WorkspaceConnectionAccountKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionApiKey":"Microsoft.MachineLearningServices.WorkspaceConnectionApiKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionManagedIdentity":"Microsoft.MachineLearningServices.WorkspaceConnectionManagedIdentity","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionOAuth2":"Microsoft.MachineLearningServices.WorkspaceConnectionOAuth2","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPersonalAccessToken":"Microsoft.MachineLearningServices.WorkspaceConnectionPersonalAccessToken","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionServicePrincipal":"Microsoft.MachineLearningServices.WorkspaceConnectionServicePrincipal","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionSharedAccessSignature":"Microsoft.MachineLearningServices.WorkspaceConnectionSharedAccessSignature","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter":"Microsoft.MachineLearningServices.WorkspaceConnectionUpdateParameter","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUsernamePassword":"Microsoft.MachineLearningServices.WorkspaceConnectionUsernamePassword","com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig":"Microsoft.MachineLearningServices.WorkspaceHubConfig","com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource":"Microsoft.MachineLearningServices.WorkspacePrivateEndpointResource"},"generatedFiles":["src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/MachineLearningManagementClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PTUQuotasClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AvailableQuotaInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointDeploymentResourcePropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageAndQuotaDetailsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AmlComputeNodesInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AvailableQuotaArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchDeploymentTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataVersionBaseResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DatastoreResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeatureResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceGroupTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferencePoolTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/JobBaseResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListAmlUserFeatureResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListUsagesResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListWorkspaceQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ManagedNetworkListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/MarketplaceSubscriptionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OutboundRuleListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PaginatedComputeResourcesList.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RegistryTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ScheduleResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/SkuResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/StringArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/UsageAndQuotaDetailsArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKS.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKSComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKSNetworkingConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AKSSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHost.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItems.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPoliciesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafety.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelFineTuning.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistillationJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FinetuningDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java","src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IPRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LabelGeneration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkKind.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsEx.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRulesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PATAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PTUDeploymentUsage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PTUQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PromptSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPoliciesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StringStringKeyValuePair.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpointRequestSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java","src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"Microsoft.MachineLearningServices":"2026-05-15-preview"},"crossLanguagePackageId":"Microsoft.MachineLearningServices","crossLanguageVersion":"5c05500b9230","crossLanguageDefinitions":{"com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient":"Microsoft.MachineLearningServices.BatchDeployments","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.BatchDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.BatchDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.beginUpdate":"Microsoft.MachineLearningServices.BatchDeployments.update","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.BatchDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.delete":"Microsoft.MachineLearningServices.BatchDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.get":"Microsoft.MachineLearningServices.BatchDeployments.get","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.BatchDeployments.get","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.list":"Microsoft.MachineLearningServices.BatchDeployments.list","com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient.update":"Microsoft.MachineLearningServices.BatchDeployments.update","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient":"Microsoft.MachineLearningServices.BatchEndpoints","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.BatchEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.BatchEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.delete":"Microsoft.MachineLearningServices.BatchEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.get":"Microsoft.MachineLearningServices.BatchEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.BatchEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.list":"Microsoft.MachineLearningServices.BatchEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.listKeys":"Microsoft.MachineLearningServices.BatchEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.BatchEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient.update":"Microsoft.MachineLearningServices.BatchEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient":"Microsoft.MachineLearningServices.CapabilityHosts","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.beginDelete":"Microsoft.MachineLearningServices.CapabilityHosts.delete","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.createOrUpdate":"Microsoft.MachineLearningServices.CapabilityHosts.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.delete":"Microsoft.MachineLearningServices.CapabilityHosts.delete","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.get":"Microsoft.MachineLearningServices.CapabilityHosts.get","com.azure.resourcemanager.machinelearning.fluent.CapabilityHostsClient.getWithResponse":"Microsoft.MachineLearningServices.CapabilityHosts.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient":"Microsoft.MachineLearningServices.CodeContainers","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.delete":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.get":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.getWithResponse":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient.list":"Microsoft.MachineLearningServices.CodeContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient":"Microsoft.MachineLearningServices.CodeVersions","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.beginPublish":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.delete":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.get":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.list":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.CodeVersionsClient.publish":"Microsoft.MachineLearningServices.CodeVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient":"Microsoft.MachineLearningServices.ComponentContainers","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.delete":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.get":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient.list":"Microsoft.MachineLearningServices.ComponentContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient":"Microsoft.MachineLearningServices.ComponentVersions","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.beginPublish":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.delete":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.get":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.list":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient.publish":"Microsoft.MachineLearningServices.ComponentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ComputesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComputeResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginDelete":"Microsoft.MachineLearningServices.ComputeResources.delete","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginResize":"Microsoft.MachineLearningServices.ComputeResources.resize","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginRestart":"Microsoft.MachineLearningServices.ComputeResources.restart","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginStart":"Microsoft.MachineLearningServices.ComputeResources.start","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginStop":"Microsoft.MachineLearningServices.ComputeResources.stop","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.beginUpdate":"Microsoft.MachineLearningServices.ComputeResources.update","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.createOrUpdate":"Microsoft.MachineLearningServices.ComputeResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.delete":"Microsoft.MachineLearningServices.ComputeResources.delete","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.get":"Microsoft.MachineLearningServices.ComputeResources.get","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getAllowedResizeSizes":"Microsoft.MachineLearningServices.ComputeResources.getAllowedResizeSizes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getAllowedResizeSizesWithResponse":"Microsoft.MachineLearningServices.ComputeResources.getAllowedResizeSizes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.getWithResponse":"Microsoft.MachineLearningServices.ComputeResources.get","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.list":"Microsoft.MachineLearningServices.ComputeResources.list","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listKeys":"Microsoft.MachineLearningServices.ComputeResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listKeysWithResponse":"Microsoft.MachineLearningServices.ComputeResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.listNodes":"Microsoft.MachineLearningServices.ComputeResources.listNodes","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.resize":"Microsoft.MachineLearningServices.ComputeResources.resize","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.restart":"Microsoft.MachineLearningServices.ComputeResources.restart","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.start":"Microsoft.MachineLearningServices.ComputeResources.start","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.stop":"Microsoft.MachineLearningServices.ComputeResources.stop","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.update":"Microsoft.MachineLearningServices.ComputeResources.update","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateCustomServices":"Microsoft.MachineLearningServices.ComputeResources.updateCustomServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateCustomServicesWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateCustomServices","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateDataMounts":"Microsoft.MachineLearningServices.ComputeResources.updateDataMounts","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateDataMountsWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateDataMounts","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateIdleShutdownSetting":"Microsoft.MachineLearningServices.ComputeResources.updateIdleShutdownSetting","com.azure.resourcemanager.machinelearning.fluent.ComputesClient.updateIdleShutdownSettingWithResponse":"Microsoft.MachineLearningServices.ComputeResources.updateIdleShutdownSetting","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.addBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.addBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginAddBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.addBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginCreate":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginDelete":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.beginDeleteBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.deleteBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.create":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.delete":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.deleteBulk":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.deleteBulk","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.get":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient.getWithResponse":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient.list":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.beginCreate":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.beginDelete":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.create":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.delete":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.get":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient.getWithResponse":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsOperationsClient.list":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.beginCreate":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.beginDelete":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.create":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.create","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.delete":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.get":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient.getWithResponse":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesOperationsClient.list":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.beginCreateOrUpdateDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.createOrUpdateDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.beginDeleteDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.deleteDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.createOrUpdateDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.createOrUpdateDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.deleteDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.deleteDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getAllModels":"Microsoft.MachineLearningServices.Workspaces.getAllModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getAllModelsWithResponse":"Microsoft.MachineLearningServices.Workspaces.getAllModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getDeployment":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.getDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getDeploymentWithResponse":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.getDeployment","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.getModels":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.getModels","com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient.listDeployments":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResources.listDeployments","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient":"Microsoft.MachineLearningServices.DataContainers","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.DataContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.delete":"Microsoft.MachineLearningServices.DataContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.get":"Microsoft.MachineLearningServices.DataContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.getWithResponse":"Microsoft.MachineLearningServices.DataContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.DataContainersClient.list":"Microsoft.MachineLearningServices.DataContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient":"Microsoft.MachineLearningServices.DataVersions","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.beginPublish":"Microsoft.MachineLearningServices.DataVersions.publish","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.DataVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.DataVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.delete":"Microsoft.MachineLearningServices.DataVersions.delete","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.DataVersions.delete","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.get":"Microsoft.MachineLearningServices.DataVersions.get","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.DataVersions.get","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.list":"Microsoft.MachineLearningServices.DataVersions.list","com.azure.resourcemanager.machinelearning.fluent.DataVersionsClient.publish":"Microsoft.MachineLearningServices.DataVersions.publish","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient":"Microsoft.MachineLearningServices.Datastores","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.createOrUpdate":"Microsoft.MachineLearningServices.Datastores.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.Datastores.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.delete":"Microsoft.MachineLearningServices.Datastores.delete","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.deleteWithResponse":"Microsoft.MachineLearningServices.Datastores.delete","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.get":"Microsoft.MachineLearningServices.Datastores.get","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.getWithResponse":"Microsoft.MachineLearningServices.Datastores.get","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.list":"Microsoft.MachineLearningServices.Datastores.list","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.listSecrets":"Microsoft.MachineLearningServices.Datastores.listSecrets","com.azure.resourcemanager.machinelearning.fluent.DatastoresClient.listSecretsWithResponse":"Microsoft.MachineLearningServices.Datastores.listSecrets","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient":"Microsoft.MachineLearningServices.EndpointDeployment","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EndpointDeployment.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.EndpointDeployment.delete","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.EndpointDeployment.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.delete":"Microsoft.MachineLearningServices.EndpointDeployment.delete","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.get":"Microsoft.MachineLearningServices.EndpointDeployment.get","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.getInWorkspace":"Microsoft.MachineLearningServices.Workspaces.getInWorkspace","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.EndpointDeployment.get","com.azure.resourcemanager.machinelearning.fluent.EndpointDeploymentsClient.list":"Microsoft.MachineLearningServices.EndpointDeployment.list","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.get":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.getModels":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.getModels","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.list":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.listKeys":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.listKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.EndpointsClient.regenerateKeysWithResponse":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResources.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient":"Microsoft.MachineLearningServices.EnvironmentContainers","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.delete":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.get":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient.list":"Microsoft.MachineLearningServices.EnvironmentContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient":"Microsoft.MachineLearningServices.EnvironmentVersions","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.beginPublish":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.delete":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.get":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.list":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient.publish":"Microsoft.MachineLearningServices.EnvironmentVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient":"Microsoft.MachineLearningServices.Features","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.get":"Microsoft.MachineLearningServices.Features.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.getWithResponse":"Microsoft.MachineLearningServices.Features.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesClient.list":"Microsoft.MachineLearningServices.Features.list","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient":"Microsoft.MachineLearningServices.FeaturesetContainers","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturesetContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.beginDelete":"Microsoft.MachineLearningServices.FeaturesetContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturesetContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.delete":"Microsoft.MachineLearningServices.FeaturesetContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.getEntity":"Microsoft.MachineLearningServices.FeaturesetContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.getEntityWithResponse":"Microsoft.MachineLearningServices.FeaturesetContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturesetContainersClient.list":"Microsoft.MachineLearningServices.FeaturesetContainers.list","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient":"Microsoft.MachineLearningServices.FeaturesetVersions","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.backfill":"Microsoft.MachineLearningServices.FeaturesetVersions.backfill","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginBackfill":"Microsoft.MachineLearningServices.FeaturesetVersions.backfill","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturesetVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.beginDelete":"Microsoft.MachineLearningServices.FeaturesetVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturesetVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.delete":"Microsoft.MachineLearningServices.FeaturesetVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.get":"Microsoft.MachineLearningServices.FeaturesetVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.FeaturesetVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturesetVersionsClient.list":"Microsoft.MachineLearningServices.FeaturesetVersions.list","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.beginDelete":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.delete":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.getEntity":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.getEntityWithResponse":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.getEntity","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityContainersClient.list":"Microsoft.MachineLearningServices.FeaturestoreEntityContainers.list","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.beginDelete":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.delete":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.delete","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.get":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.get","com.azure.resourcemanager.machinelearning.fluent.FeaturestoreEntityVersionsClient.list":"Microsoft.MachineLearningServices.FeaturestoreEntityVersions.list","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient":"Microsoft.MachineLearningServices.InferenceEndpoints","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.InferenceEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferenceEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.delete":"Microsoft.MachineLearningServices.InferenceEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.get":"Microsoft.MachineLearningServices.InferenceEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.InferenceEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.list":"Microsoft.MachineLearningServices.InferenceEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.InferenceEndpointsClient.update":"Microsoft.MachineLearningServices.InferenceEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient":"Microsoft.MachineLearningServices.InferenceGroups","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferenceGroups.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginDelete":"Microsoft.MachineLearningServices.InferenceGroups.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginModifyDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.modifyDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.beginUpdate":"Microsoft.MachineLearningServices.InferenceGroups.update","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferenceGroups.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.delete":"Microsoft.MachineLearningServices.InferenceGroups.delete","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.get":"Microsoft.MachineLearningServices.InferenceGroups.get","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getDeltaModelsStatusAsync":"Microsoft.MachineLearningServices.InferenceGroups.getDeltaModelsStatusAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getDeltaModelsStatusAsyncWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.getDeltaModelsStatusAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getStatus":"Microsoft.MachineLearningServices.InferenceGroups.getStatus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getStatusWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.getStatus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.getWithResponse":"Microsoft.MachineLearningServices.InferenceGroups.get","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.list":"Microsoft.MachineLearningServices.InferenceGroups.list","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.listDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.listDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.listSkus":"Microsoft.MachineLearningServices.InferenceGroups.listSkus","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.modifyDeltaModelsAsync":"Microsoft.MachineLearningServices.InferenceGroups.modifyDeltaModelsAsync","com.azure.resourcemanager.machinelearning.fluent.InferenceGroupsClient.update":"Microsoft.MachineLearningServices.InferenceGroups.update","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient":"Microsoft.MachineLearningServices.InferencePools","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.InferencePools.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginDelete":"Microsoft.MachineLearningServices.InferencePools.delete","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.beginUpdate":"Microsoft.MachineLearningServices.InferencePools.update","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.createOrUpdate":"Microsoft.MachineLearningServices.InferencePools.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.delete":"Microsoft.MachineLearningServices.InferencePools.delete","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.get":"Microsoft.MachineLearningServices.InferencePools.get","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.getWithResponse":"Microsoft.MachineLearningServices.InferencePools.get","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.list":"Microsoft.MachineLearningServices.InferencePools.list","com.azure.resourcemanager.machinelearning.fluent.InferencePoolsClient.update":"Microsoft.MachineLearningServices.InferencePools.update","com.azure.resourcemanager.machinelearning.fluent.JobsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.JobsClient.beginCancel":"Microsoft.MachineLearningServices.JobBases.cancel","com.azure.resourcemanager.machinelearning.fluent.JobsClient.beginDelete":"Microsoft.MachineLearningServices.JobBases.delete","com.azure.resourcemanager.machinelearning.fluent.JobsClient.cancel":"Microsoft.MachineLearningServices.JobBases.cancel","com.azure.resourcemanager.machinelearning.fluent.JobsClient.createOrUpdate":"Microsoft.MachineLearningServices.JobBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.JobsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.JobBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.JobsClient.delete":"Microsoft.MachineLearningServices.JobBases.delete","com.azure.resourcemanager.machinelearning.fluent.JobsClient.get":"Microsoft.MachineLearningServices.JobBases.get","com.azure.resourcemanager.machinelearning.fluent.JobsClient.getWithResponse":"Microsoft.MachineLearningServices.JobBases.get","com.azure.resourcemanager.machinelearning.fluent.JobsClient.list":"Microsoft.MachineLearningServices.JobBases.list","com.azure.resourcemanager.machinelearning.fluent.MachineLearningManagementClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient.beginProvisionManagedNetwork":"Microsoft.MachineLearningServices.Workspaces.provisionManagedNetwork","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkProvisionsClient.provisionManagedNetwork":"Microsoft.MachineLearningServices.Workspaces.provisionManagedNetwork","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.beginPatch":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.beginPut":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.get":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.getWithResponse":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.list":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.patch":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.patch","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsOperationsClient.put":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.put","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.beginDelete":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.createOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.delete":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.get":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.getWithResponse":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.get","com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient.list":"Microsoft.MachineLearningServices.OutboundRuleBasicResources.list","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient":"Microsoft.MachineLearningServices.MarketplaceSubscriptions","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.beginDelete":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.delete","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.createOrUpdate":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.delete":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.delete","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.get":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.get","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.getWithResponse":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.get","com.azure.resourcemanager.machinelearning.fluent.MarketplaceSubscriptionsClient.list":"Microsoft.MachineLearningServices.MarketplaceSubscriptions.list","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient":"Microsoft.MachineLearningServices.ModelContainers","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.delete":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.deleteWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.get":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient.list":"Microsoft.MachineLearningServices.ModelContainerOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient":"Microsoft.MachineLearningServices.ModelVersions","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.beginPublish":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.delete":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.get":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.list":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.ModelVersionsClient.publish":"Microsoft.MachineLearningServices.ModelVersionOperationGroup.publish","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient":"Microsoft.MachineLearningServices.OnlineDeployments","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginDelete":"Microsoft.MachineLearningServices.OnlineDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.beginUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.update","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.createOrUpdate":"Microsoft.MachineLearningServices.OnlineDeployments.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.delete":"Microsoft.MachineLearningServices.OnlineDeployments.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.get":"Microsoft.MachineLearningServices.OnlineDeployments.get","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getLogs":"Microsoft.MachineLearningServices.OnlineDeployments.getLogs","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getLogsWithResponse":"Microsoft.MachineLearningServices.OnlineDeployments.getLogs","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.getWithResponse":"Microsoft.MachineLearningServices.OnlineDeployments.get","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.list":"Microsoft.MachineLearningServices.OnlineDeployments.list","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.listSkus":"Microsoft.MachineLearningServices.OnlineDeployments.listSkus","com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient.update":"Microsoft.MachineLearningServices.OnlineDeployments.update","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient":"Microsoft.MachineLearningServices.OnlineEndpoints","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.OnlineEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginRegenerateKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.OnlineEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.delete":"Microsoft.MachineLearningServices.OnlineEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.get":"Microsoft.MachineLearningServices.OnlineEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getToken":"Microsoft.MachineLearningServices.OnlineEndpoints.getToken","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getTokenWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.getToken","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.list":"Microsoft.MachineLearningServices.OnlineEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.listKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.OnlineEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.OnlineEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient.update":"Microsoft.MachineLearningServices.OnlineEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.OperationsClient":"Microsoft.MachineLearningServices.Operations","com.azure.resourcemanager.machinelearning.fluent.OperationsClient.list":"Azure.ResourceManager.Operations.list","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.beginDelete":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.createOrUpdate":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.delete":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.delete","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.get":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.getWithResponse":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.get","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesClient.list":"Microsoft.MachineLearningServices.OutboundRuleBasicResourceOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.OutboundRulesOperationsClient.post":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResources.post","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.getAvailable":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.getAvailable","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.getAvailableWithResponse":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.getAvailable","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.list":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.PTUQuotasClient.listAvailable":"Microsoft.MachineLearningServices.PTUQuotaOperationGroup.listAvailable","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient":"Microsoft.MachineLearningServices.PrivateEndpointConnections","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.MachineLearningServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.createOrUpdateWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.MachineLearningServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.delete","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.MachineLearningServices.PrivateEndpointConnections.get","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.MachineLearningServices.PrivateEndpointConnections.get","com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.MachineLearningServices.PrivateEndpointConnections.list","com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.PrivateLinkResourcesClient.list":"Microsoft.MachineLearningServices.Workspaces.privateLinkResourcesList","com.azure.resourcemanager.machinelearning.fluent.QuotasClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.list":"Microsoft.MachineLearningServices.QuotasOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.update":"Microsoft.MachineLearningServices.QuotasOperationGroup.update","com.azure.resourcemanager.machinelearning.fluent.QuotasClient.updateWithResponse":"Microsoft.MachineLearningServices.QuotasOperationGroup.update","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient":"Microsoft.MachineLearningServices.RaiPolicy","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.beginCreate":"Microsoft.MachineLearningServices.RaiPolicy.create","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.beginDelete":"Microsoft.MachineLearningServices.RaiPolicy.delete","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.create":"Microsoft.MachineLearningServices.RaiPolicy.create","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.delete":"Microsoft.MachineLearningServices.RaiPolicy.delete","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.get":"Microsoft.MachineLearningServices.RaiPolicy.get","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient.getWithResponse":"Microsoft.MachineLearningServices.RaiPolicy.get","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesOperationsClient.list":"Microsoft.MachineLearningServices.RaiPolicy.list","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient":"Microsoft.MachineLearningServices.Registries","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Registries.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginDelete":"Microsoft.MachineLearningServices.Registries.delete","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.beginRemoveRegions":"Microsoft.MachineLearningServices.Registries.removeRegions","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.createOrUpdate":"Microsoft.MachineLearningServices.Registries.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.delete":"Microsoft.MachineLearningServices.Registries.delete","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.getByResourceGroup":"Microsoft.MachineLearningServices.Registries.get","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.getByResourceGroupWithResponse":"Microsoft.MachineLearningServices.Registries.get","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.list":"Microsoft.MachineLearningServices.Registries.listBySubscription","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.listByResourceGroup":"Microsoft.MachineLearningServices.Registries.list","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.removeRegions":"Microsoft.MachineLearningServices.Registries.removeRegions","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.update":"Microsoft.MachineLearningServices.Registries.update","com.azure.resourcemanager.machinelearning.fluent.RegistriesClient.updateWithResponse":"Microsoft.MachineLearningServices.Registries.update","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CodeContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.beginDelete":"Microsoft.MachineLearningServices.CodeContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.delete":"Microsoft.MachineLearningServices.CodeContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.get":"Microsoft.MachineLearningServices.CodeContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.getWithResponse":"Microsoft.MachineLearningServices.CodeContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient.list":"Microsoft.MachineLearningServices.CodeContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.CodeVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.beginDelete":"Microsoft.MachineLearningServices.CodeVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.CodeVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.CodeVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.CodeVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.delete":"Microsoft.MachineLearningServices.CodeVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.get":"Microsoft.MachineLearningServices.CodeVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.CodeVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient.list":"Microsoft.MachineLearningServices.CodeVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComponentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.beginDelete":"Microsoft.MachineLearningServices.ComponentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.delete":"Microsoft.MachineLearningServices.ComponentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.get":"Microsoft.MachineLearningServices.ComponentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentContainersClient.list":"Microsoft.MachineLearningServices.ComponentContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ComponentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.beginDelete":"Microsoft.MachineLearningServices.ComponentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ComponentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.delete":"Microsoft.MachineLearningServices.ComponentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.get":"Microsoft.MachineLearningServices.ComponentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ComponentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryComponentVersionsClient.list":"Microsoft.MachineLearningServices.ComponentVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.DataContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.beginDelete":"Microsoft.MachineLearningServices.DataContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.DataContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.delete":"Microsoft.MachineLearningServices.DataContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.get":"Microsoft.MachineLearningServices.DataContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.getWithResponse":"Microsoft.MachineLearningServices.DataContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataContainersClient.list":"Microsoft.MachineLearningServices.DataContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient.getBlobReferenceSas":"Microsoft.MachineLearningServices.Registries.getBlobReferenceSAS","com.azure.resourcemanager.machinelearning.fluent.RegistryDataReferencesClient.getBlobReferenceSasWithResponse":"Microsoft.MachineLearningServices.Registries.getBlobReferenceSAS","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.DataVersionBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.beginDelete":"Microsoft.MachineLearningServices.DataVersionBases.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.DataVersionBases.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.DataVersionBases.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.DataVersionBases.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.delete":"Microsoft.MachineLearningServices.DataVersionBases.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.get":"Microsoft.MachineLearningServices.DataVersionBases.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.DataVersionBases.get","com.azure.resourcemanager.machinelearning.fluent.RegistryDataVersionsClient.list":"Microsoft.MachineLearningServices.DataVersionBases.list","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.beginDelete":"Microsoft.MachineLearningServices.EnvironmentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.delete":"Microsoft.MachineLearningServices.EnvironmentContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.get":"Microsoft.MachineLearningServices.EnvironmentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentContainersClient.list":"Microsoft.MachineLearningServices.EnvironmentContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.beginDelete":"Microsoft.MachineLearningServices.EnvironmentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.EnvironmentVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.delete":"Microsoft.MachineLearningServices.EnvironmentVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.get":"Microsoft.MachineLearningServices.EnvironmentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.EnvironmentVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryEnvironmentVersionsClient.list":"Microsoft.MachineLearningServices.EnvironmentVersions.list","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ModelContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.beginDelete":"Microsoft.MachineLearningServices.ModelContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelContainers.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.delete":"Microsoft.MachineLearningServices.ModelContainers.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.get":"Microsoft.MachineLearningServices.ModelContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.getWithResponse":"Microsoft.MachineLearningServices.ModelContainers.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelContainersClient.list":"Microsoft.MachineLearningServices.ModelContainers.list","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ModelVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.beginDelete":"Microsoft.MachineLearningServices.ModelVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrGetStartPendingUpload":"Microsoft.MachineLearningServices.ModelVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrGetStartPendingUploadWithResponse":"Microsoft.MachineLearningServices.ModelVersions.createOrGetStartPendingUpload","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.createOrUpdate":"Microsoft.MachineLearningServices.ModelVersions.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.delete":"Microsoft.MachineLearningServices.ModelVersions.delete","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.get":"Microsoft.MachineLearningServices.ModelVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.getWithResponse":"Microsoft.MachineLearningServices.ModelVersions.get","com.azure.resourcemanager.machinelearning.fluent.RegistryModelVersionsClient.list":"Microsoft.MachineLearningServices.ModelVersions.list","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient":"Microsoft.MachineLearningServices.Schedules","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Schedules.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.beginDelete":"Microsoft.MachineLearningServices.Schedules.delete","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.createOrUpdate":"Microsoft.MachineLearningServices.Schedules.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.delete":"Microsoft.MachineLearningServices.Schedules.delete","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.get":"Microsoft.MachineLearningServices.Schedules.get","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.getWithResponse":"Microsoft.MachineLearningServices.Schedules.get","com.azure.resourcemanager.machinelearning.fluent.SchedulesClient.list":"Microsoft.MachineLearningServices.Schedules.list","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient":"Microsoft.MachineLearningServices.ServerlessEndpoints","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginDelete":"Microsoft.MachineLearningServices.ServerlessEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginRegenerateKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.beginUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.createOrUpdate":"Microsoft.MachineLearningServices.ServerlessEndpoints.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.delete":"Microsoft.MachineLearningServices.ServerlessEndpoints.delete","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.get":"Microsoft.MachineLearningServices.ServerlessEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.getWithResponse":"Microsoft.MachineLearningServices.ServerlessEndpoints.get","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.list":"Microsoft.MachineLearningServices.ServerlessEndpoints.list","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.listKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.listKeysWithResponse":"Microsoft.MachineLearningServices.ServerlessEndpoints.listKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.regenerateKeys":"Microsoft.MachineLearningServices.ServerlessEndpoints.regenerateKeys","com.azure.resourcemanager.machinelearning.fluent.ServerlessEndpointsClient.update":"Microsoft.MachineLearningServices.ServerlessEndpoints.update","com.azure.resourcemanager.machinelearning.fluent.UsagesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.UsagesClient.list":"Microsoft.MachineLearningServices.UsagesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient.list":"Microsoft.MachineLearningServices.VirtualMachineSizesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.VirtualMachineSizesClient.listWithResponse":"Microsoft.MachineLearningServices.VirtualMachineSizesOperationGroup.list","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.beginTestConnection":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.testConnection","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.create":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.createWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.create","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.delete":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.deleteWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.get":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.getWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.get","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.list":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.list","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.listSecrets":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.listSecrets","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.listSecretsWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.listSecrets","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.testConnection":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.testConnection","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.update":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.machinelearning.fluent.WorkspaceConnectionsClient.updateWithResponse":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResources.update","com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient.list":"Microsoft.MachineLearningServices.Workspaces.list","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient":"Microsoft.MachineLearningServices.Workspaces","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginCreateOrUpdate":"Microsoft.MachineLearningServices.Workspaces.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginDelete":"Microsoft.MachineLearningServices.Workspaces.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginDiagnose":"Microsoft.MachineLearningServices.Workspaces.diagnose","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginPrepareNotebook":"Microsoft.MachineLearningServices.Workspaces.prepareNotebook","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginResyncKeys":"Microsoft.MachineLearningServices.Workspaces.resyncKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.beginUpdate":"Microsoft.MachineLearningServices.Workspaces.update","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.createOrUpdate":"Microsoft.MachineLearningServices.Workspaces.createOrUpdate","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.delete":"Microsoft.MachineLearningServices.Workspaces.delete","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.diagnose":"Microsoft.MachineLearningServices.Workspaces.diagnose","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.getByResourceGroup":"Microsoft.MachineLearningServices.Workspaces.get","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.getByResourceGroupWithResponse":"Microsoft.MachineLearningServices.Workspaces.get","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.list":"Microsoft.MachineLearningServices.Workspaces.listBySubscription","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listByResourceGroup":"Microsoft.MachineLearningServices.Workspaces.listByResourceGroup","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listKeys":"Microsoft.MachineLearningServices.Workspaces.listKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookAccessToken":"Microsoft.MachineLearningServices.Workspaces.listNotebookAccessToken","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookAccessTokenWithResponse":"Microsoft.MachineLearningServices.Workspaces.listNotebookAccessToken","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookKeys":"Microsoft.MachineLearningServices.Workspaces.listNotebookKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listNotebookKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listNotebookKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listOutboundNetworkDependenciesEndpoints":"Microsoft.MachineLearningServices.Workspaces.listOutboundNetworkDependenciesEndpoints","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listOutboundNetworkDependenciesEndpointsWithResponse":"Microsoft.MachineLearningServices.Workspaces.listOutboundNetworkDependenciesEndpoints","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listStorageAccountKeys":"Microsoft.MachineLearningServices.Workspaces.listStorageAccountKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.listStorageAccountKeysWithResponse":"Microsoft.MachineLearningServices.Workspaces.listStorageAccountKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.prepareNotebook":"Microsoft.MachineLearningServices.Workspaces.prepareNotebook","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.resyncKeys":"Microsoft.MachineLearningServices.Workspaces.resyncKeys","com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient.update":"Microsoft.MachineLearningServices.Workspaces.update","com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner":"Microsoft.MachineLearningServices.AccountApiKeys","com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner":"Microsoft.MachineLearningServices.AmlUserFeature","com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner":"Microsoft.MachineLearningServices.AvailableQuota","com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner":"Microsoft.MachineLearningServices.BatchDeployment","com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner":"Microsoft.MachineLearningServices.BatchEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner":"Microsoft.MachineLearningServices.CapabilityHost","com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties":"Microsoft.MachineLearningServices.ClusterUpdateProperties","com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner":"Microsoft.MachineLearningServices.CodeContainer","com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner":"Microsoft.MachineLearningServices.CodeVersion","com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner":"Microsoft.MachineLearningServices.ComponentContainer","com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner":"Microsoft.MachineLearningServices.ComponentVersion","com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner":"Microsoft.MachineLearningServices.ComputeResource","com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner":"Microsoft.MachineLearningServices.ComputeSecrets","com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner":"Microsoft.MachineLearningServices.DataContainer","com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner":"Microsoft.MachineLearningServices.DataVersionBase","com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner":"Microsoft.MachineLearningServices.Datastore","com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner":"Microsoft.MachineLearningServices.DatastoreSecrets","com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner":"Microsoft.MachineLearningServices.DeltaModelStatusResponse","com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner":"Microsoft.MachineLearningServices.DeploymentLogs","com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner":"Microsoft.MachineLearningServices.DiagnoseResponseResult","com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner":"Microsoft.MachineLearningServices.EndpointAuthKeys","com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner":"Microsoft.MachineLearningServices.EndpointAuthToken","com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner":"Microsoft.MachineLearningServices.EndpointKeys","com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner":"Microsoft.MachineLearningServices.EndpointModelProperties","com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner":"Microsoft.MachineLearningServices.EndpointModels","com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner":"Microsoft.MachineLearningServices.EndpointPropertiesBase","com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner":"Microsoft.MachineLearningServices.EnvironmentContainer","com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner":"Microsoft.MachineLearningServices.EnvironmentVersion","com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner":"Microsoft.MachineLearningServices.ExternalFQDNResponse","com.azure.resourcemanager.machinelearning.fluent.models.FeatureInner":"Microsoft.MachineLearningServices.Feature","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetContainerInner":"Microsoft.MachineLearningServices.FeaturesetContainer","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionBackfillResponseInner":"Microsoft.MachineLearningServices.FeaturesetVersionBackfillResponse","com.azure.resourcemanager.machinelearning.fluent.models.FeaturesetVersionInner":"Microsoft.MachineLearningServices.FeaturesetVersion","com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityContainerInner":"Microsoft.MachineLearningServices.FeaturestoreEntityContainer","com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner":"Microsoft.MachineLearningServices.FeaturestoreEntityVersion","com.azure.resourcemanager.machinelearning.fluent.models.GetBlobReferenceSasResponseDtoInner":"Microsoft.MachineLearningServices.GetBlobReferenceSASResponseDto","com.azure.resourcemanager.machinelearning.fluent.models.GroupStatusInner":"Microsoft.MachineLearningServices.GroupStatus","com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner":"Microsoft.MachineLearningServices.InferenceEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner":"Microsoft.MachineLearningServices.InferenceGroup","com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner":"Microsoft.MachineLearningServices.InferencePool","com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner":"Microsoft.MachineLearningServices.JobBase","com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner":"Microsoft.MachineLearningServices.ListNotebookKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner":"Microsoft.MachineLearningServices.ListStorageAccountKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner":"Microsoft.MachineLearningServices.ListWorkspaceKeysResult","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner":"Microsoft.MachineLearningServices.ManagedNetworkProvisionStatus","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsBasicResourceInner":"Microsoft.MachineLearningServices.ManagedNetworkSettingsBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner":"Microsoft.MachineLearningServices.ManagedNetworkSettings","com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.ManagedNetworkSettingsPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.MarketplaceSubscriptionInner":"Microsoft.MachineLearningServices.MarketplaceSubscription","com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner":"Microsoft.MachineLearningServices.ModelContainer","com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner":"Microsoft.MachineLearningServices.ModelVersion","com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner":"Microsoft.MachineLearningServices.NotebookAccessTokenResult","com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner":"Microsoft.MachineLearningServices.NotebookResourceInfo","com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner":"Microsoft.MachineLearningServices.OnlineDeployment","com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner":"Microsoft.MachineLearningServices.OnlineEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.OperationInner":"Azure.ResourceManager.CommonTypes.Operation","com.azure.resourcemanager.machinelearning.fluent.models.OutboundRuleBasicResourceInner":"Microsoft.MachineLearningServices.OutboundRuleBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.PendingUploadResponseDtoInner":"Microsoft.MachineLearningServices.PendingUploadResponseDto","com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner":"Microsoft.MachineLearningServices.PrivateEndpointConnection","com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties":"Microsoft.MachineLearningServices.PrivateEndpointConnectionProperties","com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner":"Microsoft.MachineLearningServices.PrivateLinkResource","com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties":"Microsoft.MachineLearningServices.PrivateLinkResourceProperties","com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResource","com.azure.resourcemanager.machinelearning.fluent.models.RegistryInner":"Microsoft.MachineLearningServices.Registry","com.azure.resourcemanager.machinelearning.fluent.models.RegistryPrivateEndpointConnectionProperties":"Microsoft.MachineLearningServices.RegistryPrivateEndpointConnectionProperties","com.azure.resourcemanager.machinelearning.fluent.models.RegistryProperties":"Microsoft.MachineLearningServices.RegistryProperties","com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner":"Microsoft.MachineLearningServices.ResourceQuota","com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner":"Microsoft.MachineLearningServices.Schedule","com.azure.resourcemanager.machinelearning.fluent.models.ServerlessEndpointInner":"Microsoft.MachineLearningServices.ServerlessEndpoint","com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty":"Microsoft.MachineLearningServices.SharedPrivateLinkResourceProperty","com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner":"Microsoft.MachineLearningServices.SkuResource","com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner":"Microsoft.MachineLearningServices.UpdateWorkspaceQuotasResult","com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner":"Microsoft.MachineLearningServices.UsageAndQuotaDetails","com.azure.resourcemanager.machinelearning.fluent.models.UsageInner":"Microsoft.MachineLearningServices.Usage","com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner":"Microsoft.MachineLearningServices.VirtualMachineSizeListResult","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResource","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner":"Microsoft.MachineLearningServices.Workspace","com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesInner":"Microsoft.MachineLearningServices.WorkspaceProperties","com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner":"Microsoft.MachineLearningServices.WorkspacePropertiesUpdateParameters","com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceUpdateParametersInner":"Microsoft.MachineLearningServices.WorkspaceUpdateParameters","com.azure.resourcemanager.machinelearning.implementation.MachineLearningManagementClientBuilder":"Microsoft.MachineLearningServices","com.azure.resourcemanager.machinelearning.implementation.models.AmlComputeNodesInformation":"Microsoft.MachineLearningServices.AmlComputeNodesInformation","com.azure.resourcemanager.machinelearning.implementation.models.AvailableQuotaArmPaginatedResult":"Microsoft.MachineLearningServices.AvailableQuotaArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.BatchDeploymentTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.BatchDeploymentTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.BatchEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.BatchEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.CodeContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.CodeContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.CodeVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.CodeVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ComponentContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ComponentContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ComponentVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ComponentVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DataContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DataContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DataVersionBaseResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DataVersionBaseResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.DatastoreResourceArmPaginatedResult":"Microsoft.MachineLearningServices.DatastoreResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EndpointResourcePropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EndpointResourcePropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EnvironmentContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.EnvironmentVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.EnvironmentVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeatureResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeatureResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturesetContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturesetVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturesetVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturestoreEntityContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.FeaturestoreEntityVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.FeaturestoreEntityVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferenceEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferenceEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferenceGroupTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferenceGroupTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.InferencePoolTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.InferencePoolTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.JobBaseResourceArmPaginatedResult":"Microsoft.MachineLearningServices.JobBaseResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ListAmlUserFeatureResult":"Microsoft.MachineLearningServices.ListAmlUserFeatureResult","com.azure.resourcemanager.machinelearning.implementation.models.ListUsagesResult":"Microsoft.MachineLearningServices.ListUsagesResult","com.azure.resourcemanager.machinelearning.implementation.models.ListWorkspaceQuotas":"Microsoft.MachineLearningServices.ListWorkspaceQuotas","com.azure.resourcemanager.machinelearning.implementation.models.ManagedNetworkListResult":"Microsoft.MachineLearningServices.ManagedNetworkListResult","com.azure.resourcemanager.machinelearning.implementation.models.MarketplaceSubscriptionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.MarketplaceSubscriptionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ModelContainerResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ModelContainerResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ModelVersionResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ModelVersionResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OnlineDeploymentTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.OnlineDeploymentTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OnlineEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.OnlineEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.OperationListResult":"Azure.ResourceManager.CommonTypes.OperationListResult","com.azure.resourcemanager.machinelearning.implementation.models.OutboundRuleListResult":"Microsoft.MachineLearningServices.OutboundRuleListResult","com.azure.resourcemanager.machinelearning.implementation.models.PaginatedComputeResourcesList":"Microsoft.MachineLearningServices.PaginatedComputeResourcesList","com.azure.resourcemanager.machinelearning.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.MachineLearningServices.PrivateEndpointConnectionListResult","com.azure.resourcemanager.machinelearning.implementation.models.PrivateLinkResourceListResult":"Microsoft.MachineLearningServices.PrivateLinkResourceListResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiBlocklistPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiBlocklistPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RaiPolicyPropertiesBasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.RegistryTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.RegistryTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ScheduleResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ScheduleResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.ServerlessEndpointTrackedResourceArmPaginatedResult":"Microsoft.MachineLearningServices.ServerlessEndpointTrackedResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.SkuResourceArmPaginatedResult":"Microsoft.MachineLearningServices.SkuResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.StringArmPaginatedResult":"Microsoft.MachineLearningServices.StringArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.UsageAndQuotaDetailsArmPaginatedResult":"Microsoft.MachineLearningServices.UsageAndQuotaDetailsArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult","com.azure.resourcemanager.machinelearning.implementation.models.WorkspaceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.machinelearning.models.AadAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AADAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccessKeyAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AccessKeyAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccountKeyAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.AccountKeyAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials":"Microsoft.MachineLearningServices.AccountKeyDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets":"Microsoft.MachineLearningServices.AccountKeyDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.AcrDetails":"Microsoft.MachineLearningServices.AcrDetails","com.azure.resourcemanager.machinelearning.models.ActionType":"Azure.ResourceManager.CommonTypes.ActionType","com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo":"Microsoft.MachineLearningServices.ActualCapacityInfo","com.azure.resourcemanager.machinelearning.models.Aks":"Microsoft.MachineLearningServices.AKS","com.azure.resourcemanager.machinelearning.models.AksComputeSecrets":"Microsoft.MachineLearningServices.AksComputeSecrets","com.azure.resourcemanager.machinelearning.models.AksNetworkingConfiguration":"Microsoft.MachineLearningServices.AksNetworkingConfiguration","com.azure.resourcemanager.machinelearning.models.AksSchemaProperties":"Microsoft.MachineLearningServices.AKSSchemaProperties","com.azure.resourcemanager.machinelearning.models.AllFeatures":"Microsoft.MachineLearningServices.AllFeatures","com.azure.resourcemanager.machinelearning.models.AllNodes":"Microsoft.MachineLearningServices.AllNodes","com.azure.resourcemanager.machinelearning.models.AllocationState":"Microsoft.MachineLearningServices.AllocationState","com.azure.resourcemanager.machinelearning.models.AllowedContentLevel":"Microsoft.MachineLearningServices.AllowedContentLevel","com.azure.resourcemanager.machinelearning.models.AmlCompute":"Microsoft.MachineLearningServices.AmlCompute","com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation":"Microsoft.MachineLearningServices.AmlComputeNodeInformation","com.azure.resourcemanager.machinelearning.models.AmlComputeProperties":"Microsoft.MachineLearningServices.AmlComputeProperties","com.azure.resourcemanager.machinelearning.models.AmlToken":"Microsoft.MachineLearningServices.AmlToken","com.azure.resourcemanager.machinelearning.models.AmlTokenComputeIdentity":"Microsoft.MachineLearningServices.AmlTokenComputeIdentity","com.azure.resourcemanager.machinelearning.models.AnonymousAccessCredential":"Microsoft.MachineLearningServices.AnonymousAccessCredential","com.azure.resourcemanager.machinelearning.models.ApiKeyAuthWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ApiKeyAuthWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy":"Microsoft.MachineLearningServices.ApplicationSharingPolicy","com.azure.resourcemanager.machinelearning.models.ArmResourceId":"Microsoft.MachineLearningServices.ArmResourceId","com.azure.resourcemanager.machinelearning.models.AssetBase":"Microsoft.MachineLearningServices.AssetBase","com.azure.resourcemanager.machinelearning.models.AssetContainer":"Microsoft.MachineLearningServices.AssetContainer","com.azure.resourcemanager.machinelearning.models.AssetProvisioningState":"Microsoft.MachineLearningServices.AssetProvisioningState","com.azure.resourcemanager.machinelearning.models.AssetReferenceBase":"Microsoft.MachineLearningServices.AssetReferenceBase","com.azure.resourcemanager.machinelearning.models.AssignedUser":"Microsoft.MachineLearningServices.AssignedUser","com.azure.resourcemanager.machinelearning.models.AuthMode":"Microsoft.MachineLearningServices.AuthMode","com.azure.resourcemanager.machinelearning.models.AutoForecastHorizon":"Microsoft.MachineLearningServices.AutoForecastHorizon","com.azure.resourcemanager.machinelearning.models.AutoMLJob":"Microsoft.MachineLearningServices.AutoMLJob","com.azure.resourcemanager.machinelearning.models.AutoMLVertical":"Microsoft.MachineLearningServices.AutoMLVertical","com.azure.resourcemanager.machinelearning.models.AutoNCrossValidations":"Microsoft.MachineLearningServices.AutoNCrossValidations","com.azure.resourcemanager.machinelearning.models.AutoPauseProperties":"Microsoft.MachineLearningServices.AutoPauseProperties","com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting":"Microsoft.MachineLearningServices.AutoRebuildSetting","com.azure.resourcemanager.machinelearning.models.AutoScaleProperties":"Microsoft.MachineLearningServices.AutoScaleProperties","com.azure.resourcemanager.machinelearning.models.AutoSeasonality":"Microsoft.MachineLearningServices.AutoSeasonality","com.azure.resourcemanager.machinelearning.models.AutoTargetLags":"Microsoft.MachineLearningServices.AutoTargetLags","com.azure.resourcemanager.machinelearning.models.AutoTargetRollingWindowSize":"Microsoft.MachineLearningServices.AutoTargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.Autosave":"Microsoft.MachineLearningServices.Autosave","com.azure.resourcemanager.machinelearning.models.AvailableQuotaProperties":"Microsoft.MachineLearningServices.AvailableQuotaProperties","com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore":"Microsoft.MachineLearningServices.AzureBlobDatastore","com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore":"Microsoft.MachineLearningServices.AzureDataLakeGen1Datastore","com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore":"Microsoft.MachineLearningServices.AzureDataLakeGen2Datastore","com.azure.resourcemanager.machinelearning.models.AzureDevOpsWebhook":"Microsoft.MachineLearningServices.AzureDevOpsWebhook","com.azure.resourcemanager.machinelearning.models.AzureFileDatastore":"Microsoft.MachineLearningServices.AzureFileDatastore","com.azure.resourcemanager.machinelearning.models.AzureOpenAiFineTuning":"Microsoft.MachineLearningServices.AzureOpenAiFineTuning","com.azure.resourcemanager.machinelearning.models.AzureOpenAiHyperParameters":"Microsoft.MachineLearningServices.AzureOpenAiHyperParameters","com.azure.resourcemanager.machinelearning.models.BanditPolicy":"Microsoft.MachineLearningServices.BanditPolicy","com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfiguration":"Microsoft.MachineLearningServices.BatchDeploymentConfiguration","com.azure.resourcemanager.machinelearning.models.BatchDeploymentConfigurationType":"Microsoft.MachineLearningServices.BatchDeploymentConfigurationType","com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties":"Microsoft.MachineLearningServices.BatchDeploymentProperties","com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults":"Microsoft.MachineLearningServices.BatchEndpointDefaults","com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties":"Microsoft.MachineLearningServices.BatchEndpointProperties","com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel":"Microsoft.MachineLearningServices.BatchLoggingLevel","com.azure.resourcemanager.machinelearning.models.BatchOutputAction":"Microsoft.MachineLearningServices.BatchOutputAction","com.azure.resourcemanager.machinelearning.models.BatchPipelineComponentDeploymentConfiguration":"Microsoft.MachineLearningServices.BatchPipelineComponentDeploymentConfiguration","com.azure.resourcemanager.machinelearning.models.BatchRetrySettings":"Microsoft.MachineLearningServices.BatchRetrySettings","com.azure.resourcemanager.machinelearning.models.BayesianSamplingAlgorithm":"Microsoft.MachineLearningServices.BayesianSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.BillingCurrency":"Microsoft.MachineLearningServices.BillingCurrency","com.azure.resourcemanager.machinelearning.models.BindOptions":"Microsoft.MachineLearningServices.BindOptions","com.azure.resourcemanager.machinelearning.models.BlobReferenceForConsumptionDto":"Microsoft.MachineLearningServices.BlobReferenceForConsumptionDto","com.azure.resourcemanager.machinelearning.models.BlockedTransformers":"Microsoft.MachineLearningServices.BlockedTransformers","com.azure.resourcemanager.machinelearning.models.BuildContext":"Microsoft.MachineLearningServices.BuildContext","com.azure.resourcemanager.machinelearning.models.Caching":"Microsoft.MachineLearningServices.Caching","com.azure.resourcemanager.machinelearning.models.CapabilityHostKind":"Microsoft.MachineLearningServices.CapabilityHostKind","com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties":"Microsoft.MachineLearningServices.CapabilityHostProperties","com.azure.resourcemanager.machinelearning.models.CapabilityHostProvisioningState":"Microsoft.MachineLearningServices.CapabilityHostProvisioningState","com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetric":"Microsoft.MachineLearningServices.CategoricalDataDriftMetric","com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetricThreshold":"Microsoft.MachineLearningServices.CategoricalDataDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetric":"Microsoft.MachineLearningServices.CategoricalDataQualityMetric","com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetricThreshold":"Microsoft.MachineLearningServices.CategoricalDataQualityMetricThreshold","com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetric":"Microsoft.MachineLearningServices.CategoricalPredictionDriftMetric","com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetricThreshold":"Microsoft.MachineLearningServices.CategoricalPredictionDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.CertificateDatastoreCredentials":"Microsoft.MachineLearningServices.CertificateDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.CertificateDatastoreSecrets":"Microsoft.MachineLearningServices.CertificateDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.Classification":"Microsoft.MachineLearningServices.Classification","com.azure.resourcemanager.machinelearning.models.ClassificationModels":"Microsoft.MachineLearningServices.ClassificationModels","com.azure.resourcemanager.machinelearning.models.ClassificationMultilabelPrimaryMetrics":"Microsoft.MachineLearningServices.ClassificationMultilabelPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics":"Microsoft.MachineLearningServices.ClassificationPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings":"Microsoft.MachineLearningServices.ClassificationTrainingSettings","com.azure.resourcemanager.machinelearning.models.ClusterPurpose":"Microsoft.MachineLearningServices.ClusterPurpose","com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters":"Microsoft.MachineLearningServices.ClusterUpdateParameters","com.azure.resourcemanager.machinelearning.models.CodeConfiguration":"Microsoft.MachineLearningServices.CodeConfiguration","com.azure.resourcemanager.machinelearning.models.CodeContainerProperties":"Microsoft.MachineLearningServices.CodeContainerProperties","com.azure.resourcemanager.machinelearning.models.CodeVersionProperties":"Microsoft.MachineLearningServices.CodeVersionProperties","com.azure.resourcemanager.machinelearning.models.CognitiveServicesSku":"Microsoft.MachineLearningServices.CognitiveServicesSku","com.azure.resourcemanager.machinelearning.models.Collection":"Microsoft.MachineLearningServices.Collection","com.azure.resourcemanager.machinelearning.models.ColumnTransformer":"Microsoft.MachineLearningServices.ColumnTransformer","com.azure.resourcemanager.machinelearning.models.CommandJob":"Microsoft.MachineLearningServices.CommandJob","com.azure.resourcemanager.machinelearning.models.CommandJobLimits":"Microsoft.MachineLearningServices.CommandJobLimits","com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties":"Microsoft.MachineLearningServices.ComponentContainerProperties","com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties":"Microsoft.MachineLearningServices.ComponentVersionProperties","com.azure.resourcemanager.machinelearning.models.Compute":"Microsoft.MachineLearningServices.Compute","com.azure.resourcemanager.machinelearning.models.ComputeInstance":"Microsoft.MachineLearningServices.ComputeInstance","com.azure.resourcemanager.machinelearning.models.ComputeInstanceApplication":"Microsoft.MachineLearningServices.ComputeInstanceApplication","com.azure.resourcemanager.machinelearning.models.ComputeInstanceAuthorizationType":"Microsoft.MachineLearningServices.ComputeInstanceAuthorizationType","com.azure.resourcemanager.machinelearning.models.ComputeInstanceAutologgerSettings":"Microsoft.MachineLearningServices.ComputeInstanceAutologgerSettings","com.azure.resourcemanager.machinelearning.models.ComputeInstanceConnectivityEndpoints":"Microsoft.MachineLearningServices.ComputeInstanceConnectivityEndpoints","com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer":"Microsoft.MachineLearningServices.ComputeInstanceContainer","com.azure.resourcemanager.machinelearning.models.ComputeInstanceCreatedBy":"Microsoft.MachineLearningServices.ComputeInstanceCreatedBy","com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataDisk":"Microsoft.MachineLearningServices.ComputeInstanceDataDisk","com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount":"Microsoft.MachineLearningServices.ComputeInstanceDataMount","com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo":"Microsoft.MachineLearningServices.ComputeInstanceEnvironmentInfo","com.azure.resourcemanager.machinelearning.models.ComputeInstanceLastOperation":"Microsoft.MachineLearningServices.ComputeInstanceLastOperation","com.azure.resourcemanager.machinelearning.models.ComputeInstanceProperties":"Microsoft.MachineLearningServices.ComputeInstanceProperties","com.azure.resourcemanager.machinelearning.models.ComputeInstanceSshSettings":"Microsoft.MachineLearningServices.ComputeInstanceSshSettings","com.azure.resourcemanager.machinelearning.models.ComputeInstanceState":"Microsoft.MachineLearningServices.ComputeInstanceState","com.azure.resourcemanager.machinelearning.models.ComputeInstanceVersion":"Microsoft.MachineLearningServices.ComputeInstanceVersion","com.azure.resourcemanager.machinelearning.models.ComputePowerAction":"Microsoft.MachineLearningServices.ComputePowerAction","com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency":"Microsoft.MachineLearningServices.ComputeRecurrenceFrequency","com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule":"Microsoft.MachineLearningServices.ComputeRecurrenceSchedule","com.azure.resourcemanager.machinelearning.models.ComputeRuntimeDto":"Microsoft.MachineLearningServices.ComputeRuntimeDto","com.azure.resourcemanager.machinelearning.models.ComputeSchedules":"Microsoft.MachineLearningServices.ComputeSchedules","com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule":"Microsoft.MachineLearningServices.ComputeStartStopSchedule","com.azure.resourcemanager.machinelearning.models.ComputeTriggerType":"Microsoft.MachineLearningServices.ComputeTriggerType","com.azure.resourcemanager.machinelearning.models.ComputeType":"Microsoft.MachineLearningServices.ComputeType","com.azure.resourcemanager.machinelearning.models.ComputeWeekDay":"Microsoft.MachineLearningServices.ComputeWeekDay","com.azure.resourcemanager.machinelearning.models.ConnectionAuthType":"Microsoft.MachineLearningServices.ConnectionAuthType","com.azure.resourcemanager.machinelearning.models.ConnectionCategory":"Microsoft.MachineLearningServices.ConnectionCategory","com.azure.resourcemanager.machinelearning.models.ConnectionGroup":"Microsoft.MachineLearningServices.ConnectionGroup","com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements":"Microsoft.MachineLearningServices.ContainerResourceRequirements","com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings":"Microsoft.MachineLearningServices.ContainerResourceSettings","com.azure.resourcemanager.machinelearning.models.ContainerType":"Microsoft.MachineLearningServices.ContainerType","com.azure.resourcemanager.machinelearning.models.ContentSafety":"Microsoft.MachineLearningServices.ContentSafety","com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.ContentSafetyEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.ContentSafetyEndpointResourceProperties":"Microsoft.MachineLearningServices.ContentSafetyEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel":"Microsoft.MachineLearningServices.ContentSafetyLevel","com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus":"Microsoft.MachineLearningServices.ContentSafetyStatus","com.azure.resourcemanager.machinelearning.models.CosmosDbSettings":"Microsoft.MachineLearningServices.CosmosDbSettings","com.azure.resourcemanager.machinelearning.models.CreateMonitorAction":"Microsoft.MachineLearningServices.CreateMonitorAction","com.azure.resourcemanager.machinelearning.models.CredentialsType":"Microsoft.MachineLearningServices.CredentialsType","com.azure.resourcemanager.machinelearning.models.Cron":"Microsoft.MachineLearningServices.Cron","com.azure.resourcemanager.machinelearning.models.CronTrigger":"Microsoft.MachineLearningServices.CronTrigger","com.azure.resourcemanager.machinelearning.models.CustomForecastHorizon":"Microsoft.MachineLearningServices.CustomForecastHorizon","com.azure.resourcemanager.machinelearning.models.CustomKeys":"Microsoft.MachineLearningServices.CustomKeys","com.azure.resourcemanager.machinelearning.models.CustomKeysWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.CustomKeysWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.CustomMetricThreshold":"Microsoft.MachineLearningServices.CustomMetricThreshold","com.azure.resourcemanager.machinelearning.models.CustomModelFineTuning":"Microsoft.MachineLearningServices.CustomModelFineTuning","com.azure.resourcemanager.machinelearning.models.CustomModelJobInput":"Microsoft.MachineLearningServices.CustomModelJobInput","com.azure.resourcemanager.machinelearning.models.CustomModelJobOutput":"Microsoft.MachineLearningServices.CustomModelJobOutput","com.azure.resourcemanager.machinelearning.models.CustomMonitoringSignal":"Microsoft.MachineLearningServices.CustomMonitoringSignal","com.azure.resourcemanager.machinelearning.models.CustomNCrossValidations":"Microsoft.MachineLearningServices.CustomNCrossValidations","com.azure.resourcemanager.machinelearning.models.CustomSeasonality":"Microsoft.MachineLearningServices.CustomSeasonality","com.azure.resourcemanager.machinelearning.models.CustomService":"Microsoft.MachineLearningServices.CustomService","com.azure.resourcemanager.machinelearning.models.CustomTargetLags":"Microsoft.MachineLearningServices.CustomTargetLags","com.azure.resourcemanager.machinelearning.models.CustomTargetRollingWindowSize":"Microsoft.MachineLearningServices.CustomTargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus":"Microsoft.MachineLearningServices.DataAvailabilityStatus","com.azure.resourcemanager.machinelearning.models.DataCollectionMode":"Microsoft.MachineLearningServices.DataCollectionMode","com.azure.resourcemanager.machinelearning.models.DataCollector":"Microsoft.MachineLearningServices.DataCollector","com.azure.resourcemanager.machinelearning.models.DataContainerProperties":"Microsoft.MachineLearningServices.DataContainerProperties","com.azure.resourcemanager.machinelearning.models.DataDriftMetricThresholdBase":"Microsoft.MachineLearningServices.DataDriftMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.DataDriftMonitoringSignal":"Microsoft.MachineLearningServices.DataDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.DataFactory":"Microsoft.MachineLearningServices.DataFactory","com.azure.resourcemanager.machinelearning.models.DataGenerationTaskType":"Microsoft.MachineLearningServices.DataGenerationTaskType","com.azure.resourcemanager.machinelearning.models.DataGenerationType":"Microsoft.MachineLearningServices.DataGenerationType","com.azure.resourcemanager.machinelearning.models.DataGenerationVertical":"Microsoft.MachineLearningServices.DataGenerationVertical","com.azure.resourcemanager.machinelearning.models.DataLakeAnalytics":"Microsoft.MachineLearningServices.DataLakeAnalytics","com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties":"Microsoft.MachineLearningServices.DataLakeAnalyticsSchemaProperties","com.azure.resourcemanager.machinelearning.models.DataPathAssetReference":"Microsoft.MachineLearningServices.DataPathAssetReference","com.azure.resourcemanager.machinelearning.models.DataQualityMetricThresholdBase":"Microsoft.MachineLearningServices.DataQualityMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.DataQualityMonitoringSignal":"Microsoft.MachineLearningServices.DataQualityMonitoringSignal","com.azure.resourcemanager.machinelearning.models.DataReferenceCredential":"Microsoft.MachineLearningServices.DataReferenceCredential","com.azure.resourcemanager.machinelearning.models.DataReferenceCredentialType":"Microsoft.MachineLearningServices.DataReferenceCredentialType","com.azure.resourcemanager.machinelearning.models.DataType":"Microsoft.MachineLearningServices.DataType","com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties":"Microsoft.MachineLearningServices.DataVersionBaseProperties","com.azure.resourcemanager.machinelearning.models.Databricks":"Microsoft.MachineLearningServices.Databricks","com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets":"Microsoft.MachineLearningServices.DatabricksComputeSecrets","com.azure.resourcemanager.machinelearning.models.DatabricksProperties":"Microsoft.MachineLearningServices.DatabricksProperties","com.azure.resourcemanager.machinelearning.models.DatasetReference":"Microsoft.MachineLearningServices.DatasetReference","com.azure.resourcemanager.machinelearning.models.DatastoreCredentials":"Microsoft.MachineLearningServices.DatastoreCredentials","com.azure.resourcemanager.machinelearning.models.DatastoreProperties":"Microsoft.MachineLearningServices.DatastoreProperties","com.azure.resourcemanager.machinelearning.models.DatastoreType":"Microsoft.MachineLearningServices.DatastoreType","com.azure.resourcemanager.machinelearning.models.DefaultActionType":"Microsoft.MachineLearningServices.DefaultActionType","com.azure.resourcemanager.machinelearning.models.DefaultResourceProvisioningState":"Microsoft.MachineLearningServices.DefaultResourceProvisioningState","com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings":"Microsoft.MachineLearningServices.DefaultScaleSettings","com.azure.resourcemanager.machinelearning.models.DeltaModelCurrentState":"Microsoft.MachineLearningServices.DeltaModelCurrentState","com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest":"Microsoft.MachineLearningServices.DeltaModelListRequest","com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest":"Microsoft.MachineLearningServices.DeltaModelModifyRequest","com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest":"Microsoft.MachineLearningServices.DeltaModelStatusRequest","com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest":"Microsoft.MachineLearningServices.DeploymentLogsRequest","com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption":"Microsoft.MachineLearningServices.DeploymentModelVersionUpgradeOption","com.azure.resourcemanager.machinelearning.models.DeploymentProvisioningState":"Microsoft.MachineLearningServices.DeploymentProvisioningState","com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration":"Microsoft.MachineLearningServices.DeploymentResourceConfiguration","com.azure.resourcemanager.machinelearning.models.DestinationAsset":"Microsoft.MachineLearningServices.DestinationAsset","com.azure.resourcemanager.machinelearning.models.DiagnoseRequestProperties":"Microsoft.MachineLearningServices.DiagnoseRequestProperties","com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue":"Microsoft.MachineLearningServices.DiagnoseResponseResultValue","com.azure.resourcemanager.machinelearning.models.DiagnoseResult":"Microsoft.MachineLearningServices.DiagnoseResult","com.azure.resourcemanager.machinelearning.models.DiagnoseResultLevel":"Microsoft.MachineLearningServices.DiagnoseResultLevel","com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters":"Microsoft.MachineLearningServices.DiagnoseWorkspaceParameters","com.azure.resourcemanager.machinelearning.models.DistillationJob":"Microsoft.MachineLearningServices.DistillationJob","com.azure.resourcemanager.machinelearning.models.DistributionConfiguration":"Microsoft.MachineLearningServices.DistributionConfiguration","com.azure.resourcemanager.machinelearning.models.DistributionType":"Microsoft.MachineLearningServices.DistributionType","com.azure.resourcemanager.machinelearning.models.Docker":"Microsoft.MachineLearningServices.Docker","com.azure.resourcemanager.machinelearning.models.DockerCredential":"Microsoft.MachineLearningServices.DockerCredential","com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy":"Microsoft.MachineLearningServices.EarlyTerminationPolicy","com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicyType":"Microsoft.MachineLearningServices.EarlyTerminationPolicyType","com.azure.resourcemanager.machinelearning.models.EgressPublicNetworkAccessType":"Microsoft.MachineLearningServices.EgressPublicNetworkAccessType","com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType":"Microsoft.MachineLearningServices.EmailNotificationEnableType","com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultUpdateProperties":"Microsoft.MachineLearningServices.EncryptionKeyVaultUpdateProperties","com.azure.resourcemanager.machinelearning.models.EncryptionProperty":"Microsoft.MachineLearningServices.EncryptionProperty","com.azure.resourcemanager.machinelearning.models.EncryptionStatus":"Microsoft.MachineLearningServices.EncryptionStatus","com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties":"Microsoft.MachineLearningServices.EncryptionUpdateProperties","com.azure.resourcemanager.machinelearning.models.Endpoint":"Microsoft.MachineLearningServices.Endpoint","com.azure.resourcemanager.machinelearning.models.EndpointAuthMode":"Microsoft.MachineLearningServices.EndpointAuthMode","com.azure.resourcemanager.machinelearning.models.EndpointComputeType":"Microsoft.MachineLearningServices.EndpointComputeType","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel":"Microsoft.MachineLearningServices.EndpointDeploymentModel","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentPropertiesBase":"Microsoft.MachineLearningServices.EndpointDeploymentPropertiesBase","com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.EndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties":"Microsoft.MachineLearningServices.EndpointModelDeprecationProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuCapacityProperties":"Microsoft.MachineLearningServices.EndpointModelSkuCapacityProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuProperties":"Microsoft.MachineLearningServices.EndpointModelSkuProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitRulePatternProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitRulePatternProperties","com.azure.resourcemanager.machinelearning.models.EndpointModelSkuRateLimitRuleProperties":"Microsoft.MachineLearningServices.EndpointModelSkuRateLimitRuleProperties","com.azure.resourcemanager.machinelearning.models.EndpointProvisioningState":"Microsoft.MachineLearningServices.EndpointProvisioningState","com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties":"Microsoft.MachineLearningServices.EndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction":"Microsoft.MachineLearningServices.EndpointScheduleAction","com.azure.resourcemanager.machinelearning.models.EndpointType":"Microsoft.MachineLearningServices.EndpointType","com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties":"Microsoft.MachineLearningServices.EnvironmentContainerProperties","com.azure.resourcemanager.machinelearning.models.EnvironmentType":"Microsoft.MachineLearningServices.EnvironmentType","com.azure.resourcemanager.machinelearning.models.EnvironmentVariable":"Microsoft.MachineLearningServices.EnvironmentVariable","com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType":"Microsoft.MachineLearningServices.EnvironmentVariableType","com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties":"Microsoft.MachineLearningServices.EnvironmentVersionProperties","com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice":"Microsoft.MachineLearningServices.EstimatedVMPrice","com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices":"Microsoft.MachineLearningServices.EstimatedVMPrices","com.azure.resourcemanager.machinelearning.models.FeatureAttributionDriftMonitoringSignal":"Microsoft.MachineLearningServices.FeatureAttributionDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetric":"Microsoft.MachineLearningServices.FeatureAttributionMetric","com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold":"Microsoft.MachineLearningServices.FeatureAttributionMetricThreshold","com.azure.resourcemanager.machinelearning.models.FeatureDataType":"Microsoft.MachineLearningServices.FeatureDataType","com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode":"Microsoft.MachineLearningServices.FeatureImportanceMode","com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings":"Microsoft.MachineLearningServices.FeatureImportanceSettings","com.azure.resourcemanager.machinelearning.models.FeatureLags":"Microsoft.MachineLearningServices.FeatureLags","com.azure.resourcemanager.machinelearning.models.FeatureProperties":"Microsoft.MachineLearningServices.FeatureProperties","com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings":"Microsoft.MachineLearningServices.FeatureStoreSettings","com.azure.resourcemanager.machinelearning.models.FeatureSubset":"Microsoft.MachineLearningServices.FeatureSubset","com.azure.resourcemanager.machinelearning.models.FeatureWindow":"Microsoft.MachineLearningServices.FeatureWindow","com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties":"Microsoft.MachineLearningServices.FeaturesetContainerProperties","com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification":"Microsoft.MachineLearningServices.FeaturesetSpecification","com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest":"Microsoft.MachineLearningServices.FeaturesetVersionBackfillRequest","com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties":"Microsoft.MachineLearningServices.FeaturesetVersionProperties","com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties":"Microsoft.MachineLearningServices.FeaturestoreEntityContainerProperties","com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties":"Microsoft.MachineLearningServices.FeaturestoreEntityVersionProperties","com.azure.resourcemanager.machinelearning.models.FeaturizationMode":"Microsoft.MachineLearningServices.FeaturizationMode","com.azure.resourcemanager.machinelearning.models.FeaturizationSettings":"Microsoft.MachineLearningServices.FeaturizationSettings","com.azure.resourcemanager.machinelearning.models.FineTuningJob":"Microsoft.MachineLearningServices.FineTuningJob","com.azure.resourcemanager.machinelearning.models.FineTuningTaskType":"Microsoft.MachineLearningServices.FineTuningTaskType","com.azure.resourcemanager.machinelearning.models.FineTuningVertical":"Microsoft.MachineLearningServices.FineTuningVertical","com.azure.resourcemanager.machinelearning.models.FinetuningDetails":"Microsoft.MachineLearningServices.FinetuningDetails","com.azure.resourcemanager.machinelearning.models.FirewallSku":"Microsoft.MachineLearningServices.FirewallSku","com.azure.resourcemanager.machinelearning.models.FixedInputData":"Microsoft.MachineLearningServices.FixedInputData","com.azure.resourcemanager.machinelearning.models.FlavorData":"Microsoft.MachineLearningServices.FlavorData","com.azure.resourcemanager.machinelearning.models.ForecastHorizon":"Microsoft.MachineLearningServices.ForecastHorizon","com.azure.resourcemanager.machinelearning.models.ForecastHorizonMode":"Microsoft.MachineLearningServices.ForecastHorizonMode","com.azure.resourcemanager.machinelearning.models.Forecasting":"Microsoft.MachineLearningServices.Forecasting","com.azure.resourcemanager.machinelearning.models.ForecastingModels":"Microsoft.MachineLearningServices.ForecastingModels","com.azure.resourcemanager.machinelearning.models.ForecastingPrimaryMetrics":"Microsoft.MachineLearningServices.ForecastingPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.ForecastingSettings":"Microsoft.MachineLearningServices.ForecastingSettings","com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings":"Microsoft.MachineLearningServices.ForecastingTrainingSettings","com.azure.resourcemanager.machinelearning.models.FqdnEndpoint":"Microsoft.MachineLearningServices.FqdnEndpoint","com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail":"Microsoft.MachineLearningServices.FqdnEndpointDetail","com.azure.resourcemanager.machinelearning.models.FqdnEndpoints":"Microsoft.MachineLearningServices.FqdnEndpoints","com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag":"Microsoft.MachineLearningServices.FqdnEndpointsPropertyBag","com.azure.resourcemanager.machinelearning.models.FqdnOutboundRule":"Microsoft.MachineLearningServices.FqdnOutboundRule","com.azure.resourcemanager.machinelearning.models.GetBlobReferenceForConsumptionDto":"Microsoft.MachineLearningServices.GetBlobReferenceForConsumptionDto","com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasRequestDto":"Microsoft.MachineLearningServices.GetBlobReferenceSASRequestDto","com.azure.resourcemanager.machinelearning.models.Goal":"Microsoft.MachineLearningServices.Goal","com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm":"Microsoft.MachineLearningServices.GridSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.GroupEnvironmentConfiguration":"Microsoft.MachineLearningServices.GroupEnvironmentConfiguration","com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration":"Microsoft.MachineLearningServices.GroupModelConfiguration","com.azure.resourcemanager.machinelearning.models.HDInsight":"Microsoft.MachineLearningServices.HDInsight","com.azure.resourcemanager.machinelearning.models.HDInsightProperties":"Microsoft.MachineLearningServices.HDInsightProperties","com.azure.resourcemanager.machinelearning.models.IPRule":"Microsoft.MachineLearningServices.IPRule","com.azure.resourcemanager.machinelearning.models.IdAssetReference":"Microsoft.MachineLearningServices.IdAssetReference","com.azure.resourcemanager.machinelearning.models.IdentityConfiguration":"Microsoft.MachineLearningServices.IdentityConfiguration","com.azure.resourcemanager.machinelearning.models.IdentityConfigurationType":"Microsoft.MachineLearningServices.IdentityConfigurationType","com.azure.resourcemanager.machinelearning.models.IdentityForCmk":"Microsoft.MachineLearningServices.IdentityForCmk","com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting":"Microsoft.MachineLearningServices.IdleShutdownSetting","com.azure.resourcemanager.machinelearning.models.Image":"Microsoft.MachineLearningServices.Image","com.azure.resourcemanager.machinelearning.models.ImageClassification":"Microsoft.MachineLearningServices.ImageClassification","com.azure.resourcemanager.machinelearning.models.ImageClassificationMultilabel":"Microsoft.MachineLearningServices.ImageClassificationMultilabel","com.azure.resourcemanager.machinelearning.models.ImageDetails":"Microsoft.MachineLearningServices.ImageDetails","com.azure.resourcemanager.machinelearning.models.ImageInfo":"Microsoft.MachineLearningServices.ImageInfo","com.azure.resourcemanager.machinelearning.models.ImageInstanceSegmentation":"Microsoft.MachineLearningServices.ImageInstanceSegmentation","com.azure.resourcemanager.machinelearning.models.ImageLimitSettings":"Microsoft.MachineLearningServices.ImageLimitSettings","com.azure.resourcemanager.machinelearning.models.ImageMetadata":"Microsoft.MachineLearningServices.ImageMetadata","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings":"Microsoft.MachineLearningServices.ImageModelDistributionSettings","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification":"Microsoft.MachineLearningServices.ImageModelDistributionSettingsClassification","com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection":"Microsoft.MachineLearningServices.ImageModelDistributionSettingsObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageModelSettings":"Microsoft.MachineLearningServices.ImageModelSettings","com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification":"Microsoft.MachineLearningServices.ImageModelSettingsClassification","com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection":"Microsoft.MachineLearningServices.ImageModelSettingsObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageObjectDetection":"Microsoft.MachineLearningServices.ImageObjectDetection","com.azure.resourcemanager.machinelearning.models.ImageSweepSettings":"Microsoft.MachineLearningServices.ImageSweepSettings","com.azure.resourcemanager.machinelearning.models.ImageType":"Microsoft.MachineLearningServices.ImageType","com.azure.resourcemanager.machinelearning.models.IndexColumn":"Microsoft.MachineLearningServices.IndexColumn","com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties":"Microsoft.MachineLearningServices.InferenceContainerProperties","com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties":"Microsoft.MachineLearningServices.InferenceEndpointProperties","com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties":"Microsoft.MachineLearningServices.InferenceGroupProperties","com.azure.resourcemanager.machinelearning.models.InferencePoolProperties":"Microsoft.MachineLearningServices.InferencePoolProperties","com.azure.resourcemanager.machinelearning.models.InputDeliveryMode":"Microsoft.MachineLearningServices.InputDeliveryMode","com.azure.resourcemanager.machinelearning.models.InstanceSegmentationPrimaryMetrics":"Microsoft.MachineLearningServices.InstanceSegmentationPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema":"Microsoft.MachineLearningServices.InstanceTypeSchema","com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources":"Microsoft.MachineLearningServices.InstanceTypeSchemaResources","com.azure.resourcemanager.machinelearning.models.IsolationMode":"Microsoft.MachineLearningServices.IsolationMode","com.azure.resourcemanager.machinelearning.models.JobBaseProperties":"Microsoft.MachineLearningServices.JobBaseProperties","com.azure.resourcemanager.machinelearning.models.JobInput":"Microsoft.MachineLearningServices.JobInput","com.azure.resourcemanager.machinelearning.models.JobInputType":"Microsoft.MachineLearningServices.JobInputType","com.azure.resourcemanager.machinelearning.models.JobLimits":"Microsoft.MachineLearningServices.JobLimits","com.azure.resourcemanager.machinelearning.models.JobLimitsType":"Microsoft.MachineLearningServices.JobLimitsType","com.azure.resourcemanager.machinelearning.models.JobOutput":"Microsoft.MachineLearningServices.JobOutput","com.azure.resourcemanager.machinelearning.models.JobOutputType":"Microsoft.MachineLearningServices.JobOutputType","com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration":"Microsoft.MachineLearningServices.JobResourceConfiguration","com.azure.resourcemanager.machinelearning.models.JobResources":"Microsoft.MachineLearningServices.JobResources","com.azure.resourcemanager.machinelearning.models.JobScheduleAction":"Microsoft.MachineLearningServices.JobScheduleAction","com.azure.resourcemanager.machinelearning.models.JobService":"Microsoft.MachineLearningServices.JobService","com.azure.resourcemanager.machinelearning.models.JobStatus":"Microsoft.MachineLearningServices.JobStatus","com.azure.resourcemanager.machinelearning.models.JobTier":"Microsoft.MachineLearningServices.JobTier","com.azure.resourcemanager.machinelearning.models.JobType":"Microsoft.MachineLearningServices.JobType","com.azure.resourcemanager.machinelearning.models.JupyterKernelConfig":"Microsoft.MachineLearningServices.JupyterKernelConfig","com.azure.resourcemanager.machinelearning.models.KeyType":"Microsoft.MachineLearningServices.KeyType","com.azure.resourcemanager.machinelearning.models.KeyVaultProperties":"Microsoft.MachineLearningServices.KeyVaultProperties","com.azure.resourcemanager.machinelearning.models.Kubernetes":"Microsoft.MachineLearningServices.Kubernetes","com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment":"Microsoft.MachineLearningServices.KubernetesOnlineDeployment","com.azure.resourcemanager.machinelearning.models.KubernetesProperties":"Microsoft.MachineLearningServices.KubernetesProperties","com.azure.resourcemanager.machinelearning.models.LabelGeneration":"Microsoft.MachineLearningServices.LabelGeneration","com.azure.resourcemanager.machinelearning.models.LakeHouseArtifact":"Microsoft.MachineLearningServices.LakeHouseArtifact","com.azure.resourcemanager.machinelearning.models.LearningRateScheduler":"Microsoft.MachineLearningServices.LearningRateScheduler","com.azure.resourcemanager.machinelearning.models.ListViewType":"Microsoft.MachineLearningServices.ListViewType","com.azure.resourcemanager.machinelearning.models.LiteralJobInput":"Microsoft.MachineLearningServices.LiteralJobInput","com.azure.resourcemanager.machinelearning.models.LoadBalancerType":"Microsoft.MachineLearningServices.LoadBalancerType","com.azure.resourcemanager.machinelearning.models.LogVerbosity":"Microsoft.MachineLearningServices.LogVerbosity","com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput":"Microsoft.MachineLearningServices.MLFlowModelJobInput","com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput":"Microsoft.MachineLearningServices.MLFlowModelJobOutput","com.azure.resourcemanager.machinelearning.models.MLTableData":"Microsoft.MachineLearningServices.MLTableData","com.azure.resourcemanager.machinelearning.models.MLTableJobInput":"Microsoft.MachineLearningServices.MLTableJobInput","com.azure.resourcemanager.machinelearning.models.MLTableJobOutput":"Microsoft.MachineLearningServices.MLTableJobOutput","com.azure.resourcemanager.machinelearning.models.ManagedComputeIdentity":"Microsoft.MachineLearningServices.ManagedComputeIdentity","com.azure.resourcemanager.machinelearning.models.ManagedIdentity":"Microsoft.MachineLearningServices.ManagedIdentity","com.azure.resourcemanager.machinelearning.models.ManagedIdentityAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ManagedIdentityAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ManagedIdentityCredential":"Microsoft.MachineLearningServices.ManagedIdentityCredential","com.azure.resourcemanager.machinelearning.models.ManagedNetworkKind":"Microsoft.MachineLearningServices.ManagedNetworkKind","com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions":"Microsoft.MachineLearningServices.ManagedNetworkProvisionOptions","com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisioningState":"Microsoft.MachineLearningServices.ManagedNetworkProvisioningState","com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsEx":"Microsoft.MachineLearningServices.ManagedNetworkSettingsEx","com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsProperties":"Microsoft.MachineLearningServices.ManagedNetworkSettingsProperties","com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus":"Microsoft.MachineLearningServices.ManagedNetworkStatus","com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment":"Microsoft.MachineLearningServices.ManagedOnlineDeployment","com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.ManagedOnlineEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.ManagedOnlineEndpointResourceProperties":"Microsoft.MachineLearningServices.ManagedOnlineEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ManagedPERequirement":"Microsoft.MachineLearningServices.ManagedPERequirement","com.azure.resourcemanager.machinelearning.models.ManagedPEStatus":"Microsoft.MachineLearningServices.ManagedPEStatus","com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupAssignedIdentities":"Microsoft.MachineLearningServices.ManagedResourceGroupAssignedIdentities","com.azure.resourcemanager.machinelearning.models.ManagedResourceGroupSettings":"Microsoft.MachineLearningServices.ManagedResourceGroupSettings","com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType":"Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType","com.azure.resourcemanager.machinelearning.models.MarketplacePlan":"Microsoft.MachineLearningServices.MarketplacePlan","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties":"Microsoft.MachineLearningServices.MarketplaceSubscriptionProperties","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProvisioningState":"Microsoft.MachineLearningServices.MarketplaceSubscriptionProvisioningState","com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionStatus":"Microsoft.MachineLearningServices.MarketplaceSubscriptionStatus","com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource":"Microsoft.MachineLearningServices.MaterializationComputeResource","com.azure.resourcemanager.machinelearning.models.MaterializationSettings":"Microsoft.MachineLearningServices.MaterializationSettings","com.azure.resourcemanager.machinelearning.models.MaterializationStoreType":"Microsoft.MachineLearningServices.MaterializationStoreType","com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy":"Microsoft.MachineLearningServices.MedianStoppingPolicy","com.azure.resourcemanager.machinelearning.models.MlflowAutologger":"Microsoft.MachineLearningServices.MlflowAutologger","com.azure.resourcemanager.machinelearning.models.ModelContainerProperties":"Microsoft.MachineLearningServices.ModelContainerProperties","com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus":"Microsoft.MachineLearningServices.ModelLifecycleStatus","com.azure.resourcemanager.machinelearning.models.ModelProvider":"Microsoft.MachineLearningServices.ModelProvider","com.azure.resourcemanager.machinelearning.models.ModelSettings":"Microsoft.MachineLearningServices.ModelSettings","com.azure.resourcemanager.machinelearning.models.ModelSize":"Microsoft.MachineLearningServices.ModelSize","com.azure.resourcemanager.machinelearning.models.ModelTaskType":"Microsoft.MachineLearningServices.ModelTaskType","com.azure.resourcemanager.machinelearning.models.ModelVersionProperties":"Microsoft.MachineLearningServices.ModelVersionProperties","com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase":"Microsoft.MachineLearningServices.MonitorComputeConfigurationBase","com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityBase":"Microsoft.MachineLearningServices.MonitorComputeIdentityBase","com.azure.resourcemanager.machinelearning.models.MonitorComputeIdentityType":"Microsoft.MachineLearningServices.MonitorComputeIdentityType","com.azure.resourcemanager.machinelearning.models.MonitorComputeType":"Microsoft.MachineLearningServices.MonitorComputeType","com.azure.resourcemanager.machinelearning.models.MonitorDefinition":"Microsoft.MachineLearningServices.MonitorDefinition","com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings":"Microsoft.MachineLearningServices.MonitorEmailNotificationSettings","com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings":"Microsoft.MachineLearningServices.MonitorNotificationSettings","com.azure.resourcemanager.machinelearning.models.MonitorServerlessSparkCompute":"Microsoft.MachineLearningServices.MonitorServerlessSparkCompute","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType":"Microsoft.MachineLearningServices.MonitoringFeatureDataType","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase":"Microsoft.MachineLearningServices.MonitoringFeatureFilterBase","com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterType":"Microsoft.MachineLearningServices.MonitoringFeatureFilterType","com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase":"Microsoft.MachineLearningServices.MonitoringInputDataBase","com.azure.resourcemanager.machinelearning.models.MonitoringInputDataType":"Microsoft.MachineLearningServices.MonitoringInputDataType","com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType":"Microsoft.MachineLearningServices.MonitoringNotificationType","com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase":"Microsoft.MachineLearningServices.MonitoringSignalBase","com.azure.resourcemanager.machinelearning.models.MonitoringSignalType":"Microsoft.MachineLearningServices.MonitoringSignalType","com.azure.resourcemanager.machinelearning.models.MonitoringTarget":"Microsoft.MachineLearningServices.MonitoringTarget","com.azure.resourcemanager.machinelearning.models.MonitoringThreshold":"Microsoft.MachineLearningServices.MonitoringThreshold","com.azure.resourcemanager.machinelearning.models.MountAction":"Microsoft.MachineLearningServices.MountAction","com.azure.resourcemanager.machinelearning.models.MountMode":"Microsoft.MachineLearningServices.MountMode","com.azure.resourcemanager.machinelearning.models.MountState":"Microsoft.MachineLearningServices.MountState","com.azure.resourcemanager.machinelearning.models.Mpi":"Microsoft.MachineLearningServices.Mpi","com.azure.resourcemanager.machinelearning.models.NCrossValidations":"Microsoft.MachineLearningServices.NCrossValidations","com.azure.resourcemanager.machinelearning.models.NCrossValidationsMode":"Microsoft.MachineLearningServices.NCrossValidationsMode","com.azure.resourcemanager.machinelearning.models.Network":"Microsoft.MachineLearningServices.Network","com.azure.resourcemanager.machinelearning.models.NetworkAcls":"Microsoft.MachineLearningServices.NetworkAcls","com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings":"Microsoft.MachineLearningServices.NlpVerticalFeaturizationSettings","com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings":"Microsoft.MachineLearningServices.NlpVerticalLimitSettings","com.azure.resourcemanager.machinelearning.models.NodeState":"Microsoft.MachineLearningServices.NodeState","com.azure.resourcemanager.machinelearning.models.NodeStateCounts":"Microsoft.MachineLearningServices.NodeStateCounts","com.azure.resourcemanager.machinelearning.models.Nodes":"Microsoft.MachineLearningServices.Nodes","com.azure.resourcemanager.machinelearning.models.NodesValueType":"Microsoft.MachineLearningServices.NodesValueType","com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.NoneAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.NoneDatastoreCredentials":"Microsoft.MachineLearningServices.NoneDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.NotebookPreparationError":"Microsoft.MachineLearningServices.NotebookPreparationError","com.azure.resourcemanager.machinelearning.models.NotificationSetting":"Microsoft.MachineLearningServices.NotificationSetting","com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetric":"Microsoft.MachineLearningServices.NumericalDataDriftMetric","com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetricThreshold":"Microsoft.MachineLearningServices.NumericalDataDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetric":"Microsoft.MachineLearningServices.NumericalDataQualityMetric","com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetricThreshold":"Microsoft.MachineLearningServices.NumericalDataQualityMetricThreshold","com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetric":"Microsoft.MachineLearningServices.NumericalPredictionDriftMetric","com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetricThreshold":"Microsoft.MachineLearningServices.NumericalPredictionDriftMetricThreshold","com.azure.resourcemanager.machinelearning.models.OAuth2AuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.OAuth2AuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ObjectDetectionPrimaryMetrics":"Microsoft.MachineLearningServices.ObjectDetectionPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.Objective":"Microsoft.MachineLearningServices.Objective","com.azure.resourcemanager.machinelearning.models.OneLakeArtifact":"Microsoft.MachineLearningServices.OneLakeArtifact","com.azure.resourcemanager.machinelearning.models.OneLakeArtifactType":"Microsoft.MachineLearningServices.OneLakeArtifactType","com.azure.resourcemanager.machinelearning.models.OneLakeDatastore":"Microsoft.MachineLearningServices.OneLakeDatastore","com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties":"Microsoft.MachineLearningServices.OnlineDeploymentProperties","com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties":"Microsoft.MachineLearningServices.OnlineEndpointProperties","com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings":"Microsoft.MachineLearningServices.OnlineRequestSettings","com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings":"Microsoft.MachineLearningServices.OnlineScaleSettings","com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.OpenAIEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.OpenAIEndpointResourceProperties":"Microsoft.MachineLearningServices.OpenAIEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.OperatingSystemType":"Microsoft.MachineLearningServices.OperatingSystemType","com.azure.resourcemanager.machinelearning.models.OperationDisplay":"Azure.ResourceManager.CommonTypes.OperationDisplay","com.azure.resourcemanager.machinelearning.models.OperationName":"Microsoft.MachineLearningServices.OperationName","com.azure.resourcemanager.machinelearning.models.OperationStatus":"Microsoft.MachineLearningServices.OperationStatus","com.azure.resourcemanager.machinelearning.models.OperationTrigger":"Microsoft.MachineLearningServices.OperationTrigger","com.azure.resourcemanager.machinelearning.models.OrderString":"Microsoft.MachineLearningServices.OrderString","com.azure.resourcemanager.machinelearning.models.Origin":"Azure.ResourceManager.CommonTypes.Origin","com.azure.resourcemanager.machinelearning.models.OsPatchingStatus":"Microsoft.MachineLearningServices.OsPatchingStatus","com.azure.resourcemanager.machinelearning.models.OsType":"Microsoft.MachineLearningServices.OsType","com.azure.resourcemanager.machinelearning.models.OutboundRule":"Microsoft.MachineLearningServices.OutboundRule","com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode":"Microsoft.MachineLearningServices.OutputDeliveryMode","com.azure.resourcemanager.machinelearning.models.OutputPathAssetReference":"Microsoft.MachineLearningServices.OutputPathAssetReference","com.azure.resourcemanager.machinelearning.models.PTUDeploymentUsage":"Microsoft.MachineLearningServices.PTUDeploymentUsage","com.azure.resourcemanager.machinelearning.models.PackageDetails":"Microsoft.MachineLearningServices.PackageDetails","com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment":"Microsoft.MachineLearningServices.PartialBatchDeployment","com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties":"Microsoft.MachineLearningServices.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties","com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity":"Microsoft.MachineLearningServices.PartialManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResource":"Microsoft.MachineLearningServices.PartialMinimalTrackedResource","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithIdentity","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithSku","com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity":"Microsoft.MachineLearningServices.PartialMinimalTrackedResourceWithSkuAndIdentity","com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource":"Microsoft.MachineLearningServices.PartialRegistryPartialTrackedResource","com.azure.resourcemanager.machinelearning.models.PartialSku":"Microsoft.MachineLearningServices.PartialSku","com.azure.resourcemanager.machinelearning.models.Password":"Microsoft.MachineLearningServices.Password","com.azure.resourcemanager.machinelearning.models.PatAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.PATAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.PatchStatus":"Microsoft.MachineLearningServices.PatchStatus","com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialDto":"Microsoft.MachineLearningServices.PendingUploadCredentialDto","com.azure.resourcemanager.machinelearning.models.PendingUploadCredentialType":"Microsoft.MachineLearningServices.PendingUploadCredentialType","com.azure.resourcemanager.machinelearning.models.PendingUploadRequestDto":"Microsoft.MachineLearningServices.PendingUploadRequestDto","com.azure.resourcemanager.machinelearning.models.PendingUploadType":"Microsoft.MachineLearningServices.PendingUploadType","com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings":"Microsoft.MachineLearningServices.PersonalComputeInstanceSettings","com.azure.resourcemanager.machinelearning.models.PipelineJob":"Microsoft.MachineLearningServices.PipelineJob","com.azure.resourcemanager.machinelearning.models.PoolProvisioningState":"Microsoft.MachineLearningServices.PoolProvisioningState","com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase":"Microsoft.MachineLearningServices.PredictionDriftMetricThresholdBase","com.azure.resourcemanager.machinelearning.models.PredictionDriftMonitoringSignal":"Microsoft.MachineLearningServices.PredictionDriftMonitoringSignal","com.azure.resourcemanager.machinelearning.models.PrivateEndpoint":"Azure.ResourceManager.CommonTypes.PrivateEndpoint","com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState":"Microsoft.MachineLearningServices.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.machinelearning.models.PrivateEndpointDestination":"Microsoft.MachineLearningServices.PrivateEndpointDestination","com.azure.resourcemanager.machinelearning.models.PrivateEndpointOutboundRule":"Microsoft.MachineLearningServices.PrivateEndpointOutboundRule","com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource":"Microsoft.MachineLearningServices.PrivateEndpointResource","com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus":"Microsoft.MachineLearningServices.EndpointServiceConnectionStatus","com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState":"Microsoft.MachineLearningServices.PrivateLinkServiceConnectionState","com.azure.resourcemanager.machinelearning.models.ProbeSettings":"Microsoft.MachineLearningServices.ProbeSettings","com.azure.resourcemanager.machinelearning.models.PromptSettings":"Microsoft.MachineLearningServices.PromptSettings","com.azure.resourcemanager.machinelearning.models.PropertiesBase":"Microsoft.MachineLearningServices.PropertiesBase","com.azure.resourcemanager.machinelearning.models.Protocol":"Microsoft.MachineLearningServices.Protocol","com.azure.resourcemanager.machinelearning.models.ProvisioningState":"Microsoft.MachineLearningServices.ProvisioningState","com.azure.resourcemanager.machinelearning.models.ProvisioningStatus":"Microsoft.MachineLearningServices.ProvisioningStatus","com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess":"Microsoft.MachineLearningServices.PublicNetworkAccessType","com.azure.resourcemanager.machinelearning.models.PyTorch":"Microsoft.MachineLearningServices.PyTorch","com.azure.resourcemanager.machinelearning.models.QueueSettings":"Microsoft.MachineLearningServices.QueueSettings","com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties":"Microsoft.MachineLearningServices.QuotaBaseProperties","com.azure.resourcemanager.machinelearning.models.QuotaUnit":"Microsoft.MachineLearningServices.QuotaUnit","com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters":"Microsoft.MachineLearningServices.QuotaUpdateParameters","com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig":"Microsoft.MachineLearningServices.RaiBlocklistConfig","com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest":"Microsoft.MachineLearningServices.RaiBlocklistItemBulkRequest","com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties":"Microsoft.MachineLearningServices.RaiBlocklistItemProperties","com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties":"Microsoft.MachineLearningServices.RaiBlocklistProperties","com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter":"Microsoft.MachineLearningServices.RaiPolicyContentFilter","com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource":"Microsoft.MachineLearningServices.RaiPolicyContentSource","com.azure.resourcemanager.machinelearning.models.RaiPolicyMode":"Microsoft.MachineLearningServices.RaiPolicyMode","com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties":"Microsoft.MachineLearningServices.RaiPolicyProperties","com.azure.resourcemanager.machinelearning.models.RaiPolicyType":"Microsoft.MachineLearningServices.RaiPolicyType","com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm":"Microsoft.MachineLearningServices.RandomSamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithmRule":"Microsoft.MachineLearningServices.RandomSamplingAlgorithmRule","com.azure.resourcemanager.machinelearning.models.Ray":"Microsoft.MachineLearningServices.Ray","com.azure.resourcemanager.machinelearning.models.Recurrence":"Microsoft.MachineLearningServices.Recurrence","com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency":"Microsoft.MachineLearningServices.RecurrenceFrequency","com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule":"Microsoft.MachineLearningServices.RecurrenceSchedule","com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger":"Microsoft.MachineLearningServices.RecurrenceTrigger","com.azure.resourcemanager.machinelearning.models.ReferenceType":"Microsoft.MachineLearningServices.ReferenceType","com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest":"Microsoft.MachineLearningServices.RegenerateEndpointKeysRequest","com.azure.resourcemanager.machinelearning.models.RegenerateServiceAccountKeyContent":"Microsoft.MachineLearningServices.RegenerateServiceAccountKeyContent","com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult":"Microsoft.MachineLearningServices.RegistryListCredentialsResult","com.azure.resourcemanager.machinelearning.models.RegistryPartialManagedServiceIdentity":"Microsoft.MachineLearningServices.RegistryPartialManagedServiceIdentity","com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection":"Microsoft.MachineLearningServices.RegistryPrivateEndpointConnection","com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState":"Microsoft.MachineLearningServices.RegistryPrivateLinkServiceConnectionState","com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails":"Microsoft.MachineLearningServices.RegistryRegionArmDetails","com.azure.resourcemanager.machinelearning.models.Regression":"Microsoft.MachineLearningServices.Regression","com.azure.resourcemanager.machinelearning.models.RegressionModels":"Microsoft.MachineLearningServices.RegressionModels","com.azure.resourcemanager.machinelearning.models.RegressionPrimaryMetrics":"Microsoft.MachineLearningServices.RegressionPrimaryMetrics","com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings":"Microsoft.MachineLearningServices.RegressionTrainingSettings","com.azure.resourcemanager.machinelearning.models.RemoteLoginPortPublicAccess":"Microsoft.MachineLearningServices.RemoteLoginPortPublicAccess","com.azure.resourcemanager.machinelearning.models.RequestConfiguration":"Microsoft.MachineLearningServices.RequestConfiguration","com.azure.resourcemanager.machinelearning.models.RequestLogging":"Microsoft.MachineLearningServices.RequestLogging","com.azure.resourcemanager.machinelearning.models.ResizeSchema":"Microsoft.MachineLearningServices.ResizeSchema","com.azure.resourcemanager.machinelearning.models.ResourceBase":"Microsoft.MachineLearningServices.ResourceBase","com.azure.resourcemanager.machinelearning.models.ResourceConfiguration":"Microsoft.MachineLearningServices.ResourceConfiguration","com.azure.resourcemanager.machinelearning.models.ResourceId":"Microsoft.MachineLearningServices.ResourceId","com.azure.resourcemanager.machinelearning.models.ResourceName":"Microsoft.MachineLearningServices.ResourceName","com.azure.resourcemanager.machinelearning.models.RollingInputData":"Microsoft.MachineLearningServices.RollingInputData","com.azure.resourcemanager.machinelearning.models.RollingRateType":"Microsoft.MachineLearningServices.RollingRateType","com.azure.resourcemanager.machinelearning.models.Route":"Microsoft.MachineLearningServices.Route","com.azure.resourcemanager.machinelearning.models.RuleAction":"Microsoft.MachineLearningServices.RuleAction","com.azure.resourcemanager.machinelearning.models.RuleCategory":"Microsoft.MachineLearningServices.RuleCategory","com.azure.resourcemanager.machinelearning.models.RuleStatus":"Microsoft.MachineLearningServices.RuleStatus","com.azure.resourcemanager.machinelearning.models.RuleType":"Microsoft.MachineLearningServices.RuleType","com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm":"Microsoft.MachineLearningServices.SamplingAlgorithm","com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType":"Microsoft.MachineLearningServices.SamplingAlgorithmType","com.azure.resourcemanager.machinelearning.models.SasAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.SASAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.SasCredential":"Microsoft.MachineLearningServices.SASCredential","com.azure.resourcemanager.machinelearning.models.SasCredentialDto":"Microsoft.MachineLearningServices.SASCredentialDto","com.azure.resourcemanager.machinelearning.models.SasDatastoreCredentials":"Microsoft.MachineLearningServices.SasDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.SasDatastoreSecrets":"Microsoft.MachineLearningServices.SasDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.ScaleSettings":"Microsoft.MachineLearningServices.ScaleSettings","com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation":"Microsoft.MachineLearningServices.ScaleSettingsInformation","com.azure.resourcemanager.machinelearning.models.ScaleType":"Microsoft.MachineLearningServices.ScaleType","com.azure.resourcemanager.machinelearning.models.ScaleUnitConfiguration":"Microsoft.MachineLearningServices.ScaleUnitConfiguration","com.azure.resourcemanager.machinelearning.models.ScheduleActionBase":"Microsoft.MachineLearningServices.ScheduleActionBase","com.azure.resourcemanager.machinelearning.models.ScheduleActionType":"Microsoft.MachineLearningServices.ScheduleActionType","com.azure.resourcemanager.machinelearning.models.ScheduleBase":"Microsoft.MachineLearningServices.ScheduleBase","com.azure.resourcemanager.machinelearning.models.ScheduleListViewType":"Microsoft.MachineLearningServices.ScheduleListViewType","com.azure.resourcemanager.machinelearning.models.ScheduleProperties":"Microsoft.MachineLearningServices.ScheduleProperties","com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState":"Microsoft.MachineLearningServices.ScheduleProvisioningState","com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningStatus":"Microsoft.MachineLearningServices.ScheduleProvisioningStatus","com.azure.resourcemanager.machinelearning.models.ScheduleStatus":"Microsoft.MachineLearningServices.ScheduleStatus","com.azure.resourcemanager.machinelearning.models.ScriptReference":"Microsoft.MachineLearningServices.ScriptReference","com.azure.resourcemanager.machinelearning.models.ScriptsToExecute":"Microsoft.MachineLearningServices.ScriptsToExecute","com.azure.resourcemanager.machinelearning.models.Seasonality":"Microsoft.MachineLearningServices.Seasonality","com.azure.resourcemanager.machinelearning.models.SeasonalityMode":"Microsoft.MachineLearningServices.SeasonalityMode","com.azure.resourcemanager.machinelearning.models.SecretExpiry":"Microsoft.MachineLearningServices.SecretExpiry","com.azure.resourcemanager.machinelearning.models.SecretsType":"Microsoft.MachineLearningServices.SecretsType","com.azure.resourcemanager.machinelearning.models.ServerlessComputeSettings":"Microsoft.MachineLearningServices.ServerlessComputeSettings","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointCapacityReservation":"Microsoft.MachineLearningServices.ServerlessEndpointCapacityReservation","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointContentSafety":"Microsoft.MachineLearningServices.ServerlessEndpointContentSafety","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointInferenceEndpoint":"Microsoft.MachineLearningServices.ServerlessEndpointInferenceEndpoint","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointModelSettings":"Microsoft.MachineLearningServices.ServerlessEndpointModelSettings","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties":"Microsoft.MachineLearningServices.ServerlessEndpointProperties","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointResourceProperties":"Microsoft.MachineLearningServices.ServerlessEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.ServerlessEndpointState":"Microsoft.MachineLearningServices.ServerlessEndpointState","com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpoint":"Microsoft.MachineLearningServices.ServerlessInferenceEndpoint","com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode":"Microsoft.MachineLearningServices.ServerlessInferenceEndpointAuthMode","com.azure.resourcemanager.machinelearning.models.ServerlessOffer":"Microsoft.MachineLearningServices.ServerlessOffer","com.azure.resourcemanager.machinelearning.models.ServiceAccountKeyName":"Microsoft.MachineLearningServices.ServiceAccountKeyName","com.azure.resourcemanager.machinelearning.models.ServiceDataAccessAuthIdentity":"Microsoft.MachineLearningServices.ServiceDataAccessAuthIdentity","com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings":"Microsoft.MachineLearningServices.ServiceManagedResourcesSettings","com.azure.resourcemanager.machinelearning.models.ServicePrincipalAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.ServicePrincipalAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials":"Microsoft.MachineLearningServices.ServicePrincipalDatastoreCredentials","com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets":"Microsoft.MachineLearningServices.ServicePrincipalDatastoreSecrets","com.azure.resourcemanager.machinelearning.models.ServiceTagDestination":"Microsoft.MachineLearningServices.ServiceTagDestination","com.azure.resourcemanager.machinelearning.models.ServiceTagOutboundRule":"Microsoft.MachineLearningServices.ServiceTagOutboundRule","com.azure.resourcemanager.machinelearning.models.SetupScripts":"Microsoft.MachineLearningServices.SetupScripts","com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource":"Microsoft.MachineLearningServices.SharedPrivateLinkResource","com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration":"Microsoft.MachineLearningServices.ShortSeriesHandlingConfiguration","com.azure.resourcemanager.machinelearning.models.Sku":"Azure.ResourceManager.CommonTypes.Sku","com.azure.resourcemanager.machinelearning.models.SkuCapacity":"Microsoft.MachineLearningServices.SkuCapacity","com.azure.resourcemanager.machinelearning.models.SkuScaleType":"Microsoft.MachineLearningServices.SkuScaleType","com.azure.resourcemanager.machinelearning.models.SkuSetting":"Microsoft.MachineLearningServices.SkuSetting","com.azure.resourcemanager.machinelearning.models.SkuTier":"Azure.ResourceManager.CommonTypes.SkuTier","com.azure.resourcemanager.machinelearning.models.SourceType":"Microsoft.MachineLearningServices.SourceType","com.azure.resourcemanager.machinelearning.models.SparkJob":"Microsoft.MachineLearningServices.SparkJob","com.azure.resourcemanager.machinelearning.models.SparkJobEntry":"Microsoft.MachineLearningServices.SparkJobEntry","com.azure.resourcemanager.machinelearning.models.SparkJobEntryType":"Microsoft.MachineLearningServices.SparkJobEntryType","com.azure.resourcemanager.machinelearning.models.SparkJobPythonEntry":"Microsoft.MachineLearningServices.SparkJobPythonEntry","com.azure.resourcemanager.machinelearning.models.SparkJobScalaEntry":"Microsoft.MachineLearningServices.SparkJobScalaEntry","com.azure.resourcemanager.machinelearning.models.SparkResourceConfiguration":"Microsoft.MachineLearningServices.SparkResourceConfiguration","com.azure.resourcemanager.machinelearning.models.SpeechEndpointDeploymentResourceProperties":"Microsoft.MachineLearningServices.SpeechEndpointDeploymentResourceProperties","com.azure.resourcemanager.machinelearning.models.SpeechEndpointResourceProperties":"Microsoft.MachineLearningServices.SpeechEndpointResourceProperties","com.azure.resourcemanager.machinelearning.models.SshPublicAccess":"Microsoft.MachineLearningServices.SshPublicAccess","com.azure.resourcemanager.machinelearning.models.SslConfigStatus":"Microsoft.MachineLearningServices.SslConfigStatus","com.azure.resourcemanager.machinelearning.models.SslConfiguration":"Microsoft.MachineLearningServices.SslConfiguration","com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings":"Microsoft.MachineLearningServices.StackEnsembleSettings","com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType":"Microsoft.MachineLearningServices.StackMetaLearnerType","com.azure.resourcemanager.machinelearning.models.StaticInputData":"Microsoft.MachineLearningServices.StaticInputData","com.azure.resourcemanager.machinelearning.models.Status":"Microsoft.MachineLearningServices.Status","com.azure.resourcemanager.machinelearning.models.StochasticOptimizer":"Microsoft.MachineLearningServices.StochasticOptimizer","com.azure.resourcemanager.machinelearning.models.StorageAccountDetails":"Microsoft.MachineLearningServices.StorageAccountDetails","com.azure.resourcemanager.machinelearning.models.StorageAccountType":"Microsoft.MachineLearningServices.StorageAccountType","com.azure.resourcemanager.machinelearning.models.StringStringKeyValuePair":"Microsoft.MachineLearningServices.StringStringKeyValuePair","com.azure.resourcemanager.machinelearning.models.SweepJob":"Microsoft.MachineLearningServices.SweepJob","com.azure.resourcemanager.machinelearning.models.SweepJobLimits":"Microsoft.MachineLearningServices.SweepJobLimits","com.azure.resourcemanager.machinelearning.models.SynapseSpark":"Microsoft.MachineLearningServices.SynapseSpark","com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties":"Microsoft.MachineLearningServices.SynapseSparkProperties","com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount":"Microsoft.MachineLearningServices.SystemCreatedAcrAccount","com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount":"Microsoft.MachineLearningServices.SystemCreatedStorageAccount","com.azure.resourcemanager.machinelearning.models.SystemDatastoresAuthMode":"Microsoft.MachineLearningServices.SystemDatastoresAuthMode","com.azure.resourcemanager.machinelearning.models.SystemService":"Microsoft.MachineLearningServices.SystemService","com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings":"Microsoft.MachineLearningServices.TableVerticalFeaturizationSettings","com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings":"Microsoft.MachineLearningServices.TableVerticalLimitSettings","com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction":"Microsoft.MachineLearningServices.TargetAggregationFunction","com.azure.resourcemanager.machinelearning.models.TargetLags":"Microsoft.MachineLearningServices.TargetLags","com.azure.resourcemanager.machinelearning.models.TargetLagsMode":"Microsoft.MachineLearningServices.TargetLagsMode","com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize":"Microsoft.MachineLearningServices.TargetRollingWindowSize","com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSizeMode":"Microsoft.MachineLearningServices.TargetRollingWindowSizeMode","com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings":"Microsoft.MachineLearningServices.TargetUtilizationScaleSettings","com.azure.resourcemanager.machinelearning.models.TaskType":"Microsoft.MachineLearningServices.TaskType","com.azure.resourcemanager.machinelearning.models.TeacherModelEndpoint":"Microsoft.MachineLearningServices.TeacherModelEndpoint","com.azure.resourcemanager.machinelearning.models.TeacherModelEndpointRequestSettings":"Microsoft.MachineLearningServices.TeacherModelEndpointRequestSettings","com.azure.resourcemanager.machinelearning.models.TeacherModelSettings":"Microsoft.MachineLearningServices.TeacherModelSettings","com.azure.resourcemanager.machinelearning.models.TensorFlow":"Microsoft.MachineLearningServices.TensorFlow","com.azure.resourcemanager.machinelearning.models.TextClassification":"Microsoft.MachineLearningServices.TextClassification","com.azure.resourcemanager.machinelearning.models.TextClassificationMultilabel":"Microsoft.MachineLearningServices.TextClassificationMultilabel","com.azure.resourcemanager.machinelearning.models.TextNer":"Microsoft.MachineLearningServices.TextNer","com.azure.resourcemanager.machinelearning.models.TmpfsOptions":"Microsoft.MachineLearningServices.TmpfsOptions","com.azure.resourcemanager.machinelearning.models.TopNFeaturesByAttribution":"Microsoft.MachineLearningServices.TopNFeaturesByAttribution","com.azure.resourcemanager.machinelearning.models.TrainingSettings":"Microsoft.MachineLearningServices.TrainingSettings","com.azure.resourcemanager.machinelearning.models.TrialComponent":"Microsoft.MachineLearningServices.TrialComponent","com.azure.resourcemanager.machinelearning.models.TriggerBase":"Microsoft.MachineLearningServices.TriggerBase","com.azure.resourcemanager.machinelearning.models.TriggerType":"Microsoft.MachineLearningServices.TriggerType","com.azure.resourcemanager.machinelearning.models.TritonModelJobInput":"Microsoft.MachineLearningServices.TritonModelJobInput","com.azure.resourcemanager.machinelearning.models.TritonModelJobOutput":"Microsoft.MachineLearningServices.TritonModelJobOutput","com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy":"Microsoft.MachineLearningServices.TruncationSelectionPolicy","com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction":"Microsoft.MachineLearningServices.UnderlyingResourceAction","com.azure.resourcemanager.machinelearning.models.UnitOfMeasure":"Microsoft.MachineLearningServices.UnitOfMeasure","com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas":"Microsoft.MachineLearningServices.UpdateWorkspaceQuotas","com.azure.resourcemanager.machinelearning.models.UriFileDataVersion":"Microsoft.MachineLearningServices.UriFileDataVersion","com.azure.resourcemanager.machinelearning.models.UriFileJobInput":"Microsoft.MachineLearningServices.UriFileJobInput","com.azure.resourcemanager.machinelearning.models.UriFileJobOutput":"Microsoft.MachineLearningServices.UriFileJobOutput","com.azure.resourcemanager.machinelearning.models.UriFolderDataVersion":"Microsoft.MachineLearningServices.UriFolderDataVersion","com.azure.resourcemanager.machinelearning.models.UriFolderJobInput":"Microsoft.MachineLearningServices.UriFolderJobInput","com.azure.resourcemanager.machinelearning.models.UriFolderJobOutput":"Microsoft.MachineLearningServices.UriFolderJobOutput","com.azure.resourcemanager.machinelearning.models.UsageName":"Microsoft.MachineLearningServices.UsageName","com.azure.resourcemanager.machinelearning.models.UsageUnit":"Microsoft.MachineLearningServices.UsageUnit","com.azure.resourcemanager.machinelearning.models.UseStl":"Microsoft.MachineLearningServices.UseStl","com.azure.resourcemanager.machinelearning.models.UserAccountCredentials":"Microsoft.MachineLearningServices.UserAccountCredentials","com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity":"Azure.ResourceManager.CommonTypes.UserAssignedIdentity","com.azure.resourcemanager.machinelearning.models.UserIdentity":"Microsoft.MachineLearningServices.UserIdentity","com.azure.resourcemanager.machinelearning.models.UsernamePasswordAuthTypeWorkspaceConnectionProperties":"Microsoft.MachineLearningServices.UsernamePasswordAuthTypeWorkspaceConnectionProperties","com.azure.resourcemanager.machinelearning.models.VMPriceOSType":"Microsoft.MachineLearningServices.VMPriceOSType","com.azure.resourcemanager.machinelearning.models.VMTier":"Microsoft.MachineLearningServices.VMTier","com.azure.resourcemanager.machinelearning.models.ValidationMetricType":"Microsoft.MachineLearningServices.ValidationMetricType","com.azure.resourcemanager.machinelearning.models.VirtualMachine":"Microsoft.MachineLearningServices.VirtualMachine","com.azure.resourcemanager.machinelearning.models.VirtualMachineImage":"Microsoft.MachineLearningServices.VirtualMachineImage","com.azure.resourcemanager.machinelearning.models.VirtualMachineSchemaProperties":"Microsoft.MachineLearningServices.VirtualMachineSchemaProperties","com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets":"Microsoft.MachineLearningServices.VirtualMachineSecrets","com.azure.resourcemanager.machinelearning.models.VirtualMachineSize":"Microsoft.MachineLearningServices.VirtualMachineSize","com.azure.resourcemanager.machinelearning.models.VirtualMachineSshCredentials":"Microsoft.MachineLearningServices.VirtualMachineSshCredentials","com.azure.resourcemanager.machinelearning.models.VmPriority":"Microsoft.MachineLearningServices.VmPriority","com.azure.resourcemanager.machinelearning.models.VolumeDefinition":"Microsoft.MachineLearningServices.VolumeDefinition","com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType":"Microsoft.MachineLearningServices.VolumeDefinitionType","com.azure.resourcemanager.machinelearning.models.VolumeOptions":"Microsoft.MachineLearningServices.VolumeOptions","com.azure.resourcemanager.machinelearning.models.VulnerabilityDetails":"Microsoft.MachineLearningServices.VulnerabilityDetails","com.azure.resourcemanager.machinelearning.models.VulnerabilityFindings":"Microsoft.MachineLearningServices.VulnerabilityFindings","com.azure.resourcemanager.machinelearning.models.VulnerabilityRisk":"Microsoft.MachineLearningServices.VulnerabilityRisk","com.azure.resourcemanager.machinelearning.models.Webhook":"Microsoft.MachineLearningServices.Webhook","com.azure.resourcemanager.machinelearning.models.WebhookType":"Microsoft.MachineLearningServices.WebhookType","com.azure.resourcemanager.machinelearning.models.WeekDay":"Microsoft.MachineLearningServices.WeekDay","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey":"Microsoft.MachineLearningServices.WorkspaceConnectionAccessKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccountKey":"Microsoft.MachineLearningServices.WorkspaceConnectionAccountKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionApiKey":"Microsoft.MachineLearningServices.WorkspaceConnectionApiKey","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionManagedIdentity":"Microsoft.MachineLearningServices.WorkspaceConnectionManagedIdentity","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionOAuth2":"Microsoft.MachineLearningServices.WorkspaceConnectionOAuth2","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPersonalAccessToken":"Microsoft.MachineLearningServices.WorkspaceConnectionPersonalAccessToken","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2":"Microsoft.MachineLearningServices.WorkspaceConnectionPropertiesV2","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionServicePrincipal":"Microsoft.MachineLearningServices.WorkspaceConnectionServicePrincipal","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionSharedAccessSignature":"Microsoft.MachineLearningServices.WorkspaceConnectionSharedAccessSignature","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUpdateParameter":"Microsoft.MachineLearningServices.WorkspaceConnectionUpdateParameter","com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionUsernamePassword":"Microsoft.MachineLearningServices.WorkspaceConnectionUsernamePassword","com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig":"Microsoft.MachineLearningServices.WorkspaceHubConfig","com.azure.resourcemanager.machinelearning.models.WorkspacePrivateEndpointResource":"Microsoft.MachineLearningServices.WorkspacePrivateEndpointResource"},"generatedFiles":["src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturesetVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/FeaturestoreEntityVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/MachineLearningManagementClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkProvisionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ManagedNetworkSettingsRulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/MarketplaceSubscriptionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/OutboundRulesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PTUQuotasClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesOperationsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistriesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryCodeVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryComponentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataReferencesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryDataVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryEnvironmentVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelContainersClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/RegistryModelVersionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/ServerlessEndpointsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AvailableQuotaInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointDeploymentResourcePropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeatureInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionBackfillResponseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturesetVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/FeaturestoreEntityVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GetBlobReferenceSasResponseDtoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkProvisionStatusInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ManagedNetworkSettingsPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/MarketplaceSubscriptionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OutboundRuleBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PendingUploadResponseDtoInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryPrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RegistryProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ServerlessEndpointInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParametersInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceUpdateParametersInner.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointKeysImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeatureImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionBackfillResponseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturesetVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/FeaturestoreEntityVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/GetBlobReferenceSasResponseDtoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MachineLearningManagementClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionStatusImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkSettingsRulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/MarketplaceSubscriptionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRuleBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/OutboundRulesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PTUQuotasImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PendingUploadResponseDtoImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesOperationsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistriesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryCodeVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryComponentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataReferencesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryDataVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryEnvironmentVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelContainersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/RegistryModelVersionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/ServerlessEndpointsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageAndQuotaDetailsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesUpdateParametersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceUpdateParametersImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AmlComputeNodesInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/AvailableQuotaArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchDeploymentTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/BatchEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/CodeVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ComponentVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DataVersionBaseResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/DatastoreResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/EnvironmentVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeatureResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturesetVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/FeaturestoreEntityVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferenceGroupTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/InferencePoolTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/JobBaseResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListAmlUserFeatureResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListUsagesResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ListWorkspaceQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ManagedNetworkListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/MarketplaceSubscriptionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelContainerResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ModelVersionResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OnlineEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/OutboundRuleListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PaginatedComputeResourcesList.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/RegistryTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ScheduleResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/ServerlessEndpointTrackedResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/SkuResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/StringArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/UsageAndQuotaDetailsArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/models/WorkspaceListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AadAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccessKeyAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountApiKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AcrDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllFeatures.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllNodes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ApiKeyAuthWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ArmResourceId.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDevOpsWebhook.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java","src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentConfigurationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchPipelineComponentDeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BindOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BlobReferenceForConsumptionDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHost.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Collection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRecurrenceSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeTriggerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeWeekDay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionGroup.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItems.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPoliciesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafety.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CreateMonitorAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Cron.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomKeysWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelFineTuning.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataAvailabilityStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollectionMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataCollector.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataGenerationVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataQualityMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataReferenceCredentialType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatasetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DestinationAsset.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistillationJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Docker.java","src/main/java/com/azure/resourcemanager/machinelearning/models/DockerCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EmailNotificationEnableType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionUpdateProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointKeys.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariable.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVariableType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java","src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Feature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureAttributionMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureImportanceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureStoreSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureSubset.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureWindow.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Features.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetSpecification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionBackfillResponse.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturesetVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturestoreEntityVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FinetuningDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FixedInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java","src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceForConsumptionDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasRequestDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GetBlobReferenceSasResponseDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java","src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IPRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Image.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageMetadata.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IndexColumn.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroup.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.java","src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/IsolationMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java","src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LabelGeneration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LakeHouseArtifact.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedComputeIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkKind.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkProvisions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsEx.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkSettingsRules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedNetworkStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplacePlan.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscription.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationComputeResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MaterializationStoreType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelTaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeConfigurationBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeIdentityType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorComputeType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorDefinition.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorEmailNotificationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorNotificationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitorServerlessSparkCompute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringFeatureFilterType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringInputDataType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringNotificationType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringSignalType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringTarget.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MonitoringThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Network.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Nodes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NodesValueType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NotificationSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetric.java","src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OAuth2AuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifact.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeArtifactType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OneLakeDatastore.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Operation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Origin.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRuleBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutboundRulesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PTUDeploymentUsage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PTUQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSkuAndIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialRegistryPartialTrackedResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Password.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadCredentialType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadRequestDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadResponseDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PendingUploadType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMetricThresholdBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointDestination.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PromptSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Protocol.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QueueSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.java","src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPoliciesOperations.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Ray.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Recurrence.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Registries.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Registry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryCodeVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryComponentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataReferences.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryDataVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryEnvironmentVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelContainers.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryModelVersions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPartialManagedServiceIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryPrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryRegionArmDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RequestLogging.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RollingInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RollingRateType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleCategory.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/RuleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredential.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasCredentialDto.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessComputeSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointState.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpoints.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessInferenceEndpointAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagDestination.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceTagOutboundRule.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobEntryType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobPythonEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkJobScalaEntry.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SparkResourceConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StaticInputData.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/StringStringKeyValuePair.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedAcrAccount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemCreatedStorageAccount.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpoint.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelEndpointRequestSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TeacherModelSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TmpfsOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TopNFeaturesByAttribution.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.java","src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinition.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeDefinitionType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VolumeOptions.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java","src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Webhook.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WebhookType.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccessKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionApiKey.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionOAuth2.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionServicePrincipal.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceHubConfig.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePropertiesUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java","src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java","src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java","src/main/java/com/azure/resourcemanager/machinelearning/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java index 8c6366845fb5..819ea0eac038 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java @@ -4,8 +4,8 @@ package com.azure.resourcemanager.machinelearning.generated; -import com.azure.resourcemanager.machinelearning.models.AKS; -import com.azure.resourcemanager.machinelearning.models.AKSSchemaProperties; +import com.azure.resourcemanager.machinelearning.models.Aks; +import com.azure.resourcemanager.machinelearning.models.AksSchemaProperties; import com.azure.resourcemanager.machinelearning.models.AmlCompute; import com.azure.resourcemanager.machinelearning.models.AmlComputeProperties; import com.azure.resourcemanager.machinelearning.models.ApplicationSharingPolicy; @@ -68,10 +68,10 @@ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning. .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new AKS().withDescription("some compute") + .withProperties(new Aks().withDescription("some compute") .withResourceId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AKSSchemaProperties().withAgentCount(4))) + .withProperties(new AksSchemaProperties().withAgentCount(4))) .create(); } @@ -88,7 +88,7 @@ public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning. .define("compute123") .withExistingWorkspace("testrg123", "workspaces123") .withRegion("eastus") - .withProperties(new AKS()) + .withProperties(new Aks()) .create(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AKSNetworkingConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java similarity index 69% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AKSNetworkingConfigurationTests.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java index e9baf26a565a..f44d7fb61b1f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AKSNetworkingConfigurationTests.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java @@ -5,31 +5,31 @@ package com.azure.resourcemanager.machinelearning.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AKSNetworkingConfiguration; +import com.azure.resourcemanager.machinelearning.models.AksNetworkingConfiguration; import org.junit.jupiter.api.Assertions; -public final class AKSNetworkingConfigurationTests { +public final class AksNetworkingConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AKSNetworkingConfiguration model = BinaryData.fromString( + AksNetworkingConfiguration model = BinaryData.fromString( "{\"subnetId\":\"quxpjhcfaara\",\"serviceCidr\":\"iovmufzgugrblwal\",\"dnsServiceIP\":\"ssnqe\",\"dockerBridgeCidr\":\"otbptg\"}") - .toObject(AKSNetworkingConfiguration.class); + .toObject(AksNetworkingConfiguration.class); Assertions.assertEquals("quxpjhcfaara", model.subnetId()); Assertions.assertEquals("iovmufzgugrblwal", model.serviceCidr()); - Assertions.assertEquals("ssnqe", model.dnsServiceIP()); + Assertions.assertEquals("ssnqe", model.dnsServiceIp()); Assertions.assertEquals("otbptg", model.dockerBridgeCidr()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AKSNetworkingConfiguration model = new AKSNetworkingConfiguration().withSubnetId("quxpjhcfaara") + AksNetworkingConfiguration model = new AksNetworkingConfiguration().withSubnetId("quxpjhcfaara") .withServiceCidr("iovmufzgugrblwal") - .withDnsServiceIP("ssnqe") + .withDnsServiceIp("ssnqe") .withDockerBridgeCidr("otbptg"); - model = BinaryData.fromObject(model).toObject(AKSNetworkingConfiguration.class); + model = BinaryData.fromObject(model).toObject(AksNetworkingConfiguration.class); Assertions.assertEquals("quxpjhcfaara", model.subnetId()); Assertions.assertEquals("iovmufzgugrblwal", model.serviceCidr()); - Assertions.assertEquals("ssnqe", model.dnsServiceIP()); + Assertions.assertEquals("ssnqe", model.dnsServiceIp()); Assertions.assertEquals("otbptg", model.dockerBridgeCidr()); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml b/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml index 3f65a75c1174..2a1567a46927 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/machinelearningservices/MachineLearningServices.Management -commit: 96406064213bc7e5ee56208866e698fa679e42e8 +commit: 00ba16307ce7d82e80ad67cff0849a183f19a788 repo: Azure/azure-rest-api-specs additionalDirectories: From 1fdd925fc2fbc4ea03d002f42c925126c25a662e Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 23 Jul 2026 02:31:09 +0000 Subject: [PATCH 3/4] Configurations: 'specification/machinelearningservices/MachineLearningServices.Management/tspconfig.yaml', and CommitSHA: '00ba16307ce7d82e80ad67cff0849a183f19a788' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6605345 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 640 +++++++++--------- 1 file changed, 320 insertions(+), 320 deletions(-) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index ccbd85fa47e1..779d04dace5e 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.0-beta.1 (2026-07-22) +## 1.2.0-beta.1 (2026-07-23) - Azure Resource Manager Machine Learning client library for Java. This package contains Microsoft Azure SDK for Machine Learning Management SDK. These APIs allow end users to operate on Azure Machine Learning Workspace resources. Package api-version 2026-05-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). @@ -161,9 +161,9 @@ #### `models.EstimatedVMPrice` was modified * `EstimatedVMPrice()` was changed to private access +* `withRetailPrice(double)` was removed * `validate()` was removed * `withVmTier(models.VMTier)` was removed -* `withRetailPrice(double)` was removed * `withOsType(models.VMPriceOSType)` was removed #### `models.ScaleSettingsInformation` was modified @@ -172,19 +172,19 @@ #### `models.WorkspaceConnectionPropertiesV2` was modified +* `value()` was removed * `validate()` was removed * `withValue(java.lang.String)` was removed -* `value()` was removed * `valueFormat()` was removed * `withValueFormat(models.ValueFormat)` was removed #### `models.BanditPolicy` was modified * `java.lang.Float slackFactor()` -> `java.lang.Double slackFactor()` -* `withSlackAmount(java.lang.Float)` was removed +* `java.lang.Float slackAmount()` -> `java.lang.Double slackAmount()` * `withSlackFactor(java.lang.Float)` was removed * `validate()` was removed -* `java.lang.Float slackAmount()` -> `java.lang.Double slackAmount()` +* `withSlackAmount(java.lang.Float)` was removed #### `models.JobResourceConfiguration` was modified @@ -233,34 +233,34 @@ #### `models.ImageModelSettingsObjectDetection` was modified -* `withStepLRGamma(java.lang.Float)` was removed -* `withBeta1(java.lang.Float)` was removed -* `withValidationIouThreshold(java.lang.Float)` was removed -* `withLearningRate(java.lang.Float)` was removed * `withBeta2(java.lang.Float)` was removed -* `withNmsIouThreshold(java.lang.Float)` was removed +* `java.lang.Float nmsIouThreshold()` -> `java.lang.Double nmsIouThreshold()` +* `validate()` was removed +* `withLearningRate(java.lang.Float)` was removed +* `withBoxScoreThreshold(java.lang.Float)` was removed * `withWeightDecay(java.lang.Float)` was removed -* `java.lang.Float tilePredictionsNmsThreshold()` -> `java.lang.Double tilePredictionsNmsThreshold()` +* `withBeta1(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed +* `withNmsIouThreshold(java.lang.Float)` was removed +* `withStepLRGamma(java.lang.Float)` was removed +* `withValidationIouThreshold(java.lang.Float)` was removed * `withTileOverlapRatio(java.lang.Float)` was removed +* `java.lang.Float validationIouThreshold()` -> `java.lang.Double validationIouThreshold()` * `withWarmupCosineLRCycles(java.lang.Float)` was removed -* `java.lang.Float tileOverlapRatio()` -> `java.lang.Double tileOverlapRatio()` -* `validate()` was removed -* `withBoxScoreThreshold(java.lang.Float)` was removed +* `java.lang.Float tilePredictionsNmsThreshold()` -> `java.lang.Double tilePredictionsNmsThreshold()` * `java.lang.Float boxScoreThreshold()` -> `java.lang.Double boxScoreThreshold()` -* `java.lang.Float validationIouThreshold()` -> `java.lang.Double validationIouThreshold()` * `withTilePredictionsNmsThreshold(java.lang.Float)` was removed -* `withMomentum(java.lang.Float)` was removed -* `java.lang.Float nmsIouThreshold()` -> `java.lang.Double nmsIouThreshold()` +* `java.lang.Float tileOverlapRatio()` -> `java.lang.Double tileOverlapRatio()` #### `models.ManagedIdentityCredential` was modified * `ManagedIdentityCredential()` was changed to private access -* `validate()` was removed -* `withUserManagedIdentityClientId(java.lang.String)` was removed -* `withUserManagedIdentityTenantId(java.lang.String)` was removed -* `withUserManagedIdentityPrincipalId(java.lang.String)` was removed * `withManagedIdentityType(java.lang.String)` was removed +* `withUserManagedIdentityTenantId(java.lang.String)` was removed +* `withUserManagedIdentityClientId(java.lang.String)` was removed * `withUserManagedIdentityResourceId(java.lang.String)` was removed +* `validate()` was removed +* `withUserManagedIdentityPrincipalId(java.lang.String)` was removed #### `models.AmlToken` was modified @@ -292,11 +292,11 @@ #### `models.SynapseSpark` was modified -* `isAttachedCompute()` was removed * `validate()` was removed +* `modifiedOn()` was removed +* `isAttachedCompute()` was removed * `provisioningErrors()` was removed * `createdOn()` was removed -* `modifiedOn()` was removed * `provisioningState()` was removed #### `models.ScheduleProperties` was modified @@ -349,8 +349,8 @@ #### `models.AcrDetails` was modified -* `validate()` was removed * `withUserCreatedAcrAccount(models.UserCreatedAcrAccount)` was removed +* `validate()` was removed * `userCreatedAcrAccount()` was removed #### `models.CodeConfiguration` was modified @@ -373,8 +373,8 @@ * `DockerCredential()` was changed to private access * `validate()` was removed -* `withPassword(java.lang.String)` was removed * `withUsername(java.lang.String)` was removed +* `withPassword(java.lang.String)` was removed #### `models.BatchDeploymentProperties` was modified @@ -386,12 +386,12 @@ #### `models.Aks` was modified -* `provisioningErrors()` was removed -* `isAttachedCompute()` was removed * `validate()` was removed -* `provisioningState()` was removed * `modifiedOn()` was removed +* `provisioningState()` was removed +* `isAttachedCompute()` was removed * `createdOn()` was removed +* `provisioningErrors()` was removed #### `models.CustomMetricThreshold` was modified @@ -415,11 +415,11 @@ #### `models.DataLakeAnalytics` was modified -* `provisioningState()` was removed -* `createdOn()` was removed -* `validate()` was removed * `isAttachedCompute()` was removed +* `validate()` was removed * `modifiedOn()` was removed +* `createdOn()` was removed +* `provisioningState()` was removed * `provisioningErrors()` was removed #### `models.AutoTargetRollingWindowSize` was modified @@ -550,8 +550,8 @@ #### `models.OneLakeDatastore` was modified -* `validate()` was removed * `isDefault()` was removed +* `validate()` was removed #### `models.AmlComputeNodeInformation` was modified @@ -624,11 +624,11 @@ #### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified -* `group()` was removed -* `withValueFormat(models.ValueFormat)` was removed +* `validate()` was removed * `createdByWorkspaceArmId()` was removed * `withValue(java.lang.String)` was removed -* `validate()` was removed +* `group()` was removed +* `withValueFormat(models.ValueFormat)` was removed #### `models.BatchEndpointDefaults` was modified @@ -652,8 +652,8 @@ #### `models.AzureDataLakeGen1Datastore` was modified -* `validate()` was removed * `isDefault()` was removed +* `validate()` was removed #### `models.BindOptions` was modified @@ -661,16 +661,16 @@ #### `models.Workspaces` was modified -* `listByResourceGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed * `list(java.lang.String,com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed #### `models.Kubernetes` was modified * `isAttachedCompute()` was removed +* `provisioningErrors()` was removed * `validate()` was removed * `createdOn()` was removed * `provisioningState()` was removed -* `provisioningErrors()` was removed * `modifiedOn()` was removed #### `models.AllFeatures` was modified @@ -679,8 +679,8 @@ #### `models.ManagedOnlineDeployment` was modified -* `validate()` was removed * `provisioningState()` was removed +* `validate()` was removed #### `models.NodeStateCounts` was modified @@ -719,19 +719,19 @@ * `withValueFormat(models.ValueFormat)` was removed * `group()` was removed -* `createdByWorkspaceArmId()` was removed * `validate()` was removed * `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed #### `models.FeatureProperties` was modified * `FeatureProperties()` was changed to private access -* `withTags(java.util.Map)` was removed * `withDescription(java.lang.String)` was removed * `withFeatureName(java.lang.String)` was removed * `withProperties(java.util.Map)` was removed -* `validate()` was removed * `withDataType(models.FeatureDataType)` was removed +* `validate()` was removed +* `withTags(java.util.Map)` was removed #### `models.CustomModelJobInput` was modified @@ -755,9 +755,9 @@ #### `models.RegistryPartialManagedServiceIdentity` was modified +* `validate()` was removed * `java.util.UUID tenantId()` -> `java.lang.String tenantId()` * `java.util.UUID principalId()` -> `java.lang.String principalId()` -* `validate()` was removed #### `models.UriFolderDataVersion` was modified @@ -786,11 +786,11 @@ #### `models.ComputeInstanceDataDisk` was modified * `ComputeInstanceDataDisk()` was changed to private access -* `validate()` was removed +* `withLun(java.lang.Integer)` was removed * `withStorageAccountType(models.StorageAccountType)` was removed -* `withDiskSizeGB(java.lang.Integer)` was removed * `withCaching(models.Caching)` was removed -* `withLun(java.lang.Integer)` was removed +* `validate()` was removed +* `withDiskSizeGB(java.lang.Integer)` was removed #### `models.RegistryPrivateEndpointConnection` was modified @@ -807,37 +807,37 @@ #### `models.ComputeInstanceApplication` was modified * `ComputeInstanceApplication()` was changed to private access -* `withEndpointUri(java.lang.String)` was removed -* `withDisplayName(java.lang.String)` was removed * `validate()` was removed +* `withDisplayName(java.lang.String)` was removed +* `withEndpointUri(java.lang.String)` was removed #### `models.PrivateLinkResource` was modified * `PrivateLinkResource()` was removed +* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` +* `withSku(models.Sku)` was removed * `java.lang.String name()` -> `java.lang.String name()` -* `java.lang.String type()` -> `java.lang.String type()` -* `withTags(java.util.Map)` was removed -* `fromJson(com.azure.json.JsonReader)` was removed +* `withRequiredZoneNames(java.util.List)` was removed * `java.util.List requiredMembers()` -> `java.util.List requiredMembers()` -* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` * `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` -* `withSku(models.Sku)` was removed +* `java.lang.String id()` -> `java.lang.String id()` +* `models.Sku sku()` -> `models.Sku sku()` +* `withLocation(java.lang.String)` was removed * `toJson(com.azure.json.JsonWriter)` was removed -* `withRequiredZoneNames(java.util.List)` was removed +* `withTags(java.util.Map)` was removed +* `java.lang.String type()` -> `java.lang.String type()` * `java.util.Map tags()` -> `java.util.Map tags()` -* `validate()` was removed -* `models.Sku sku()` -> `models.Sku sku()` -* `java.lang.String location()` -> `java.lang.String location()` +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `fromJson(com.azure.json.JsonReader)` was removed * `java.lang.String groupId()` -> `java.lang.String groupId()` +* `java.lang.String location()` -> `java.lang.String location()` +* `validate()` was removed * `withIdentity(models.ManagedServiceIdentity)` was removed -* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` -* `withLocation(java.lang.String)` was removed -* `java.lang.String id()` -> `java.lang.String id()` #### `models.PipelineJob` was modified -* `status()` was removed * `validate()` was removed +* `status()` was removed #### `models.Password` was modified @@ -858,9 +858,9 @@ #### `models.StorageAccountDetails` was modified -* `validate()` was removed -* `userCreatedStorageAccount()` was removed * `withUserCreatedStorageAccount(models.UserCreatedStorageAccount)` was removed +* `userCreatedStorageAccount()` was removed +* `validate()` was removed #### `models.PartialMinimalTrackedResource` was modified @@ -905,10 +905,10 @@ #### `models.VirtualMachine` was modified * `createdOn()` was removed +* `validate()` was removed * `provisioningErrors()` was removed -* `isAttachedCompute()` was removed * `provisioningState()` was removed -* `validate()` was removed +* `isAttachedCompute()` was removed * `modifiedOn()` was removed #### `models.RegressionTrainingSettings` was modified @@ -922,17 +922,17 @@ #### `models.UpdateWorkspaceQuotas` was modified * `UpdateWorkspaceQuotas()` was changed to private access -* `withLimit(java.lang.Long)` was removed * `withStatus(models.Status)` was removed * `validate()` was removed +* `withLimit(java.lang.Long)` was removed #### `models.AmlCompute` was modified -* `isAttachedCompute()` was removed -* `validate()` was removed -* `provisioningErrors()` was removed * `provisioningState()` was removed +* `isAttachedCompute()` was removed * `modifiedOn()` was removed +* `provisioningErrors()` was removed +* `validate()` was removed * `createdOn()` was removed #### `models.AzureDataLakeGen2Datastore` was modified @@ -946,14 +946,14 @@ #### `models.ImageModelSettingsClassification` was modified +* `withMomentum(java.lang.Float)` was removed * `withBeta1(java.lang.Float)` was removed * `withWarmupCosineLRCycles(java.lang.Float)` was removed -* `validate()` was removed * `withStepLRGamma(java.lang.Float)` was removed -* `withLearningRate(java.lang.Float)` was removed * `withWeightDecay(java.lang.Float)` was removed -* `withMomentum(java.lang.Float)` was removed * `withBeta2(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed +* `validate()` was removed #### `models.QueueSettings` was modified @@ -974,12 +974,12 @@ #### `models.Databricks` was modified +* `modifiedOn()` was removed * `isAttachedCompute()` was removed * `provisioningErrors()` was removed * `validate()` was removed -* `provisioningState()` was removed -* `modifiedOn()` was removed * `createdOn()` was removed +* `provisioningState()` was removed #### `models.PrivateEndpointConnection$Update` was modified @@ -1003,11 +1003,11 @@ #### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed * `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed * `group()` was removed * `validate()` was removed -* `withValue(java.lang.String)` was removed #### `models.UriFileJobInput` was modified @@ -1015,12 +1015,12 @@ #### `models.ComputeInstance` was modified +* `provisioningState()` was removed +* `validate()` was removed * `isAttachedCompute()` was removed * `modifiedOn()` was removed -* `provisioningErrors()` was removed -* `provisioningState()` was removed * `createdOn()` was removed -* `validate()` was removed +* `provisioningErrors()` was removed #### `models.AnonymousAccessCredential` was modified @@ -1030,9 +1030,9 @@ #### `models.SkuCapacity` was modified * `SkuCapacity()` was changed to private access +* `withDefaultProperty(java.lang.Integer)` was removed * `withScaleType(models.SkuScaleType)` was removed * `validate()` was removed -* `withDefaultProperty(java.lang.Integer)` was removed * `withMaximum(java.lang.Integer)` was removed * `withMinimum(java.lang.Integer)` was removed @@ -1055,12 +1055,12 @@ #### `models.ComputeInstanceContainer` was modified * `ComputeInstanceContainer()` was changed to private access -* `validate()` was removed -* `withName(java.lang.String)` was removed -* `withEnvironment(models.ComputeInstanceEnvironmentInfo)` was removed -* `withNetwork(models.Network)` was removed -* `withGpu(java.lang.String)` was removed * `withAutosave(models.Autosave)` was removed +* `withGpu(java.lang.String)` was removed +* `withNetwork(models.Network)` was removed +* `withEnvironment(models.ComputeInstanceEnvironmentInfo)` was removed +* `withName(java.lang.String)` was removed +* `validate()` was removed #### `models.UriFileJobOutput` was modified @@ -1110,16 +1110,16 @@ * `withValueFormat(models.ValueFormat)` was removed * `withValue(java.lang.String)` was removed +* `validate()` was removed * `group()` was removed * `createdByWorkspaceArmId()` was removed -* `validate()` was removed #### `models.NotebookPreparationError` was modified * `NotebookPreparationError()` was changed to private access -* `validate()` was removed -* `withStatusCode(java.lang.Integer)` was removed * `withErrorMessage(java.lang.String)` was removed +* `withStatusCode(java.lang.Integer)` was removed +* `validate()` was removed #### `models.PrivateEndpointDestination` was modified @@ -1158,8 +1158,8 @@ * `ImageMetadata()` was changed to private access * `validate()` was removed * `withIsLatestOsImageVersion(java.lang.Boolean)` was removed -* `withCurrentImageVersion(java.lang.String)` was removed * `withLatestImageVersion(java.lang.String)` was removed +* `withCurrentImageVersion(java.lang.String)` was removed #### `models.ScheduleActionBase` was modified @@ -1179,19 +1179,19 @@ #### `models.CustomKeysWorkspaceConnectionProperties` was modified -* `createdByWorkspaceArmId()` was removed * `withValue(java.lang.String)` was removed -* `withValueFormat(models.ValueFormat)` was removed -* `validate()` was removed * `group()` was removed +* `validate()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed #### `models.CertificateDatastoreCredentials` was modified -* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` -* `java.util.UUID clientId()` -> `java.lang.String clientId()` -* `validate()` was removed * `withClientId(java.util.UUID)` was removed +* `validate()` was removed * `withTenantId(java.util.UUID)` was removed +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` #### `models.CustomKeys` was modified @@ -1207,19 +1207,19 @@ #### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed -* `validate()` was removed -* `createdByWorkspaceArmId()` was removed * `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed * `group()` was removed +* `createdByWorkspaceArmId()` was removed +* `validate()` was removed #### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified -* `withValue(java.lang.String)` was removed -* `createdByWorkspaceArmId()` was removed -* `withValueFormat(models.ValueFormat)` was removed * `validate()` was removed * `group()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed #### `models.ServiceManagedResourcesSettings` was modified @@ -1235,8 +1235,8 @@ #### `models.AzureFileDatastore` was modified -* `isDefault()` was removed * `validate()` was removed +* `isDefault()` was removed #### `models.ManagedNetworkProvisionOptions` was modified @@ -1250,43 +1250,43 @@ #### `models.WorkspaceUpdateParameters` was modified * `WorkspaceUpdateParameters()` was removed -* `withV1LegacyMode(java.lang.Boolean)` was removed -* `withFriendlyName(java.lang.String)` was removed -* `java.lang.Boolean v1LegacyMode()` -> `java.lang.Boolean v1LegacyMode()` -* `withDescription(java.lang.String)` was removed -* `withPrimaryUserAssignedIdentity(java.lang.String)` was removed * `fromJson(com.azure.json.JsonReader)` was removed -* `toJson(com.azure.json.JsonWriter)` was removed -* `withContainerRegistry(java.lang.String)` was removed -* `withIdentity(models.ManagedServiceIdentity)` was removed -* `java.lang.String friendlyName()` -> `java.lang.String friendlyName()` -* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed -* `java.lang.String containerRegistry()` -> `java.lang.String containerRegistry()` -* `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -> `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` * `validate()` was removed -* `fluent.models.ManagedNetworkSettingsInner managedNetwork()` -> `models.ManagedNetworkSettings managedNetwork()` -* `withServerlessComputeSettings(models.ServerlessComputeSettings)` was removed -* `java.util.Map tags()` -> `java.util.Map tags()` -* `withFeatureStoreSettings(models.FeatureStoreSettings)` was removed -* `withEnableDataIsolation(java.lang.Boolean)` was removed -* `java.lang.String description()` -> `java.lang.String description()` -* `withEncryption(models.EncryptionUpdateProperties)` was removed * `models.FeatureStoreSettings featureStoreSettings()` -> `models.FeatureStoreSettings featureStoreSettings()` +* `withDescription(java.lang.String)` was removed +* `withIdentity(models.ManagedServiceIdentity)` was removed +* `java.lang.String applicationInsights()` -> `java.lang.String applicationInsights()` +* `withApplicationInsights(java.lang.String)` was removed * `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `withTags(java.util.Map)` was removed +* `java.lang.String description()` -> `java.lang.String description()` +* `java.lang.String friendlyName()` -> `java.lang.String friendlyName()` +* `withEncryption(models.EncryptionUpdateProperties)` was removed +* `models.EncryptionUpdateProperties encryption()` -> `models.EncryptionUpdateProperties encryption()` +* `models.Sku sku()` -> `models.Sku sku()` +* `withSku(models.Sku)` was removed * `java.lang.Boolean enableDataIsolation()` -> `java.lang.Boolean enableDataIsolation()` +* `withEnableDataIsolation(java.lang.Boolean)` was removed +* `withV1LegacyMode(java.lang.Boolean)` was removed +* `toJson(com.azure.json.JsonWriter)` was removed +* `withImageBuildCompute(java.lang.String)` was removed +* `withFeatureStoreSettings(models.FeatureStoreSettings)` was removed * `withManagedNetwork(fluent.models.ManagedNetworkSettingsInner)` was removed +* `models.ServerlessComputeSettings serverlessComputeSettings()` -> `models.ServerlessComputeSettings serverlessComputeSettings()` +* `java.lang.Boolean v1LegacyMode()` -> `java.lang.Boolean v1LegacyMode()` +* `withServerlessComputeSettings(models.ServerlessComputeSettings)` was removed +* `fluent.models.ManagedNetworkSettingsInner managedNetwork()` -> `models.ManagedNetworkSettings managedNetwork()` +* `withFriendlyName(java.lang.String)` was removed +* `withContainerRegistry(java.lang.String)` was removed +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed * `withServiceManagedResourcesSettings(models.ServiceManagedResourcesSettings)` was removed -* `withSku(models.Sku)` was removed -* `java.lang.String imageBuildCompute()` -> `java.lang.String imageBuildCompute()` -* `models.Sku sku()` -> `models.Sku sku()` -* `withImageBuildCompute(java.lang.String)` was removed -* `withTags(java.util.Map)` was removed -* `withApplicationInsights(java.lang.String)` was removed -* `java.lang.String applicationInsights()` -> `java.lang.String applicationInsights()` +* `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -> `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` +* `java.lang.String containerRegistry()` -> `java.lang.String containerRegistry()` * `java.lang.String primaryUserAssignedIdentity()` -> `java.lang.String primaryUserAssignedIdentity()` -* `models.ServerlessComputeSettings serverlessComputeSettings()` -> `models.ServerlessComputeSettings serverlessComputeSettings()` -* `models.EncryptionUpdateProperties encryption()` -> `models.EncryptionUpdateProperties encryption()` +* `java.util.Map tags()` -> `java.util.Map tags()` +* `withPrimaryUserAssignedIdentity(java.lang.String)` was removed +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` +* `java.lang.String imageBuildCompute()` -> `java.lang.String imageBuildCompute()` #### `models.ComputeRuntimeDto` was modified @@ -1371,16 +1371,16 @@ #### `models.DiagnoseResponseResultValue` was modified * `DiagnoseResponseResultValue()` was changed to private access -* `withNetworkSecurityRuleResults(java.util.List)` was removed -* `withResourceLockResults(java.util.List)` was removed * `withUserDefinedRouteResults(java.util.List)` was removed -* `withStorageAccountResults(java.util.List)` was removed -* `withDnsResolutionResults(java.util.List)` was removed -* `withKeyVaultResults(java.util.List)` was removed -* `withContainerRegistryResults(java.util.List)` was removed +* `withResourceLockResults(java.util.List)` was removed +* `withNetworkSecurityRuleResults(java.util.List)` was removed * `validate()` was removed +* `withContainerRegistryResults(java.util.List)` was removed +* `withStorageAccountResults(java.util.List)` was removed * `withOtherResults(java.util.List)` was removed * `withApplicationInsightsResults(java.util.List)` was removed +* `withDnsResolutionResults(java.util.List)` was removed +* `withKeyVaultResults(java.util.List)` was removed #### `models.SasDatastoreCredentials` was modified @@ -1388,10 +1388,10 @@ #### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified -* `withValue(java.lang.String)` was removed +* `validate()` was removed * `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed * `group()` was removed -* `validate()` was removed * `createdByWorkspaceArmId()` was removed #### `models.AksNetworkingConfiguration` was modified @@ -1405,8 +1405,8 @@ #### `models.DatabricksComputeSecrets` was modified * `DatabricksComputeSecrets()` was changed to private access -* `withDatabricksAccessToken(java.lang.String)` was removed * `validate()` was removed +* `withDatabricksAccessToken(java.lang.String)` was removed #### `models.ImageModelDistributionSettings` was modified @@ -1418,19 +1418,19 @@ #### `models.AadAuthTypeWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed -* `group()` was removed +* `withValue(java.lang.String)` was removed * `createdByWorkspaceArmId()` was removed * `validate()` was removed -* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed #### `models.BlobReferenceForConsumptionDto` was modified * `BlobReferenceForConsumptionDto()` was changed to private access -* `withStorageAccountArmId(java.lang.String)` was removed +* `validate()` was removed * `withBlobUri(java.lang.String)` was removed * `withCredential(models.PendingUploadCredentialDto)` was removed -* `validate()` was removed +* `withStorageAccountArmId(java.lang.String)` was removed #### `models.VolumeDefinition` was modified @@ -1470,16 +1470,16 @@ #### `models.EstimatedVMPrices` was modified * `EstimatedVMPrices()` was changed to private access +* `validate()` was removed * `withValues(java.util.List)` was removed -* `withUnitOfMeasure(models.UnitOfMeasure)` was removed * `withBillingCurrency(models.BillingCurrency)` was removed -* `validate()` was removed +* `withUnitOfMeasure(models.UnitOfMeasure)` was removed #### `models.ServerlessInferenceEndpoint` was modified * `ServerlessInferenceEndpoint()` was changed to private access -* `validate()` was removed * `withUri(java.lang.String)` was removed +* `validate()` was removed #### `models.TextClassificationMultilabel` was modified @@ -1500,10 +1500,10 @@ #### `models.AksComputeSecrets` was modified * `AksComputeSecrets()` was changed to private access -* `validate()` was removed +* `withImagePullSecretName(java.lang.String)` was removed * `withUserKubeConfig(java.lang.String)` was removed * `withAdminKubeConfig(java.lang.String)` was removed -* `withImagePullSecretName(java.lang.String)` was removed +* `validate()` was removed #### `models.PersonalComputeInstanceSettings` was modified @@ -1521,8 +1521,8 @@ * `VirtualMachineSize()` was changed to private access * `validate()` was removed -* `withEstimatedVMPrices(models.EstimatedVMPrices)` was removed * `withSupportedComputeTypes(java.util.List)` was removed +* `withEstimatedVMPrices(models.EstimatedVMPrices)` was removed #### `models.ModelSettings` was modified @@ -1607,24 +1607,24 @@ #### `models.ComputeInstanceEnvironmentInfo` was modified * `ComputeInstanceEnvironmentInfo()` was changed to private access -* `withName(java.lang.String)` was removed * `validate()` was removed * `withVersion(java.lang.String)` was removed +* `withName(java.lang.String)` was removed #### `models.GetBlobReferenceForConsumptionDto` was modified * `GetBlobReferenceForConsumptionDto()` was changed to private access * `withStorageAccountArmId(java.lang.String)` was removed -* `withBlobUri(java.lang.String)` was removed * `validate()` was removed +* `withBlobUri(java.lang.String)` was removed * `withCredential(models.DataReferenceCredential)` was removed #### `models.SkuSetting` was modified * `SkuSetting()` was changed to private access * `withName(java.lang.String)` was removed -* `withTier(models.SkuTier)` was removed * `validate()` was removed +* `withTier(models.SkuTier)` was removed #### `models.MonitorEmailNotificationSettings` was modified @@ -1644,8 +1644,8 @@ #### `models.PrivateLinkResources` was modified -* `models.PrivateLinkResourceListResult list(java.lang.String,java.lang.String)` -> `com.azure.core.http.rest.PagedIterable list(java.lang.String,java.lang.String)` * `listWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `models.PrivateLinkResourceListResult list(java.lang.String,java.lang.String)` -> `com.azure.core.http.rest.PagedIterable list(java.lang.String,java.lang.String)` #### `models.TensorFlow` was modified @@ -1663,11 +1663,11 @@ #### `models.SasAuthTypeWorkspaceConnectionProperties` was modified -* `validate()` was removed -* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed * `group()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `validate()` was removed * `withValue(java.lang.String)` was removed -* `createdByWorkspaceArmId()` was removed #### `models.BatchDeploymentConfiguration` was modified @@ -1712,9 +1712,9 @@ #### `models.WorkspaceConnectionOAuth2` was modified +* `validate()` was removed * `java.util.UUID clientId()` -> `java.lang.String clientId()` * `withClientId(java.util.UUID)` was removed -* `validate()` was removed #### `models.PartialRegistryPartialTrackedResource` was modified @@ -1730,9 +1730,9 @@ #### `models.EncryptionProperty` was modified +* `withKeyVaultProperties(models.EncryptionKeyVaultProperties)` was removed * `models.EncryptionKeyVaultProperties keyVaultProperties()` -> `models.KeyVaultProperties keyVaultProperties()` * `validate()` was removed -* `withKeyVaultProperties(models.EncryptionKeyVaultProperties)` was removed #### `models.FeaturestoreEntityVersionProperties` was modified @@ -1740,8 +1740,8 @@ #### `models.CommandJob` was modified -* `validate()` was removed * `status()` was removed +* `validate()` was removed #### `models.NumericalDataDriftMetricThreshold` was modified @@ -1759,17 +1759,17 @@ #### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified -* `validate()` was removed -* `withValue(java.lang.String)` was removed * `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed * `createdByWorkspaceArmId()` was removed * `group()` was removed #### `models.RegistryListCredentialsResult` was modified * `RegistryListCredentialsResult()` was changed to private access -* `withPasswords(java.util.List)` was removed * `validate()` was removed +* `withPasswords(java.util.List)` was removed #### `models.FeaturizationSettings` was modified @@ -1777,11 +1777,11 @@ #### `models.ServicePrincipalDatastoreCredentials` was modified -* `java.util.UUID clientId()` -> `java.lang.String clientId()` * `withClientId(java.util.UUID)` was removed -* `validate()` was removed -* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` * `withTenantId(java.util.UUID)` was removed +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `validate()` was removed #### `models.ServiceTagDestination` was modified @@ -1805,12 +1805,12 @@ #### `models.DataFactory` was modified -* `provisioningState()` was removed -* `modifiedOn()` was removed * `isAttachedCompute()` was removed -* `provisioningErrors()` was removed -* `validate()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed * `createdOn()` was removed +* `validate()` was removed +* `provisioningErrors()` was removed #### `models.CustomTargetRollingWindowSize` was modified @@ -1838,21 +1838,21 @@ #### `models.ImageModelSettings` was modified -* `validate()` was removed -* `withWeightDecay(java.lang.Float)` was removed -* `java.lang.Float stepLRGamma()` -> `java.lang.Double stepLRGamma()` -* `java.lang.Float beta2()` -> `java.lang.Double beta2()` -* `withWarmupCosineLRCycles(java.lang.Float)` was removed * `withBeta2(java.lang.Float)` was removed +* `withWarmupCosineLRCycles(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed +* `withStepLRGamma(java.lang.Float)` was removed * `withLearningRate(java.lang.Float)` was removed -* `java.lang.Float momentum()` -> `java.lang.Double momentum()` -* `java.lang.Float learningRate()` -> `java.lang.Double learningRate()` * `java.lang.Float warmupCosineLRCycles()` -> `java.lang.Double warmupCosineLRCycles()` +* `withWeightDecay(java.lang.Float)` was removed * `withBeta1(java.lang.Float)` was removed -* `java.lang.Float weightDecay()` -> `java.lang.Double weightDecay()` -* `withMomentum(java.lang.Float)` was removed -* `withStepLRGamma(java.lang.Float)` was removed * `java.lang.Float beta1()` -> `java.lang.Double beta1()` +* `java.lang.Float learningRate()` -> `java.lang.Double learningRate()` +* `java.lang.Float weightDecay()` -> `java.lang.Double weightDecay()` +* `java.lang.Float momentum()` -> `java.lang.Double momentum()` +* `validate()` was removed +* `java.lang.Float stepLRGamma()` -> `java.lang.Double stepLRGamma()` +* `java.lang.Float beta2()` -> `java.lang.Double beta2()` #### `models.CustomMonitoringSignal` was modified @@ -1872,11 +1872,11 @@ #### `models.ManagedIdentity` was modified +* `validate()` was removed * `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `withClientId(java.util.UUID)` was removed * `java.util.UUID objectId()` -> `java.lang.String objectId()` * `withObjectId(java.util.UUID)` was removed -* `withClientId(java.util.UUID)` was removed -* `validate()` was removed #### `models.CreateMonitorAction` was modified @@ -1986,8 +1986,8 @@ #### `models.AutoMLJob` was modified -* `status()` was removed * `validate()` was removed +* `status()` was removed #### `models.AmlTokenComputeIdentity` was modified @@ -2015,17 +2015,17 @@ #### `models.HDInsight` was modified +* `provisioningState()` was removed +* `provisioningErrors()` was removed * `isAttachedCompute()` was removed * `validate()` was removed -* `createdOn()` was removed -* `provisioningState()` was removed * `modifiedOn()` was removed -* `provisioningErrors()` was removed +* `createdOn()` was removed #### `models.KubernetesOnlineDeployment` was modified -* `validate()` was removed * `provisioningState()` was removed +* `validate()` was removed #### `models.AccountKeyDatastoreSecrets` was modified @@ -2037,9 +2037,9 @@ #### `models.OnlineEndpointProperties` was modified +* `models.PublicNetworkAccessType publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` * `validate()` was removed * `withPublicNetworkAccess(models.PublicNetworkAccessType)` was removed -* `models.PublicNetworkAccessType publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` #### `models.CustomSeasonality` was modified @@ -2074,8 +2074,8 @@ #### `models.ComputeInstanceLastOperation` was modified * `ComputeInstanceLastOperation()` was changed to private access -* `withOperationTrigger(models.OperationTrigger)` was removed * `withOperationTime(java.time.OffsetDateTime)` was removed +* `withOperationTrigger(models.OperationTrigger)` was removed * `withOperationName(models.OperationName)` was removed * `withOperationStatus(models.OperationStatus)` was removed * `validate()` was removed @@ -2103,8 +2103,8 @@ #### `models.RegistryPrivateLinkServiceConnectionState` was modified * `validate()` was removed -* `withStatus(models.EndpointServiceConnectionStatus)` was removed * `models.EndpointServiceConnectionStatus status()` -> `models.PrivateEndpointServiceConnectionStatus status()` +* `withStatus(models.EndpointServiceConnectionStatus)` was removed #### `models.FixedInputData` was modified @@ -2113,8 +2113,8 @@ #### `models.UserAssignedIdentity` was modified * `java.util.UUID clientId()` -> `java.lang.String clientId()` -* `validate()` was removed * `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `validate()` was removed #### `models.DataLakeAnalyticsSchemaProperties` was modified @@ -2134,11 +2134,11 @@ #### `models.PatAuthTypeWorkspaceConnectionProperties` was modified -* `createdByWorkspaceArmId()` was removed * `withValueFormat(models.ValueFormat)` was removed -* `group()` was removed * `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed * `validate()` was removed +* `group()` was removed #### `models.ComputeSchedules` was modified @@ -2554,24 +2554,24 @@ #### `models.WorkspaceConnectionPropertiesV2` was modified -* `peStatus()` was added -* `withError(java.lang.String)` was added -* `peRequirement()` was added * `withPeRequirement(models.ManagedPERequirement)` was added -* `useWorkspaceManagedIdentity()` was added -* `withPeStatus(models.ManagedPEStatus)` was added +* `peRequirement()` was added * `error()` was added +* `withError(java.lang.String)` was added +* `peStatus()` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `useWorkspaceManagedIdentity()` was added +* `withPeStatus(models.ManagedPEStatus)` was added #### `models.BanditPolicy` was modified -* `withSlackFactor(java.lang.Double)` was added * `withSlackAmount(java.lang.Double)` was added +* `withSlackFactor(java.lang.Double)` was added #### `models.JobResourceConfiguration` was modified -* `dockerArgsList()` was added * `withDockerArgsList(java.util.List)` was added +* `dockerArgsList()` was added #### `models.MLFlowModelJobOutput` was modified @@ -2580,18 +2580,18 @@ #### `models.ImageModelSettingsObjectDetection` was modified -* `withStepLRGamma(java.lang.Double)` was added -* `withTileOverlapRatio(java.lang.Double)` was added -* `withWeightDecay(java.lang.Double)` was added -* `withMomentum(java.lang.Double)` was added * `withWarmupCosineLRCycles(java.lang.Double)` was added -* `withValidationIouThreshold(java.lang.Double)` was added -* `withLearningRate(java.lang.Double)` was added * `withBeta1(java.lang.Double)` was added * `withBeta2(java.lang.Double)` was added +* `withBoxScoreThreshold(java.lang.Double)` was added +* `withLearningRate(java.lang.Double)` was added +* `withWeightDecay(java.lang.Double)` was added +* `withTileOverlapRatio(java.lang.Double)` was added * `withTilePredictionsNmsThreshold(java.lang.Double)` was added * `withNmsIouThreshold(java.lang.Double)` was added -* `withBoxScoreThreshold(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added +* `withValidationIouThreshold(java.lang.Double)` was added #### `models.ComputeInstanceState` was modified @@ -2608,12 +2608,12 @@ #### `models.Workspace$Update` was modified -* `withIpAllowlist(java.util.List)` was added -* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added * `withSoftDeleteRetentionInDays(java.lang.Integer)` was added -* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added -* `withNetworkAcls(models.NetworkAcls)` was added +* `withIpAllowlist(java.util.List)` was added * `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added #### `models.Image` was modified @@ -2626,8 +2626,8 @@ #### `models.ModelVersionProperties` was modified -* `withDatasets(java.util.List)` was added * `datasets()` was added +* `withDatasets(java.util.List)` was added #### `models.OnlineDeploymentProperties` was modified @@ -2636,8 +2636,8 @@ #### `models.InferenceContainerProperties` was modified -* `withStartupRoute(models.Route)` was added * `startupRoute()` was added +* `withStartupRoute(models.Route)` was added #### `models.OperationStatus` was modified @@ -2649,15 +2649,15 @@ #### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified -* `withError(java.lang.String)` was added -* `withPeStatus(models.ManagedPEStatus)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added #### `models.PrivateEndpointOutboundRule` was modified -* `withFqdns(java.util.List)` was added * `fqdns()` was added +* `withFqdns(java.util.List)` was added #### `models.Workspaces` was modified @@ -2675,16 +2675,16 @@ #### `models.Computes` was modified +* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added * `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema,com.azure.core.util.Context)` was added -* `updateDataMountsWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added -* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema)` was added -* `updateIdleShutdownSettingWithResponse(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `updateIdleShutdownSetting(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting)` was added * `getAllowedResizeSizes(java.lang.String,java.lang.String,java.lang.String)` was added +* `updateDataMountsWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added * `updateDataMounts(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added * `updateCustomServices(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added -* `updateIdleShutdownSetting(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting)` was added -* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added -* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `updateIdleShutdownSettingWithResponse(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema)` was added #### `models.ConnectionAuthType` was modified @@ -2698,26 +2698,26 @@ #### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified -* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `models.Workspace$Definition` was modified +* `withKeyVaults(java.util.List)` was added * `withStorageAccounts(java.util.List)` was added -* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added -* `withExistingWorkspaces(java.util.List)` was added * `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added -* `withNetworkAcls(models.NetworkAcls)` was added -* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added -* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added -* `withEnableServiceSideCmkEncryption(java.lang.Boolean)` was added -* `withProvisionNetworkNow(java.lang.Boolean)` was added * `withIpAllowlist(java.util.List)` was added +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added * `withEnableSimplifiedCmk(java.lang.Boolean)` was added -* `withKeyVaults(java.util.List)` was added +* `withEnableServiceSideCmkEncryption(java.lang.Boolean)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added * `withContainerRegistries(java.util.List)` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `withProvisionNetworkNow(java.lang.Boolean)` was added +* `withExistingWorkspaces(java.util.List)` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added #### `models.Datastores` was modified @@ -2735,11 +2735,11 @@ * `withWeightDecay(java.lang.Double)` was added * `withMomentum(java.lang.Double)` was added -* `withLearningRate(java.lang.Double)` was added * `withWarmupCosineLRCycles(java.lang.Double)` was added +* `withLearningRate(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added * `withBeta2(java.lang.Double)` was added * `withBeta1(java.lang.Double)` was added -* `withStepLRGamma(java.lang.Double)` was added #### `models.PrivateEndpointConnection$Update` was modified @@ -2747,40 +2747,40 @@ #### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added * `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added -* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.WorkspaceConnections` was modified -* `testConnection(java.lang.String,java.lang.String,java.lang.String)` was added -* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added * `testConnection(java.lang.String,java.lang.String,java.lang.String,fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added +* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added +* `testConnection(java.lang.String,java.lang.String,java.lang.String)` was added #### `models.ManagedNetworkSettings` was modified -* `managedNetworkKind()` was added * `firewallPublicIpAddress()` was added * `enableNetworkMonitor()` was added +* `managedNetworkKind()` was added * `firewallSku()` was added #### `models.Workspace` was modified -* `systemDatastoresAuthMode()` was added -* `storageAccounts()` was added -* `networkAcls()` was added -* `existingWorkspaces()` was added -* `softDeleteRetentionInDays()` was added -* `ipAllowlist()` was added +* `enableSimplifiedCmk()` was added * `provisionNetworkNow()` was added -* `enableServiceSideCmkEncryption()` was added -* `agentsEndpointUri()` was added -* `enableSoftwareBillOfMaterials()` was added * `containerRegistries()` was added -* `enableSimplifiedCmk()` was added +* `networkAcls()` was added * `keyVaults()` was added +* `agentsEndpointUri()` was added +* `ipAllowlist()` was added * `allowRoleAssignmentOnRG()` was added +* `enableSoftwareBillOfMaterials()` was added +* `systemDatastoresAuthMode()` was added +* `enableServiceSideCmkEncryption()` was added +* `softDeleteRetentionInDays()` was added +* `existingWorkspaces()` was added +* `storageAccounts()` was added #### `models.UriFileJobOutput` was modified @@ -2793,32 +2793,32 @@ #### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added -* `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added #### `MachineLearningManager` was modified -* `endpoints()` was added -* `raiPolicies()` was added -* `connections()` was added -* `inferenceGroups()` was added -* `inferencePools()` was added * `connectionRaiPolicies()` was added -* `inferenceEndpoints()` was added -* `connectionRaiBlocklists()` was added -* `pTUQuotas()` was added -* `endpointDeployments()` was added * `raiPoliciesOperations()` was added -* `capabilityHosts()` was added +* `managedNetworkSettingsOperations()` was added * `connectionRaiBlocklistItems()` was added +* `endpoints()` was added * `connectionRaiBlocklistsOperations()` was added * `outboundRules()` was added -* `outboundRulesOperations()` was added -* `managedNetworkSettingsOperations()` was added +* `connections()` was added +* `inferenceEndpoints()` was added +* `raiPolicies()` was added +* `endpointDeployments()` was added * `connectionRaiBlocklistItemsOperations()` was added +* `outboundRulesOperations()` was added +* `pTUQuotas()` was added +* `inferencePools()` was added * `connectionRaiPoliciesOperations()` was added +* `connectionRaiBlocklists()` was added +* `capabilityHosts()` was added +* `inferenceGroups()` was added #### `models.ImageMetadata` was modified @@ -2827,8 +2827,8 @@ #### `models.CustomKeysWorkspaceConnectionProperties` was modified * `withPeStatus(models.ManagedPEStatus)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added #### `models.CertificateDatastoreCredentials` was modified @@ -2838,16 +2838,16 @@ #### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified -* `withPeStatus(models.ManagedPEStatus)` was added * `withError(java.lang.String)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added #### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified +* `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added -* `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added #### `models.SparkJob` was modified @@ -2856,22 +2856,22 @@ #### `models.WorkspacePropertiesUpdateParameters` was modified +* `allowRoleAssignmentOnRG()` was added +* `enableSoftwareBillOfMaterials()` was added * `networkAcls()` was added -* `softDeleteRetentionInDays()` was added * `systemDatastoresAuthMode()` was added * `ipAllowlist()` was added -* `allowRoleAssignmentOnRG()` was added -* `enableSoftwareBillOfMaterials()` was added +* `softDeleteRetentionInDays()` was added #### `models.WorkspaceUpdateParameters` was modified +* `allowRoleAssignmentOnRG()` was added * `ipAllowlist()` was added * `enableSoftwareBillOfMaterials()` was added -* `networkAcls()` was added -* `allowRoleAssignmentOnRG()` was added * `systemDatastoresAuthMode()` was added -* `innerModel()` was added +* `networkAcls()` was added * `softDeleteRetentionInDays()` was added +* `innerModel()` was added #### `models.UriFolderJobOutput` was modified @@ -2886,56 +2886,56 @@ #### `models.MLTableJobOutput` was modified -* `withAssetName(java.lang.String)` was added * `assetName()` was added +* `withAssetName(java.lang.String)` was added #### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified * `withPeStatus(models.ManagedPEStatus)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added -* `withError(java.lang.String)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `models.CustomService` was modified -* `withKernel(models.JupyterKernelConfig)` was added * `kernel()` was added +* `withKernel(models.JupyterKernelConfig)` was added #### `models.AadAuthTypeWorkspaceConnectionProperties` was modified -* `withPeStatus(models.ManagedPEStatus)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added #### `models.TritonModelJobOutput` was modified -* `withAssetName(java.lang.String)` was added * `assetName()` was added +* `withAssetName(java.lang.String)` was added #### `models.WorkspaceConnectionPropertiesV2BasicResource` was modified -* `update()` was added -* `resourceGroupName()` was added * `testConnection()` was added * `testConnection(fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added +* `resourceGroupName()` was added +* `update()` was added #### `models.WorkspaceProperties` was modified -* `existingWorkspaces()` was added -* `networkAcls()` was added * `enableSoftwareBillOfMaterials()` was added -* `enableSimplifiedCmk()` was added * `ipAllowlist()` was added -* `systemDatastoresAuthMode()` was added +* `softDeleteRetentionInDays()` was added +* `existingWorkspaces()` was added +* `networkAcls()` was added * `provisionNetworkNow()` was added -* `enableServiceSideCmkEncryption()` was added +* `agentsEndpointUri()` was added * `allowRoleAssignmentOnRG()` was added -* `softDeleteRetentionInDays()` was added +* `systemDatastoresAuthMode()` was added +* `enableSimplifiedCmk()` was added * `storageAccounts()` was added * `containerRegistries()` was added +* `enableServiceSideCmkEncryption()` was added * `keyVaults()` was added -* `agentsEndpointUri()` was added #### `models.OutboundRule` was modified @@ -2946,14 +2946,14 @@ * `updateDataMounts(java.util.List)` was added * `resize(models.ResizeSchema)` was added -* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added -* `getAllowedResizeSizesWithResponse(com.azure.core.util.Context)` was added -* `updateCustomServices(java.util.List)` was added * `updateCustomServicesWithResponse(java.util.List,com.azure.core.util.Context)` was added -* `updateIdleShutdownSettingWithResponse(models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added +* `updateCustomServices(java.util.List)` was added * `updateIdleShutdownSetting(models.IdleShutdownSetting)` was added +* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added * `getAllowedResizeSizes()` was added -* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added +* `updateIdleShutdownSettingWithResponse(models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `getAllowedResizeSizesWithResponse(com.azure.core.util.Context)` was added #### `models.CustomModelJobOutput` was modified @@ -2966,10 +2966,10 @@ #### `models.SasAuthTypeWorkspaceConnectionProperties` was modified -* `withPeStatus(models.ManagedPEStatus)` was added * `withError(java.lang.String)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `models.WorkspaceConnectionOAuth2` was modified @@ -2977,13 +2977,13 @@ #### `models.EncryptionProperty` was modified -* `withCosmosDbResourceId(java.lang.String)` was added * `withKeyVaultProperties(models.KeyVaultProperties)` was added -* `storageAccountResourceId()` was added -* `searchAccountResourceId()` was added -* `withStorageAccountResourceId(java.lang.String)` was added +* `withCosmosDbResourceId(java.lang.String)` was added * `withSearchAccountResourceId(java.lang.String)` was added * `cosmosDbResourceId()` was added +* `searchAccountResourceId()` was added +* `withStorageAccountResourceId(java.lang.String)` was added +* `storageAccountResourceId()` was added #### `models.CommandJob` was modified @@ -2998,8 +2998,8 @@ #### `models.ServicePrincipalDatastoreCredentials` was modified -* `withClientId(java.lang.String)` was added * `withTenantId(java.lang.String)` was added +* `withClientId(java.lang.String)` was added #### `models.ServiceTagDestination` was modified @@ -3011,33 +3011,33 @@ #### `models.ImageModelSettings` was modified +* `withBeta1(java.lang.Double)` was added * `withStepLRGamma(java.lang.Double)` was added -* `withBeta2(java.lang.Double)` was added +* `withWeightDecay(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added * `withLearningRate(java.lang.Double)` was added +* `withBeta2(java.lang.Double)` was added * `withWarmupCosineLRCycles(java.lang.Double)` was added -* `withBeta1(java.lang.Double)` was added -* `withMomentum(java.lang.Double)` was added -* `withWeightDecay(java.lang.Double)` was added #### `models.ManagedIdentity` was modified -* `withObjectId(java.lang.String)` was added * `withClientId(java.lang.String)` was added +* `withObjectId(java.lang.String)` was added #### `models.ComputeInstanceProperties` was modified * `withEnableSSO(java.lang.Boolean)` was added -* `enableSSO()` was added -* `releaseQuotaOnStop()` was added -* `withReleaseQuotaOnStop(java.lang.Boolean)` was added +* `withEnableOSPatching(java.lang.Boolean)` was added * `enableOSPatching()` was added -* `withIdleTimeBeforeShutdown(java.lang.String)` was added -* `withEnableRootAccess(java.lang.Boolean)` was added -* `enableRootAccess()` was added -* `idleTimeBeforeShutdown()` was added * `withAutologgerSettings(models.ComputeInstanceAutologgerSettings)` was added * `autologgerSettings()` was added -* `withEnableOSPatching(java.lang.Boolean)` was added +* `enableRootAccess()` was added +* `withReleaseQuotaOnStop(java.lang.Boolean)` was added +* `withEnableRootAccess(java.lang.Boolean)` was added +* `releaseQuotaOnStop()` was added +* `enableSSO()` was added +* `withIdleTimeBeforeShutdown(java.lang.String)` was added +* `idleTimeBeforeShutdown()` was added #### `models.ServerlessInferenceEndpointAuthMode` was modified @@ -3058,8 +3058,8 @@ #### `models.ComputeInstanceDataMount` was modified -* `withMountMode(models.MountMode)` was added * `mountMode()` was added +* `withMountMode(models.MountMode)` was added #### `models.AutoMLJob` was modified @@ -3080,13 +3080,13 @@ #### `models.ContentSafety` was modified -* `contentSafetyLevel()` was added * `withContentSafetyLevel(models.ContentSafetyLevel)` was added +* `contentSafetyLevel()` was added #### `models.JobBaseProperties` was modified -* `parentJobName()` was added * `withParentJobName(java.lang.String)` was added +* `parentJobName()` was added #### `models.RegistryPrivateLinkServiceConnectionState` was modified @@ -3094,10 +3094,10 @@ #### `models.PatAuthTypeWorkspaceConnectionProperties` was modified -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeStatus(models.ManagedPEStatus)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added * `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added ## 1.1.0 (2024-08-22) From fe9d2ee1ae36e07266df04612d96aa5f7039c883 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 23 Jul 2026 02:46:27 +0000 Subject: [PATCH 4/4] Configurations: 'specification/machinelearningservices/MachineLearningServices.Management/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: '8c66db435b08db558d154f98c998f3d9672dab58' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6605383 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 628 +++++++++--------- .../tsp-location.yaml | 2 +- 2 files changed, 315 insertions(+), 315 deletions(-) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md index 779d04dace5e..1a97b3785819 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md @@ -161,10 +161,10 @@ #### `models.EstimatedVMPrice` was modified * `EstimatedVMPrice()` was changed to private access -* `withRetailPrice(double)` was removed +* `withOsType(models.VMPriceOSType)` was removed * `validate()` was removed +* `withRetailPrice(double)` was removed * `withVmTier(models.VMTier)` was removed -* `withOsType(models.VMPriceOSType)` was removed #### `models.ScaleSettingsInformation` was modified @@ -172,19 +172,19 @@ #### `models.WorkspaceConnectionPropertiesV2` was modified -* `value()` was removed -* `validate()` was removed -* `withValue(java.lang.String)` was removed * `valueFormat()` was removed +* `withValue(java.lang.String)` was removed +* `validate()` was removed +* `value()` was removed * `withValueFormat(models.ValueFormat)` was removed #### `models.BanditPolicy` was modified +* `validate()` was removed * `java.lang.Float slackFactor()` -> `java.lang.Double slackFactor()` * `java.lang.Float slackAmount()` -> `java.lang.Double slackAmount()` -* `withSlackFactor(java.lang.Float)` was removed -* `validate()` was removed * `withSlackAmount(java.lang.Float)` was removed +* `withSlackFactor(java.lang.Float)` was removed #### `models.JobResourceConfiguration` was modified @@ -212,8 +212,8 @@ #### `models.AzureBlobDatastore` was modified -* `isDefault()` was removed * `validate()` was removed +* `isDefault()` was removed #### `models.AssetContainer` was modified @@ -233,34 +233,34 @@ #### `models.ImageModelSettingsObjectDetection` was modified -* `withBeta2(java.lang.Float)` was removed -* `java.lang.Float nmsIouThreshold()` -> `java.lang.Double nmsIouThreshold()` -* `validate()` was removed -* `withLearningRate(java.lang.Float)` was removed +* `withWarmupCosineLRCycles(java.lang.Float)` was removed +* `withValidationIouThreshold(java.lang.Float)` was removed +* `java.lang.Float tilePredictionsNmsThreshold()` -> `java.lang.Double tilePredictionsNmsThreshold()` +* `withTileOverlapRatio(java.lang.Float)` was removed * `withBoxScoreThreshold(java.lang.Float)` was removed * `withWeightDecay(java.lang.Float)` was removed -* `withBeta1(java.lang.Float)` was removed -* `withMomentum(java.lang.Float)` was removed -* `withNmsIouThreshold(java.lang.Float)` was removed * `withStepLRGamma(java.lang.Float)` was removed -* `withValidationIouThreshold(java.lang.Float)` was removed -* `withTileOverlapRatio(java.lang.Float)` was removed -* `java.lang.Float validationIouThreshold()` -> `java.lang.Double validationIouThreshold()` -* `withWarmupCosineLRCycles(java.lang.Float)` was removed -* `java.lang.Float tilePredictionsNmsThreshold()` -> `java.lang.Double tilePredictionsNmsThreshold()` -* `java.lang.Float boxScoreThreshold()` -> `java.lang.Double boxScoreThreshold()` * `withTilePredictionsNmsThreshold(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed +* `withBeta1(java.lang.Float)` was removed +* `java.lang.Float nmsIouThreshold()` -> `java.lang.Double nmsIouThreshold()` +* `validate()` was removed +* `java.lang.Float boxScoreThreshold()` -> `java.lang.Double boxScoreThreshold()` +* `withBeta2(java.lang.Float)` was removed +* `withNmsIouThreshold(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed * `java.lang.Float tileOverlapRatio()` -> `java.lang.Double tileOverlapRatio()` +* `java.lang.Float validationIouThreshold()` -> `java.lang.Double validationIouThreshold()` #### `models.ManagedIdentityCredential` was modified * `ManagedIdentityCredential()` was changed to private access -* `withManagedIdentityType(java.lang.String)` was removed -* `withUserManagedIdentityTenantId(java.lang.String)` was removed * `withUserManagedIdentityClientId(java.lang.String)` was removed -* `withUserManagedIdentityResourceId(java.lang.String)` was removed -* `validate()` was removed * `withUserManagedIdentityPrincipalId(java.lang.String)` was removed +* `validate()` was removed +* `withUserManagedIdentityResourceId(java.lang.String)` was removed +* `withManagedIdentityType(java.lang.String)` was removed +* `withUserManagedIdentityTenantId(java.lang.String)` was removed #### `models.AmlToken` was modified @@ -292,12 +292,12 @@ #### `models.SynapseSpark` was modified -* `validate()` was removed -* `modifiedOn()` was removed -* `isAttachedCompute()` was removed * `provisioningErrors()` was removed * `createdOn()` was removed * `provisioningState()` was removed +* `modifiedOn()` was removed +* `validate()` was removed +* `isAttachedCompute()` was removed #### `models.ScheduleProperties` was modified @@ -307,8 +307,8 @@ * `FqdnEndpoints()` was changed to private access * `properties()` was removed -* `validate()` was removed * `withProperties(models.FqdnEndpointsProperties)` was removed +* `validate()` was removed #### `models.DefaultScaleSettings` was modified @@ -349,9 +349,9 @@ #### `models.AcrDetails` was modified -* `withUserCreatedAcrAccount(models.UserCreatedAcrAccount)` was removed -* `validate()` was removed * `userCreatedAcrAccount()` was removed +* `validate()` was removed +* `withUserCreatedAcrAccount(models.UserCreatedAcrAccount)` was removed #### `models.CodeConfiguration` was modified @@ -372,9 +372,9 @@ #### `models.DockerCredential` was modified * `DockerCredential()` was changed to private access +* `withPassword(java.lang.String)` was removed * `validate()` was removed * `withUsername(java.lang.String)` was removed -* `withPassword(java.lang.String)` was removed #### `models.BatchDeploymentProperties` was modified @@ -386,12 +386,12 @@ #### `models.Aks` was modified -* `validate()` was removed -* `modifiedOn()` was removed * `provisioningState()` was removed * `isAttachedCompute()` was removed +* `validate()` was removed * `createdOn()` was removed * `provisioningErrors()` was removed +* `modifiedOn()` was removed #### `models.CustomMetricThreshold` was modified @@ -416,11 +416,11 @@ #### `models.DataLakeAnalytics` was modified * `isAttachedCompute()` was removed -* `validate()` was removed -* `modifiedOn()` was removed * `createdOn()` was removed * `provisioningState()` was removed * `provisioningErrors()` was removed +* `modifiedOn()` was removed +* `validate()` was removed #### `models.AutoTargetRollingWindowSize` was modified @@ -462,8 +462,8 @@ #### `models.VirtualMachineSecrets` was modified * `VirtualMachineSecrets()` was changed to private access -* `withAdministratorAccount(models.VirtualMachineSshCredentials)` was removed * `validate()` was removed +* `withAdministratorAccount(models.VirtualMachineSshCredentials)` was removed #### `models.PrivateEndpointConnection$Definition` was modified @@ -624,11 +624,11 @@ #### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified -* `validate()` was removed -* `createdByWorkspaceArmId()` was removed * `withValue(java.lang.String)` was removed -* `group()` was removed * `withValueFormat(models.ValueFormat)` was removed +* `validate()` was removed +* `group()` was removed +* `createdByWorkspaceArmId()` was removed #### `models.BatchEndpointDefaults` was modified @@ -652,8 +652,8 @@ #### `models.AzureDataLakeGen1Datastore` was modified -* `isDefault()` was removed * `validate()` was removed +* `isDefault()` was removed #### `models.BindOptions` was modified @@ -661,17 +661,17 @@ #### `models.Workspaces` was modified -* `list(java.lang.String,com.azure.core.util.Context)` was removed * `listByResourceGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed +* `list(java.lang.String,com.azure.core.util.Context)` was removed #### `models.Kubernetes` was modified -* `isAttachedCompute()` was removed * `provisioningErrors()` was removed * `validate()` was removed -* `createdOn()` was removed * `provisioningState()` was removed * `modifiedOn()` was removed +* `createdOn()` was removed +* `isAttachedCompute()` was removed #### `models.AllFeatures` was modified @@ -717,20 +717,20 @@ #### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed * `group()` was removed * `validate()` was removed -* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed * `createdByWorkspaceArmId()` was removed #### `models.FeatureProperties` was modified * `FeatureProperties()` was changed to private access +* `withProperties(java.util.Map)` was removed +* `validate()` was removed * `withDescription(java.lang.String)` was removed * `withFeatureName(java.lang.String)` was removed -* `withProperties(java.util.Map)` was removed * `withDataType(models.FeatureDataType)` was removed -* `validate()` was removed * `withTags(java.util.Map)` was removed #### `models.CustomModelJobInput` was modified @@ -756,8 +756,8 @@ #### `models.RegistryPartialManagedServiceIdentity` was modified * `validate()` was removed -* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` * `java.util.UUID principalId()` -> `java.lang.String principalId()` +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` #### `models.UriFolderDataVersion` was modified @@ -786,11 +786,11 @@ #### `models.ComputeInstanceDataDisk` was modified * `ComputeInstanceDataDisk()` was changed to private access -* `withLun(java.lang.Integer)` was removed -* `withStorageAccountType(models.StorageAccountType)` was removed -* `withCaching(models.Caching)` was removed * `validate()` was removed +* `withCaching(models.Caching)` was removed * `withDiskSizeGB(java.lang.Integer)` was removed +* `withLun(java.lang.Integer)` was removed +* `withStorageAccountType(models.StorageAccountType)` was removed #### `models.RegistryPrivateEndpointConnection` was modified @@ -807,37 +807,37 @@ #### `models.ComputeInstanceApplication` was modified * `ComputeInstanceApplication()` was changed to private access -* `validate()` was removed * `withDisplayName(java.lang.String)` was removed +* `validate()` was removed * `withEndpointUri(java.lang.String)` was removed #### `models.PrivateLinkResource` was modified * `PrivateLinkResource()` was removed -* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` -* `withSku(models.Sku)` was removed * `java.lang.String name()` -> `java.lang.String name()` -* `withRequiredZoneNames(java.util.List)` was removed -* `java.util.List requiredMembers()` -> `java.util.List requiredMembers()` -* `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` -* `java.lang.String id()` -> `java.lang.String id()` * `models.Sku sku()` -> `models.Sku sku()` -* `withLocation(java.lang.String)` was removed -* `toJson(com.azure.json.JsonWriter)` was removed -* `withTags(java.util.Map)` was removed +* `java.util.List requiredMembers()` -> `java.util.List requiredMembers()` +* `withSku(models.Sku)` was removed * `java.lang.String type()` -> `java.lang.String type()` -* `java.util.Map tags()` -> `java.util.Map tags()` -* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` * `fromJson(com.azure.json.JsonReader)` was removed +* `java.util.Map tags()` -> `java.util.Map tags()` +* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` +* `toJson(com.azure.json.JsonWriter)` was removed +* `validate()` was removed * `java.lang.String groupId()` -> `java.lang.String groupId()` +* `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` * `java.lang.String location()` -> `java.lang.String location()` -* `validate()` was removed +* `withLocation(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed +* `java.lang.String id()` -> `java.lang.String id()` +* `withRequiredZoneNames(java.util.List)` was removed * `withIdentity(models.ManagedServiceIdentity)` was removed +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` #### `models.PipelineJob` was modified -* `validate()` was removed * `status()` was removed +* `validate()` was removed #### `models.Password` was modified @@ -858,9 +858,9 @@ #### `models.StorageAccountDetails` was modified -* `withUserCreatedStorageAccount(models.UserCreatedStorageAccount)` was removed * `userCreatedStorageAccount()` was removed * `validate()` was removed +* `withUserCreatedStorageAccount(models.UserCreatedStorageAccount)` was removed #### `models.PartialMinimalTrackedResource` was modified @@ -904,12 +904,12 @@ #### `models.VirtualMachine` was modified -* `createdOn()` was removed -* `validate()` was removed -* `provisioningErrors()` was removed * `provisioningState()` was removed -* `isAttachedCompute()` was removed +* `provisioningErrors()` was removed * `modifiedOn()` was removed +* `isAttachedCompute()` was removed +* `validate()` was removed +* `createdOn()` was removed #### `models.RegressionTrainingSettings` was modified @@ -923,17 +923,17 @@ * `UpdateWorkspaceQuotas()` was changed to private access * `withStatus(models.Status)` was removed -* `validate()` was removed * `withLimit(java.lang.Long)` was removed +* `validate()` was removed #### `models.AmlCompute` was modified * `provisioningState()` was removed +* `createdOn()` was removed * `isAttachedCompute()` was removed -* `modifiedOn()` was removed * `provisioningErrors()` was removed * `validate()` was removed -* `createdOn()` was removed +* `modifiedOn()` was removed #### `models.AzureDataLakeGen2Datastore` was modified @@ -946,14 +946,14 @@ #### `models.ImageModelSettingsClassification` was modified -* `withMomentum(java.lang.Float)` was removed +* `withWeightDecay(java.lang.Float)` was removed +* `validate()` was removed * `withBeta1(java.lang.Float)` was removed +* `withLearningRate(java.lang.Float)` was removed * `withWarmupCosineLRCycles(java.lang.Float)` was removed -* `withStepLRGamma(java.lang.Float)` was removed -* `withWeightDecay(java.lang.Float)` was removed * `withBeta2(java.lang.Float)` was removed -* `withLearningRate(java.lang.Float)` was removed -* `validate()` was removed +* `withStepLRGamma(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed #### `models.QueueSettings` was modified @@ -974,12 +974,12 @@ #### `models.Databricks` was modified -* `modifiedOn()` was removed * `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed +* `createdOn()` was removed * `provisioningErrors()` was removed * `validate()` was removed -* `createdOn()` was removed -* `provisioningState()` was removed #### `models.PrivateEndpointConnection$Update` was modified @@ -1003,11 +1003,11 @@ #### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified -* `createdByWorkspaceArmId()` was removed -* `withValueFormat(models.ValueFormat)` was removed * `withValue(java.lang.String)` was removed -* `group()` was removed +* `withValueFormat(models.ValueFormat)` was removed * `validate()` was removed +* `group()` was removed +* `createdByWorkspaceArmId()` was removed #### `models.UriFileJobInput` was modified @@ -1015,12 +1015,12 @@ #### `models.ComputeInstance` was modified -* `provisioningState()` was removed -* `validate()` was removed +* `createdOn()` was removed * `isAttachedCompute()` was removed +* `provisioningState()` was removed * `modifiedOn()` was removed -* `createdOn()` was removed * `provisioningErrors()` was removed +* `validate()` was removed #### `models.AnonymousAccessCredential` was modified @@ -1030,11 +1030,11 @@ #### `models.SkuCapacity` was modified * `SkuCapacity()` was changed to private access -* `withDefaultProperty(java.lang.Integer)` was removed -* `withScaleType(models.SkuScaleType)` was removed -* `validate()` was removed * `withMaximum(java.lang.Integer)` was removed +* `validate()` was removed +* `withDefaultProperty(java.lang.Integer)` was removed * `withMinimum(java.lang.Integer)` was removed +* `withScaleType(models.SkuScaleType)` was removed #### `models.WorkspaceConnections` was modified @@ -1055,12 +1055,12 @@ #### `models.ComputeInstanceContainer` was modified * `ComputeInstanceContainer()` was changed to private access -* `withAutosave(models.Autosave)` was removed +* `withName(java.lang.String)` was removed * `withGpu(java.lang.String)` was removed -* `withNetwork(models.Network)` was removed * `withEnvironment(models.ComputeInstanceEnvironmentInfo)` was removed -* `withName(java.lang.String)` was removed +* `withAutosave(models.Autosave)` was removed * `validate()` was removed +* `withNetwork(models.Network)` was removed #### `models.UriFileJobOutput` was modified @@ -1108,11 +1108,11 @@ #### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed * `withValue(java.lang.String)` was removed -* `validate()` was removed +* `withValueFormat(models.ValueFormat)` was removed * `group()` was removed * `createdByWorkspaceArmId()` was removed +* `validate()` was removed #### `models.NotebookPreparationError` was modified @@ -1156,10 +1156,10 @@ #### `models.ImageMetadata` was modified * `ImageMetadata()` was changed to private access +* `withCurrentImageVersion(java.lang.String)` was removed * `validate()` was removed -* `withIsLatestOsImageVersion(java.lang.Boolean)` was removed * `withLatestImageVersion(java.lang.String)` was removed -* `withCurrentImageVersion(java.lang.String)` was removed +* `withIsLatestOsImageVersion(java.lang.Boolean)` was removed #### `models.ScheduleActionBase` was modified @@ -1179,19 +1179,19 @@ #### `models.CustomKeysWorkspaceConnectionProperties` was modified -* `withValue(java.lang.String)` was removed -* `group()` was removed * `validate()` was removed +* `group()` was removed * `withValueFormat(models.ValueFormat)` was removed * `createdByWorkspaceArmId()` was removed +* `withValue(java.lang.String)` was removed #### `models.CertificateDatastoreCredentials` was modified * `withClientId(java.util.UUID)` was removed * `validate()` was removed +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` * `withTenantId(java.util.UUID)` was removed * `java.util.UUID clientId()` -> `java.lang.String clientId()` -* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` #### `models.CustomKeys` was modified @@ -1207,19 +1207,19 @@ #### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified +* `validate()` was removed * `withValue(java.lang.String)` was removed * `withValueFormat(models.ValueFormat)` was removed -* `group()` was removed * `createdByWorkspaceArmId()` was removed -* `validate()` was removed +* `group()` was removed #### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified * `validate()` was removed -* `group()` was removed * `withValueFormat(models.ValueFormat)` was removed * `withValue(java.lang.String)` was removed * `createdByWorkspaceArmId()` was removed +* `group()` was removed #### `models.ServiceManagedResourcesSettings` was modified @@ -1235,8 +1235,8 @@ #### `models.AzureFileDatastore` was modified -* `validate()` was removed * `isDefault()` was removed +* `validate()` was removed #### `models.ManagedNetworkProvisionOptions` was modified @@ -1250,43 +1250,43 @@ #### `models.WorkspaceUpdateParameters` was modified * `WorkspaceUpdateParameters()` was removed -* `fromJson(com.azure.json.JsonReader)` was removed +* `withEnableDataIsolation(java.lang.Boolean)` was removed +* `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -> `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` +* `withSku(models.Sku)` was removed +* `java.lang.String containerRegistry()` -> `java.lang.String containerRegistry()` +* `java.lang.String primaryUserAssignedIdentity()` -> `java.lang.String primaryUserAssignedIdentity()` +* `java.lang.Boolean enableDataIsolation()` -> `java.lang.Boolean enableDataIsolation()` +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` * `validate()` was removed +* `withServerlessComputeSettings(models.ServerlessComputeSettings)` was removed +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed * `models.FeatureStoreSettings featureStoreSettings()` -> `models.FeatureStoreSettings featureStoreSettings()` -* `withDescription(java.lang.String)` was removed -* `withIdentity(models.ManagedServiceIdentity)` was removed -* `java.lang.String applicationInsights()` -> `java.lang.String applicationInsights()` -* `withApplicationInsights(java.lang.String)` was removed -* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` -* `withTags(java.util.Map)` was removed -* `java.lang.String description()` -> `java.lang.String description()` -* `java.lang.String friendlyName()` -> `java.lang.String friendlyName()` * `withEncryption(models.EncryptionUpdateProperties)` was removed +* `fromJson(com.azure.json.JsonReader)` was removed +* `withIdentity(models.ManagedServiceIdentity)` was removed * `models.EncryptionUpdateProperties encryption()` -> `models.EncryptionUpdateProperties encryption()` -* `models.Sku sku()` -> `models.Sku sku()` -* `withSku(models.Sku)` was removed -* `java.lang.Boolean enableDataIsolation()` -> `java.lang.Boolean enableDataIsolation()` -* `withEnableDataIsolation(java.lang.Boolean)` was removed +* `withApplicationInsights(java.lang.String)` was removed +* `java.lang.String applicationInsights()` -> `java.lang.String applicationInsights()` * `withV1LegacyMode(java.lang.Boolean)` was removed -* `toJson(com.azure.json.JsonWriter)` was removed -* `withImageBuildCompute(java.lang.String)` was removed -* `withFeatureStoreSettings(models.FeatureStoreSettings)` was removed -* `withManagedNetwork(fluent.models.ManagedNetworkSettingsInner)` was removed -* `models.ServerlessComputeSettings serverlessComputeSettings()` -> `models.ServerlessComputeSettings serverlessComputeSettings()` * `java.lang.Boolean v1LegacyMode()` -> `java.lang.Boolean v1LegacyMode()` -* `withServerlessComputeSettings(models.ServerlessComputeSettings)` was removed -* `fluent.models.ManagedNetworkSettingsInner managedNetwork()` -> `models.ManagedNetworkSettings managedNetwork()` +* `withManagedNetwork(fluent.models.ManagedNetworkSettingsInner)` was removed * `withFriendlyName(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed +* `withFeatureStoreSettings(models.FeatureStoreSettings)` was removed +* `java.util.Map tags()` -> `java.util.Map tags()` +* `fluent.models.ManagedNetworkSettingsInner managedNetwork()` -> `models.ManagedNetworkSettings managedNetwork()` * `withContainerRegistry(java.lang.String)` was removed -* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed +* `withImageBuildCompute(java.lang.String)` was removed +* `withTags(java.util.Map)` was removed +* `java.lang.String friendlyName()` -> `java.lang.String friendlyName()` * `withServiceManagedResourcesSettings(models.ServiceManagedResourcesSettings)` was removed -* `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -> `models.ServiceManagedResourcesSettings serviceManagedResourcesSettings()` -* `java.lang.String containerRegistry()` -> `java.lang.String containerRegistry()` -* `java.lang.String primaryUserAssignedIdentity()` -> `java.lang.String primaryUserAssignedIdentity()` -* `java.util.Map tags()` -> `java.util.Map tags()` +* `java.lang.String description()` -> `java.lang.String description()` * `withPrimaryUserAssignedIdentity(java.lang.String)` was removed -* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccess publicNetworkAccess()` +* `models.ServerlessComputeSettings serverlessComputeSettings()` -> `models.ServerlessComputeSettings serverlessComputeSettings()` +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `toJson(com.azure.json.JsonWriter)` was removed * `java.lang.String imageBuildCompute()` -> `java.lang.String imageBuildCompute()` +* `models.Sku sku()` -> `models.Sku sku()` #### `models.ComputeRuntimeDto` was modified @@ -1372,15 +1372,15 @@ * `DiagnoseResponseResultValue()` was changed to private access * `withUserDefinedRouteResults(java.util.List)` was removed -* `withResourceLockResults(java.util.List)` was removed +* `withKeyVaultResults(java.util.List)` was removed * `withNetworkSecurityRuleResults(java.util.List)` was removed -* `validate()` was removed * `withContainerRegistryResults(java.util.List)` was removed -* `withStorageAccountResults(java.util.List)` was removed -* `withOtherResults(java.util.List)` was removed +* `withResourceLockResults(java.util.List)` was removed * `withApplicationInsightsResults(java.util.List)` was removed +* `validate()` was removed * `withDnsResolutionResults(java.util.List)` was removed -* `withKeyVaultResults(java.util.List)` was removed +* `withOtherResults(java.util.List)` was removed +* `withStorageAccountResults(java.util.List)` was removed #### `models.SasDatastoreCredentials` was modified @@ -1388,11 +1388,11 @@ #### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified -* `validate()` was removed -* `withValueFormat(models.ValueFormat)` was removed -* `withValue(java.lang.String)` was removed * `group()` was removed * `createdByWorkspaceArmId()` was removed +* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `validate()` was removed #### `models.AksNetworkingConfiguration` was modified @@ -1405,8 +1405,8 @@ #### `models.DatabricksComputeSecrets` was modified * `DatabricksComputeSecrets()` was changed to private access -* `validate()` was removed * `withDatabricksAccessToken(java.lang.String)` was removed +* `validate()` was removed #### `models.ImageModelDistributionSettings` was modified @@ -1418,18 +1418,18 @@ #### `models.AadAuthTypeWorkspaceConnectionProperties` was modified +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed * `withValue(java.lang.String)` was removed * `createdByWorkspaceArmId()` was removed * `validate()` was removed -* `withValueFormat(models.ValueFormat)` was removed -* `group()` was removed #### `models.BlobReferenceForConsumptionDto` was modified * `BlobReferenceForConsumptionDto()` was changed to private access +* `withCredential(models.PendingUploadCredentialDto)` was removed * `validate()` was removed * `withBlobUri(java.lang.String)` was removed -* `withCredential(models.PendingUploadCredentialDto)` was removed * `withStorageAccountArmId(java.lang.String)` was removed #### `models.VolumeDefinition` was modified @@ -1463,23 +1463,23 @@ #### `models.ManagedServiceIdentity` was modified -* `java.util.UUID principalId()` -> `java.lang.String principalId()` * `validate()` was removed +* `java.util.UUID principalId()` -> `java.lang.String principalId()` * `java.util.UUID tenantId()` -> `java.lang.String tenantId()` #### `models.EstimatedVMPrices` was modified * `EstimatedVMPrices()` was changed to private access -* `validate()` was removed -* `withValues(java.util.List)` was removed * `withBillingCurrency(models.BillingCurrency)` was removed * `withUnitOfMeasure(models.UnitOfMeasure)` was removed +* `withValues(java.util.List)` was removed +* `validate()` was removed #### `models.ServerlessInferenceEndpoint` was modified * `ServerlessInferenceEndpoint()` was changed to private access -* `withUri(java.lang.String)` was removed * `validate()` was removed +* `withUri(java.lang.String)` was removed #### `models.TextClassificationMultilabel` was modified @@ -1500,10 +1500,10 @@ #### `models.AksComputeSecrets` was modified * `AksComputeSecrets()` was changed to private access +* `validate()` was removed * `withImagePullSecretName(java.lang.String)` was removed -* `withUserKubeConfig(java.lang.String)` was removed * `withAdminKubeConfig(java.lang.String)` was removed -* `validate()` was removed +* `withUserKubeConfig(java.lang.String)` was removed #### `models.PersonalComputeInstanceSettings` was modified @@ -1520,9 +1520,9 @@ #### `models.VirtualMachineSize` was modified * `VirtualMachineSize()` was changed to private access -* `validate()` was removed * `withSupportedComputeTypes(java.util.List)` was removed * `withEstimatedVMPrices(models.EstimatedVMPrices)` was removed +* `validate()` was removed #### `models.ModelSettings` was modified @@ -1614,17 +1614,17 @@ #### `models.GetBlobReferenceForConsumptionDto` was modified * `GetBlobReferenceForConsumptionDto()` was changed to private access -* `withStorageAccountArmId(java.lang.String)` was removed -* `validate()` was removed * `withBlobUri(java.lang.String)` was removed * `withCredential(models.DataReferenceCredential)` was removed +* `validate()` was removed +* `withStorageAccountArmId(java.lang.String)` was removed #### `models.SkuSetting` was modified * `SkuSetting()` was changed to private access * `withName(java.lang.String)` was removed -* `validate()` was removed * `withTier(models.SkuTier)` was removed +* `validate()` was removed #### `models.MonitorEmailNotificationSettings` was modified @@ -1663,9 +1663,9 @@ #### `models.SasAuthTypeWorkspaceConnectionProperties` was modified +* `withValueFormat(models.ValueFormat)` was removed * `createdByWorkspaceArmId()` was removed * `group()` was removed -* `withValueFormat(models.ValueFormat)` was removed * `validate()` was removed * `withValue(java.lang.String)` was removed @@ -1676,8 +1676,8 @@ #### `models.SasCredentialDto` was modified * `SasCredentialDto()` was changed to private access -* `validate()` was removed * `withSasUri(java.lang.String)` was removed +* `validate()` was removed #### `models.ServiceTagOutboundRule` was modified @@ -1694,9 +1694,9 @@ #### `models.FqdnEndpoint` was modified * `FqdnEndpoint()` was changed to private access -* `withEndpointDetails(java.util.List)` was removed -* `validate()` was removed * `withDomainName(java.lang.String)` was removed +* `validate()` was removed +* `withEndpointDetails(java.util.List)` was removed #### `models.MLTableJobInput` was modified @@ -1713,8 +1713,8 @@ #### `models.WorkspaceConnectionOAuth2` was modified * `validate()` was removed -* `java.util.UUID clientId()` -> `java.lang.String clientId()` * `withClientId(java.util.UUID)` was removed +* `java.util.UUID clientId()` -> `java.lang.String clientId()` #### `models.PartialRegistryPartialTrackedResource` was modified @@ -1730,9 +1730,9 @@ #### `models.EncryptionProperty` was modified +* `validate()` was removed * `withKeyVaultProperties(models.EncryptionKeyVaultProperties)` was removed * `models.EncryptionKeyVaultProperties keyVaultProperties()` -> `models.KeyVaultProperties keyVaultProperties()` -* `validate()` was removed #### `models.FeaturestoreEntityVersionProperties` was modified @@ -1740,8 +1740,8 @@ #### `models.CommandJob` was modified -* `status()` was removed * `validate()` was removed +* `status()` was removed #### `models.NumericalDataDriftMetricThreshold` was modified @@ -1759,11 +1759,11 @@ #### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified +* `group()` was removed * `withValueFormat(models.ValueFormat)` was removed * `withValue(java.lang.String)` was removed * `validate()` was removed * `createdByWorkspaceArmId()` was removed -* `group()` was removed #### `models.RegistryListCredentialsResult` was modified @@ -1777,11 +1777,11 @@ #### `models.ServicePrincipalDatastoreCredentials` was modified -* `withClientId(java.util.UUID)` was removed -* `withTenantId(java.util.UUID)` was removed -* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` * `java.util.UUID clientId()` -> `java.lang.String clientId()` +* `java.util.UUID tenantId()` -> `java.lang.String tenantId()` +* `withTenantId(java.util.UUID)` was removed * `validate()` was removed +* `withClientId(java.util.UUID)` was removed #### `models.ServiceTagDestination` was modified @@ -1805,12 +1805,12 @@ #### `models.DataFactory` was modified -* `isAttachedCompute()` was removed * `modifiedOn()` was removed -* `provisioningState()` was removed * `createdOn()` was removed -* `validate()` was removed * `provisioningErrors()` was removed +* `isAttachedCompute()` was removed +* `provisioningState()` was removed +* `validate()` was removed #### `models.CustomTargetRollingWindowSize` was modified @@ -1838,21 +1838,21 @@ #### `models.ImageModelSettings` was modified -* `withBeta2(java.lang.Float)` was removed -* `withWarmupCosineLRCycles(java.lang.Float)` was removed -* `withMomentum(java.lang.Float)` was removed +* `java.lang.Float weightDecay()` -> `java.lang.Double weightDecay()` +* `validate()` was removed * `withStepLRGamma(java.lang.Float)` was removed -* `withLearningRate(java.lang.Float)` was removed -* `java.lang.Float warmupCosineLRCycles()` -> `java.lang.Double warmupCosineLRCycles()` * `withWeightDecay(java.lang.Float)` was removed -* `withBeta1(java.lang.Float)` was removed +* `java.lang.Float momentum()` -> `java.lang.Double momentum()` +* `java.lang.Float warmupCosineLRCycles()` -> `java.lang.Double warmupCosineLRCycles()` +* `java.lang.Float beta2()` -> `java.lang.Double beta2()` +* `withBeta2(java.lang.Float)` was removed +* `withMomentum(java.lang.Float)` was removed * `java.lang.Float beta1()` -> `java.lang.Double beta1()` +* `withWarmupCosineLRCycles(java.lang.Float)` was removed * `java.lang.Float learningRate()` -> `java.lang.Double learningRate()` -* `java.lang.Float weightDecay()` -> `java.lang.Double weightDecay()` -* `java.lang.Float momentum()` -> `java.lang.Double momentum()` -* `validate()` was removed * `java.lang.Float stepLRGamma()` -> `java.lang.Double stepLRGamma()` -* `java.lang.Float beta2()` -> `java.lang.Double beta2()` +* `withLearningRate(java.lang.Float)` was removed +* `withBeta1(java.lang.Float)` was removed #### `models.CustomMonitoringSignal` was modified @@ -1872,11 +1872,11 @@ #### `models.ManagedIdentity` was modified +* `withObjectId(java.util.UUID)` was removed * `validate()` was removed * `java.util.UUID clientId()` -> `java.lang.String clientId()` -* `withClientId(java.util.UUID)` was removed * `java.util.UUID objectId()` -> `java.lang.String objectId()` -* `withObjectId(java.util.UUID)` was removed +* `withClientId(java.util.UUID)` was removed #### `models.CreateMonitorAction` was modified @@ -1921,8 +1921,8 @@ #### `models.SweepJob` was modified -* `validate()` was removed * `status()` was removed +* `validate()` was removed #### `models.AutoSeasonality` was modified @@ -1986,8 +1986,8 @@ #### `models.AutoMLJob` was modified -* `validate()` was removed * `status()` was removed +* `validate()` was removed #### `models.AmlTokenComputeIdentity` was modified @@ -2015,17 +2015,17 @@ #### `models.HDInsight` was modified +* `createdOn()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed * `provisioningState()` was removed * `provisioningErrors()` was removed -* `isAttachedCompute()` was removed * `validate()` was removed -* `modifiedOn()` was removed -* `createdOn()` was removed #### `models.KubernetesOnlineDeployment` was modified -* `provisioningState()` was removed * `validate()` was removed +* `provisioningState()` was removed #### `models.AccountKeyDatastoreSecrets` was modified @@ -2074,11 +2074,11 @@ #### `models.ComputeInstanceLastOperation` was modified * `ComputeInstanceLastOperation()` was changed to private access -* `withOperationTime(java.time.OffsetDateTime)` was removed -* `withOperationTrigger(models.OperationTrigger)` was removed -* `withOperationName(models.OperationName)` was removed * `withOperationStatus(models.OperationStatus)` was removed +* `withOperationTrigger(models.OperationTrigger)` was removed * `validate()` was removed +* `withOperationName(models.OperationName)` was removed +* `withOperationTime(java.time.OffsetDateTime)` was removed #### `models.ForecastingSettings` was modified @@ -2134,10 +2134,10 @@ #### `models.PatAuthTypeWorkspaceConnectionProperties` was modified -* `withValueFormat(models.ValueFormat)` was removed -* `withValue(java.lang.String)` was removed * `createdByWorkspaceArmId()` was removed * `validate()` was removed +* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed * `group()` was removed #### `models.ComputeSchedules` was modified @@ -2528,8 +2528,8 @@ #### `models.DiagnoseRequestProperties` was modified -* `withRequiredResourceProviders(java.util.Map)` was added * `requiredResourceProviders()` was added +* `withRequiredResourceProviders(java.util.Map)` was added #### `models.ConnectionCategory` was modified @@ -2554,13 +2554,13 @@ #### `models.WorkspaceConnectionPropertiesV2` was modified -* `withPeRequirement(models.ManagedPERequirement)` was added * `peRequirement()` was added -* `error()` was added -* `withError(java.lang.String)` was added -* `peStatus()` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `peStatus()` was added +* `error()` was added * `useWorkspaceManagedIdentity()` was added +* `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added #### `models.BanditPolicy` was modified @@ -2575,23 +2575,23 @@ #### `models.MLFlowModelJobOutput` was modified -* `withAssetName(java.lang.String)` was added * `assetName()` was added +* `withAssetName(java.lang.String)` was added #### `models.ImageModelSettingsObjectDetection` was modified +* `withTilePredictionsNmsThreshold(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added * `withWarmupCosineLRCycles(java.lang.Double)` was added -* `withBeta1(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added +* `withLearningRate(java.lang.Double)` was added * `withBeta2(java.lang.Double)` was added * `withBoxScoreThreshold(java.lang.Double)` was added -* `withLearningRate(java.lang.Double)` was added * `withWeightDecay(java.lang.Double)` was added +* `withBeta1(java.lang.Double)` was added +* `withValidationIouThreshold(java.lang.Double)` was added * `withTileOverlapRatio(java.lang.Double)` was added -* `withTilePredictionsNmsThreshold(java.lang.Double)` was added * `withNmsIouThreshold(java.lang.Double)` was added -* `withStepLRGamma(java.lang.Double)` was added -* `withMomentum(java.lang.Double)` was added -* `withValidationIouThreshold(java.lang.Double)` was added #### `models.ComputeInstanceState` was modified @@ -2608,17 +2608,17 @@ #### `models.Workspace$Update` was modified -* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added -* `withIpAllowlist(java.util.List)` was added * `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added -* `withNetworkAcls(models.NetworkAcls)` was added * `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added +* `withNetworkAcls(models.NetworkAcls)` was added * `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added +* `withIpAllowlist(java.util.List)` was added #### `models.Image` was modified -* `withVersion(java.lang.String)` was added * `version()` was added +* `withVersion(java.lang.String)` was added #### `models.PrivateEndpointConnection$Definition` was modified @@ -2626,18 +2626,18 @@ #### `models.ModelVersionProperties` was modified -* `datasets()` was added * `withDatasets(java.util.List)` was added +* `datasets()` was added #### `models.OnlineDeploymentProperties` was modified -* `startupProbe()` was added * `withStartupProbe(models.ProbeSettings)` was added +* `startupProbe()` was added #### `models.InferenceContainerProperties` was modified -* `startupRoute()` was added * `withStartupRoute(models.Route)` was added +* `startupRoute()` was added #### `models.OperationStatus` was modified @@ -2650,14 +2650,14 @@ #### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added -* `withPeStatus(models.ManagedPEStatus)` was added * `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added #### `models.PrivateEndpointOutboundRule` was modified -* `fqdns()` was added * `withFqdns(java.util.List)` was added +* `fqdns()` was added #### `models.Workspaces` was modified @@ -2675,16 +2675,16 @@ #### `models.Computes` was modified -* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `getAllowedResizeSizes(java.lang.String,java.lang.String,java.lang.String)` was added * `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema,com.azure.core.util.Context)` was added * `updateIdleShutdownSetting(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting)` was added -* `getAllowedResizeSizes(java.lang.String,java.lang.String,java.lang.String)` was added -* `updateDataMountsWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added -* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema)` was added * `updateDataMounts(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added * `updateCustomServices(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added * `updateIdleShutdownSettingWithResponse(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting,com.azure.core.util.Context)` was added -* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema)` was added +* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `updateDataMountsWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added #### `models.ConnectionAuthType` was modified @@ -2698,25 +2698,25 @@ #### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added -* `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added #### `models.Workspace$Definition` was modified -* `withKeyVaults(java.util.List)` was added +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added * `withStorageAccounts(java.util.List)` was added -* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added * `withIpAllowlist(java.util.List)` was added -* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added +* `withExistingWorkspaces(java.util.List)` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `withKeyVaults(java.util.List)` was added * `withEnableSimplifiedCmk(java.lang.Boolean)` was added * `withEnableServiceSideCmkEncryption(java.lang.Boolean)` was added -* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added * `withContainerRegistries(java.util.List)` was added -* `withNetworkAcls(models.NetworkAcls)` was added * `withProvisionNetworkNow(java.lang.Boolean)` was added -* `withExistingWorkspaces(java.util.List)` was added * `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added #### `models.Datastores` was modified @@ -2734,12 +2734,12 @@ #### `models.ImageModelSettingsClassification` was modified * `withWeightDecay(java.lang.Double)` was added -* `withMomentum(java.lang.Double)` was added +* `withBeta2(java.lang.Double)` was added * `withWarmupCosineLRCycles(java.lang.Double)` was added +* `withMomentum(java.lang.Double)` was added +* `withBeta1(java.lang.Double)` was added * `withLearningRate(java.lang.Double)` was added * `withStepLRGamma(java.lang.Double)` was added -* `withBeta2(java.lang.Double)` was added -* `withBeta1(java.lang.Double)` was added #### `models.PrivateEndpointConnection$Update` was modified @@ -2747,40 +2747,40 @@ #### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified -* `withPeStatus(models.ManagedPEStatus)` was added * `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.WorkspaceConnections` was modified +* `testConnection(java.lang.String,java.lang.String,java.lang.String)` was added * `testConnection(java.lang.String,java.lang.String,java.lang.String,fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added * `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added -* `testConnection(java.lang.String,java.lang.String,java.lang.String)` was added #### `models.ManagedNetworkSettings` was modified -* `firewallPublicIpAddress()` was added -* `enableNetworkMonitor()` was added * `managedNetworkKind()` was added * `firewallSku()` was added +* `enableNetworkMonitor()` was added +* `firewallPublicIpAddress()` was added #### `models.Workspace` was modified +* `storageAccounts()` was added +* `keyVaults()` was added * `enableSimplifiedCmk()` was added -* `provisionNetworkNow()` was added -* `containerRegistries()` was added +* `allowRoleAssignmentOnRG()` was added +* `existingWorkspaces()` was added * `networkAcls()` was added -* `keyVaults()` was added +* `containerRegistries()` was added * `agentsEndpointUri()` was added +* `softDeleteRetentionInDays()` was added +* `enableServiceSideCmkEncryption()` was added +* `systemDatastoresAuthMode()` was added * `ipAllowlist()` was added -* `allowRoleAssignmentOnRG()` was added * `enableSoftwareBillOfMaterials()` was added -* `systemDatastoresAuthMode()` was added -* `enableServiceSideCmkEncryption()` was added -* `softDeleteRetentionInDays()` was added -* `existingWorkspaces()` was added -* `storageAccounts()` was added +* `provisionNetworkNow()` was added #### `models.UriFileJobOutput` was modified @@ -2793,32 +2793,32 @@ #### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified -* `withPeRequirement(models.ManagedPERequirement)` was added * `withPeStatus(models.ManagedPEStatus)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `MachineLearningManager` was modified -* `connectionRaiPolicies()` was added -* `raiPoliciesOperations()` was added -* `managedNetworkSettingsOperations()` was added -* `connectionRaiBlocklistItems()` was added +* `connectionRaiBlocklists()` was added * `endpoints()` was added -* `connectionRaiBlocklistsOperations()` was added -* `outboundRules()` was added -* `connections()` was added -* `inferenceEndpoints()` was added * `raiPolicies()` was added -* `endpointDeployments()` was added -* `connectionRaiBlocklistItemsOperations()` was added -* `outboundRulesOperations()` was added +* `connectionRaiBlocklistsOperations()` was added +* `connectionRaiPolicies()` was added * `pTUQuotas()` was added -* `inferencePools()` was added -* `connectionRaiPoliciesOperations()` was added -* `connectionRaiBlocklists()` was added * `capabilityHosts()` was added +* `outboundRulesOperations()` was added +* `inferencePools()` was added +* `endpointDeployments()` was added * `inferenceGroups()` was added +* `outboundRules()` was added +* `connectionRaiBlocklistItemsOperations()` was added +* `managedNetworkSettingsOperations()` was added +* `connections()` was added +* `connectionRaiPoliciesOperations()` was added +* `inferenceEndpoints()` was added +* `connectionRaiBlocklistItems()` was added +* `raiPoliciesOperations()` was added #### `models.ImageMetadata` was modified @@ -2827,27 +2827,27 @@ #### `models.CustomKeysWorkspaceConnectionProperties` was modified * `withPeStatus(models.ManagedPEStatus)` was added -* `withError(java.lang.String)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added #### `models.CertificateDatastoreCredentials` was modified -* `withTenantId(java.lang.String)` was added * `withClientId(java.lang.String)` was added +* `withTenantId(java.lang.String)` was added #### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified -* `withError(java.lang.String)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added #### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added * `withPeStatus(models.ManagedPEStatus)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added #### `models.SparkJob` was modified @@ -2856,22 +2856,22 @@ #### `models.WorkspacePropertiesUpdateParameters` was modified +* `networkAcls()` was added +* `softDeleteRetentionInDays()` was added * `allowRoleAssignmentOnRG()` was added * `enableSoftwareBillOfMaterials()` was added -* `networkAcls()` was added -* `systemDatastoresAuthMode()` was added * `ipAllowlist()` was added -* `softDeleteRetentionInDays()` was added +* `systemDatastoresAuthMode()` was added #### `models.WorkspaceUpdateParameters` was modified -* `allowRoleAssignmentOnRG()` was added -* `ipAllowlist()` was added -* `enableSoftwareBillOfMaterials()` was added * `systemDatastoresAuthMode()` was added -* `networkAcls()` was added * `softDeleteRetentionInDays()` was added +* `enableSoftwareBillOfMaterials()` was added +* `allowRoleAssignmentOnRG()` was added * `innerModel()` was added +* `ipAllowlist()` was added +* `networkAcls()` was added #### `models.UriFolderJobOutput` was modified @@ -2886,56 +2886,56 @@ #### `models.MLTableJobOutput` was modified -* `assetName()` was added * `withAssetName(java.lang.String)` was added +* `assetName()` was added #### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified -* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added -* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added #### `models.CustomService` was modified -* `kernel()` was added * `withKernel(models.JupyterKernelConfig)` was added +* `kernel()` was added #### `models.AadAuthTypeWorkspaceConnectionProperties` was modified * `withError(java.lang.String)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeRequirement(models.ManagedPERequirement)` was added * `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added #### `models.TritonModelJobOutput` was modified -* `assetName()` was added * `withAssetName(java.lang.String)` was added +* `assetName()` was added #### `models.WorkspaceConnectionPropertiesV2BasicResource` was modified * `testConnection()` was added -* `testConnection(fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added * `resourceGroupName()` was added * `update()` was added +* `testConnection(fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added #### `models.WorkspaceProperties` was modified -* `enableSoftwareBillOfMaterials()` was added -* `ipAllowlist()` was added -* `softDeleteRetentionInDays()` was added -* `existingWorkspaces()` was added -* `networkAcls()` was added -* `provisionNetworkNow()` was added -* `agentsEndpointUri()` was added -* `allowRoleAssignmentOnRG()` was added * `systemDatastoresAuthMode()` was added -* `enableSimplifiedCmk()` was added -* `storageAccounts()` was added * `containerRegistries()` was added +* `networkAcls()` was added +* `existingWorkspaces()` was added +* `allowRoleAssignmentOnRG()` was added +* `enableSoftwareBillOfMaterials()` was added +* `provisionNetworkNow()` was added +* `softDeleteRetentionInDays()` was added * `enableServiceSideCmkEncryption()` was added * `keyVaults()` was added +* `enableSimplifiedCmk()` was added +* `storageAccounts()` was added +* `ipAllowlist()` was added +* `agentsEndpointUri()` was added #### `models.OutboundRule` was modified @@ -2944,16 +2944,16 @@ #### `models.ComputeResource` was modified -* `updateDataMounts(java.util.List)` was added -* `resize(models.ResizeSchema)` was added -* `updateCustomServicesWithResponse(java.util.List,com.azure.core.util.Context)` was added -* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added * `updateCustomServices(java.util.List)` was added -* `updateIdleShutdownSetting(models.IdleShutdownSetting)` was added -* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added -* `getAllowedResizeSizes()` was added +* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added * `updateIdleShutdownSettingWithResponse(models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `getAllowedResizeSizes()` was added * `getAllowedResizeSizesWithResponse(com.azure.core.util.Context)` was added +* `updateIdleShutdownSetting(models.IdleShutdownSetting)` was added +* `updateCustomServicesWithResponse(java.util.List,com.azure.core.util.Context)` was added +* `updateDataMounts(java.util.List)` was added +* `resize(models.ResizeSchema)` was added +* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added #### `models.CustomModelJobOutput` was modified @@ -2966,10 +2966,10 @@ #### `models.SasAuthTypeWorkspaceConnectionProperties` was modified -* `withError(java.lang.String)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withPeStatus(models.ManagedPEStatus)` was added * `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added #### `models.WorkspaceConnectionOAuth2` was modified @@ -2977,13 +2977,13 @@ #### `models.EncryptionProperty` was modified +* `withStorageAccountResourceId(java.lang.String)` was added * `withKeyVaultProperties(models.KeyVaultProperties)` was added * `withCosmosDbResourceId(java.lang.String)` was added -* `withSearchAccountResourceId(java.lang.String)` was added * `cosmosDbResourceId()` was added -* `searchAccountResourceId()` was added -* `withStorageAccountResourceId(java.lang.String)` was added * `storageAccountResourceId()` was added +* `withSearchAccountResourceId(java.lang.String)` was added +* `searchAccountResourceId()` was added #### `models.CommandJob` was modified @@ -2993,13 +2993,13 @@ * `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added -* `withPeStatus(models.ManagedPEStatus)` was added * `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added #### `models.ServicePrincipalDatastoreCredentials` was modified -* `withTenantId(java.lang.String)` was added * `withClientId(java.lang.String)` was added +* `withTenantId(java.lang.String)` was added #### `models.ServiceTagDestination` was modified @@ -3011,13 +3011,13 @@ #### `models.ImageModelSettings` was modified +* `withLearningRate(java.lang.Double)` was added +* `withWarmupCosineLRCycles(java.lang.Double)` was added * `withBeta1(java.lang.Double)` was added -* `withStepLRGamma(java.lang.Double)` was added * `withWeightDecay(java.lang.Double)` was added +* `withStepLRGamma(java.lang.Double)` was added * `withMomentum(java.lang.Double)` was added -* `withLearningRate(java.lang.Double)` was added * `withBeta2(java.lang.Double)` was added -* `withWarmupCosineLRCycles(java.lang.Double)` was added #### `models.ManagedIdentity` was modified @@ -3026,18 +3026,18 @@ #### `models.ComputeInstanceProperties` was modified -* `withEnableSSO(java.lang.Boolean)` was added -* `withEnableOSPatching(java.lang.Boolean)` was added -* `enableOSPatching()` was added -* `withAutologgerSettings(models.ComputeInstanceAutologgerSettings)` was added -* `autologgerSettings()` was added -* `enableRootAccess()` was added +* `enableSSO()` was added * `withReleaseQuotaOnStop(java.lang.Boolean)` was added -* `withEnableRootAccess(java.lang.Boolean)` was added * `releaseQuotaOnStop()` was added -* `enableSSO()` was added -* `withIdleTimeBeforeShutdown(java.lang.String)` was added +* `withAutologgerSettings(models.ComputeInstanceAutologgerSettings)` was added +* `enableOSPatching()` was added +* `enableRootAccess()` was added +* `withEnableSSO(java.lang.Boolean)` was added * `idleTimeBeforeShutdown()` was added +* `withEnableOSPatching(java.lang.Boolean)` was added +* `withIdleTimeBeforeShutdown(java.lang.String)` was added +* `withEnableRootAccess(java.lang.Boolean)` was added +* `autologgerSettings()` was added #### `models.ServerlessInferenceEndpointAuthMode` was modified @@ -3058,8 +3058,8 @@ #### `models.ComputeInstanceDataMount` was modified -* `mountMode()` was added * `withMountMode(models.MountMode)` was added +* `mountMode()` was added #### `models.AutoMLJob` was modified @@ -3080,8 +3080,8 @@ #### `models.ContentSafety` was modified -* `withContentSafetyLevel(models.ContentSafetyLevel)` was added * `contentSafetyLevel()` was added +* `withContentSafetyLevel(models.ContentSafetyLevel)` was added #### `models.JobBaseProperties` was modified @@ -3094,10 +3094,10 @@ #### `models.PatAuthTypeWorkspaceConnectionProperties` was modified -* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added * `withError(java.lang.String)` was added * `withPeRequirement(models.ManagedPERequirement)` was added -* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added ## 1.1.0 (2024-08-22) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml b/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml index 2a1567a46927..532f62da7979 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/machinelearningservices/MachineLearningServices.Management -commit: 00ba16307ce7d82e80ad67cff0849a183f19a788 +commit: 8c66db435b08db558d154f98c998f3d9672dab58 repo: Azure/azure-rest-api-specs additionalDirectories: